Overpass JSON is the response format of the Overpass API, a read-only query language over OpenStreetMap (Roland Olbricht, since 2008). It is a compact JSON with a list of elements (node/way/relation), their geometry, tags, and a meta block — the structure parsed directly by osmnx, the QGIS QuickOSM plugin, overpass-turbo, and dozens of pipelines that use OSM as a structured dataset. Our exporter builds JSON of the same structure from the OSM layers: each feature becomes an element of the appropriate type with id, coordinates, geometry, and tags, plus a meta section with generator and version. Honestly: we synthesize an Overpass-format-compatible response from our selection — this is not a live Overpass API query, but the result can be handed to downstream tools as a drop-in replacement for a public Overpass response.
Viktiga funktioner
Om formatet Overpass JSON
Overpass JSON is the response format of the Overpass API, the query language for OpenStreetMap data. It is compact JSON: an elements array where every object is a node, way or relation with its coordinates, geometry and tags, plus a service meta block. This structure is read directly by OSMnx, the QuickOSM plugin for QGIS, overpass-turbo and dozens of research pipelines.
The format is chosen when OSM is used as a structured dataset: counting objects by tags, assembling a street graph, exporting points of interest into your own script. A ready file instead of a live query removes the two familiar Overpass problems — rate limits and timeouts on large selections — and it also makes the result reproducible: you hold a fixed snapshot of the data.
The exporter synthesizes a response of the same structure from your selection: points become node elements with coordinates, lines and polygons become way elements with a node list and geometry, tags are carried over as they are, and the generator and version are written into meta. Identifiers are issued by us from a separate range so as not to collide with real OSM numbers; the size of a single file is limited to a hundred thousand elements. This is not a live query to Overpass but a compatible replacement for its response.
Vilket program öppnar Overpass JSON-filer
Följande program och applikationer kan öppna, redigera och arbeta med Overpass API JSON-filer (.json) som exporterats från OSM2CDR:
Format specifications
- Open standard
- 2D only
- Lossless (no quality loss)
- Stores feature attributes
- Output: 1 file
- An Overpass-API-compatible JSON (elements node/way/relation + meta) synthesized from the selection; a drop-in replacement for a public Overpass response, not a live query.
Vem använder Overpass JSON-kartor
Så exporterar du Overpass JSON
Så öppnar du filen efter exporten
- Python — json.load() and work with the elements list: filter by tags, count objects, export into a table. The overpy library accepts the same data.
- jq — a quick check in the terminal: jq '.elements | length' map.json shows how many objects arrived, jq '.elements[0]' shows what a single element looks like.
- osmtogeojson — conversion into GeoJSON with one command, if it is more convenient to work in GIS or on the web from there.
- QGIS with the QuickOSM plugin — load the saved response and get layers on the map without calling the public Overpass.
- Your own parsers and pipelines that already read Overpass output — put the file in place of the URL, the format is the same.
Populära kartor i Overpass JSON
Hämta kartexporter i Overpass API JSON
Ladda ner professionella Overpass JSON-kartor från OpenStreetMap. Direktgenerering, valfritt område.