The documentation for GDALDataset::GetGeoTransform says some things that are rather confusing.
Fetches the coefficients for transforming between pixel/line (P,L) raster space, and projection coordinates (Xp,Yp) space.
Xp = padfTransform + P*padfTransform + L*padfTransform; Yp = padfTransform + P*padfTransform + L*padfTransform;
In a north up image,
padfTransformis the pixel width, and
padfTransformis the pixel height.
The upper left corner of the upper left pixel is at position (
The default transform is
(0,1,0,0,0,1)and should be returned even when a CE_Failure error is returned, such as for formats that don't support transformation to projection coordinates.
If this is a matrix, it makes sense that Pixel_X is at 1,1 and Pixel_Y is at 2,2.
Here is my question:
So should the equation for Yp be:
Yp = padfTransform + L*padfTransform + P*padfTransform;
in which the positions of L and P are swapped?
Or if I am confused about something, can someone help me get unconfused?