Plotting hazards with inapt crs #865
Labels
accepting pull request
Contribute by raising a pull request to resolve this issue!
enhancement
user-friendliness
Starting from climada 5.0, the crs of a Centroids object is bound to its GeoDataFrame (centroids.gdf).
It is possible though to create a Centroids object with an inapt crs by using
Centroids.from_meta
and a crs like, e.g.:This can happen if the hazard object is read from a shp file. (e.g.,
climada_petals.hazard.landslide.Landslide.from_prob
).Any hazard object based on this will behave normally, in general, but plotting (
plot_intensity
) raises an error as well asto_crs
.The only remedy to fix the crs is by directly overwriting it:
I think we should possibly fix this in
from_meta
, but at least allow replacing a broken crs with a good one into_crs
.The text was updated successfully, but these errors were encountered: