Commit a90fa05d authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed empty plot when plotting a boolean image in GeoArray.show().


Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent e6af436c
......@@ -8,6 +8,7 @@ History
* Updated minimal version of py_tools_ds which fixes a TypeError in GeoArray.save if nodata value has a numpy data type.
* Force Python data type in GeoArray.nodata setter.
* Fixed bandnames synchronization issue in GeoArray.get_subset().
* Fixed empty plot when plotting a boolean image in GeoArray.show().
0.13.3 (2021-07-12)
......
......@@ -1157,6 +1157,8 @@ class GeoArray(object):
out_nodata = in_nodata if in_nodata is not None else -9999
if not np.can_cast(out_nodata, image2plot.dtype):
image2plot = image2plot.astype(np.int32)
if image2plot.dtype == bool:
image2plot = image2plot.astype(int)
# rotated images always have to be resampled for plotting
if not ignore_rotation and (gt[2] or gt[4]):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment