1

I'm working on a water utility network. My municipality is in another multipolygon feature. The attribute field "area name" defines other cadastral municipalities. I want to select parts of the water network within a specific cadastral municipality.

I'm working in QGIS 2.18.

1

First option:

In your municipality layer, go to Properties>General and click on Query Builder (It's in the bottom right). There, create the query "area name" = 'the_name_of_the_municipality_you_want'. Click apply. There you will have showing just the municipality you want to use.

After that, go to Select by location and choose your network layer, click on the condition you want (probably within), and your municipalities layer as your intersection layer. Click Run.

Then, you should have your items from the network that are within your municipality.

Second option:

If you have problems getting your query to work, what you can do is just select the polygon of the desired municipality, right click your layer and click 'Export'. Check the box for 'Only selected items' and export. There, you have a layer with just the desired polygon. Then you just have to do a Select by location and choose your network layer, click on the condition you want (within), and the new municipality layer as your intersection layer. Click Run and you will get the result you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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