Hot answers tagged

4 votes

Can't display a satellite TIFF image in Spyder using Python

You need to reshape the list as ( width, height, z (bands) ). Currently, it is (bands, width, height). That's why you're getting the error. import numpy as np ... bands = np.array([red_band, ...
2 votes

GDAL predicator and Tile Offsets

Check spelling and use PREDICTOR https://gdal.org/drivers/raster/gtiff.html PREDICTOR=[1/2/3]: Set the predictor for LZW, DEFLATE and ZSTD compression. The default is 1 (no predictor), 2 is ...
  • 58.9k
1 vote

An example for Viewshed analysis in Python

The Python API documentation for the ViewshedGenerate algorithm is at https://gdal.org/api/python/osgeo.gdal.html#osgeo.gdal.ViewshedGenerate osgeo.gdal.ViewshedGenerate(Band srcBand, char const * ...
  • 58.9k

Only top scored, non community-wiki answers of a minimum length are eligible