1

I'm trying to calculate the length of a GPS track in ArcGIS 10.3.1. What I've done so far is:

  1. Converted track using the "Points to Line" tool
  2. Opened attribute table
  3. Made new "Length" column
  4. Opened "Field Calculator"
  5. Entered in Python mode, "!Shape!.getLength("GEODESIC","METERS")"

Will this get me the length of the line in meters? It seems like it does but I wanted to double check.

  • Try it by calculating geometry... it should only be slightly different for calculated (projected) and geodesic distances. It might help to project the line first to a UTM spatial reference. – Michael Stimson May 12 '16 at 4:18
  • @MichaelMiles-Stimson When I try to use "Calculate Geometry" to find out the length I'm not given an option to find the length in meters. Just a bunch of X, Y, Z coordinates for the start, mid, or end point of the line. I'm assuming this is because it's not in the correct projection? How would I get it in the correct project? It's currently in GCS. – SRPang May 12 '16 at 4:21
  • 1
    Change your map spatial reference to an appropriate projected spatial reference and Calculate Geometry will offer to use that to calculate the length or use the Project Tool resources.arcgis.com/en/help/main/10.1/index.html#//… to create an output in an appropriate projected spatial reference (something like WGS84/UTM 55 south but choose a zone for your area and hemisphere, unless you're actually around Melbourne, ACT or Cairns etc.). – Michael Stimson May 12 '16 at 4:39
  • @MichaelMiles-Stimson I'll go ahead and use "Project" to convert to PCS UTM WGS 1984. A few questions, is there a way to convert a bunch of polylines (44 total) to a particular projection? Second, where can I find a list of the different zones and what they represent? I'm looking for a projection that encompasses the tip of Baja California Sur (La Paz, BCS, Mexico to be specific). – SRPang May 12 '16 at 4:50
  • Look in your Arc install directory, Reference Systems\UTM.shp (overlay it over your data and identify the polygon that matches) to find the right zone.. search for the tool called 'batch project' this will allow you to do all 44 at once. As I alluded to I'm in the southern hemisphere so I don't know much about northern zones having no need to use them. – Michael Stimson May 12 '16 at 4:56
1

If you export the line (presumably shapefile) to a geodatabase, the Shape_Length field is added automatically and dynamically maintained (splitting, merging, etc. will work)

To calculate a static length, use the Calculate Geometry tool in the attribute table. Right click on the column you wish the calculate -> Calculate Geometry. This is a static calculation and thus not recommended if you area planning on editing the geometry. You will have to recalculate the geometry every time you edit the line and it's shape changes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.