Overpass turbo/Polygon Features

From OpenStreetMap Wiki
Jump to navigation Jump to search
Overpass API logo.svg
Overpass API · Language reference · Language guide · Technical terms · Areas · Query examples · Sparse Editing · Permanent ID · FAQ · more · Web site
Servers status · Versions · Development · Technical design · Installation · XAPI compatibility layer · Public transport sketch lines · Applications · Source code and issues
Overpass turbo · Wizard · Overpass turbo shortcuts · MapCSS stylesheets · Export to GeoJSON · more · Development · Source code and issues · Web site
Overpass Ultra · Overpass Ultra extensions · MapLibre stylesheets ·more · Source code and issues · Web site

As OpenStreetMap doesn't have an intrinsic area data type, an heuristic has to be applied to determine whether a way is a Line or a Polygon. For Overpass turbo and osmtogeojson I came up with the following (see here for a machine-readable JSON file of this table):

A way is considered a Polygon if

  1. It forms a closed loop, and
  2. it is not tagged area=no, and
  3. at least one of the following conditions is true:

This is mostly based on the information found in the OSM-wiki (namely the presence and absence of the way/area symbols on the individual key-pages). I used taginfo's wiki database for this task.

Unfortunately, the wiki doesn't include any information about whether or not a tag is categorizing (such as landuse=*) or descriptive (such as name=*). Therefore, this heuristic includes my own understanding and opinion about this. For the same reason, this list is surely quite incomplete! Please inform me about more tags that could imply areas.