min zero in GeometryIndexed.to_image
@@ -171,7 +171,7 @@ class GeometryIndexed:
int(math.ceil((maxx-minx)/self.resolution))), dtype=np.uint8)
if self.data.size:
- minval = max(self.data.min(), 0)
+ minval = min(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)
image_data[self.y:self.y+height, self.x:self.x+width] = visible_data
