acdc.database.saa_distance.Distance3dPointTo3dCoords

Distance3dPointTo3dCoords(lat, lon, polylat, polylon)[source]

Calculate the closest distance between a latitude-longitude query point and a shapely polygon defined by latitude-longitude points using only spherical mathematics, modified from Distance3dPointTo3dPolygon.

Parameters:
  • lat (float) – Latitude of query point in degrees

  • lon (float) – Longitude of query point in degrees

  • polylat (array) – Latitude borders polygon

  • polylon (array) – Longitude borders polygon

  • geom (shapely geometry) – A shapely geometry whose points are in latitude-longitude space

Returns:

dist (float) – The minimum distance in kilometres between the polygon and the query point.