calculate_distance
gma.smc.query.calculate_distance
function calculate_distance(points, in_crs = "WGS84", unit = "meter"):
Calculate the distance between two or more input points.
Parameters:
points: list||tuple||array.
The X (longitude), Y (latitude) coordinates of two points (or multiple points) for which distances need to be calculated.
For example: points = [(130.1, 45.2), (131.5, 40.2)]
Optional:
in_crs = str||int||aclassofgmaCoordinateReferenceSystem. Default 'WGS84'.
Coordinate system. Can be EPSG, WKT, Proj4, and other types of coordinate characters or CoordinateReferenceSystem class.
unit = str. Default 'meter'.
The unit in which to calculate the distance result.
Other supported units: 'decimeter', 'centimeter', 'millimeter', 'micron', 'picometer', 'fermi', 'kilometer', 'inch', 'foot', 'yard', 'mile', 'mil', 'point', 'survey foot', 'survey mile', 'nautical mile', 'angstrom', 'astronomical unit', 'light year', 'parsec'.
Returns:
Type: array.