6

I am creating some statistics based on certain values. The issue I am having is that the extracted values are not the same as the values in the original raster. This creates incorrect output, and I need to ensure that, when joined, both fields are the exact same. After looking on ArcGIS Desktop, i found that the reason is that the pixels are moved by a tiny bit on the extract vs the original.

enter image description here

Hopefully you can see that the pixels are not aligned properly, and I need them to be properly aligned. I have tried the following:

  1. Set extent and Co-ordinate system to the extraction layer (in Extract by Mask)
  2. Snap the raster to the extraction extent(in Extract by Mask)

I am not sure what else I can do. I understand that this is a glitch as documented http://support.esri.com/en/knowledgebase/techarticles/detail/34448

From the article, setting the extent should fix it, but it does not do anything.

  • 2
    Have you set your Cell Size help.arcgis.com/EN/arcgisdesktop/10.0/help/index.html#/… and Snap Raster help.arcgis.com/EN/arcgisdesktop/10.0/help/index.html#//… to the raster being extracted from before the extraction? if not the origin may be taken from the mask or decided arbitrarily hence the difference in pixels... then set the output extent also to the input raster or not at all otherwise you'll have two environments conflicting. For extract by mask the Snap Raster and Cell Size are more important than extent. – Michael Stimson Oct 22 '15 at 1:50
  • Thank you very much! This fixed it perfectly.Could you possibly explain to me why this was happening and why the snap to to the extraction raster fixed it ? Does Extract by Mask take some starting point? – Martin Oct 22 '15 at 12:57
  • 2
    Yes, it's an old problem persisted since ArcInfo workstation. When you have a raster being extracted by another raster or polygon the extent will shrink to that of the clipping geometry and the origin (upper left) is taken just outside the extent of the geometry.. by enforcing the Snap Raster you tell the geoprocessor to essentially round the coordinates to match the snap which, even though offset by a pixel or two, will align with the snap raster and as you specify the cell size as being the source the result will align with the source (and avoid resampling). – Michael Stimson Oct 22 '15 at 21:14
1

It appears that these comments by @MichaelStimson answered your question:

Have you set your Cell Size http://help.arcgis.com/EN/arcgisdesktop/10.0/help/index.html#/Cell_Size/001w0000001s000000/ and Snap Raster http://help.arcgis.com/EN/arcgisdesktop/10.0/help/index.html#//001w0000000m000000 to the raster being extracted from before the extraction? if not the origin may be taken from the mask or decided arbitrarily hence the difference in pixels... then set the output extent also to the input raster or not at all otherwise you'll have two environments conflicting. For extract by mask the Snap Raster and Cell Size are more important than extent.

and:

Yes, it's an old problem persisted since ArcInfo workstation. When you have a raster being extracted by another raster or polygon the extent will shrink to that of the clipping geometry and the origin (upper left) is taken just outside the extent of the geometry.. by enforcing the Snap Raster you tell the geoprocessor to essentially round the coordinates to match the snap which, even though offset by a pixel or two, will align with the snap raster and as you specify the cell size as being the source the result will align with the source (and avoid resampling).

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.