Open palmoreck opened 6 years ago
In
https://github.com/CONABIO/antares3/blob/develop/madmex/management/commands/db_to_raster.py#L148
and
https://github.com/CONABIO/antares3/blob/develop/madmex/management/commands/db_to_raster.py#L156
there's a default value: np.uint8 which for scheme classification values out of range [0,255] will raise an error:
np.uint8
... File "/usr/local/lib/python3.5/dist-packages/rasterio/features.py", line 287, in rasterize raise ValueError(format_cast_error('shape values', dtype)) ValueError: shape values cannot be cast to specified dtype: <class 'numpy.uint8'>
so, handle this either in db_to_raster or ingest_training command
db_to_raster
ingest_training
(error got when using scheme of classes for colombia workshop, some values were: 321113, 2121, ...)
In
https://github.com/CONABIO/antares3/blob/develop/madmex/management/commands/db_to_raster.py#L148
and
https://github.com/CONABIO/antares3/blob/develop/madmex/management/commands/db_to_raster.py#L156
there's a default value:
np.uint8
which for scheme classification values out of range [0,255] will raise an error:so, handle this either in
db_to_raster
oringest_training
command(error got when using scheme of classes for colombia workshop, some values were: 321113, 2121, ...)