New answers tagged


I suggest using gdal.Translate to convert your PNG to a georeferenced GeoTIFF: from osgeo import gdal bounds = [west, north, east, south] gdal.Translate('output.tif', 'input.png', outputSRS='EPSG:4326', outputBounds=bounds) Use the coordinates from your bounding box as the outputBounds, making sure the SRS is correct (probably 4326). You can then include ...


You are using the -scale option of gdal_translate without other parameters and that's why your 16 bit png appears black. From -scale [src_min src_max [dst_min dst_max]] Rescale the input pixels values from the range src_min to src_max to the range dst_min to dst_max. If omitted the output range is 0 to 255....


Try substituting: render = QgsMapRendererCustomPainterJob(ms, p) for: render = QgsMapRendererParallelJob(ms)

Top 50 recent answers are included