I have a shape file "Line1.shp". It has only one feature. When I calculate the length in ArcGIS Pro using "Calculate Geometry" and selecting units as "Meters" and coordinate system as "GCS_WGS_1984" it gives 1919.182971
I am trying to calculate the length of line features (in meter unit) using GeoPandas. I use the following code:
import geopandas as gpd fn = "D:/Line1.shp" df = gpd.read_file(fn) df = df.to_crs('EPSG:3857') ps_length = df['geometry'].length print(ps_length)
dtype: float64 **
Using GeoPandas I am getting 2591.493383 as length. I think the above code will return the length in meters units as the unit of measurement of 'EPSG:3857' is in meters.
Why am I getting a different length using these codes? Am I doing anything wrong in choosing the crs?
I have uploaded the shape files in the link. https://drive.google.com/file/d/1TkibJLQJatn2bzNUSM2nRP7TFdYkw3bq/view?usp=sharing