Hi All. Super sorry this is so long, but it's complex stuff.
I'm trying to clip a 48-MB, 1-band raster. I started with Toolboxes' "Clip Raster" tool but gave-up after waiting half a day. Checking this forum, it was suggested to instead "Extract by Mask", which actually worked, and quickly, but upon close examination, it appears to have reevaluated and modified the resulting raster's cell values. Below, you'll see where all values have been elevated/lightened.
Original raster - group of cells:
Extracted raster - same group of cells:
Both rasters above still claim a single-band value range of 0-81, but the Extracted raster appears to have "overexposed" the data, lightening all its values and eliminating its highest. My guess is that the process clips out the unwanted cells, then reevaluates what remains, redistributing the value spectrum across the new-raster cells. The Raster Information tables throw all sorts of red flags too, namely, Columns, Rows, Size, Pixel Type and Depth, NoData Value, and Pyramids, so it seems evident that Extract by Mask might not work here, since most of these parameters are not editable in the tool's Environments.
Alternatively, via Pro's tabs, the Analysis > Clip tool (Analysis > Raster > Raster Functions > System > Data Management > Clip) offers even fewer parameter adjustments.
This leads me to believe that the Geoprocessing > Clip Raster tool (Geoprocessing > Toolboxes > Data Management Tools > Raster > Raster Processing > Clip Raster), which does allow adjustment of many of the Raster Information parameters, is the only way to clip without losing data (assuming that IS what's actually happening).
So my questions are:
Solved! Go to Solution.
Really the only way you might get the pixel values actually changing is if the output coordinate system is different and the raster gets resampled when it is reprojected.
Can't reproduce. Extract by Mask maintains cell values,
For example - using Identify to show cell values at the same point in both original large raster and the extracted raster:
Of course your extent, n. rows/columns and min/max cell statistics will change, because you clipped/extracted out a smaller area. But the actual cell values remain the same.
The rasters/cells may even look different in the map but the values themselves have not changed. This is simply because the symbology will have changed (as the statistics are different). You can make them look the same by changing the symbology.
Also, as your raster cells appear rotated in the screenshots, it looks like you are trying to run the clip in a different projection than the raster is in which is probably why it's taking so long. Change your map /tool environments spatial reference system to match that of the original raster.
Thanks Luke. For me, the most important bit of your reply is where you say the cell values have not changed. Can you explain/confirm this? I almost never work with rasters (hence my struggle here) and am not sure how to compare one raster's cell value to that of another. In all my tests, what appears to happen is that the clipping process reevaluates the clipped raster, reassigning values from min to max, which will change those values if, for example, the removed portions were higher and/or lower values than what remains.
You can manually check by subtracting one from the other. You'll get all zero values where they overlap.
@JohnBranum wrote:In all my tests, what appears to happen is that the clipping process reevaluates the clipped raster, reassigning values from min to max, which will change those values if, for example, the removed portions were higher and/or lower values than what remains.
I think what you are referring to there is what happens to the symbology which is just a visual representation. It doesn't change the underlying values though.
Really the only way you might get the pixel values actually changing is if the output coordinate system is different and the raster gets resampled when it is reprojected.
That's great, Luke. That's what i needed to know. Much appreciated!