1 /********************************************************************** 2 * 3 * geo_tiffp.h - Private interface for TIFF tag parsing. 4 * 5 * Written by: Niles D. Ritter 6 * 7 * This interface file encapsulates the interface to external TIFF 8 * file-io routines and definitions. The current configuration 9 * assumes that the "libtiff" module is used, but if you have your 10 * own TIFF reader, you may replace the definitions with your own 11 * here, and replace the implementations in geo_tiffp.c. No other 12 * modules have any explicit dependence on external TIFF modules. 13 * 14 * Revision History; 15 * 16 * 20 June, 1995 Niles D. Ritter New 17 * 6 July, 1995 Niles D. Ritter Fix prototypes 18 * 19 **********************************************************************/ 20 21 #ifndef __geo_tiffp_h_ 22 #define __geo_tiffp_h_ 23 24 /********************************************************************** 25 * 26 * Private includes 27 * 28 * If you are not using libtiff and XTIFF, replace this include file 29 * with the appropriate one for your own TIFF parsing routines. 30 * 31 * Revision History 32 * 33 * 19 September 1995 ndr Demoted Intergraph trans matrix. 34 * 35 **********************************************************************/ 36 37 #include "geotiff.h" 38 #include "xtiffio.h" 39 #include "cpl_serv.h" 40 41 /* 42 * dblparam_t is the type that a double precision 43 * floating point value will have on the parameter 44 * stack (when coerced by the compiler). You shouldn't 45 * have to change this. 46 */ 47 #ifdef applec 48 typedef extended dblparam_t; 49 #else 50 typedef double dblparam_t; 51 #endif 52 53 54 /********************************************************************** 55 * 56 * Private defines 57 * 58 * If you are not using "libtiff"/LIBXTIFF, replace these definitions 59 * with the appropriate definitions to access the geo-tags 60 * 61 **********************************************************************/ 62 63 typedef unsigned short pinfo_t; /* SHORT ProjectionInfo tag type */ 64 typedef TIFF tiff_t; /* TIFF file descriptor */ 65 typedef tdata_t gdata_t; /* pointer to data */ 66 typedef tsize_t gsize_t; /* data allocation size */ 67 68 #define GTIFF_GEOKEYDIRECTORY TIFFTAG_GEOKEYDIRECTORY /* from xtiffio.h */ 69 #define GTIFF_DOUBLEPARAMS TIFFTAG_GEODOUBLEPARAMS 70 #define GTIFF_ASCIIPARAMS TIFFTAG_GEOASCIIPARAMS 71 #define GTIFF_PIXELSCALE TIFFTAG_GEOPIXELSCALE 72 #define GTIFF_TRANSMATRIX TIFFTAG_GEOTRANSMATRIX 73 #define GTIFF_INTERGRAPH_MATRIX TIFFTAG_INTERGRAPH_MATRIX 74 #define GTIFF_TIEPOINTS TIFFTAG_GEOTIEPOINTS 75 #define GTIFF_LOCAL 0 76 77 #if defined(__cplusplus) 78 extern "C" { 79 #endif 80 81 /* 82 * Method function pointer types 83 */ 84 typedef int (*GTGetFunction) (tiff_t *tif, pinfo_t tag, int *count, void *value ); 85 typedef int (*GTSetFunction) (tiff_t *tif, pinfo_t tag, int count, void *value ); 86 typedef tagtype_t (*GTTypeFunction) (tiff_t *tif, pinfo_t tag); 87 typedef struct _TIFFMethod { 88 GTGetFunction get; 89 GTSetFunction set; 90 GTTypeFunction type; 91 } TIFFMethod; 92 93 /********************************************************************** 94 * 95 * Protected Function Declarations 96 * 97 * These routines are exposed implementations, and should not 98 * be used by external GEOTIFF client programs. 99 * 100 **********************************************************************/ 101 102 extern gsize_t _gtiff_size[]; /* TIFF data sizes */ 103 extern void CPL_DLL _GTIFSetDefaultTIFF(TIFFMethod *method); 104 extern gdata_t CPL_DLL _GTIFcalloc(gsize_t); 105 extern gdata_t CPL_DLL _GTIFrealloc(gdata_t,gsize_t); 106 extern void CPL_DLL _GTIFFree(gdata_t data); 107 extern void CPL_DLL _GTIFmemcpy(gdata_t out,gdata_t in,gsize_t size); 108 109 #if defined(__cplusplus) 110 } 111 #endif 112 113 114 #endif /* __geo_tiffp_h_ */ 115