how to keep coordinates after modifying a geotiff

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how to keep coordinates after modifying a geotiff

Acid-2
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,

sincerely,Alison  ^_^

_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff
Reply | Threaded
Open this post in threaded view
|

Re: how to keep coordinates after modifying a geotiff

Frank Warmerdam
On 10/14/05, acid <[hidden email]> 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, [hidden email]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff