I have a geotiff, whose gdalinfo gives the following information about the georeferencing:
WGS 84 / UTM zone 32N
AUTHORITY["EPSG","32632"]
Now, I apply a simple gdalwarp for testing purposes:
gdalwarp -of GTiff -cutline subset.geojson InputImage.tif OutputImage.tif
The geojson subset is exactly the size of the geotiff, as I have extracted the corresponding subset before and the InputImage.tif already results from that extraction. Only thing I need to mention is that the .geojson is given in Lat-Long coordinates.
The output GeoTiff gives exactly the same gdalinfo georeferencing information!
The problem, however, now is that this operation, which actually should not do anything, changes the image: It basically slightly rotates the scene content and adds noData values around it to make for a rectangular image matrix again. Why is that? Actually, this is pretty annoying since my goal is to create subset images without any noData frames for further mathematical image processing operations. Can this be avoided somehow? In the end the task I am aiming to achieve is to extract subsets from the 10m bands of Sentinel-2 images and to store them as RGB geotiffs.