We have a census tract layer which contains the total number of dwellings 'V_tot'.
We need to group the census zones that intersect each other where their sum is in the range of greater than 150 and less than 200 houses
(V_tot).
The export can be a form or a field in the attribute table.
We have used the "Aggregate" option from the toolbox with the following code:
CASE WHEN overlay_intersects('z_2011_caract', filter:= CONTEO > 4 AND CONTEO<7 AND SUMA_VTOT > 150 AND SUMA_VTOT < 200 )THEN 1
WHEN overlay_intersects('z_2011_caract', filter:= CONTEO > 7 AND CONTEO<10 AND SUMA_VTOT > 150 AND SUMA_VTOT < 200 ) THEN 2
WHEN overlay_intersects('z_2011_caract', filter:= CONTEO > 10 AND CONTEO<15 AND SUMA_VTOT > 150 AND SUMA_VTOT < 200 ) THEN 3
WHEN overlay_intersects('z_2011_caract', filter:= CONTEO > 13 AND CONTEO<17 AND SUMA_VTOT > 150 AND SUMA_VTOT < 200 ) THEN 4
ELSE 5
END
Using as a condition the areas that intersect, the number of polygons that each one intersects and the total population of each zone.
We want the zones that meet the condition to be grouped and that are also adjacent that share at least one vertex.
Please help.