[Geotiff] how to keep coordinates after modifying a geotiff
Frank Warmerdam
warmerdam at pobox.com
Fri Oct 14 20:50:54 EDT 2005
On 10/14/05, acid <acid at nchc.org.tw> wrote:
> Hi,
> I use geotiff example GTIFReportACorner() to get the coordinates of 4 corners of geotiff images,
> and I wonder after modifying images,for example,cropping images, how can the coordinates of 4 new corners
> be obtained?
> Really appreciate your help,
Alison,
The GTIFReportACorner() function in listgeo takes pixel locations
as arguments. If you wanted to know the corners of a geotiff image
after cropping 20 pixels off the top, bottom and sides you could just
adjust the locations appropriately.
GTIFReportACorner( gtif, defn, fp_out, "Lower Left", 0.0+20, ysize-20,
inv_flag, dec_flag );
Does that help?
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 Geotiff
mailing list