I always thought QGIS and gdalwarp should return same result for projecting a 2D Sentinel 2 image (e.g: T32UQD_20200421T102021_TCI_60m.jp2) from UTM 32 to EPSG:4326.
What I did was:
- Open the .jp2 in QGis 2.14.9 with 'Enable on the fly CRS transformation'.
Warp the .jp2 to geotiff by gdalwarp:
gdalwarp T32UQD_20200421T102021_TCI_60m.jp2 -t_srs EPSG:4326 4.warped.tiff
But the output results from them look different significantly (on the left hand side with QGIS it looks rotated and on the right hand side with gdalwarp it looks aligned).
So, what should be the correct result?
gdalinfo T32UQD_20200421T102021_TCI_60m.jp2
Size is 1830, 1830
Coordinate System is:
PROJCS["WGS 84 / UTM zone 32N",
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9122"]],
AXIS["Latitude",NORTH],
AXIS["Longitude",EAST],
AUTHORITY["EPSG","4326"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",9],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AXIS["Easting",EAST],
AXIS["Northing",NORTH],
AUTHORITY["EPSG","32632"]]
Origin = (699960.000000000000000,5900040.000000000000000)
Pixel Size = (60.000000000000000,-60.000000000000000)
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 699960.000, 5900040.000) ( 11d59'40.71"E, 53d12'43.17"N)
Lower Left ( 699960.000, 5790240.000) ( 11d55'40.15"E, 52d13'34.41"N)
Upper Right ( 809760.000, 5900040.000) ( 13d38' 3.06"E, 53d 9'33.92"N)
Lower Right ( 809760.000, 5790240.000) ( 13d31'51.72"E, 52d10'31.74"N)
Center ( 754860.000, 5845140.000) ( 12d46'18.91"E, 52d41'45.89"N)
and warped by gdalwarp: 4.warped.tiff
Size is 2383, 1447
Coordinate System is:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]
Origin = (11.927820031375013,53.211992871316582)
Pixel Size = (0.000716123003772,-0.000716123003772)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 11.9278200, 53.2119929) ( 11d55'40.15"E, 53d12'43.17"N)
Lower Left ( 11.9278200, 52.1757629) ( 11d55'40.15"E, 52d10'32.75"N)
Upper Right ( 13.6343411, 53.2119929) ( 13d38' 3.63"E, 53d12'43.17"N)
Lower Right ( 13.6343411, 52.1757629) ( 13d38' 3.63"E, 52d10'32.75"N)
Center ( 12.7810806, 52.6938779) ( 12d46'51.89"E, 52d41'37.96"N)