0

Trying to snap cells of one Landsat image with another one (older ones are sometimes totally misplaced, so I had to georeference it first), I use ArcMap's Copy tool and snap raster environment setting. The output raster is however in exactly the same position as the input one, with no change. Any ideas of what I may be doing wrong?

Details:

  • Both files are *.TIF
  • I have background geoprocessing off as in this question
  • I have parallel processing left default as in my issue on Esri's Geonet
  • I tried saving both to custom location and to Default.gdb
  • My ArcGIS version is 10.5.0.6491
  • I tried to process in: ArcMap, ArcCatalog and through ArcPy script from Windows cmd
  • finally both have same cellzise (I used Resample tool to match it, since Environment setting in Raster Analysis didn't work. Before the georeferenced image had it 30,009244 while "correct" images have 30)

I have ~40 rasters to process, so I would like to avoid "raster projection with point reference" method, which is a totally manual one.

  • What resample method are you using? Are you saying you have 30 classes which become more than 30? If so change your resample method to 'nearest' or 'majority' which wont introduce new values. Even though the help says Copy Raster uses the snap raster (and cell size) setting I don't think it does, copy is just a copy exactly the same as the original in a different format, name or folder. I would caution you against using the default gdb except as a scratch space, it may cause problems if you create a MXD with that data which can only be opened by you on that workstation. – Michael Stimson May 11 '17 at 22:46
  • I'm using "Nearest neighbor" method because of the nature of my data, but I think it doesn't have anything to do with cellsize and position. The number 30 refers to cellsize (pixel size), that is 30 meters. I got 30.009244 after using Warp from file tool (georeferencing). As for the Copy tool, this is what is most often advised to do if you just want only to snap your raster, I don't know any other way. And default.gdb thing- yes, that's only scratch place that helped me to identify issues sometimes (see link about Esri's Geonet). Thanks for your comment. – adamczi May 11 '17 at 22:59
  • Resample resources.arcgis.com/en/help/main/10.2/index.html#/Resample/… I know uses the snap raster and cell size (supply the raster you want to match cell size). Warp from file isn't a tool that I've used but the help docs doesn't say that it honors the environment cell size but it should use the environment snap raster. It seems a little odd to me that you can't control the output cell size of this raster operation, perhaps it's an oversight that needs to be highlighted as an Esri bug. – Michael Stimson May 11 '17 at 23:16
  • When back on my laptop I will try cellsize change + snapping on one take using Resample tool as you say, but I'm skeptical here, since it already didn't work separately. I wouldn't expect Esri to force you to find exact combination of commands when geoprocessing with multiple tools :D – adamczi May 11 '17 at 23:21
  • It worked using Resample tool. Thanks for your suggestion! I found out that Copy tool does not honour "Raster Analysis" environment setting, that's why my rasters were left untouched. If you post your comment as an answer, I'll be glad to accept it. – adamczi May 12 '17 at 13:34
0

As commented by @MichaelStimson:

Resample http://resources.arcgis.com/en/help/main/10.2/index.html#/Resample/00170000009t000000/ I know uses the snap raster and cell size (supply the raster you want to match cell size). Warp from file isn't a tool that I've used but the help docs doesn't say that it honors the environment cell size but it should use the environment snap raster. It seems a little odd to me that you can't control the output cell size of this raster operation, perhaps it's an oversight that needs to be highlighted as an Esri bug.

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.