- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

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