1

Even after rotating a GeoTIFF file, the resulting file size do not change. however, the rotated file overlays on the original TIFF file. When I tried gdal_translate with projwin switch an error occured:

ERROR 1: The -projwin option was used, but the geotransform is rotated. This configuration is not supported.

I am using GDAL 2.4.

closed as unclear what you're asking by user30184, Erik, whyzar, Mark Ireland, Gabriel De Luca Mar 7 at 19:39

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • I want to create a separate tiff for the rotated image. – Sharmistha Mar 7 at 7:35
  • Please do not comment on your own question. Instead, Edit it to make clarifications. – Vince Mar 7 at 13:22
0

SetGeoTransform() does not rotate the image. It effectively just tells a conformant viewer which way north is (and not all viewers are conformant). So, if you have an image where East is up (for example), the geotransform is used to say that each step along the scanline is a step South and one pixel down from the top of the image is a step West (in this example).

gdal_translate will take this geotransform with it to the new file, but it still won't be actually rotated. The -projwin option is not for rotating either but for selecting a subwindow. You want to use gdal_warp which will account for the geotransform as it resamples the image and thereby burn the rotation into the new output file (as per your comment below the original post).

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