I have to combine several DEM rasters into one from this source: http://srtm.csi.cgiar.org/SELECTION/inputCoord.asp, so I use Mosaic to New Raster tool.

I set up the tool:

  1. I input the rasters (all from the same source, same size and no projection);
  2. Set up the Pixel Type (32 bit floating point as in the original rasters);
  3. Set up the Cell size as the original rasters;
  4. Number of Bands = 1 as the original rasters; Mosaic Operator, I have done it with BLEND and MEAN (I get the same result).

The problem I have is that the resultant mosaic shows a different range of maximum and minimum values than the maximum and minimum values of the individual raster e.g., raster 1 (-5123.8, 23.25), raster 2 (-5974.6, 40.09), raster 3 (-57770.2, 38), raster 4 (-2534.3, 23.55), and final mosaic raster (-5975.8, 81.1).

I guess this solution is not right, at least I didn't expect to get that. Anybody has an idea if this is ok, and if this is not, how to solve it and get a proper mosaic raster with right maximum and minimum values?

I am using ArcGIS 10.2.2 for Desktop.

  • Could you tell us how you found the statistics for the input and output rasters? Sometimes, in the interest of efficiency, ArcGIS cheats and uses only a subset of the data to estimate the statistics. In particular this means it could be way off in its reporting of minima and maxima.
    – whuber
    Mar 6 '15 at 21:25
  • Thanks for your interest. I do right click to the layer (both initial rasters and mosaic) and look into Properties. It worth mentioning that I've checked to switch the values of each raster in Symbology from Streched to Unique values, and turns out that if I switch to Streched values for all the layers, then it matches the min Streched value from one layer and the max Streched value from another, to the min and max values that I see when the mosaic is created. Anybody could explain me if the procedure still right, and these differences between Streched and Uniques values? Thanks!
    – tom
    Mar 7 '15 at 0:13
  • 2
    I suspect the "Properties" tab is cheating. For more on this see gis.stackexchange.com/questions/8780.
    – whuber
    Mar 7 '15 at 1:59
  • 1
    Thanks. Never thought about the possibility that the 'Properties' tab is cheating. Maybe this can be clarify if we know the reason behind ArcGIS gives different values for Streched and Unique values in Symbology, for a single raster layer. Anybody would know why?
    – tom
    Mar 7 '15 at 7:23

As whuber mentioned, often statistics found in the raster properties are sometimes approximate or are out-of-date. They are predetermined properties that can be misleading to the actual raster values.

Calculated your own min / max values from 100% of the actual data using NumPy arrays. See Working with NumPy in ArcGIS, and RasterToNumPyArray (arcpy). E.g.:

import arcpy

inrast = r'C:\data\inRaster.tif'
my_array = arcpy.RasterToNumPyArray(inrast)
print((my_array.min(), my_array.max()))

If you have missing values (NODATA) then a masked array is needed to get the correct stats:

import numpy as np
my_array = arcpy.RasterToNumPyArray(inrast)
my_masked_array = np.ma.masked_equal(my_array, arcpy.Raster(inrast).noDataValue)
print((my_masked_array.min(), my_masked_array.max()))

Also, you don't need ArcGIS to read rasters as NumPy arrays; e.g. GDAL or rasterio can do similar.


As the other replies say the statistics are likely out of date. If you prefer using ArcGIS try the Calculate Statistics tool in the Data Management toolbox. This should update the statistics for you.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.