util_geo#

geo_distance#

calc_distance_on_unit_sphere(pt1, pt2[, unit])

Calculate the distance between two points on the unit sphere.

calc_distance_on_unit_haversine(lon1, lat1, ...)

Calculate the great-circle distance between multiple pairs of points on the Earth's surface specified in decimal degrees using the Haversine formula.

find_k_nearest_points(pts, geom_obj, radius)

Find the k nearest points from a list of points to a geometry object (points) within a given radius.

find_closest_point(pt, pts[, k_closest])

Find the closest point from a list of reference points.

get_coordinates_from_geom(geom_obj)

Get the coordinates from a geometry object.

proj_point_to_line(point, line)

Project a point to a line and return the projected point on the line.

Coordinate Conversation#

cvt_wgs84_to_baidu09(wgs84_lng, wgs84_lat)

Convert coordinate from WGS84 to Baidu09.

cvt_wgs84_to_gcj02(wgs84_lng, wgs84_lat)

Convert coordinate from WGS84 to GCJ02.

cvt_gcj02_to_wgs84(gcj_lng, gcj_lat)

Convert coordinate from GCJ02 to WGS84.

cvt_gcj02_to_baidu09(gcj_lng, gcj_lat)

Convert coordinate from GCJ02 to Baidu09.

cvt_baidu09_to_wgs84(baidu_lng, baidu_lat)

Convert coordinate from Baidu09 to WGS84.

cvt_baidu09_to_gcj02(baidu_lng, baidu_lat)

Convert coordinate from Baidu09 to GCJ02.

geo_circle#

create_circle_at_point_with_radius(point, radius)

Generate a polygon by the center point and radius.

geo_area#

calc_area_from_wkt_geometry(wkt_geometry[, ...])

Calculate the area of a geometry in WKT format.

Download Elevation Tiff File#

download_elevation_tif_by(bbox, output_file)

Download elevation data (TIFF) from USGS National Map based on a bounding box.

gmns_geo#

gmns_Node

gmns_Link

gmns_POI

gmns_Zone

gmns_Agent

gmns_read_node([node_file, cpu_cores, verbose])

Read node.csv file and return a dict of nodes.

gmns_read_link([link_file, cpu_cores, verbose])

Read link.csv file and return a dict of Links.

gmns_read_poi([poi_file, cpu_cores, verbose])

Read poi.csv file and return a dict of POIs.

gmns_read_zone([zone_file, cpu_cores, verbose])

Read zone.csv file and return a dict of Zones.

get_osm_place(place[, verbose])

Geocode a place name to dictionary of its attributes and geometry from OpenStreetMap.

OSM data and place#

get_osm_place(place[, verbose])

Geocode a place name to dictionary of its attributes and geometry from OpenStreetMap.

get_osm_by_relation_id(relation_id[, ...])

Downloads OpenStreetMap (OSM) data for a specified region using the Overpass API.

get_osm_by_bbox(bbox[, output_filepath, url])

Downloads OpenStreetMap (OSM) data for a specified bounding box using the Overpass API.

extract_bbox_coordinates(bbox)

Extracts bounding box coordinates from a string, tuple, or list.