This question may seem strange at first, but what I need to do is to move a raster image over another raster image and align them perfectly. Both rasters have the very same size and resolution – one is a Landsat band and another is a product of bands analysis, so this movement includes change of coordinates.
Why are they in different places? In Correcting Landsat images shifted by strangely high distance using ArcMap? I said I have rasters straight from Earth Explorer covering some area that are misplaced from 100 m even up to 40 km (don't ask me why, sensor callibration?).
I will explain it by listing what I do:
- For every image create an RGB composition (for better terrain recognition)
- Choose one image as a reference one (which seems to be correct according to my GPS data)
- Using ArcMap's Shift tool I move each RGB image individually to it's correct place looking at the reference raster (RGB product only, bands are left untouched)
- Now I would like to automatically apply movement of each band of each image to corresponding RGB image created from these bands (move them to their "correct place")
- Afterwards I would use Snap raster option to align pixel misplacement if needed
Point 4. is where I'm stuck. I would prefer not to have to use Shift tool for each image, because selecting correct X and Y shift is problematic if you don't remember by how much you have already moved the corresponding RGB.
Best Answer
Thanks to the hint given by Vince, I wrote this really short Python script:
Put it in a loop to automate shifting of multiple images.