In QGIS I have a polygon shapefile and a point shapefile. At the point shapefile, I want to create a column, which will inform me about the polygon where each point exists. What do you suggest?
Asked
Active
Viewed 3,959 times
5
-
1@Fezter : I don't think this question is a duplicate of How to count points in polygons with QGIS? as it states a different task of adding a column on the point shapefile with the information about the polygon. – nash Mar 22 '17 at 17:32
-
Is there an easy way to use the 'Join attributes by location' function within field calculator to add one attribute of a polygon to each point within it. I.e. I have a number of monitoring locations (points) which I would like to add an attribute column that containing the ID of the waterbody catchment they reside within (polygon). – OllieH Sep 04 '18 at 14:58
-
If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review – JGH Sep 04 '18 at 15:50
-
This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From Review – Vince Sep 04 '18 at 16:12
3 Answers
4
An easy way to do it in QGIS is to use 'Join attributes by location' algorithm under QGIS geoalgorithms > Vector general tools from the Processing Toolbox. Your target layer would be your point layer and the join layer would be the polygon layer. Since you want the details of the polygon in which the point lie, use the within option. Below is a screenshot for reference-
nash
- 1,976
- 14
- 19
-
Is there any way to do this without creating a new temporary layer. I just want to ** select ** the points so I can then update them. – LeasMaps Jan 06 '19 at 04:01
0
You can use the Points in Polygon tool in QGIS. From the menu click Vector > Analysis Tools > Points in Polygon...
dustinturp
- 322
- 2
- 12
-
1Hi. Actually I want to identify where (in which polygon) each point is located. Points in Polygon, counts the number of points in each polygon. Thanks anyway :) – Dimitris Mar 22 '17 at 13:39
0
in field calculator try this from your point layer, add or edit a field returning the polygon id
overlay_intersects(
layer:='poly_layer',
expression:="layer_id",
limit:=1)[0]
Stefano Verugi
- 21
- 3
