Name | esy-osm-pbf JSON |
Version |
0.1.1
JSON |
| download |
home_page | None |
Summary | Low-level Python library to interact with OSM PBF files |
upload_time | 2024-04-11 09:10:07 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.5 |
license | MIT License Copyright (c) 2024, German Aerospace Center (DLR) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
osm
openstreetmap
pbf
protobuf
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
`esy.osm.pbf` is a low-level Python library to interact with
[OpenStreetMap](https://www.openstreetmap.org) data files in the [Protocol
Buffers (PBF)](https://developers.google.com/protocol-buffers/) format.
# Usage
To count the amount of parks in the OpenStreetMap Andorra `.pbf` file (at least
according to a copy from [geofabrik](https://www.geofabrik.de/)), do this:
First download a copy of the andorra dataset:
```python
>>> 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`.
```python
>>> 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](CLA.md).
# Contact
Please use the projects issue tracker to get in touch.
# Team
`esy.osm.pbf` is developed by the
[DLR](https://www.dlr.de/EN/Home/home_node.html) Institute of
[Networked Energy Systems](https://www.dlr.de/ve/en/desktopdefault.aspx/tabid-12472/21440_read-49440/)
in the departement for
[Energy Systems Analysis (ESY)](https://www.dlr.de/ve/en/desktopdefault.aspx/tabid-12471/21741_read-49802/).
# 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.
Raw data
{
"_id": null,
"home_page": null,
"name": "esy-osm-pbf",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.5",
"maintainer_email": null,
"keywords": "OSM, OpenStreetMap, PBF, protobuf",
"author": null,
"author_email": "Ontje L\u00fcnsdorf <ontje.luensdorf@dlr.de>",
"download_url": "https://files.pythonhosted.org/packages/b5/14/5242bc6a813335abde5f6a956cf1da68746a49a12ce152d6ae3a45cbb9d4/esy-osm-pbf-0.1.1.tar.gz",
"platform": null,
"description": "`esy.osm.pbf` is a low-level Python library to interact with\n[OpenStreetMap](https://www.openstreetmap.org) data files in the [Protocol\nBuffers (PBF)](https://developers.google.com/protocol-buffers/) format.\n\n# Usage\n\nTo count the amount of parks in the OpenStreetMap Andorra `.pbf` file (at least\naccording to a copy from [geofabrik](https://www.geofabrik.de/)), do this:\n\nFirst download a copy of the andorra dataset:\n\n```python\n>>> import os, urllib.request\n>>> if not os.path.exists('andorra.osm.pbf'):\n... filename, headers = urllib.request.urlretrieve(\n... 'https://download.geofabrik.de/europe/andorra-190101.osm.pbf',\n... filename='andorra.osm.pbf'\n... )\n\n```\n\nOpen the file and iterate over all entry and count those with a tag `leisure`\nhaving a value of `park`.\n\n```python\n>>> import esy.osm.pbf\n>>> osm = esy.osm.pbf.File('andorra.osm.pbf')\n>>> len([entry for entry in osm if entry.tags.get('leisure') == 'park'])\n21\n\n```\n\n# Design, Development & Contributing\n\nDesign and development notes are available in `esy.osm.pbf.test`.\n\nWe would be happy to accept contributions via merge requests, but due to\ncorporate policy we can only accept contributions if you have send us the signed\n[contributor license agreement](CLA.md).\n\n# Contact\n\nPlease use the projects issue tracker to get in touch.\n\n# Team\n\n`esy.osm.pbf` is developed by the\n[DLR](https://www.dlr.de/EN/Home/home_node.html) Institute of\n[Networked Energy Systems](https://www.dlr.de/ve/en/desktopdefault.aspx/tabid-12472/21440_read-49440/)\nin the departement for\n[Energy Systems Analysis (ESY)](https://www.dlr.de/ve/en/desktopdefault.aspx/tabid-12471/21741_read-49802/).\n\n# Acknowledgements\n\nThe authors would like to thank the Federal Government and the Heads of\nGovernment of the L\u00e4nder, as well as the Joint Science Conference (GWK), for\ntheir funding and support within the framework of the NFDI4Ing consortium.\nFunded by the German Research Foundation (DFG) - project number 442146713.\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024, German Aerospace Center (DLR) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Low-level Python library to interact with OSM PBF files",
"version": "0.1.1",
"project_urls": {
"homepage": "https://gitlab.com/dlr-ve-esy/esy-osm-pbf"
},
"split_keywords": [
"osm",
" openstreetmap",
" pbf",
" protobuf"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "001ac553a8fb0355b7619c8c1364d3b24f32f24e8b2a16a94b764bcc5f308bc7",
"md5": "35c96fbc42d818f4a329acd04176812a",
"sha256": "fe3bb98b83124c536002f15204d500e2a2413c15009d403361f3c22718f19185"
},
"downloads": -1,
"filename": "esy_osm_pbf-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "35c96fbc42d818f4a329acd04176812a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.5",
"size": 12917,
"upload_time": "2024-04-11T09:10:03",
"upload_time_iso_8601": "2024-04-11T09:10:03.834517Z",
"url": "https://files.pythonhosted.org/packages/00/1a/c553a8fb0355b7619c8c1364d3b24f32f24e8b2a16a94b764bcc5f308bc7/esy_osm_pbf-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b5145242bc6a813335abde5f6a956cf1da68746a49a12ce152d6ae3a45cbb9d4",
"md5": "db3515cdb02f4c0311a11d57b29b7d78",
"sha256": "5b65bb2c51911f5c88c28134819bec53139cffd6b7f4b2f246337c8cd7bd8ff4"
},
"downloads": -1,
"filename": "esy-osm-pbf-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "db3515cdb02f4c0311a11d57b29b7d78",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 11683,
"upload_time": "2024-04-11T09:10:07",
"upload_time_iso_8601": "2024-04-11T09:10:07.623974Z",
"url": "https://files.pythonhosted.org/packages/b5/14/5242bc6a813335abde5f6a956cf1da68746a49a12ce152d6ae3a45cbb9d4/esy-osm-pbf-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-11 09:10:07",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "dlr-ve-esy",
"gitlab_project": "esy-osm-pbf",
"lcname": "esy-osm-pbf"
}