7

I am trying to download the polygons for the Umweltzone Heidelberg from OpenStreetMap using QuickOSM in QGIS. I queried by name as shown in the screenshot:

QuickOSM

The corresponding OSM script looks like this:

<osm-script output="xml" timeout="25"> 
     <id-query {{geocodeArea:Germany}} into="area"/> 
     <union>
          <query type="node">
               <has-kv k="name" v="Umweltzone Heidelberg"/> 
               <area-query from="area"/>
          </query>
          <query type="way">
               <has-kv k="name" v="Umweltzone Heidelberg"/> 
               <area-query from="area"/>
          </query>
          <query type="relation">
               <has-kv k="name" v="Umweltzone Heidelberg"/> 
               <area-query from="area"/>
          </query>
     </union>
     <union>
          <item />
          <recurse type="down"/>
     </union>
     <print mode="body" />
</osm-script>

The query runs successful however no result is returned.

I also tried to download by relation id running this query:

rel(2676846); >; out meta;

This downloads two points - nothing more.

How can I download the polygons for the Umweltzone Heidelberg?

1
  • Please open a new question with the detailed crash report or file a bug at the issue tracker or contact the author of the plugin via email.
    – JJD
    Jan 13, 2016 at 15:50

2 Answers 2

4

I guess your query area Germany does not exist with that name. Using Deutschland and disabeling the timeout returns the data.

I zoomed around Heidelberg and ran the query successfully and much quicker, querying the extent of the map canvas.

QGIS with QuickOSM

2

If you don't want to zoom before around Heidelberg and if you are pretty sure that only one object is called Umweltzone Heidelberg, you can set a quick query like this :

  • key name
  • value Umweltzone Heidelberg
  • in : empty value.

This will create only an attribute query, not a geographic query. This kind of query is very quick.

<osm-script output="xml" timeout="25">
    <union>
        <query type="relation">
            <has-kv k="name" v="Umweltzone Heidelberg"/>
        </query>
    </union>
    <union>
        <item/>
        <recurse type="down"/>
    </union>
    <print mode="body"/>
</osm-script>

QuickOSM

2
  • You also unselected all object types except Relation to produce this query. In my case it running the query fails with the message: "No outputs selected".
    – JJD
    Jul 30, 2015 at 15:01
  • On the left, it's the OSM object. Yes I selected only relation. On the right, it's GIS geometry. We need to select at least one for the output. You can select all of them, it doesn't matter. You want to the multipolygons so check it.
    – etrimaille
    Jul 31, 2015 at 16:11

Your Answer

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

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