kraina-ai / srai

Spatial Representations for Artificial Intelligence - a Python library toolkit for geospatial machine learning focused on creating embeddings for downstream tasks
https://kraina-ai.github.io/srai/
Apache License 2.0
205 stars 15 forks source link

Rebuild OSM PBF data loading to include osmconvert and cutting pbfs to size #295

Open RaczeQ opened 1 year ago

RaczeQ commented 1 year ago

Downloading a bigger PBF file and parsing it all is really inefficient. Cutting it first before loading data is much faster. Unfortunately, for now, you have to rely on a CLI tool that has to be run using subprocess.

RaczeQ commented 1 year ago

Examples to run osmconvert https://github.com/interline-io/planetutils/blob/6b5d91d41bc34125de1c925d1c2c00246dfe82b2/planetutils/planet.py#L94 https://github.com/organicmaps/organicmaps/blob/ca31bbaee4cd7ffcb6e8483587d244695777daf9/tools/python/maps_generator/generator/osmtools.py#L42