You are here: > ESRI Forums > arcgis desktop discussion forums > Thread Replies

ArcGIS Desktop Discussion Forums

ArcGIS Desktop - Geoprocessing ArcToolbox forum

Misaligned raster after resampling?   David Kunz May 07, 2008
Re: Misaligned raster after resampling?   William Huber May 12, 2008
Re: Misaligned raster after resampling?   David Kunz May 12, 2008
Re: Misaligned raster after resampling?   William Huber May 12, 2008
Re: Misaligned raster after resampling?   David Kunz May 12, 2008
Re: Misaligned raster after resampling?   William Huber May 12, 2008
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Misaligned raster after resampling? 
Author David Kunz 
Date May 07, 2008 
Message I am attempting to smooth a Lidar DEM by resampling it to a larger cell size in order to produce meaningful contour lines. To do so i need to use a cubic convolution resampling process, nearest neighbor (nn) is not appropriate. After three days of experimenting I finally determined the optimal cell size and produce great contours but they are all shifted north and east and thus incompatible with the rest of my "spatial" data now!

I am using the Resample Tool in the toolbox and my multiple attempts to tweak the extent and snap extent Environments have failed miserably. If i use Spatial Analyst I am restricted to only the nn sampling.

Can anyone offer me a point and click solution? I am not fluent in writing code.

Thanks 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Misaligned raster after resampling? 
Author William Huber 
Date May 12, 2008 
Message David,

Some shifting is to be expected. Contours steer between cells using interpolation. Thus, when you compare contours based on the original data to contours based on data resampled to a larger cellsize, you are comparing interpolated values (from the original data) to values that have been *twice* interpolated (first to go to the larger cellsize, then to interpolate among the largers cells). Typical errors will be a fraction of the new cellsize, but sometimes you can lose local extremes of the data during the double interpolation, causing some contours to vanish or to shift by many cells.

Cell registration is another common cause of shifting: during the resampling process, make sure to use the same extent origin as the original grid. This shift will be relatively small, however, because it cannot exceed the original cellsize. It can, however, be a systematic shift such as the one you describe, so perhaps misregistration is the culprit in your case.

I still recommend using Spatial Analyst rather than some tool, because you can control and understand what SA is doing. There is no inherent limitation with cell sizes. For example, if you want to resample from 2 meters to 9.5 meters, you could first resample from 2 meter to 0.5 meters, then perform a 19X aggregation. However, I doubt you need such fine control, since your purpose is aesthetic, not analytical: the results of resampling to 8 meters or 10 meters (4X and 5X aggregation) won't be much different. 
  --Bill Huber
Quantitative Decisions (http://www.quantdec.com )
More GIS Q&A at http://gis.stackexchange.com/q/3083/664 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Misaligned raster after resampling? 
Author David Kunz 
Date May 12, 2008 
Message William,

A big thank you for your response. I completely understand what you sugest and i would expect some variation in my new data from the original however, the differences in the output file are gross. Is it me, but if your working with a "Geographic" information system shouldn't maintaining space be an absolute priority of the system?

Heck i don't mind even manually shifting the raster back to where i think it should go but I'll be darned if i can figure out how to edit a raster?


Since my original post i have made a few measurements if you're interested:

Source File res.: 5.99991893 m
Output res: 101.9986218 m (i.e. 17 x original)
Shifting: 101.9986218 (one pixel) + approx. 18.0 m to the north only?

I have also taken the shifted output and recalcuated it with SA with the rastor calculator where i know i can align the grids. That product aligned with the snapped grid alright but the data were still way off by a pixel.







 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Misaligned raster after resampling? 
Author William Huber 
Date May 12, 2008 
Message David,

It sounds like you're saying the new raster is shifted, not just the contours.

I wonder whether there is something going on with unexpected changes of coordinate system. This seems to happen a lot in ArcGIS. To check, remove all coordinate system information from the original grid and redo the resampling in a fresh ArcGIS project. (You can use a small portion of the grid for this test.) Does the shift still occur? 
  --Bill Huber
Quantitative Decisions (http://www.quantdec.com )
More GIS Q&A at http://gis.stackexchange.com/q/3083/664 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Misaligned raster after resampling? 
Author David Kunz 
Date May 12, 2008 
Message Many thanks for sticking with me Bill,

We really liked your idea but that was not the case at all. I sat down with a colleague who is able to operate ArcInfo Workstation using the command line and we figured out that most of ESRI's resampling techniques use the lower left corner to define the output extent. The resample tool in the toolbox actually uses the upper left : ) even though the webhelp states lower left. I’ve tried this on both 9.2 and 9.1 versions. How’s that for a slap in the face. We just ended up having my colleague run the resample in worksatation to get the desired product and be done with it. But later I realized a possible solution (for non-command liners like myself) was to resample my source grid to the same cell size but a new extent, X pixels wide (i.e. X = a direct multiple of the desired cell size), essentially adding more “no data” cells to the top of the grid at the original resolution so that the two grids mesh. If using multiples of 10, 100, etc…. this is not necessary.

So the problem was not the software’s lack of ability to maintain space but rather its lack of consistency in methodology. How do I go about reporting bugs?

Do I get points for solving my own problem ESRI???
 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Misaligned raster after resampling? 
Author William Huber 
Date May 12, 2008 
Message David,

They don't make it obvious, but at least there is now a way to report bugs: check out the FAQ at http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShow&d=33917 .

There are plenty of other "inconsistencies" between ArcToolBox tools and the built-in operations. That is one reason why I warmly advocate doing things directly with Spatial Analyst (preferably the Raster Calculator or command line) rather than using tools: you know what you are getting. 
  --Bill Huber
Quantitative Decisions (http://www.quantdec.com )
More GIS Q&A at http://gis.stackexchange.com/q/3083/664