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, ...
- 69.7k
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
Related Tags
gdal × 5919python × 1781
qgis × 873
raster × 865
geotiff-tiff × 580
gdalwarp × 500
ogr × 489
coordinate-system × 473
gdal-translate × 371
ogr2ogr × 319
shapefile × 251
postgis × 189
rasterio × 179
r × 149
pyqgis × 147
numpy × 135
c++ × 122
gdal2tiles × 121
osgeo × 116
netcdf × 112
georeferencing × 108
dem × 107
vrt × 104
clip × 94
tiles × 92