0

I'm working with all postcode shapefiles for the Netherlands. But I want to add an indicator variable for all polygons that are above a feature (which is a line in this case). This line looks something like this:

enter image description here

What's the best way to do this in QGIS? I assume there is a way to do this in the field calculator, or by simply selecting shapes above a certain latitude, but the line has a slight kink, so I'm not sure.

1

Your postcode features are polygons, isn't it ? Do you agree that your line can intersect the postcode features ?

You can test the coordinates of the centroids with an operator "and" (all your centroids coordinates must be under / above the coordinates of the nodes ) Use the $Y function into a select console.

I think it would be easier to perform this analysis with a polygon (intersects / not intersects) perfectly aligned with the polygon boundaries but there may be a way to do exactly what you want to do...

I just tested the second method, using a polygon. As you can see, you only need a spatial query to get this result :

enter image description here

enter image description here


The trick is to use a mask to make it look like a polyline ...

| improve this answer | |
0

Well I will answer in English but assume your are Dutch. 1. Select by expression: Depence on the data set of the shapefile, and if the line as draws is very strick. If it is than it is not the best option. 2. Select by Polygoon: Is the line is very strick, make a polygoon from the part to don't want and select what in the polygoon. By turnaround selection you have to Northen part of The Netherlands.

Importent is if the shapefile data is a polygoon, so if there is data which goes through is line does is count or not?

Tip 1: In the attribute table there is above in the menu the option, turnaround selection (selectie omdraaien). Thise is very handy tool!

Tip 2: I think to data set it's large (Netherlands is a large country), so to reduce calculation time of your PC you can make a new shapefile of the selecting the shapefile in the panel and save, with the option: Only save the selected data.

| improve this answer | |

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.