[gdal-dev] Re: Add GCP's to a file

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Sat Feb 20 17:34:50 EST 2010


Dan Greve <grevedan <at> hotmail.com> writes:

> 
> 
> Question on the -gcp option in gdal_translate.  If i want to use it to 
> specify the geographic referencing of the four corners do i need to
> specify the center of the pixel, or the UL of the pixel.  
> (e.g. -gcp 0 0 34 115 OR -gcp 0.5 0.5 34 115 .


Hi,

Pixel values are integers and -gcp 0.5 0.5 34 115 does not make sense.  It is
worth knowing that the anchor point of the pixel is in the top-left corner of
the pixel (somebody hopefully corrects me if I am wrong) and the geographical
coordinates should be taken from that point, not from the middle of the pixel.  

Also the extents reported by gdalinfo are the widest possible extents and if 
those are to be used only UL coordinated can be used as it.  For other three
corners there is a need to minus one pixel size in one or both axis directions.

-Jukka Rahkonen-



More information about the gdal-dev mailing list