mosstool.map.osm.point_of_interest¶
Module Contents¶
Classes¶
Process OSM raw data to POI as geojson format files |
Data¶
API¶
- mosstool.map.osm.point_of_interest.__all__¶
[‘PointOfInterest’]
- class mosstool.map.osm.point_of_interest.PointOfInterest(max_longitude: Optional[float] = None, min_longitude: Optional[float] = None, max_latitude: Optional[float] = None, min_latitude: Optional[float] = None, wikipedia_name: Optional[str] = None, proxies: Optional[dict[str, str]] = None)¶
Process OSM raw data to POI as geojson format files
Initialization
Args:
max_longitude (Optional[float]): max longitude
min_longitude (Optional[float]): min longitude
max_latitude (Optional[float]): max latitude
min_latitude (Optional[float]): min latitude
wikipedia_name (Optional[str]): wikipedia name of the area in OSM.
proxies (Optional[dict[str, str]]): proxies for requests, e.g. {‘http’: ‘http://localhost:1080’, ‘https’: ‘http://localhost:1080’}
- _query_raw_data(osm_data_cache: Optional[list[dict]] = None)¶
Get raw data from OSM API OSM query language: https://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide Can be run and visualized in real time at https://overpass-turbo.eu/
- _make_raw_poi()¶
Construct POI from original OSM data.
- create_pois(output_path: Optional[str] = None, osm_data_cache: Optional[list[dict]] = None, osm_cache_check: bool = False)¶
Create POIs from OpenStreetMap.
Args:
osm_data_cache (Optional[list[dict]]): OSM data cache.
output_path (str): GeoJSON file output path.
osm_cache_check (bool): check the format of input OSM data cache.
Returns:
POIs in GeoJSON format.