GXF
|
00001 /****************************************************************************** 00002 * $Id: gxfopen.h 10645 2007-01-18 02:22:39Z warmerdam $ 00003 * 00004 * Project: GXF Reader 00005 * Purpose: GXF-3 access function declarations. 00006 * Author: Frank Warmerdam, warmerdam@pobox.com 00007 * 00008 ****************************************************************************** 00009 * Copyright (c) 1998, Global Geomatics 00010 * Copyright (c) 1998, Frank Warmerdam 00011 * 00012 * Permission is hereby granted, free of charge, to any person obtaining a 00013 * copy of this software and associated documentation files (the "Software"), 00014 * to deal in the Software without restriction, including without limitation 00015 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00016 * and/or sell copies of the Software, and to permit persons to whom the 00017 * Software is furnished to do so, subject to the following conditions: 00018 * 00019 * The above copyright notice and this permission notice shall be included 00020 * in all copies or substantial portions of the Software. 00021 * 00022 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00023 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00024 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 00025 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00026 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 00027 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 00028 * DEALINGS IN THE SOFTWARE. 00029 ****************************************************************************/ 00030 00031 #ifndef _GXFOPEN_H_INCLUDED 00032 #define _GXFOPEN_H_INCLUDED 00033 00040 /* -------------------------------------------------------------------- */ 00041 /* Include standard portability stuff. */ 00042 /* -------------------------------------------------------------------- */ 00043 #include "cpl_conv.h" 00044 #include "cpl_string.h" 00045 00046 CPL_C_START 00047 00048 typedef void *GXFHandle; 00049 00050 GXFHandle GXFOpen( const char * pszFilename ); 00051 00052 CPLErr GXFGetRawInfo( GXFHandle hGXF, int *pnXSize, int *pnYSize, 00053 int *pnSense, double * pdfZMin, double * pdfZMax, 00054 double * pdfDummy ); 00055 CPLErr GXFGetInfo( GXFHandle hGXF, int *pnXSize, int *pnYSize ); 00056 00057 CPLErr GXFGetRawScanline( GXFHandle, int iScanline, double * padfLineBuf ); 00058 CPLErr GXFGetScanline( GXFHandle, int iScanline, double * padfLineBuf ); 00059 00060 char **GXFGetMapProjection( GXFHandle ); 00061 char **GXFGetMapDatumTransform( GXFHandle ); 00062 char *GXFGetMapProjectionAsPROJ4( GXFHandle ); 00063 char *GXFGetMapProjectionAsOGCWKT( GXFHandle ); 00064 00065 CPLErr GXFGetRawPosition( GXFHandle, double *, double *, double *, double *, 00066 double * ); 00067 CPLErr GXFGetPosition( GXFHandle, double *, double *, double *, double *, 00068 double * ); 00069 00070 CPLErr GXFGetPROJ4Position( GXFHandle, double *, double *, double *, double *, 00071 double * ); 00072 00073 void GXFClose( GXFHandle hGXF ); 00074 00075 #define GXFS_LL_UP -1 00076 #define GXFS_LL_RIGHT 1 00077 #define GXFS_UL_RIGHT -2 00078 #define GXFS_UL_DOWN 2 00079 #define GXFS_UR_DOWN -3 00080 #define GXFS_UR_LEFT 3 00081 #define GXFS_LR_LEFT -4 00082 #define GXFS_LR_UP 4 00083 00084 CPL_C_END 00085 00086 /* -------------------------------------------------------------------- */ 00087 /* This is consider to be a private structure. */ 00088 /* -------------------------------------------------------------------- */ 00089 typedef struct { 00090 FILE *fp; 00091 00092 int nRawXSize; 00093 int nRawYSize; 00094 int nSense; /* GXFS_ codes */ 00095 int nGType; /* 0 is uncompressed */ 00096 00097 double dfXPixelSize; 00098 double dfYPixelSize; 00099 double dfRotation; 00100 double dfXOrigin; /* lower left corner */ 00101 double dfYOrigin; /* lower left corner */ 00102 00103 char szDummy[64]; 00104 double dfSetDummyTo; 00105 00106 char *pszTitle; 00107 00108 double dfTransformScale; 00109 double dfTransformOffset; 00110 char *pszTransformName; 00111 00112 char **papszMapProjection; 00113 char **papszMapDatumTransform; 00114 00115 char *pszUnitName; 00116 double dfUnitToMeter; 00117 00118 00119 double dfZMaximum; 00120 double dfZMinimum; 00121 00122 long *panRawLineOffset; 00123 00124 } GXFInfo_t; 00125 00126 #endif /* ndef _GXFOPEN_H_INCLUDED */