You can use the "Join attributes by location" tool in QGIS to add up the values of a different layer's field when it intersects with a polygon. Here's how:
Load both the polygon layer and the other layer that contains the field you want to add up.
Select the polygon layer in the Layers panel and click on the "Join attributes by location" tool in the Processing Toolbox.
In the "Join attributes by location" window, select the other layer from the "Input layer" drop-down menu.
Select "Take attributes of first located feature" under "Join type", which means that the attributes of the first feature that intersects with each polygon will be taken.
Choose the field from the other layer that you want to add up under the "Fields to add" list.
Check the box next to "Summarize" and select "Sum" from the drop-down menu.
Choose a name for the output layer and click "Run".
The output layer will now contain the polygons with added-up values from the other layer within their boundaries. You can open the attribute table of the output layer to see the new field with the summed values for each polygon.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-12-15 11:00:00 +0000
Seen: 18 times
Last updated: Aug 15 '21
In Qgis, what is the method to horizontally position labels along a line?
How can weights be duplicated and altered using pytorch?
How can I prevent the LeafletJS page from jumping when a layer is clicked?
What is the correct location to locate the appropriate Keras layer?
What are some methods to avoid the blending of colors due to opacity?
How can you use a mask in Photoshop to conceal parts of a stroke?
What is the method to add horizontal labels to a line in Qgis?
What is the method for de-linearizing the value of the depth buffer?