[gdal-dev] Question about rotated rasters

Jorge Arévalo jorge.arevalo at deimos-space.com
Fri Sep 2 14:13:07 EDT 2011


Hello,

In gdal_translate source code I can read that the projwin option is
not valid if the raster is rotated. And related with this (I think),
in WCS driver, in GetCoverage function, you can see these lines

dfMinX = adfGeoTransform[0] +
        (nXOff) * adfGeoTransform[1];
dfMaxX = adfGeoTransform[0] +
        (nXOff + nXSize) * adfGeoTransform[1];
dfMaxY = adfGeoTransform[3] +
        (nYOff) * adfGeoTransform[5];
dfMinY = adfGeoTransform[3] +
        (nYOff + nYSize) * adfGeoTransform[5];

So, the georeferenced window is calculated from the source window (in
pixels) without using the rotation about axes (fields 2 and 4 from
geotransform array)

My question is: why? Why can't I calculate the projected window from a
source window in pixels in case of rotated rasters? I guess this is a
newbie question...

Thanks in advance, and best regards

-- 
Jorge Arévalo
Internet & Mobility Division, DEIMOS
jorge.arevalo at deimos-space.com
http://es.linkedin.com/in/jorgearevalo80
http://mobility.grupodeimos.com/
http://gis4free.wordpress.com
http://geohash.org/ezjqgrgzz0g


More information about the gdal-dev mailing list