3

I have calculated the distance between two points using geopanda's gdf.distance() function. I have my distances, but I don't know what unit they are in? My GeoDataFrame has a crs of epsg:4326. I understand that my coordinate system is using decimal degrees (lat/long), and that the distance function calculates the euclidean distance, but what is this distance in?

my code:

move["dist_to_next"] = move.distance(move.shift(-1))

move.groupby(["collarid", "date"]).sum('dist_to_next')["dist_to_next"]

output:

collarid      date      
GSM2014-1613  2019-06-01     0.002557
              2019-06-02     0.003515
              2019-06-03     0.004013
              2019-06-04     0.049162
              2019-06-05     0.036822
                              ...    
GSM2014-1620  2020-11-15    12.478351
              2020-11-16    11.246273
              2020-11-17    13.668699
              2020-11-18    11.488645
              2020-11-19     2.285434
Name: dist_to_next, Length: 1981, dtype: float64
Gregory G
  • 63
  • 3
  • based on : https://stackoverflow.com/questions/63722124/get-distance-between-two-points-in-geopandas it looks like "meters". – JonSG Dec 15 '21 at 19:52
  • Usually the results are in the same units as the data, so degrees – Ian Turton Dec 15 '21 at 19:57
  • Distances between two points specified by lat/long are rarely, if ever, measured in degrees. (I'm not sure a distance in degrees even makes sense unless both points are at the same latitude or on the same line of longitude.) – chepner Dec 15 '21 at 21:13

1 Answers1

0

based on https://gis.stackexchange.com/questions/166675/what-units-are-used-by-geopandas-shapely-area-and-distance-functions it depends on your crs.

to check that use df.crs.axis_info[0].unit_name