Skip to main content

esy.osm.pbf is a low-level Python library to interact with OpenStreetMap data files in the Protocol Buffers (PBF) format.

Usage

To count the amount of parks in the OpenStreetMap Andorra .pbf file (at least according to a copy from geofabrik), do this:

First download a copy of the andorra dataset:

>>> import os, urllib.request
>>> if not os.path.exists('andorra.osm.pbf'):
...     filename, headers = urllib.request.urlretrieve(
...         'https://download.geofabrik.de/europe/andorra-190101.osm.pbf',
...         filename='andorra.osm.pbf'
...     )

Open the file and iterate over all entry and count those with a tag leisure having a value of park.

>>> import esy.osm.pbf
>>> osm = esy.osm.pbf.File('andorra.osm.pbf')
>>> len([entry for entry in osm if entry.tags.get('leisure') == 'park'])
21

Design, Development & Contributing

Design and development notes are available in esy.osm.pbf.test.

We would be happy to accept contributions via merge requests, but due to corporate policy we can only accept contributions if you have send us the signed contributor license agreement.

Contact

Please use the projects issue tracker to get in touch.

Team

esy.osm.pbf is developed by the DLR Institute of Networked Energy Systems in the departement for Energy Systems Analysis (ESY).

Acknowledgements

The authors would like to thank the Federal Government and the Heads of Government of the Länder, as well as the Joint Science Conference (GWK), for their funding and support within the framework of the NFDI4Ing consortium. Funded by the German Research Foundation (DFG) - project number 442146713.

Metadata

Release files for esy-osm-pbf 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for esy-osm-pbf 0.1.1
File Size Uploaded Provenance Actions
esy-osm-pbf-0.1.1.tar.gz 11.7 kB Without provenance Details for esy-osm-pbf-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for esy-osm-pbf 0.1.1
File Interpreter ABI Platform Actions
esy_osm_pbf-0.1.1-py3-none-any.whl Python 3 none any Details for esy_osm_pbf-0.1.1-py3-none-any.whl

Total release size: 24.6 kB

Release files / esy-osm-pbf-0.1.1.tar.gz

Download URL esy-osm-pbf-0.1.1.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5b65bb2c51911f5c88c28134819bec53139cffd6b7f4b2f246337c8cd7bd8ff4
BLAKE2b-256 checksum
How to use checksums
b5145242bc6a813335abde5f6a956cf1da68746a49a12ce152d6ae3a45cbb9d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.9.6 requests/2.28.1 setuptools/63.2.0 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.10.7

Release files / esy_osm_pbf-0.1.1-py3-none-any.whl

Download URL esy_osm_pbf-0.1.1-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fe3bb98b83124c536002f15204d500e2a2413c15009d403361f3c22718f19185
BLAKE2b-256 checksum
How to use checksums
001ac553a8fb0355b7619c8c1364d3b24f32f24e8b2a16a94b764bcc5f308bc7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.9.6 requests/2.28.1 setuptools/63.2.0 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.10.7

Security for esy-osm-pbf 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page