[Gdal-dev] Calculating Polyline lengths in a file

matt.pettis at thomson.com matt.pettis at thomson.com
Tue Nov 7 17:26:57 EST 2006


Is there an easy way to calculate the lengths of polyline objects in a shapefile (i have a shapefile of roads for a county, and want to find the total length)?  Is there an OGR tool to do this, or does anybody know of another tool?
 
I have done this halfway a hard way... I imported my file into PostgreSQL/PostGIS, and applied length2d to it, and got a number.  However, I can't find documentation for what the units of the result are in.  Does anybody know the answer to this question as well, as long as I am here?
 
TIA,
Matt




More information about the Gdal-dev mailing list