pbf2json | OpenStreetMap pbf parser which exports json | JSON Processing library
kandi X-RAY | pbf2json Summary
kandi X-RAY | pbf2json Summary
pbf2json creates a JSON stream of openstreetmap data from any PBF extract, you can pick-and-choose only the bits of the file you want, the library will take care of de-normalizing the relational data (nodes/ways/relations) so you can put it straight in to your favourite document-store, inverted index or graph database.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- print writes the decoder to leveldb .
- Main entry point
- index is the main entry point for decoding .
- computeCentroidAndBounds computes the centroids for the given latlons .
- simplify simplifies the points in the polygon
- Parse settings from leveldb
- indexRelationMembers indexes the relation members .
- selectEntrance picks the first entry from the list of entries .
- nodeToBytes converts an osmpf . Node to a byte slice
- bytesToLatLon converts a byte slice to a map
pbf2json Key Features
pbf2json Examples and Code Snippets
Community Discussions
Trending Discussions on pbf2json
QUESTION
I would like to develop a small geocoder using OpenStreetMap. Now I downloaded the file germany-latest.osm.pbf
and converted it with the tool pbf2json
into a JSON stream.
With this tool it is now possible to "pick" only JSON's with the planet type way
.
These contain the respective street, city, house number, postal code and the position, so everything I need for the geocoding.
But what I don't understand is that the file saarland-latest.osm.pbf
which has the state Saarland (the smallest state in Germany) has about 658548 ways and the file germany-latest.osm.pbf
has about 3792000 ways. Is there something wrong with the parser, or does "germany-latest.osm.pbf" only contain the "most important" roads in Germany, while the osm.pbf files of the different federal states contain all roads within the federal states?
So I have to download each state individually to get all streets of the whole country?
...ANSWER
Answered 2019-Dec-29 at 11:29The .osm.pbf files from Geofabrik are complete extracts, you do not need the files for individual states in addition to the country extract.
I can confirm your count of the number of ways in the Saarland file. However, I count 50566293 ways in "germany-latest.osm.pbf" when parsing it with a relatively low-level library (osm4j).
So presumably, the issue is somewhere in your pipeline. Is it possible that the difference results from filtering based on the presence of certain tags, e.g. address information?
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pbf2json
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page