1

I would like to sum up the amount of points in a polygon and in surrounding polygons adding certain weights.

Step 1. Here an example with one point: where the point is contained the weight should be for example 4; in the adjacent polygons the value assigned should be 0,5.

enter image description here

Step 2. It should work with multiple points within the polygons. For example - using the same values of the previous example - it should simultaneously sum up the weights of adjacent points and points within the polygon, as in the image below:

enter image description here

2
  • 2
    Welcome to GIS SE. As a new user, please take the Tour. We are a problem-solving site, but you don't seem to have a problem yet. just a task. The most frequent comments here are "What have you tried?" and "Where are you stuck?" If your Question doesn't address these, you are likely to encounter close votes. Please Edit the Question to indicate what problem you have encountered.
    – Vince
    Commented Jun 4 at 18:36
  • Sum up all the points in each hexagon, then sum up the touching hexagon and add it to the final sum for each hexagon in turn
    – Ian Turton
    Commented Jun 4 at 21:41

1 Answer 1

2

According to the question 'Counting points in adjacent polygons using QGIS', you can use the following expression proposed by the user Dror Bogin:

num_geometries( 
intersection(
    collect_geometries(
        aggregate('points',
            'array_agg',
            $geometry)
            ),
    collect_geometries(overlay_intersects('poly',$geometry))    
 ))

Example:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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