dida-do/eurocropsml

Ensure that parcel_id_name column is str

jsreuss opened this issue · 0 comments

Making sure when filtering the polygon_df in the clipper.py module by parcel IDs that both DataFrames parcel ID column and the parcel_id list have type string (cf. clipper.py):
cf. clipping(...)

polygon_df[config.parcel_id_name] = polygon_df[config.parcel_id_name].astype(str) 

cf. _process_raster_parallel(...)

parcel_ids = [str(id) for id in parcel_ids]

This was only an issue for some countries (e.g. Spain NA) and ended in not clipping any values since no parcels were filtered.