[gdal-dev] Convention for pixel coordinates in GDAL_GCP?

Frank Warmerdam warmerdam at pobox.com
Tue Sep 8 07:52:32 EDT 2009

Pablo d Angelo wrote:
> Hi all,
> I'm currently writing a GDAL driver for our in house image format.
> I have a question about the GDAL_GCP.dfGCPPixel and GDAL_GCP.dfGCPPixel
> coordinates. 
> http://gdal.org/gdal_datamodel.html says:
> The (Pixel,Line) position is the GCP location on the raster.
> Is it the center of the pixel, or one of the corners? It would be great
> if that info could be added to the documentation.


It uses the same pixel/line georeferencing model as is inherent in the
geotransform.  That is (0.0,0.0) would refer to the top left corner of the
top left pixel.  For a GCP to be at the center of the top left pixel it
would use (0.5,0.5)

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

More information about the gdal-dev mailing list