PyDriosm
|PyPI| |Python| |Documentation| |License| |Codacy grade| |DOI|
.. |PyPI| image:: https://img.shields.io/pypi/v/pydriosm :alt: PyPI - Release :target: https://pypi.org/project/pydriosm/ .. |Python| image:: https://img.shields.io/pypi/pyversions/pydriosm :alt: PyPI - Python version :target: https://docs.python.org/3/ .. |Documentation| image:: https://readthedocs.org/projects/pydriosm/badge/?version=latest :alt: ReadTheDocs - Documentation status :target: https://pydriosm.readthedocs.io/en/latest/?badge=latest .. |License| image:: https://img.shields.io/pypi/l/pydriosm :alt: PyPI - License :target: https://github.com/mikeqfu/pydriosm/blob/master/LICENSE .. |Codacy grade| image:: https://app.codacy.com/project/badge/Grade/b411ce89cbc445f58377a5799646d4cb :alt: Codacy grade (Code quality) :target: https://www.codacy.com/gh/mikeqfu/pydriosm/dashboard?utm_source=github.com&utm_medium=referral&utm_content=mikeqfu/pydriosm&utm_campaign=Badge_Grade .. |DOI| image:: https://zenodo.org/badge/92493726.svg :alt: Zenodo - DOI :target: https://zenodo.org/badge/latestdoi/92493726
PyDriosm is an open-source tool for researchers/practitioners to easily download and read OpenStreetMap <https://www.openstreetmap.org/>
(OSM) data in popular file formats such as protobuf binary format <https://wiki.openstreetmap.org/wiki/PBF_Format>
(PBF) and shapefile <https://wiki.openstreetmap.org/wiki/Shapefiles>
, which are available for free download from Geofabrik <https://download.geofabrik.de/>
and BBBike <https://download.bbbike.org/>
. The package also provides a convenient way for PostgreSQL <https://www.postgresql.org/>
-based I/O and storage of parsed OSM data.
Installation
To install the latest release of pydriosm from PyPI <https://pypi.org/project/pydriosm/>
via pip <https://pip.pypa.io/en/stable/cli/pip/>
:
.. code-block:: bash
pip install --upgrade pydriosm
For more information, please refer to Installation <https://pydriosm.readthedocs.io/en/latest/installation.html>
_.
Documentation
The full PyDriosm documentation (including detailed examples and a quick-start tutorial) is hosted on ReadTheDocs <https://readthedocs.org/projects/pydriosm/>
: [HTML <https://pydriosm.readthedocs.io/en/latest/>
] [PDF <https://pydriosm.readthedocs.io/_/downloads/en/latest/pdf/>
_].
License
GNU General Public License v3 <https://github.com/mikeqfu/pydriosm/blob/master/LICENSE>
_ or later (GPLv3+).OpenStreetMap <https://www.openstreetmap.org/>
data, which is used for the development of PyDriosm, is licensed under the Open Data Commons Open Database License <https://opendatacommons.org/licenses/odbl/>
(ODbL) by the OpenStreetMap Foundation <https://osmfoundation.org/>
_ (OSMF).Cite as
Fu, Q. (2020). PyDriosm: an open-source tool for downloading, reading and PostgreSQL-based I/O of OpenStreetMap data. doi:10.5281/zenodo.4281194 <https://doi.org/10.5281/zenodo.4281194>
_
.. code-block:: bibtex
@software{qian_fu_pydriosm_4281194,
author = {Qian Fu},
title = {{PyDriosm: an open-source tool for downloading, reading
and PostgreSQL-based I/O of OpenStreetMap data}},
year = 2020,
publisher = {Zenodo},
doi = {10.5281/zenodo.4718623},
url = {https://doi.org/10.5281/zenodo.4281194}
}
Note: Please also refer to the export options from Zenodo <https://zenodo.org/search?page=1&size=20&q=conceptrecid:4281194&all_versions&sort=-version>
_ to reference the specific version of PyDriosm as appropriate.
Using a tool to work with historic osm data would be great.
Hello again,
Since the parsing is layer-specific, I was wondering if its possible to associated each WayId to a list of NodeIds? This information does not seem to be available but maybe it's possible, any thoughts?
Something like this:
```python
{ 'osm_id': some_way_id, 'connected_nodes': [list of node id's associated with this way], ... } ```
Since some *.osm.pbf
files are quite large, do you think it would be possible to yield
each row of data instead of appending it to a dict
? So that parse_osm_pbf()
would become a generator. This would be great for my use-case, if you want I can start a PR for this feature if you think its useful/feasible. @mikeqfu
For more information and detailed specifications, check out PyDriosm 2.1.2 documentation.
For more information and detailed specifications, check out PyDriosm 2.1.1 documentation.
Note that this release introduces a highly modified version, which is not compatible with any previous versions.
For more information and detailed specifications, check out PyDriosm 2.1.0 documentation.
For more information and detailed specifications, check out PyDriosm 2.0.3 documentation.
max_tmpfile_size
for setting the maximum size of in-memory temporary file while instantiating the classes GeofabrikReader and BBBikeReader for reading OSM data.For more information and detailed specifications, check out PyDriosm 2.0.2 documentation.
openstreetmap python openstreetmap-data openstreetmap-protobuffer-format osm protocol-buffer-binary-format protobuf-binary-format pbf shapefile shp geofabrik bbbike postgresql