HOW TO

Calculate the latitude and longitude of line segments at regular intervals in ArcGIS Pro

Last Published: March 14, 2024

Summary

Latitude and longitude are geographic coordinates used to specify a location on the Earth’s surface, which allows for precise positioning and navigation. In ArcGIS Pro, the Calculate Geometry Attributes tool is used to calculate the latitude and longitude values of a specific feature geometry by populating the coordinate fields in the attribute table. This method is applicable to line segments at regular intervals, making it useful for traffic analysis, determining the distribution of amenities along the road, or calculating distances between specific locations. This article provides the workflow to calculate the latitude and longitude of line segments at regular intervals in ArcGIS Pro.

Procedure

  1. Open the project in ArcGIS Pro.
  2. Create point features at regular intervals along the line feature using the Generate Points Along Lines tool.
    1. On the Analysis tab, in the Geoprocessing group, click Tools.
    2. In the Geoprocessing pane, search for and click Generate Points Along Lines (Data Management Tools).
    3. In the Generate Points Along Lines pane, for Input Features, select the line feature layer from the drop-down list.
    4. For Output Feature Class, specify a location and name for the output feature class.
    5. For Distance, specify the interval of the point features and the unit. In this example, it is 500 meters.
    6. Click Run.
The Generate Points Along Lines pane
  1. Split the line feature based on its proximity to the point features using the Split Line at Point tool.
    1. On the Analysis tab, in the Geoprocessing group, click Tools.
    2. In the Geoprocessing pane, search for and click Split Line at Point (Data Management Tools).
    3. In the Split Line at Point pane, for Input Features, select the line feature layer from the drop-down list.
    4. For Point Features, select the output feature layer in Step 2 from the drop-down list.
    5. For Output Feature Class, specify a location and name for the output feature class.
    6. For Search Radius, specify the distance to split the line feature and the unit. In this example, it is 5 meters.
    7. Click Run.
The Split Line at Point pane
Note:
Alternatively, divide the line feature into the desired number of line segments using the Divide tool in the Modify Feature pane. Refer to ArcGIS Pro: Divide a polyline by a value for more information.
  1. Calculate the latitude and longitude of each line segment using the Calculate Geometry Attributes tool.
    1. On the Analysis tab, in the Geoprocessing group, click Tools.
    2. In the Geoprocessing pane, search for and click Calculate Geometry Attributes (Data Management Tools).
    3. In the Calculate Geometry Attributes pane, for Input Features, select the output feature layer in Step 3 from the drop-down list.
    4. For Field (Existing or New) under Geometry Attributes, select the latitude and longitude fields from the drop-down list. For Property, select Line start y-coordinate for the latitude field and Line start x-coordinate for the longitude field from the drop-down list.
    5. For Coordinate Format, specify the preferred coordinate format to calculate the XY coordinates of the line segments. Refer to ArcGIS Pro: Parameters for more information.
    6. For Coordinate System, click Select coordinate system The Select coordinate system button to open the Coordinate System window.
    7. In the Coordinate System window, expand Projected Coordinate System or Geographic Coordinate System to specify the coordinate system. In this example, WGS 1984 Web Mercator (auxiliary sphere) is selected. Click OK.
    8. Click Run.
The Calculate Geometry Attributes pane
Note:
Label the latitude and longitude values of each line segment on the map, if necessary. Refer to How To: Display labels from two or more fields in ArcGIS Pro for instructions.

The image below shows the latitude and longitude values for each line segment at 500-meter intervals in ArcGIS Pro.

The latitude and longitude of each line segment

Article ID:000032165

Software:
  • ArcGIS Pro 3 2
  • ArcGIS Pro 3 1
  • ArcGIS Pro 3 0

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options