Closed cecileherr closed 1 year ago
I can confirm the issue:
>>> no_simplebr_fkok.map.iloc[6]
id 7
HAB1 4010
HAB2 4010,4030
HAB3 None
HAB4 None
HAB5 None
pHAB1 80
pHAB2 20.0
pHAB3 NaN
pHAB4 None
pHAB5 None
area_ha 33.874943
geometry POLYGON ((159967.1008254092 221298.9891029091,...
area_shape 33.876981
NICH_1_1 22.0
NICH_1_2 NaN
NICH_2_1 22.0
NICH_2_2 28.0
NICH_3_1 NaN
NICH_3_2 NaN
NICH_4_1 NaN
NICH_4_2 NaN
NICH_5_1 NaN
NICH_5_2 NaN
Name: 6, dtype: object
no_simplebr_fkok.area_effective.iloc[6]
vegetation
2 NaN
8 NaN
22 6.775396
23 NaN
24 NaN
28 6.775396
Name: 6, dtype: float64
just as a reference in the future: this a better version of test shapefile: bwk_fake_extentok.zip
When the same vegetation type occurs several times in a polygon, the total effective area is not correct. I suspect other derived variables could also be wrong (but not tested yet) This can happen in a real dataset, e.g. in the habitat map for Brasschaat BWK_2020_clip_Brasschaat.shp for polygon with TAG = 629464_v2020: both
4010,4030
and4010
are present and both will be translated into niche vegetation type 22.Here is an example with a dummy dataset:
For shape_id = 6 (polygon = ca 33 ha with 80% 4010 and 20% 4010, 4030):
4010,4030
)4010
+ 20% of 33 ha for4010,4030
)bwk_fake_extentok.zip