This is a follow up question from $area gives NULL for some polygons in QGIS's Field Calculator and $area is NULL for over-wrapping geometry.
I have a map of Cambodia at district level (dist) and economic land concession (elc). I am trying to calculate the proportion of district that is occupied by the economic land concession. I have tried the following:
- created area for
elc
layer - for dist layer,
100*intersecting_geom_sum('elc','area_elc')/$area
Problem is, there are some districts that have over 100% coverage because the elc
layers in these districts have outrageously large area calculated.
I have used the following data, projected them into EPSG:3148, set the output field length as 21 for area calculation as advised. I also ran fix geometry for elc
layer afterwards.
How can I correctly calculate the area for these districts.
*** ADDED
I have found that for a small district, area of one big chunk of elc
that cross the district and other district was used- instead of part of elc
that is within district. Attached as picture below:
When I take the intersection, it works to cut them correctly. How could I possibly correct this problem?
Data using: GEO2_KH (Cambodia shapefile) https://international.ipums.org/international/gis_harmonized_2nd.shtml
ELCs: All economic land concessions shapefile https://data.opendevelopmentcambodia.net/dataset/economiclandconcessions
area($geometry)
for the calculations.