writing raster files produces black tifs


Julius Schmiedt
 

Hello everybody,

I´m quite new to rasterio and Python, but my task is, to produce binary raster files based on the information of sentinel2 satellite images (GTiff). Therefore I use Spyder IDE and the numpy.where() method to calculate new arrays and save them as GTiffs.

Although the output arrays contain 0 and 1 values, the output tif only shows black (in the shape of the original gtiff), if opened with standard image viewer or ArcGIS Desktop. Only if opened via Python script in Spyder, I am able to display the output tifs as expected (using rasterio.plot.show() method).

If anybody has an idea, what the problem might be, I would appreciate any help.

Thanks!

--
Julius Schmiedt
Wissenschaftliche Hilfskraft

Department Landschaftsökologie
Helmholtz-Zentrum für Umweltforschung GmbH - UFZ
Permoserstraße 15 | 04318 Leipzig
Tel.: +49 341 235 - 1058
Email: julius.schmiedt@...
Web: https://www.ufz.de

Join main@rasterio.groups.io to automatically receive all group messages.