GIS#
Functions for computing geographic coordinates.
- cuspatial.haversine_distance(p1_lon, p1_lat, p2_lon, p2_lat)#
Compute the haversine distances in kilometers between an arbitrary list of lon/lat pairs
- Parameters
- p1_lon
longitude of first set of coords
- p1_lat
latitude of first set of coords
- p2_lon
longitude of second set of coords
- p2_lat
latitude of second set of coords
- Returns
- resultcudf.Series
The distance between all pairs of lon/lat coordinates
- cuspatial.lonlat_to_cartesian(origin_lon, origin_lat, input_lon, input_lat)#
Convert lon/lat to
x,y
coordinates with respect to an origin lon/lat point. Results are scaled relative to the size of the Earth in kilometers.- Parameters
- origin_lon
number
longitude offset (this is subtracted from each input before converting to x,y)
- origin_lat
number
latitude offset (this is subtracted from each input before converting to x,y)
- input_lon
Series
orlist
longitude coordinates to convert to x
- input_lat
Series
orlist
latitude coordinates to convert to y
- origin_lon
- Returns
- resultcudf.DataFrame
- xcudf.Series
x-coordinate of the input relative to the size of the Earth in kilometers.
- ycudf.Series
y-coordinate of the input relative to the size of the Earth in kilometers.