1

This question already has an answer here:

I have a shapefile of a cut-up map of England. I have overlaid points (lat/long) from a CSV as a separate layer.

Is there a way to output what polygon each point is on. So, i'd want to be able to output that point A,B,C are on Polygon 1, D,E,F is polygon 2 etc.

I've counted how many points per polygon but I do not know how to do to swing it back round so it tells me what polygon each point overlays.

marked as duplicate by underdark qgis Feb 4 '18 at 21:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

Vector > Data Management Tools > Join attributes by location

Target vector layer = points
Join vector layer = polygons
Geometric predicate = within

Leave the rest on their defaults and run it. The output points layer will have a new field in the table referring to the underlying polygon, and you can set the labels to refer to it.

I'm certain there's a more elegant solution involving an expression or bit of code, but this will certainly work, provided your points layer is static.

  • Thanks, Josh. I did google around but wasn't completely sure what was the right answer! The process you suggested worked perfectly. Thanks very much for replying. – HeyVBA Feb 6 '18 at 14:15

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