API reference#
The OSM class is the main entry point: construct it once from a PBF file,
then call a feature method to read a layer into a GeoDataFrame, export a network to a graph,
or write data back to PBF. Module-level helpers download PBF extracts and simplify graphs.
OSM reader#
Constructor#
|
OpenStreetMap PBF reader object. |
Reading OSM features#
|
Parses street networks from OSM for walking, driving, and cycling. |
|
Parses buildings from OSM. |
|
Parse Point of Interest (POI) from OSM. |
|
Parses landuse from OSM. |
|
Parses natural from OSM. |
|
Parses boundaries from OSM. |
Parse OSM data based on custom criteria. |
Exporting to a graph#
|
Export OSM network to routable graph. |
Saving and cropping to PBF#
|
Crop the source PBF by this object's |
|
Write the OSM data this object holds back to a valid, re-readable |
Cache and downloads#
|
List the out-of-core engine's cached layer files -- the GeoParquet files that |
List the PBF files downloaded by |
|
|
Remove the out-of-core engine's result cache -- the GeoParquet files that |
|
Remove PBF files downloaded by |
Downloading data#
|
Get the path to a PBF data file, and download the data if needed. |
|
Download (and by default crop) the OSM data covering a bounding box. |
|
Geocode a place name to a Shapely polygon via Nominatim. |
|
Download (and by default crop) the OSM data for a geocoded place name. |
Graph simplification#
|
Topologically simplify pyrosm's directed graph-export edges. |