libgeotiff
geotiff.h
Go to the documentation of this file.
1 /**********************************************************************
2  *
3  * geotiff.h - Public interface for Geotiff tag parsing.
4  *
5  *
6  * Written By: Niles D. Ritter
7  *
8  **********************************************************************/
9 
10 #ifndef __geotiff_h_
11 #define __geotiff_h_
12 
24 /* This Version code should only change if a drastic
25  * alteration is made to the GeoTIFF key structure. Readers
26  * encountering a larger value should give up gracefully.
27  */
28 #define GvCurrentVersion 1
29 
30 #define LIBGEOTIFF_VERSION 1250
31 
32 #include "geo_config.h"
33 #include "geokeys.h"
34 
35 /**********************************************************************
36  * Do we want to build as a DLL on windows?
37  **********************************************************************/
38 #if !defined(CPL_DLL)
39 # if defined(_WIN32) && defined(BUILD_AS_DLL)
40 # define CPL_DLL __declspec(dllexport)
41 # else
42 # define CPL_DLL
43 # endif
44 #endif
45 
46 /**********************************************************************
47  *
48  * Public Structures & Definitions
49  *
50  **********************************************************************/
51 
52 #if defined(__cplusplus)
53 extern "C" {
54 #endif
55 
56 typedef struct gtiff GTIF; /* struct gtiff is private */
57 typedef struct _TIFFMethod TIFFMethod;
58 typedef unsigned short tifftag_t;
59 typedef unsigned short geocode_t;
60 typedef int (*GTIFPrintMethod)(char *string, void *aux);
61 typedef int (*GTIFReadMethod)(char *string, void *aux);
62 
63 typedef enum {
64  TYPE_BYTE=1,
65  TYPE_SHORT=2,
66  TYPE_LONG=3,
67  TYPE_RATIONAL=4,
68  TYPE_ASCII=5,
69  TYPE_FLOAT=6,
70  TYPE_DOUBLE=7,
71  TYPE_SBYTE=8,
72  TYPE_SSHORT=9,
73  TYPE_SLONG=10,
74  TYPE_UNKNOWN=11
75 } tagtype_t;
76 
77 
78 /**********************************************************************
79  *
80  * Public Function Declarations
81  *
82  **********************************************************************/
83 
84 /* TIFF-level interface */
85 GTIF CPL_DLL *GTIFNew(void *tif);
86 GTIF CPL_DLL *GTIFNewSimpleTags(void *tif);
87 GTIF CPL_DLL *GTIFNewWithMethods(void *tif, TIFFMethod*);
88 void CPL_DLL GTIFFree(GTIF *gtif);
89 int CPL_DLL GTIFWriteKeys(GTIF *gtif);
90 void CPL_DLL GTIFDirectoryInfo(GTIF *gtif, int *versions, int *keycount);
91 
92 /* GeoKey Access */
93 int CPL_DLL GTIFKeyInfo(GTIF *gtif, geokey_t key, int *size, tagtype_t* type);
94 int CPL_DLL GTIFKeyGet(GTIF *gtif, geokey_t key, void *val, int index,
95  int count);
96 int CPL_DLL GTIFKeySet(GTIF *gtif, geokey_t keyID, tagtype_t type,
97  int count,...);
98 
99 /* Metadata Import-Export utilities */
100 void CPL_DLL GTIFPrint(GTIF *gtif, GTIFPrintMethod print, void *aux);
101 int CPL_DLL GTIFImport(GTIF *gtif, GTIFReadMethod scan, void *aux);
102 char CPL_DLL *GTIFKeyName(geokey_t key);
103 char CPL_DLL *GTIFValueName(geokey_t key,int value);
104 char CPL_DLL *GTIFTypeName(tagtype_t type);
105 char CPL_DLL *GTIFTagName(int tag);
106 int CPL_DLL GTIFKeyCode(char * key);
107 int CPL_DLL GTIFValueCode(geokey_t key,char *value);
108 int CPL_DLL GTIFTypeCode(char *type);
109 int CPL_DLL GTIFTagCode(char *tag);
110 
111 /* Translation between image/PCS space */
112 
113 int CPL_DLL GTIFImageToPCS( GTIF *gtif, double *x, double *y );
114 int CPL_DLL GTIFPCSToImage( GTIF *gtif, double *x, double *y );
115 
116 #if defined(__cplusplus)
117 }
118 #endif
119 
120 #endif /* __geotiff_h_ */
int CPL_DLL GTIFWriteKeys(GTIF *gtif)
Definition: geo_write.c:34
int CPL_DLL GTIFImageToPCS(GTIF *gtif, double *x, double *y)
Definition: geo_trans.c:152
Definition: geo_tiffp.h:87
int CPL_DLL GTIFPCSToImage(GTIF *gtif, double *x, double *y)
Definition: geo_trans.c:249
int CPL_DLL GTIFKeySet(GTIF *gtif, geokey_t keyID, tagtype_t type, int count,...)
Definition: geo_set.c:112
int CPL_DLL GTIFKeyGet(GTIF *gtif, geokey_t key, void *val, int index, int count)
Definition: geo_get.c:150
void CPL_DLL GTIFFree(GTIF *gtif)
Definition: geo_free.c:37
Definition: geo_keyp.h:67
GTIF CPL_DLL * GTIFNew(void *tif)
Definition: geo_new.c:80

Generated for libgeotiff by doxygen 1.8.5