[Geotiff] Re: Hep on GeoTiff
Frank Warmerdam
warmerdam at pobox.com
Wed Jun 23 16:09:21 EDT 2004
Ricardo Fonseca wrote:
> //Geotiff geokeys declaration
>
> geocode_t projFalseEasting, projFalseNorthing;
>
> //Geokeys (example of how I'm calling)
>
> GTIFKeyGet(gtif, ProjFalseEastingGeoKey, &projFalseEasting, 0, 1);
> GTIFKeyGet(gtif, ProjFalseNorthingGeoKey, &projFalseNorthing, 0, 1);
>
> //Closing
>
> GTIFFree(gtif);
>
> XTIFFClose(tif);
>
> ----xxx----
>
>
> This is a small example of how I'm using the library. Can you please
> help me?
> Another thing I want to retrieve and don't know how is the xResolution
> and yResolution of the pixel, as well as its type (byte, integer, short,
> long or double). Can you help me also in this subject?
Ricardo,
In the above scenario the projFalseEasting and projFalseNorthing variables
should be double's, not geocode_t (whatever that is).
Otherwise your approach seems fine. Note that many files will not have
all the geotags, so you need to be careful to check whether you got a
value or not from GTIFKeyGet(). I believe GTIFKeyGet() returns zero if it
did not find the tag, and nonzero if it does get a value.
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