PyDriosm

A Python package for downloading, reading and PostgreSQL-based I/O of OpenStreetMap data.

PyPI Release Version Python Version PyPI - License ReadTheDocs - Documentation status GitHub Actions Workflow Status Codacy - Code Quality DOI

Author: Qian Fu

PyDriosm is an open-source Python package designed to simplify the acquisition and management of OpenStreetMap (OSM) data. It provides automated utilities for downloading and parsing data extracts from Geofabrik and BBBike in several popular formats, including Protocolbuffer Binary Format (PBF), Shapefiles and GeoPackage (GPKG).

Beyond data retrieval, the package integrates a robust I/O interface for PostgreSQL databases. This allows users to import parsed OSM data directly into a relational database, facilitating complex spatial querying and efficient data manipulation. By handling the complexities of source scraping, file parsing and schema mapping, pydriosm provides a streamlined workflow for researchers and developers working with large-scale geographic datasets.

Core features:

  • Automated downloads: Direct access to Geofabrik and BBBike subregion extracts.

  • Format support: Parse regional data of PBF, Shapefiles and GeoPackage files into standard Pandas DataFrames or GeoDataFrames.

  • PostgreSQL integration: Streamlined geometry I/O for efficient database storage.

  • Multi-region processing: Tools for merging regional data layers into unified datasets.

Getting Started

Usage & Reference

Indices