I would like to sum up the amount of points in a polygon and its adjacent polygons. If possible, I would like to add a certain "weight"
to the points of the adjacent polygons. Here is a visual example:
Step 1. Count all points in the yellow hexagon
Step 2. Sum all points in the yellow hexagons and add them to the count of the single hexagon, but multiply this count by a certain factor X (for example 0.5) to make the "weight"
of the single hexagon heavier.
Best Answer
Using calculate field you could use the following expression for points inside the polygon:
You can see in the preview the results for the selected hexagon which really does have 3 points inside it.
To calculate the number of points within the neighboring hexagons you will need the following expression:
You can see the result again for the same hexagon, which has 6 neighbors that have 10 points between them. You have to make sure the geometry you want to count is the first one in the
intersection
function.Once you have both numbers you can use any factor you want on them.