Rule for labeling ways not being part of OSM relation in QGISWhy is sum of st_length() of segments 20% too...

How is the Swiss post e-voting system supposed to work, and how was it wrong?

Make a transparent 448*448 image

Latest web browser compatible with Windows 98

Identifying the interval from A♭ to D♯

PTIJ: Who should pay for Uber rides: the child or the parent?

Provisioning profile doesn't include the application-identifier and keychain-access-groups entitlements

What is IP squat space

Meaning of "SEVERA INDEOVI VAS" from 3rd Century slab

How to simplify this time periods definition interface?

Rejected in 4th interview round citing insufficient years of experience

What are the possible solutions of the given equation?

I need to drive a 7/16" nut but am unsure how to use the socket I bought for my screwdriver

Co-worker team leader wants to inject his friend's awful software into our development. What should I say to our common boss?

Why are there 40 737 Max planes in flight when they have been grounded as not airworthy?

Happy pi day, everyone!

What is this large pipe coming out of my roof?

Does splitting a potentially monolithic application into several smaller ones help prevent bugs?

Dot in front of file

How could a scammer know the apps on my phone / iTunes account?

Define, (actually define) the "stability" and "energy" of a compound

Running a subshell from the middle of the current command

Should we release the security issues we found in our product as CVE or we can just update those on weekly release notes?

Where is the 1/8 CR apprentice in Volo's Guide to Monsters?

Welcoming 2019 Pi day: How to draw the letter π?



Rule for labeling ways not being part of OSM relation in QGIS


Why is sum of st_length() of segments 20% too big?How to style ways with CartoCSS depending on a relation property (OSM)An Overpass query for OSM ways; both part of a relation and also a specific tag?QuickOSM returns no resultQGIS Labeling OSM items depending on scaleNegative OSM ID values - building polygonsRule Based Labeling in QGISRule-based labeling in QGISImporting large OSM data to QGis failed (using QuickOSM, SpatialLite layer or add vector layer)Multigeometry relations to single geometries, through Overpass-Turbo to KML













1















A brief overview of what I want to achieve: Create a map showing all cross-country ski trails in a specific region with some customizations/styling on them.



The data come from OpenStreetMap exclusively. Ski trails can be either relations or ways.



I imported the ways and relations from OpenStreetMap using QuickOSM plugin in QGIS 3 with the following Overpass query:



<osm-script output="xml" timeout="25">
<union>
<query type="way">
<has-kv k="piste:type" v="nordic"/>
</query>
<query type="relation">
<has-kv k="piste:type" v="nordic"/>
</query>
</union>
<union>
<item/>
<recurse type="down"/>
</union>
<print mode="body"/>
</osm-script>


Now I have 2 layers in QGIS, one for lines (OSM ways) and one for multiline strings (OSM relations).



What I want to do is to add a label on ways (showing the value of the attribute piste:name or, if it doesn't exist, name) only if those ways are not part of a relation from the second layer. This is to avoid duplicating the label since these relations already have their name displayed with another labeling rule.



I tried to write rules using geometry functions like contains() but it seems that I can't reference an object from another layer.



Is there a way to achieve what I want to do in QGIS?










share|improve this question









New contributor




Romain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    1















    A brief overview of what I want to achieve: Create a map showing all cross-country ski trails in a specific region with some customizations/styling on them.



    The data come from OpenStreetMap exclusively. Ski trails can be either relations or ways.



    I imported the ways and relations from OpenStreetMap using QuickOSM plugin in QGIS 3 with the following Overpass query:



    <osm-script output="xml" timeout="25">
    <union>
    <query type="way">
    <has-kv k="piste:type" v="nordic"/>
    </query>
    <query type="relation">
    <has-kv k="piste:type" v="nordic"/>
    </query>
    </union>
    <union>
    <item/>
    <recurse type="down"/>
    </union>
    <print mode="body"/>
    </osm-script>


    Now I have 2 layers in QGIS, one for lines (OSM ways) and one for multiline strings (OSM relations).



    What I want to do is to add a label on ways (showing the value of the attribute piste:name or, if it doesn't exist, name) only if those ways are not part of a relation from the second layer. This is to avoid duplicating the label since these relations already have their name displayed with another labeling rule.



    I tried to write rules using geometry functions like contains() but it seems that I can't reference an object from another layer.



    Is there a way to achieve what I want to do in QGIS?










    share|improve this question









    New contributor




    Romain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      1












      1








      1








      A brief overview of what I want to achieve: Create a map showing all cross-country ski trails in a specific region with some customizations/styling on them.



      The data come from OpenStreetMap exclusively. Ski trails can be either relations or ways.



      I imported the ways and relations from OpenStreetMap using QuickOSM plugin in QGIS 3 with the following Overpass query:



      <osm-script output="xml" timeout="25">
      <union>
      <query type="way">
      <has-kv k="piste:type" v="nordic"/>
      </query>
      <query type="relation">
      <has-kv k="piste:type" v="nordic"/>
      </query>
      </union>
      <union>
      <item/>
      <recurse type="down"/>
      </union>
      <print mode="body"/>
      </osm-script>


      Now I have 2 layers in QGIS, one for lines (OSM ways) and one for multiline strings (OSM relations).



      What I want to do is to add a label on ways (showing the value of the attribute piste:name or, if it doesn't exist, name) only if those ways are not part of a relation from the second layer. This is to avoid duplicating the label since these relations already have their name displayed with another labeling rule.



      I tried to write rules using geometry functions like contains() but it seems that I can't reference an object from another layer.



      Is there a way to achieve what I want to do in QGIS?










      share|improve this question









      New contributor




      Romain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      A brief overview of what I want to achieve: Create a map showing all cross-country ski trails in a specific region with some customizations/styling on them.



      The data come from OpenStreetMap exclusively. Ski trails can be either relations or ways.



      I imported the ways and relations from OpenStreetMap using QuickOSM plugin in QGIS 3 with the following Overpass query:



      <osm-script output="xml" timeout="25">
      <union>
      <query type="way">
      <has-kv k="piste:type" v="nordic"/>
      </query>
      <query type="relation">
      <has-kv k="piste:type" v="nordic"/>
      </query>
      </union>
      <union>
      <item/>
      <recurse type="down"/>
      </union>
      <print mode="body"/>
      </osm-script>


      Now I have 2 layers in QGIS, one for lines (OSM ways) and one for multiline strings (OSM relations).



      What I want to do is to add a label on ways (showing the value of the attribute piste:name or, if it doesn't exist, name) only if those ways are not part of a relation from the second layer. This is to avoid duplicating the label since these relations already have their name displayed with another labeling rule.



      I tried to write rules using geometry functions like contains() but it seems that I can't reference an object from another layer.



      Is there a way to achieve what I want to do in QGIS?







      openstreetmap labeling qgis-3 rule-based






      share|improve this question









      New contributor




      Romain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      Romain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 6 mins ago









      Taras

      2,2342727




      2,2342727






      New contributor




      Romain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 7 hours ago









      RomainRomain

      61




      61




      New contributor




      Romain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Romain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Romain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Plugin refFunctiond will allow You to interact with geometry from another layer.



          From the description:




          Plugin that add custom user functions to Qgis Field calculator for referencing, analitically or spatially, between layers, For example retrieving a value from a layer using as a field value or a spatial condition (intersects, disjoint ....) as parameter







          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "79"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });






            Romain is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f315581%2frule-for-labeling-ways-not-being-part-of-osm-relation-in-qgis%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Plugin refFunctiond will allow You to interact with geometry from another layer.



            From the description:




            Plugin that add custom user functions to Qgis Field calculator for referencing, analitically or spatially, between layers, For example retrieving a value from a layer using as a field value or a spatial condition (intersects, disjoint ....) as parameter







            share|improve this answer




























              0














              Plugin refFunctiond will allow You to interact with geometry from another layer.



              From the description:




              Plugin that add custom user functions to Qgis Field calculator for referencing, analitically or spatially, between layers, For example retrieving a value from a layer using as a field value or a spatial condition (intersects, disjoint ....) as parameter







              share|improve this answer


























                0












                0








                0







                Plugin refFunctiond will allow You to interact with geometry from another layer.



                From the description:




                Plugin that add custom user functions to Qgis Field calculator for referencing, analitically or spatially, between layers, For example retrieving a value from a layer using as a field value or a spatial condition (intersects, disjoint ....) as parameter







                share|improve this answer













                Plugin refFunctiond will allow You to interact with geometry from another layer.



                From the description:




                Plugin that add custom user functions to Qgis Field calculator for referencing, analitically or spatially, between layers, For example retrieving a value from a layer using as a field value or a spatial condition (intersects, disjoint ....) as parameter








                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 6 hours ago









                GSienkoGSienko

                8613




                8613






















                    Romain is a new contributor. Be nice, and check out our Code of Conduct.










                    draft saved

                    draft discarded


















                    Romain is a new contributor. Be nice, and check out our Code of Conduct.













                    Romain is a new contributor. Be nice, and check out our Code of Conduct.












                    Romain is a new contributor. Be nice, and check out our Code of Conduct.
















                    Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f315581%2frule-for-labeling-ways-not-being-part-of-osm-relation-in-qgis%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Щит и меч (фильм) Содержание Названия серий | Сюжет |...

                    Венесуэла на летних Олимпийских играх 2000 Содержание Состав...

                    Meter-Bus Содержание Параметры шины | Стандартизация |...