0

When I use quickOSM in QGIS to download OSM data, I check the "relations" option, but then?

My need is the following :

  1. Download OSM data for a specific area
  2. In the table for the "point" geometry, I add a field : "StreetName"
  3. For all nodes having a non empty addr:housenumber attribute, I want to get the street name from the relation "associatedStreet > Name" and fill the field created in 2.

The thing is, I can't find the relation anywhere. Example : https://www.openstreetmap.org/node/685883404 I would have "Rue des vinaigriers" in my field.

This is my query

<osm-script output="xml" timeout="25">
    <union>
        <query type="node">
            <bbox-query {{bbox}}/>
        </query>
        <query type="way">
            <bbox-query {{bbox}}/>
        </query>
        <query type="relation">
           <has-kv k="type" v="associatedStreet"/>
            <bbox-query {{bbox}}/>
        </query>
    </union>
    <union>
        <item/>
        <recurse type="down"/>
    </union>
    <print mode="body"/>
</osm-script>

I tried with recurse type = relation-node, relation-way, with both of them...

1 Answer 1

1

It seems that QuickOSM drops anything that can't be represented as QGIS [spatial] features and their attributes. All suitable elements which are members of queried relations appear as features within resulting layers but with no trace of relations themselves. One possible solution is to get raw .osm from Overpass directly, do preprocessing that involves associatedStreet relations out of QGIS, then use QuickOSM to import the .osm

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.