geo_tiffp.h

00001 /**********************************************************************
00002  *
00003  *  geo_tiffp.h - Private interface for TIFF tag parsing.
00004  *
00005  *   Written by: Niles D. Ritter
00006  *
00007  *   This interface file encapsulates the interface to external TIFF
00008  *   file-io routines and definitions. The current configuration
00009  *   assumes that the "libtiff" module is used, but if you have your
00010  *   own TIFF reader, you may replace the definitions with your own
00011  *   here, and replace the implementations in geo_tiffp.c. No other
00012  *   modules have any explicit dependence on external TIFF modules.
00013  *
00014  *  Revision History;
00015  *
00016  *    20 June, 1995      Niles D. Ritter         New
00017  *    6 July,  1995      Niles D. Ritter         Fix prototypes
00018  *
00019  **********************************************************************/
00020 
00021 #ifndef __geo_tiffp_h_
00022 #define __geo_tiffp_h_
00023 
00024 /**********************************************************************
00025  *
00026  *                        Private includes
00027  *
00028  *   If you are not using libtiff and XTIFF, replace this include file
00029  *    with the appropriate one for your own TIFF parsing routines.
00030  *
00031  *   Revision History
00032  * 
00033  *      19 September 1995   ndr    Demoted Intergraph trans matrix.
00034  *
00035  **********************************************************************/
00036 
00037 #include "geotiff.h"
00038 #include "xtiffio.h"
00039 #include "cpl_serv.h"
00040 
00041 /*
00042  * dblparam_t is the type that a double precision
00043  * floating point value will have on the parameter
00044  * stack (when coerced by the compiler). You shouldn't
00045  * have to change this.
00046  */
00047 #ifdef applec
00048 typedef extended dblparam_t;
00049 #else
00050 typedef double dblparam_t;
00051 #endif
00052 
00053 
00054 /**********************************************************************
00055  *
00056  *                        Private defines
00057  *
00058  *   If you are not using "libtiff"/LIBXTIFF, replace these definitions
00059  *   with the appropriate definitions to access the geo-tags
00060  *
00061  **********************************************************************/
00062  
00063 typedef unsigned short pinfo_t;    /* SHORT ProjectionInfo tag type */
00064 typedef TIFF    tiff_t;            /* TIFF file descriptor          */
00065 typedef tdata_t  gdata_t;          /* pointer to data */
00066 typedef tsize_t  gsize_t;          /* data allocation size */
00067  
00068 #define GTIFF_GEOKEYDIRECTORY   TIFFTAG_GEOKEYDIRECTORY /* from xtiffio.h */
00069 #define GTIFF_DOUBLEPARAMS      TIFFTAG_GEODOUBLEPARAMS
00070 #define GTIFF_ASCIIPARAMS       TIFFTAG_GEOASCIIPARAMS
00071 #define GTIFF_PIXELSCALE        TIFFTAG_GEOPIXELSCALE
00072 #define GTIFF_TRANSMATRIX       TIFFTAG_GEOTRANSMATRIX
00073 #define GTIFF_INTERGRAPH_MATRIX TIFFTAG_INTERGRAPH_MATRIX
00074 #define GTIFF_TIEPOINTS         TIFFTAG_GEOTIEPOINTS
00075 #define GTIFF_LOCAL          0
00076 
00077 #if defined(__cplusplus)
00078 extern "C" {
00079 #endif
00080 
00081 /*
00082  * Method function pointer types
00083  */
00084 typedef int        (*GTGetFunction) (tiff_t *tif, pinfo_t tag, int *count, void *value );
00085 typedef int        (*GTSetFunction) (tiff_t *tif, pinfo_t tag, int  count, void *value );
00086 typedef tagtype_t  (*GTTypeFunction) (tiff_t *tif, pinfo_t tag);
00087 typedef struct     _TIFFMethod {
00088         GTGetFunction get;
00089         GTSetFunction set;
00090         GTTypeFunction type;
00091 } TIFFMethod;
00092 
00093 /**********************************************************************
00094  *
00095  *               Protected Function Declarations  
00096  *
00097  *   These routines are exposed implementations, and should not
00098  *   be used by external GEOTIFF client programs.
00099  *
00100  **********************************************************************/
00101 
00102 extern gsize_t _gtiff_size[]; /* TIFF data sizes */
00103 extern void CPL_DLL _GTIFSetDefaultTIFF(TIFFMethod *method);
00104 extern gdata_t CPL_DLL _GTIFcalloc(gsize_t);
00105 extern gdata_t CPL_DLL _GTIFrealloc(gdata_t,gsize_t);
00106 extern void CPL_DLL _GTIFFree(gdata_t data);
00107 extern void CPL_DLL _GTIFmemcpy(gdata_t out,gdata_t in,gsize_t size);
00108 
00109 #if defined(__cplusplus)
00110 } 
00111 #endif
00112 
00113 
00114 #endif /* __geo_tiffp_h_ */

Generated on Tue Jul 31 03:46:18 2007 for libgeotiff by  doxygen 1.5.2