GXF
gxfopen.h
Go to the documentation of this file.
1/******************************************************************************
2 * $Id$
3 *
4 * Project: GXF Reader
5 * Purpose: GXF-3 access function declarations.
6 * Author: Frank Warmerdam, warmerdam@pobox.com
7 *
8 ******************************************************************************
9 * Copyright (c) 1998, Global Geomatics
10 * Copyright (c) 1998, Frank Warmerdam
11 *
12 * Permission is hereby granted, free of charge, to any person obtaining a
13 * copy of this software and associated documentation files (the "Software"),
14 * to deal in the Software without restriction, including without limitation
15 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 * and/or sell copies of the Software, and to permit persons to whom the
17 * Software is furnished to do so, subject to the following conditions:
18 *
19 * The above copyright notice and this permission notice shall be included
20 * in all copies or substantial portions of the Software.
21 *
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
28 * DEALINGS IN THE SOFTWARE.
29 ****************************************************************************/
30
31#ifndef GXFOPEN_H_INCLUDED
32#define GXFOPEN_H_INCLUDED
33
40/* -------------------------------------------------------------------- */
41/* Include standard portability stuff. */
42/* -------------------------------------------------------------------- */
43#include "cpl_conv.h"
44#include "cpl_string.h"
45
46CPL_C_START
47
48typedef void *GXFHandle;
49
50GXFHandle GXFOpen( const char * pszFilename );
51
52CPLErr GXFGetRawInfo( GXFHandle hGXF, int *pnXSize, int *pnYSize,
53 int *pnSense, double * pdfZMin, double * pdfZMax,
54 double * pdfDummy );
55CPLErr GXFGetInfo( GXFHandle hGXF, int *pnXSize, int *pnYSize );
56
57CPLErr GXFGetRawScanline( GXFHandle, int iScanline, double * padfLineBuf );
58CPLErr GXFGetScanline( GXFHandle, int iScanline, double * padfLineBuf );
59
60char **GXFGetMapProjection( GXFHandle );
61char **GXFGetMapDatumTransform( GXFHandle );
62char *GXFGetMapProjectionAsPROJ4( GXFHandle );
63char *GXFGetMapProjectionAsOGCWKT( GXFHandle );
64
65CPLErr GXFGetRawPosition( GXFHandle, double *, double *, double *, double *,
66 double * );
67CPLErr GXFGetPosition( GXFHandle, double *, double *, double *, double *,
68 double * );
69
70CPLErr GXFGetPROJ4Position( GXFHandle, double *, double *, double *, double *,
71 double * );
72
73void GXFClose( GXFHandle hGXF );
74
75#define GXFS_LL_UP -1
76#define GXFS_LL_RIGHT 1
77#define GXFS_UL_RIGHT -2
78#define GXFS_UL_DOWN 2
79#define GXFS_UR_DOWN -3
80#define GXFS_UR_LEFT 3
81#define GXFS_LR_LEFT -4
82#define GXFS_LR_UP 4
83
84CPL_C_END
85
86/* -------------------------------------------------------------------- */
87/* This is consider to be a private structure. */
88/* -------------------------------------------------------------------- */
89typedef struct {
90 VSILFILE *fp;
91
92 int nRawXSize;
93 int nRawYSize;
94 int nSense; /* GXFS_ codes */
95 int nGType; /* 0 is uncompressed */
96
97 double dfXPixelSize;
98 double dfYPixelSize;
99 double dfRotation;
100 double dfXOrigin; /* lower left corner */
101 double dfYOrigin; /* lower left corner */
102
103 char szDummy[64];
104 double dfSetDummyTo;
105
106 char *pszTitle;
107
108 double dfTransformScale;
109 double dfTransformOffset;
110 char *pszTransformName;
111
112 char **papszMapProjection;
113 char **papszMapDatumTransform;
114
115 char *pszUnitName;
116 double dfUnitToMeter;
117
118 double dfZMaximum;
119 double dfZMinimum;
120
121 vsi_l_offset *panRawLineOffset;
122} GXFInfo_t;
123
124#endif /* ndef GXFOPEN_H_INCLUDED */
CPLErr GXFGetPosition(GXFHandle, double *, double *, double *, double *, double *)
Definition: gxfopen.c:1010
char * GXFGetMapProjectionAsPROJ4(GXFHandle)
Definition: gxf_proj4.c:73
CPLErr GXFGetRawInfo(GXFHandle hGXF, int *pnXSize, int *pnYSize, int *pnSense, double *pdfZMin, double *pdfZMax, double *pdfDummy)
Definition: gxfopen.c:843
CPLErr GXFGetScanline(GXFHandle, int iScanline, double *padfLineBuf)
Definition: gxfopen.c:633
char ** GXFGetMapDatumTransform(GXFHandle)
Definition: gxfopen.c:915
CPLErr GXFGetRawScanline(GXFHandle, int iScanline, double *padfLineBuf)
Definition: gxfopen.c:700
CPLErr GXFGetRawPosition(GXFHandle, double *, double *, double *, double *, double *)
Definition: gxfopen.c:951
char ** GXFGetMapProjection(GXFHandle)
Definition: gxfopen.c:893
char * GXFGetMapProjectionAsOGCWKT(GXFHandle)
Definition: gxf_ogcwkt.c:288
void GXFClose(GXFHandle hGXF)
Definition: gxfopen.c:424
GXFHandle GXFOpen(const char *pszFilename)
Definition: gxfopen.c:191
Definition: gxfopen.h:89