1

I have a set of geotif images that I want shifted by an integer number of pixels in X and Y. However, those images are quite large, so I don't want to duplicate them (and I need to keep the original unmodified), so modifying the geotransform is not a solution for me.

Is it possible to create a set of vrts (with different shift values) without modifying or duplicating the original images?

1 Answer 1

3

Seems to be easy at least with non-rotated images which use metric units. Create VRT file and edit the 1st and 4th parameters of GeoTransform by hand.

<VRTDataset rasterXSize="12000" rasterYSize="12000">
  <GeoTransform> 3.8100000000000000e+005, 5.0000000000000000e-001, 0.0000000000000000e+000, 6.8270000000000000e+006, 0.0000000000000000e+000,-5.0000000000000000e-001</GeoTransform>

The image below shows the same image opened through the original and edited .VRT with 1000 m shifts.

Shifted by editing .VRT

I have also a feeling that if PAM metadata is present as .aux.xml file GDAL will use it instead of the internal georeferencing of GeoTIFF. However, I can't say directly how to create the aux.xml metadata file for existing GeoTIFFs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.