Skip to content

Commit 3a2bd1c

Browse files
author
schmide
committed
exposures.plot_raster(): deal with 'height' or 'width' not present in meta
1 parent 28cc256 commit 3a2bd1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

climada/entity/exposures/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ def plot_raster(self, res=None, raster_res=None, save_tiff=None,
481481
Returns:
482482
matplotlib.figure.Figure, cartopy.mpl.geoaxes.GeoAxesSubplot
483483
"""
484-
if self.meta and self.meta['height'] * self.meta['width'] == len(self.gdf):
484+
if self.meta and self.meta.get('height', 0) * self.meta.get('height', 0) == len(self.gdf):
485485
raster = self.gdf.value.values.reshape((self.meta['height'],
486486
self.meta['width']))
487487
# check raster starts by upper left corner

0 commit comments

Comments
 (0)