Main Page   Compound List   File List   Compound Members   File Members   Related Pages  

geotiff.h

Go to the documentation of this file.
00001 /**********************************************************************
00002  *
00003  *  geotiff.h - Public interface for Geotiff tag parsing.
00004  *
00005  *
00006  *   Written By: Niles D. Ritter
00007  *
00008  **********************************************************************/
00009 
00010 #ifndef __geotiff_h_
00011 #define __geotiff_h_
00012 
00024 /* This Version code should only change if a drastic
00025  * alteration is made to the GeoTIFF key structure. Readers
00026  * encountering a larger value should give up gracefully.
00027  */
00028 #define GvCurrentVersion   1
00029 
00030 #include "geo_config.h"
00031 #include "geokeys.h"
00032 
00033 /**********************************************************************
00034  * Do we want to build as a DLL on windows?
00035  **********************************************************************/
00036 #if !defined(CPL_DLL)
00037 #  if defined(_WIN32) && defined(BUILD_AS_DLL)
00038 #    define CPL_DLL     __declspec(dllexport)
00039 #  else
00040 #    define CPL_DLL
00041 #  endif
00042 #endif
00043 
00044 /**********************************************************************
00045  *
00046  *                 Public Structures & Definitions
00047  *
00048  **********************************************************************/
00049 
00050 #if defined(__cplusplus)
00051 extern "C" {
00052 #endif
00053 
00054 typedef struct gtiff GTIF;   /* struct gtiff is private */
00055 typedef unsigned short tifftag_t;
00056 typedef unsigned short geocode_t;
00057 typedef int (*GTIFPrintMethod)(char *string, void *aux);
00058 typedef int (*GTIFReadMethod)(char *string, void *aux);
00059 
00060 typedef enum {
00061    TYPE_BYTE=1,
00062    TYPE_SHORT=2,
00063    TYPE_LONG=3,
00064    TYPE_RATIONAL=4,
00065    TYPE_ASCII=5,
00066    TYPE_FLOAT=6,
00067    TYPE_DOUBLE=7,
00068    TYPE_SBYTE=8,
00069    TYPE_SSHORT=9,
00070    TYPE_SLONG=10,
00071    TYPE_UNKNOWN=11
00072 } tagtype_t;
00073 
00074 
00075 /**********************************************************************
00076  *
00077  *                 Public Function Declarations
00078  *
00079  **********************************************************************/
00080 
00081 /* TIFF-level interface */
00082 GTIF CPL_DLL *GTIFNew(void *tif);
00083 void CPL_DLL  GTIFFree(GTIF *gtif);
00084 int  CPL_DLL  GTIFWriteKeys(GTIF *gtif);
00085 void CPL_DLL  GTIFDirectoryInfo(GTIF *gtif, int *versions, int *keycount);
00086 
00087 /* GeoKey Access */
00088 int  CPL_DLL  GTIFKeyInfo(GTIF *gtif, geokey_t key, int *size, tagtype_t* type);
00089 int  CPL_DLL  GTIFKeyGet(GTIF *gtif, geokey_t key, void *val, int index,
00090                          int count);
00091 int  CPL_DLL  GTIFKeySet(GTIF *gtif, geokey_t keyID, tagtype_t type,
00092                          int count,...);
00093 
00094 /* Metadata Import-Export utilities */
00095 void  CPL_DLL  GTIFPrint(GTIF *gtif, GTIFPrintMethod print, void *aux);
00096 int   CPL_DLL  GTIFImport(GTIF *gtif, GTIFReadMethod scan, void *aux);
00097 char  CPL_DLL *GTIFKeyName(geokey_t key);
00098 char  CPL_DLL *GTIFValueName(geokey_t key,int value);
00099 char  CPL_DLL *GTIFTypeName(tagtype_t type);
00100 char  CPL_DLL *GTIFTagName(int tag);
00101 int   CPL_DLL  GTIFKeyCode(char * key);
00102 int   CPL_DLL  GTIFValueCode(geokey_t key,char *value);
00103 int   CPL_DLL  GTIFTypeCode(char *type);
00104 int   CPL_DLL  GTIFTagCode(char *tag);
00105 
00106 /* Translation between image/PCS space */
00107 
00108 int CPL_DLL    GTIFImageToPCS( GTIF *gtif, double *x, double *y );
00109 int CPL_DLL    GTIFPCSToImage( GTIF *gtif, double *x, double *y );
00110 
00111 #if defined(__cplusplus)
00112 }
00113 #endif
00114 
00115 #endif /* __geotiff_h_ */

Generated at Sun Mar 4 23:32:45 2001 for libgeotiff by doxygen1.2.3-20001105 written by Dimitri van Heesch, © 1997-2000