Overpass turbo/GeoJSON

From OpenStreetMap Wiki
Jump to: navigation, search
Available languages — Overpass turbo/GeoJSON
Afrikaans Alemannisch aragonés asturianu azərbaycanca Bahasa Indonesia Bahasa Melayu Bân-lâm-gú Basa Jawa Baso Minangkabau bosanski brezhoneg català čeština dansk Deutsch eesti English español Esperanto estremeñu euskara français Frysk Gaeilge Gàidhlig galego Hausa hrvatski Igbo interlingua Interlingue isiXhosa isiZulu íslenska italiano Kiswahili Kreyòl ayisyen kréyòl gwadloupéyen Kurdî latviešu Lëtzebuergesch lietuvių magyar Malagasy Malti Nederlands Nedersaksies norsk bokmål norsk nynorsk occitan Oromoo oʻzbekcha/ўзбекча Plattdüütsch polski português português do Brasil română shqip slovenčina slovenščina Soomaaliga suomi svenska Tiếng Việt Türkçe Vahcuengh vèneto Wolof Yorùbá Zazaki српски / srpski беларуская български қазақша македонски монгол русский тоҷикӣ українська Ελληνικά Հայերեն ქართული नेपाली मराठी हिन्दी অসমীয়া বাংলা ਪੰਜਾਬੀ ગુજરાતી ଓଡ଼ିଆ தமிழ் తెలుగు ಕನ್ನಡ മലയാളം සිංහල ไทย မြန်မာဘာသာ ລາວ ភាសាខ្មែរ ⵜⴰⵎⴰⵣⵉⵖⵜ አማርኛ 한국어 日本語 中文(简体)‎ 吴语 粵語 中文(繁體)‎ ייִדיש עברית اردو العربية پښتو سنڌي فارسی ދިވެހިބަސް

GeoJSON an open format for encoding a geographic data. Here is some description about the structure of the GeoJSON exported by overpass turbo.

Structure

All data is given as a FeatureCollection. The following metadata is given at this level:

  • generator: the name of the application generating the data (i.e. "overpass-turbo")
  • copyright: the copyright attribution as given by the data source
  • timestamp: the timestamp as given by the data source

Each Feature in the collection has the member properties containing the following data:

  • @id: an id identifying the object, formed from the OSM datatype (node, way, relation) and the OSM id (e.g. node/123, way/4321, …).
  • all tags of the OSM object[1]
  • meta-data (if available) - encoded with a beginning @ (@timestamp, @version, @changeset, @user, @uid)
  • @tainted: if present: indicates that the feature's geometry is incomplete
  • @relations: an array of relations the object is member of. each relation is encoded as an object literal containing the following properties: role (membership role), rel (the relation's id) and reltags (contains all tags of the relation).

The geometry is standard GeoJSON.

Contained Data

GeoJSON produced by overpass turbo will include exactly one GeoJSON-feature for each of the following OSM objects (that is everything that is also visible in overpass turbo's map view):

  • all ways[2]
  • all tagged[3] or unconnected nodes ("POIs")
  • all multipolygons[4]

It doesn't contain some data which can be returned by Overpass API (for example: Overpass areas, objects without coordinates, way-nodes, etc.) and arbitrary relations are only present via their childs. So, there is no 1:1 relationship between OSM Data and the exported GeoJSON.

Example Output

{
  "type": "FeatureCollection",
  "generator": "overpass-turbo",
  "copyright": "The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.",
  "timestamp": "2013-04-25T08:50:03Z",
  "features": [
    {
      "type": "Feature",
      "properties": {
        "@id": "way/181440866",
        "landuse": "meadow",
        "@timestamp": "2012-09-17T13:06:55Z",
        "@version": "1",
        "@changeset": "13143419",
        "@user": "tyr_asd",
        "@uid": "115612",
        "@relations": [
          {
            "role": "inner",
            "rel": "130768",
            "reltags": {
              "landuse": "forest",
              "type": "multipolygon"
            }
          }
        ]
      },
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              11.2070535,
              46.4834059
            ],
            [
              11.2067411,
              46.483376
            ],
            [
              11.2066324,
              46.4830587
            ],
            /* -- snip -- */
            [
              11.2070535,
              46.4834059
            ]
          ]
        ]
      },
      "id": "way/181440866"
    },
    {
      "type": "Feature",
      "properties": {
        "@id": "way/119434107",
        "highway": "path",
        "ref": "500",
        "sac_scale": "mountain_hiking",
        "@timestamp": "2011-09-14T11:41:32Z",
        "@version": "2",
        "@changeset": "9298589",
        "@user": "tyr_asd",
        "@uid": "115612",
        "@tainted": true,
        "@relations": [
          {
            "role": "",
            "rel": "1537588",
            "reltags": {
              "network": "rwn",
              "operator": "Società degli Alpinisti Tridentini",
              "osmc:symbol": "red:red:white_bar:500:black",
              "ref": "500",
              "route": "hiking",
              "type": "route"
            }
          }
        ]
      },
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [
            11.2071162,
            46.4838528
          ],
          [
            11.2068518,
            46.4829
          ],
          [
            11.207187,
            46.481963
          ],
          [
            11.207199,
            46.481105
          ]
        ]
      },
      "id": "way/119434107"
    }
  ]
}



  1. tags beginning with an @ sign will be escaped by an additional @ in front
  2. except those that are untagged and only form the outline of a multipolygon
  3. "uninteresting" tags such as created_by and source are ignored for this
  4. simple multipolygons with exactly one closed outer way are present via their outer way