Since I never really digged into the data contained in OpenStreetMap I ask myself what would be the recommended way to identify layers or tags within the overall data. In my current use case I want to find out whether there is spatial information about the boundaries of low emission zones.

First of all I looked into the taginfo-master database and filtered the table popular_keys by %zone%.

SQLite Manager / taginfo-master filtered by %zone%

As shown in the screenshot this results in 11 keys from which none indicated what I am searching for - but still it is possible that a more general tag name such as zone is used.

While reading another post I get to know about JOSM and installed the latest version. Since it is not recommended to download the whole dataset in order to avoid torturing OSM servers I would like to know: How can I only load OSM data tagged with zone for a specific city such as Munich? Is QGIS a better tool for this?

In the end it would be nice if I can somehow download spatial information which I can convert into common formats such as ESRI ShapeFiles.


3 Answers 3


You can use the Overpass API to download filtered data: http://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide

This is what an Overpass API call might look like:


You will get a file named interpreter; rename it to interpreter.osm.

Using QGIS

Load the data with

Vector -> Openstreetmap -> Import topology from XML

Choose the interpreter.osm file. The data will be stored in a spatialite database called interpreter.osm.db.

Don't panic if you see nothing yet, choose

Vector -> Openstreetmap -> Export Topology to Spatialite

Choose interpreter.osm.db database, selecting Polylines in a first run, and Polygons in a second one (see screenshot). You should click Load from DB and choose name to get the name tag as well.

QGIS / Export OpenStreetMap topology to SpatialLite

Then you can add an Openstreetmap background with the OpenLayers plugin, showing you where the zones are placedd.

The next step would be to close the boundaries to polygons. A simple Lines to Polygons action will not give good results, so you have to do a little handwork redrawing them in a polygon layer (or use JOSM for that, see below).

Due to the non-standarized data structure of OSM, you might as well look out for:


Using JOSM

If you prefer JOSM, look up the existing data on this page:


Click on the relation number, then copy the relation number from the html page.

In JOSM, File - Download Object, Object type : relation, and check Download relation objects. The relation ID should be preset already.

Save as .osm, and proceed in QGIS as mentioned above.

If you promise not to upload on leaving JOSM, you can even search for the missing bit in the boundary, connect all ways and copy the relation tags to the resulting single line. You have to keep an eye on every boundary to avoid roundabouts and ways without continuation. In Magdeburg and Neu-Ulm, they simply added all streets in the zone to the relation. So you have to draw the border yourself. And some towns have several polygons, because certain motorways are excluded from the zone.

With the improved JOSM data, an import into QGIS as polygon (as described above) will work:

LEZ Germany


Searching for names like "Umweltzone" eventually contains the zone for Munich as well: http://www.openstreetmap.org/way/177807427

A closed line only tagged with border=adminstrative and name=Umweltzone München.

  • Awesome! I have been reading the whole day and could not get a query running. The initial key information in your updated answer is type=LEZ. I could not find any information about what the key-value pair would be since sites like taginfo simple name it lez.
    – JJD
    Commented Dec 6, 2013 at 20:37
  • 1
    Sorry, name:lez is something completely different. There you find names in a language named Lezgian: en.wikipedia.org/wiki/Lezgian_language
    – AndreJ
    Commented Dec 7, 2013 at 8:04
  • Can you please explain what you mean by "... you can even search for the missing bit in the boundary, connect all ways and copy the relation tags to the resulting single line. You have to keep an eye on every boundary to avoid roundabouts and ways without continuation." I do not have too much experience with geodata (sry).
    – JJD
    Commented Dec 8, 2013 at 1:26
  • If you want a polygon, the way must be closed. This can be done best using the editing tools of JOSM. Off course, you can load the OSM data only as background, and draw your polygon in QGIS over it.
    – AndreJ
    Commented Dec 8, 2013 at 6:53
  • I would like to avoid manually redrawing the shape if possible. If JOSM allows transforming the LineStrings into one or multiple polygons I would go for this.
    – JJD
    Commented Dec 8, 2013 at 11:53

There are various ways for searching if OSM contains specific data:

  • the wiki: This will usually include a clear description of the tag and its usage
  • taginfo: An automatically generated database providing statistics about tags and also links to wiki pages
  • help.openstreetmap.org: A Q&A site similar to stackexchange
  • mailing lists and the forum

In your case the wiki already has a page about low emission zone. It recommends to use relations with a tag type=LEZ. It seems that this is still an experimental tag and might change in the future.

For downloading all data with one or more specific tags you should use the Overpass API. It can return data in various output formats and allows to search the whole planet or a specific bounding box. For heavy queries it might be useful to increase the timeout. You can also go to taginfo instead which provides an Overpass API download link for every tag.

  • After quite some search I found the "JOSM" link but could not use it. I do not understand why it is prefixed with http://localhost:8111/import?url=. Further, the relevant URL part is url-encoded: http%3A%2F%2Foverpass-api.de%2Fapi%2Fxapi_meta%3F*%5Bname%253Alez%253D*%5D This cannot be handled by JSOM. I used File / Open Location ... to load the data.
    – JJD
    Commented Dec 6, 2013 at 20:44
  • I tried to load the data for Berlin (since there seems to be no data for Munich in OSM) in JOSM as show in a screenshot. However the response does not contain any data.
    – JJD
    Commented Dec 6, 2013 at 20:52
  • 1
    For the JOSM link, you need to activate the remote control. But I never have used that myself.
    – AndreJ
    Commented Dec 7, 2013 at 7:50
  • 1
    That's correct, you need to activate the remote control mechanism (edit -> preferences -> remote control symbol). It is disabled by default for security reasons. And regarding your query: the type is LEZ and not lez, tags and values are case-sensitive.
    – scai
    Commented Dec 7, 2013 at 9:22
  • 1
    @JJD You should read about OSM's tags. Tags always have the form key=value. So what you are looking for is the key-value pair type=LEZ and not the key type:LEZ (which could have any value, like type:LEZ=foo).
    – scai
    Commented Dec 8, 2013 at 17:01

I don't think that OSM contains the data you are looking for, it's more geared towards mapping road data, points of interests and places. However you can easily download an extract of Munich here from Mike Migurski's Metro Extracts.

  • Actually, that Metro Extract brought me to find the lez zone of Munich.
    – AndreJ
    Commented Dec 7, 2013 at 13:18
  • That's great, I'm not too familiar with the LEZ's. Globally I'd still say that most of the OSM data contributed has to do with roads, poi's, and places. Data such as land use and natural features seem to vary by location.
    – clhenrick
    Commented Dec 7, 2013 at 19:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.