don't crash with empty GeometryIndexed
@@ -168,6 +168,7 @@ class GeometryIndexed:
image_data = np.zeros((int(math.ceil((maxy-miny)/self.resolution)),
int(math.ceil((maxx-minx)/self.resolution))), dtype=np.uint8)
+ if self.data.size:
minval = max(self.data.min(), 0)
maxval = max(self.data.max(), minval+0.01)
visible_data = (self.data.astype(float)-minval*255/(maxval-minval)).clip(0, 255).astype(np.uint8)
