0

I have inserted a Landsat raster into PostGIS using the command :

raster2pgsql -I -C -s 28356 -M -t 100x100 /data/LS7_20150425_B40.tif public.red | psql -d postgres -U postgres

Using QGIS, I have opened both my original file and the raster from PostGIS using DB manager of QGIS.

According to QGIS the pixel values are not the same :

  • original file : values from 64 to 3687
  • raster from PostGIS : values from 10 to 8295

Note: if I export my raster from PostGIS to a new file using GDAL, the file is identical to the original one.

Any explanation about this difference ?

  • Where is QGIS telling you the raster limits? There's options in the style dialog to sample from rasters to get an approximate range quickly for large rasters. – Spacedman Nov 23 '15 at 16:15
  • @Spacedman I looked the raster histogram in the layer properties view. It looks different even with the shape of the histogram. But I didn't know about this functionality of QGIS to display an approximate range quickly so I tried to get full statistics but I didn't manage to compute statistics on my raster layer such as min, max, std dev, mean, sum. Is there a way to use the "statistics panel" for that ? – pvillard Nov 23 '15 at 16:54
  • Which version of Qgis ? Band statistics in the information tab ? Qgis Raster Menu > Miscellaneous > Raster information ... ? – J. Monticolo Mar 13 at 17:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.