Is it possible to find the longeststraight
distance between a Point
(latitude and longitude) and a Polygon
in Shapely
? I read it's possible to find the closest path, but i'm not sure about the longest.
Find longest "straight" path between Point and Polygon
1.8k Views Asked by Alberto Bonsanto At
1
Try the Hausdorff distance, which is returned by the
g1.hausdorff_distance(g2)
fuction:Keep in mind, Shapely only works in Cartesian space. Your question asks about "latitude and longitude", so these distance units are in degrees. You'd need to project this into a suitable coordinate reference system (CRS) to get more conventional units of length. Furthermore, the definition of "straight path" changes depending on the choice of CRS.