I'm looking into some global DEMs (like ETOPO1 - http://www.ngdc.noaa.gov/mgg/global/global.html), and noticed that the statistics for the elevation values can change quite a bit after reprojecting the raster.
The original data comes in a LatLong pseudo-projection. Its stats are:
from GRASS 7.1 r.univar
min: -10803
max: 8333
mean: -1892.40422534
stddev: 2649.98339303
from gdalinfo -stats
min: -10803.000
max: 8333.000
mean: -1892.404
stddev: 2649.983
Now if I project the raster to a cylindrical equal-area projection:
GRASS
min: -10803
max: 8333
mean: -2382.28934158
stddev: 2508.93105538
gdalinfo
min: -10803.000
max: 8333.000
mean: -2382.289
stddev: 2508.931
So the projection process is causing this, although I'm using a nearest neighbor method, so the values shouldn't change.
I keep thinking on the elevation values as a big array of values, and that these values shouldn't change. Right?
I would expect some change with other interpolators, but not nearest neighbor. Or am I missing something really basic here?
In any case, this raises the question: which one is correct? (ignore the fact that the mean value doesn't really mean much due the bimodal distribution of elevations on Earth)