Hello! I want to output the min and max of my layer properties via a python script. If I check it manually they are "Min 0.250754" and "Max 0.726268". [cid:image001.png@01D42279.12D3E1D0]
But my output via the python console is something completely different. With the GetMinimum method I receive 0.0837957039475 and with GetMaximum I receive 0.788260400295. Script: testlayer = iface.activeLayer() dataset = gdal.Open(testlayer.source(), gdal.GA_ReadOnly) band = dataset.GetRasterBand(1) print "GDAL Min" print band.GetMinimum() print "GDAL Max" print band.GetMaximum() Output: GDAL Min 0.0837957039475 GDAL Max 0.788260400295
_______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer