<p dir="ltr">Remember the phrase "lies, d*mn lies, and statistics"? It applies here... . Most statistics for images are sampled, meaning the value of every pixel will not be read. In other words, you can't ordinarily trust the stats to tell you whether the data have changed on import.</p>
<p dir="ltr">I believe gdalinfo will report the true min and max for an image with "-mm", e.g.:</p>
<p dir="ltr">gdalinfo -mm image.asc</p>
<p dir="ltr">Hope this helps!<br>
Best,<br>
Steve</p>
<div class="gmail_quote">On May 26, 2014 4:18 PM, "dandrigo" <<a href="mailto:lcelati@latitude-geosystems.com">lcelati@latitude-geosystems.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear all,<br>
<br>
I imported into my postgis database my DEM thanks to raster2pgsql.<br>
<br>
After the import, i loaded my raw dem file (.asc) and my pg dem raster file<br>
into qgis to make sure that the altimetric values were identical.<br>
<br>
Unfortunatly, i noticed a z difference between the 2 data (often 3-5 meters,<br>
sometimes more).<br>
<br>
Below, you can read my small file comparing the metadata of the 2 data (on<br>
the left, raw dem file; on the right, postgis dem raster) :<br>
<br>
Raster_compare.pdf<br>
<<a href="http://postgis.17.x6.nabble.com/file/n5006415/Raster_compare.pdf" target="_blank">http://postgis.17.x6.nabble.com/file/n5006415/Raster_compare.pdf</a>><br>
<br>
Why this difference? How can I do so that my pg data is really identical to<br>
my raw asc file?<br>
<br>
In advance, thank you.<br>
<br>
Regards.<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://postgis.17.x6.nabble.com/Z-Difference-between-DEM-file-PG-DEM-layer-tp5006415.html" target="_blank">http://postgis.17.x6.nabble.com/Z-Difference-between-DEM-file-PG-DEM-layer-tp5006415.html</a><br>
Sent from the PostGIS - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a></blockquote></div>