#include "geo_config.h"
#include "geokeys.h"
Go to the source code of this file.
Functions | |
GTIF CPL_DLL* | GTIFNew (void *tif) |
void CPL_DLL | GTIFFree (GTIF *gtif) |
int CPL_DLL | GTIFWriteKeys (GTIF *gtif) |
int CPL_DLL | GTIFKeyGet (GTIF *gtif, geokey_t key, void *val, int index, int count) |
int CPL_DLL | GTIFKeySet (GTIF *gtif, geokey_t keyID, tagtype_t type, int count,...) |
int CPL_DLL | GTIFImageToPCS ( GTIF *gtif, double *x, double *y ) |
int CPL_DLL | GTIFPCSToImage ( GTIF *gtif, double *x, double *y ) |
Primary libgeotiff include file.
This is the defacto registry for valid GEOTIFF GeoKeys and their associated symbolic values. This is also the only file of the GeoTIFF library which needs to be included in client source code.
|
This function deallocates an existing GeoTIFF access handle previously created with GTIFNew(). If the handle was used to write GeoTIFF keys to the TIFF file, the GTIFWriteKeys() function should be used to flush results to the file before calling GTIFFree(). GTIFFree() should be called before XTIFFClose() is called on the corresponding TIFF file handle.
|
|
Translate a pixel/line coordinate to projection coordinates. At this time this function does not support image to PCS translations for tiepoints-only definitions, only pixelscale and transformation matrix formulations.
|
|
This function reads the value of a single GeoKey from a GeoTIFF file.
-- 6.2.1 GeoTIFF Configuration Keys -- ValuePair( GTModelTypeGeoKey, 1024) -- Section 6.3.1.1 Codes -- ValuePair( GTRasterTypeGeoKey, 1025) -- Section 6.3.1.2 Codes -- ValuePair( GTCitationGeoKey, 1026) -- documentation -- -- 6.2.2 Geographic CS Parameter Keys -- ValuePair( GeographicTypeGeoKey, 2048) -- Section 6.3.2.1 Codes -- ValuePair( GeogCitationGeoKey, 2049) -- documentation -- ValuePair( GeogGeodeticDatumGeoKey, 2050) -- Section 6.3.2.2 Codes -- ValuePair( GeogPrimeMeridianGeoKey, 2051) -- Section 6.3.2.4 codes -- ValuePair( GeogLinearUnitsGeoKey, 2052) -- Section 6.3.1.3 Codes -- ValuePair( GeogLinearUnitSizeGeoKey, 2053) -- meters -- ValuePair( GeogAngularUnitsGeoKey, 2054) -- Section 6.3.1.4 Codes -- ValuePair( GeogAngularUnitSizeGeoKey, 2055) -- radians -- ValuePair( GeogEllipsoidGeoKey, 2056) -- Section 6.3.2.3 Codes -- ValuePair( GeogSemiMajorAxisGeoKey, 2057) -- GeogLinearUnits -- ValuePair( GeogSemiMinorAxisGeoKey, 2058) -- GeogLinearUnits -- ValuePair( GeogInvFlatteningGeoKey, 2059) -- ratio -- ValuePair( GeogAzimuthUnitsGeoKey, 2060) -- Section 6.3.1.4 Codes -- ValuePair( GeogPrimeMeridianLongGeoKey, 2061) -- GeoAngularUnit -- -- 6.2.3 Projected CS Parameter Keys -- -- Several keys have been renamed,-- -- and the deprecated names aliased for backward compatibility -- ValuePair( ProjectedCSTypeGeoKey, 3072) -- Section 6.3.3.1 codes -- ValuePair( PCSCitationGeoKey, 3073) -- documentation -- ValuePair( ProjectionGeoKey, 3074) -- Section 6.3.3.2 codes -- ValuePair( ProjCoordTransGeoKey, 3075) -- Section 6.3.3.3 codes -- ValuePair( ProjLinearUnitsGeoKey, 3076) -- Section 6.3.1.3 codes -- ValuePair( ProjLinearUnitSizeGeoKey, 3077) -- meters -- ValuePair( ProjStdParallel1GeoKey, 3078) -- GeogAngularUnit -- ValuePair( ProjStdParallelGeoKey,ProjStdParallel1GeoKey) -- ** alias ** -- ValuePair( ProjStdParallel2GeoKey, 3079) -- GeogAngularUnit -- ValuePair( ProjNatOriginLongGeoKey, 3080) -- GeogAngularUnit -- ValuePair( ProjOriginLongGeoKey,ProjNatOriginLongGeoKey) -- ** alias ** -- ValuePair( ProjNatOriginLatGeoKey, 3081) -- GeogAngularUnit -- ValuePair( ProjOriginLatGeoKey,ProjNatOriginLatGeoKey) -- ** alias ** -- ValuePair( ProjFalseEastingGeoKey, 3082) -- ProjLinearUnits -- ValuePair( ProjFalseNorthingGeoKey, 3083) -- ProjLinearUnits -- ValuePair( ProjFalseOriginLongGeoKey, 3084) -- GeogAngularUnit -- ValuePair( ProjFalseOriginLatGeoKey, 3085) -- GeogAngularUnit -- ValuePair( ProjFalseOriginEastingGeoKey, 3086) -- ProjLinearUnits -- ValuePair( ProjFalseOriginNorthingGeoKey, 3087) -- ProjLinearUnits -- ValuePair( ProjCenterLongGeoKey, 3088) -- GeogAngularUnit -- ValuePair( ProjCenterLatGeoKey, 3089) -- GeogAngularUnit -- ValuePair( ProjCenterEastingGeoKey, 3090) -- ProjLinearUnits -- ValuePair( ProjCenterNorthingGeoKey, 3091) -- ProjLinearUnits -- ValuePair( ProjScaleAtNatOriginGeoKey, 3092) -- ratio -- ValuePair( ProjScaleAtOriginGeoKey,ProjScaleAtNatOriginGeoKey) -- ** alias ** -- ValuePair( ProjScaleAtCenterGeoKey, 3093) -- ratio -- ValuePair( ProjAzimuthAngleGeoKey, 3094) -- GeogAzimuthUnit -- ValuePair( ProjStraightVertPoleLongGeoKey, 3095) -- GeogAngularUnit -- 6.2.4 Vertical CS Keys ValuePair( VerticalCSTypeGeoKey, 4096) -- Section 6.3.4.1 codes -- ValuePair( VerticalCitationGeoKey, 4097) -- documentation -- ValuePair( VerticalDatumGeoKey, 4098) -- Section 6.3.4.2 codes -- ValuePair( VerticalUnitsGeoKey, 4099) -- Section 6.3.1 (.x) codes -- |
|
This function writes a geokey_t value to a GeoTIFF file.
The key indicates the key name to be written to the file and should from the geokey_t enumeration (eg.
The type should be one of TYPE_SHORT, TYPE_ASCII, or TYPE_DOUBLE and will indicate the type of value being passed at the end of the argument list (the key value). The count should be one except for strings when it should be the length of the string (or zero to for this to be computed internally).
The actual value is passed at the end of the argument list, and should be a short, a double, or a char * value. Note that short and double values are passed as is, not as pointers.
Note that key values aren't actually flushed to the file untill GTIFWriteKeys() is called. Till then the new values are just kept with the GTIF structure.
Example:
GTIFKeySet(gtif, GTRasterTypeGeoKey, TYPE_SHORT, 1, RasterPixelIsArea); GTIFKeySet(gtif, GTCitationGeoKey, TYPE_ASCII, 0, "UTM 11 North / NAD27" ); |
|
Given an open TIFF file, look for GTIF keys and values and return GTIF structure.
This function creates a GeoTIFF information interpretation handle (GTIF *) based on a passed in TIFF handle originally from XTIFFOpen(). Even though the argument (tif) is shown as type
The returned GTIF handle can be used to read or write GeoTIFF tags using the various GTIF functions. The handle should be destroyed using GTIFFree() before the file is closed with TIFFClose().
If the file accessed has no GeoTIFF keys, an valid (but empty) GTIF is still returned. GTIFNew() is used both for existing files being read, and for new TIFF files that will have GeoTIFF tags written to them.
|
|
Translate a projection coordinate to pixel/line coordinates. At this time this function does not support PCS to image translations for tiepoints-only, or transformation matrix based definitions, only pixelscale and tiepoints formulations.
|
|
This function flushes all the GeoTIFF keys that have been set with the GTIFKeySet() function into the associated TIFF file.
|