svn-gvsig-desktop / trunk / libraries / libjni-gdal / include / gdal.h @ 5888
History | View | Annotate | Download (24 KB)
1 |
/******************************************************************************
|
---|---|
2 |
* $Id: gdal.h 3540 2006-01-09 12:51:24Z nacho $
|
3 |
*
|
4 |
* Name: gdal.h
|
5 |
* Project: GDAL Core
|
6 |
* Purpose: GDAL Core C/Public declarations.
|
7 |
* Author: Frank Warmerdam, warmerdam@pobox.com
|
8 |
*
|
9 |
******************************************************************************
|
10 |
* Copyright (c) 1998, 2002 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 |
* $Log$
|
32 |
* Revision 1.2 2006-01-09 12:50:13 nacho
|
33 |
* *** empty log message ***
|
34 |
*
|
35 |
* Revision 1.1 2005/07/27 08:22:55 igbrotru
|
36 |
* *** empty log message ***
|
37 |
*
|
38 |
* Revision 1.1 2004/12/28 14:06:59 igbrotru
|
39 |
* *** empty log message ***
|
40 |
*
|
41 |
* Revision 1.1 2004/10/28 12:08:47 igbrotru
|
42 |
* *** empty log message ***
|
43 |
*
|
44 |
* Revision 1.1 2004/10/05 11:56:56 igbrotru
|
45 |
* *** empty log message ***
|
46 |
*
|
47 |
* Revision 1.82 2004/06/24 03:10:49 warmerda
|
48 |
* update to GDAL 1.2.1
|
49 |
*
|
50 |
* Revision 1.81 2004/04/29 13:42:58 warmerda
|
51 |
* added C Offset/Scale entry points
|
52 |
*
|
53 |
* Revision 1.80 2004/04/04 20:05:37 warmerda
|
54 |
* mark as 1.2.0.1
|
55 |
*
|
56 |
* Revision 1.79 2004/04/02 17:32:40 warmerda
|
57 |
* added GDALGeneralCmdLineProcessor()
|
58 |
*
|
59 |
* Revision 1.78 2004/03/28 16:01:46 warmerda
|
60 |
* added GDALApplyGeoTransform()
|
61 |
*
|
62 |
* Revision 1.77 2004/03/10 19:18:29 warmerda
|
63 |
* updated date
|
64 |
*
|
65 |
* Revision 1.76 2004/03/01 18:30:44 warmerda
|
66 |
* Updated release date.
|
67 |
*
|
68 |
* Revision 1.75 2004/02/25 09:03:15 dron
|
69 |
* Added GDALPackedDMSToDec() and GDALDecToPackedDMS() functions.
|
70 |
*
|
71 |
* Revision 1.74 2004/02/19 15:55:52 warmerda
|
72 |
* updated to 1.2.0
|
73 |
*
|
74 |
* Revision 1.73 2004/02/04 21:30:12 warmerda
|
75 |
* ensure GDALGetDataTypeByName is exported
|
76 |
*
|
77 |
* Revision 1.72 2004/01/18 16:43:37 dron
|
78 |
* Added GDALGetDataTypeByName() function.
|
79 |
*
|
80 |
* Revision 1.71 2003/07/18 04:46:48 sperkins
|
81 |
* added CPL_DLL to GDALFillRaster
|
82 |
*
|
83 |
* Revision 1.70 2003/06/27 20:03:11 warmerda
|
84 |
* updated version to 1.1.9
|
85 |
*
|
86 |
* Revision 1.69 2003/06/03 19:44:00 warmerda
|
87 |
* added GDALRPCInfo support
|
88 |
*
|
89 |
* Revision 1.68 2003/05/06 05:20:38 sperkins
|
90 |
* cleaned up comments
|
91 |
*
|
92 |
* Revision 1.67 2003/05/06 05:13:36 sperkins
|
93 |
* added Fill() and GDALFillRaster()
|
94 |
*
|
95 |
* Revision 1.66 2003/05/02 19:47:57 warmerda
|
96 |
* added C GetBandNumber and GetBandDataset entry points
|
97 |
*
|
98 |
* Revision 1.65 2003/04/30 17:13:48 warmerda
|
99 |
* added docs for many C functions
|
100 |
*
|
101 |
* Revision 1.64 2003/04/30 15:48:31 warmerda
|
102 |
* Fixed email address, trimmed log messages.
|
103 |
*
|
104 |
* Revision 1.63 2003/04/25 19:46:13 warmerda
|
105 |
* added GDALDatasetRasterIO
|
106 |
*
|
107 |
* Revision 1.62 2003/03/18 06:01:03 warmerda
|
108 |
* Added GDALFlushCache()
|
109 |
*
|
110 |
* Revision 1.61 2003/02/20 18:34:12 warmerda
|
111 |
* added GDALGetRasterAccess()
|
112 |
*
|
113 |
* Revision 1.60 2003/01/27 21:55:52 warmerda
|
114 |
* various documentation improvements
|
115 |
*
|
116 |
* Revision 1.59 2002/12/21 17:28:35 warmerda
|
117 |
* actually, lets use 1.1.8.0
|
118 |
*
|
119 |
* Revision 1.58 2002/12/21 17:26:43 warmerda
|
120 |
* updated version to 1.1.7.5
|
121 |
*
|
122 |
* Revision 1.57 2002/12/05 15:46:38 warmerda
|
123 |
* added GDALReadTabFile()
|
124 |
*
|
125 |
* Revision 1.56 2002/11/23 18:07:41 warmerda
|
126 |
* added DMD_CREATIONDATATYPES
|
127 |
*
|
128 |
* Revision 1.55 2002/10/24 14:18:29 warmerda
|
129 |
* intermediate version update
|
130 |
*
|
131 |
* Revision 1.54 2002/09/11 14:17:38 warmerda
|
132 |
* added C GDALSetDescription()
|
133 |
*
|
134 |
* Revision 1.53 2002/09/06 01:29:55 warmerda
|
135 |
* added C entry points for GetAccess() and GetOpenDatasets()
|
136 |
*
|
137 |
* Revision 1.52 2002/09/04 06:52:35 warmerda
|
138 |
* added GDALDestroyDriverManager
|
139 |
*
|
140 |
* Revision 1.51 2002/07/09 20:33:12 warmerda
|
141 |
* expand tabs
|
142 |
*
|
143 |
* Revision 1.50 2002/06/12 21:13:27 warmerda
|
144 |
* use metadata based driver info
|
145 |
*
|
146 |
* Revision 1.49 2002/05/28 18:55:46 warmerda
|
147 |
* added GDALOpenShared() and GDALDumpOpenDatasets
|
148 |
*
|
149 |
* Revision 1.48 2002/05/14 21:38:32 warmerda
|
150 |
* make INST_DATA overidable with binary patch
|
151 |
*
|
152 |
* Revision 1.47 2002/05/06 21:37:29 warmerda
|
153 |
* added GDALGCPsToGeoTransform
|
154 |
*
|
155 |
* Revision 1.46 2002/04/24 16:25:04 warmerda
|
156 |
* Ensure that GDAL{Read,Write}WorldFile() are exported on Windows.
|
157 |
*
|
158 |
* Revision 1.45 2002/04/19 12:22:05 dron
|
159 |
* added GDALWriteWorldFile()
|
160 |
*
|
161 |
* Revision 1.44 2002/04/16 13:59:33 warmerda
|
162 |
* added GDALVersionInfo
|
163 |
*
|
164 |
* Revision 1.43 2002/04/16 13:26:08 warmerda
|
165 |
* upgrade to version 1.1.7
|
166 |
*/
|
167 |
|
168 |
#ifndef GDAL_H_INCLUDED
|
169 |
#define GDAL_H_INCLUDED
|
170 |
|
171 |
/**
|
172 |
* \file gdal.h
|
173 |
*
|
174 |
* Public (C callable) GDAL entry points.
|
175 |
*/
|
176 |
|
177 |
#include "cpl_port.h" |
178 |
#include "cpl_error.h" |
179 |
|
180 |
/* -------------------------------------------------------------------- */
|
181 |
/* GDAL Version Information. */
|
182 |
/* -------------------------------------------------------------------- */
|
183 |
#ifndef GDAL_VERSION_NUM
|
184 |
# define GDAL_VERSION_NUM 1210 |
185 |
#endif
|
186 |
#ifndef GDAL_RELEASE_DATE
|
187 |
# define GDAL_RELEASE_DATE 20040623 |
188 |
#endif
|
189 |
#ifndef GDAL_RELEASE_NAME
|
190 |
# define GDAL_RELEASE_NAME "1.2.1.0" |
191 |
#endif
|
192 |
|
193 |
/* -------------------------------------------------------------------- */
|
194 |
/* Significant constants. */
|
195 |
/* -------------------------------------------------------------------- */
|
196 |
|
197 |
CPL_C_START |
198 |
|
199 |
/*! Pixel data types */
|
200 |
typedef enum { |
201 |
GDT_Unknown = 0,
|
202 |
/*! Eight bit unsigned integer */ GDT_Byte = 1, |
203 |
/*! Sixteen bit unsigned integer */ GDT_UInt16 = 2, |
204 |
/*! Sixteen bit signed integer */ GDT_Int16 = 3, |
205 |
/*! Thirty two bit unsigned integer */ GDT_UInt32 = 4, |
206 |
/*! Thirty two bit signed integer */ GDT_Int32 = 5, |
207 |
/*! Thirty two bit floating point */ GDT_Float32 = 6, |
208 |
/*! Sixty four bit floating point */ GDT_Float64 = 7, |
209 |
/*! Complex Int16 */ GDT_CInt16 = 8, |
210 |
/*! Complex Int32 */ GDT_CInt32 = 9, |
211 |
/*! Complex Float32 */ GDT_CFloat32 = 10, |
212 |
/*! Complex Float64 */ GDT_CFloat64 = 11, |
213 |
GDT_TypeCount = 12 /* maximum type # + 1 */ |
214 |
} GDALDataType; |
215 |
|
216 |
int CPL_DLL GDALGetDataTypeSize( GDALDataType );
|
217 |
int CPL_DLL GDALDataTypeIsComplex( GDALDataType );
|
218 |
const char CPL_DLL *GDALGetDataTypeName( GDALDataType ); |
219 |
GDALDataType CPL_DLL GDALGetDataTypeByName( const char * ); |
220 |
GDALDataType CPL_DLL GDALDataTypeUnion( GDALDataType, GDALDataType ); |
221 |
|
222 |
/*! Flag indicating read/write, or read-only access to data. */
|
223 |
typedef enum { |
224 |
/*! Read only (no update) access */ GA_ReadOnly = 0, |
225 |
/*! Read/write access. */ GA_Update = 1 |
226 |
} GDALAccess; |
227 |
|
228 |
/*! Read/Write flag for RasterIO() method */
|
229 |
typedef enum { |
230 |
/*! Read data */ GF_Read = 0, |
231 |
/*! Write data */ GF_Write = 1 |
232 |
} GDALRWFlag; |
233 |
|
234 |
/*! Types of color interpretation for raster bands. */
|
235 |
typedef enum |
236 |
{ |
237 |
GCI_Undefined=0,
|
238 |
/*! Greyscale */ GCI_GrayIndex=1, |
239 |
/*! Paletted (see associated color table) */ GCI_PaletteIndex=2, |
240 |
/*! Red band of RGBA image */ GCI_RedBand=3, |
241 |
/*! Green band of RGBA image */ GCI_GreenBand=4, |
242 |
/*! Blue band of RGBA image */ GCI_BlueBand=5, |
243 |
/*! Alpha (0=transparent, 255=opaque) */ GCI_AlphaBand=6, |
244 |
/*! Hue band of HLS image */ GCI_HueBand=7, |
245 |
/*! Saturation band of HLS image */ GCI_SaturationBand=8, |
246 |
/*! Lightness band of HLS image */ GCI_LightnessBand=9, |
247 |
/*! Cyan band of CMYK image */ GCI_CyanBand=10, |
248 |
/*! Magenta band of CMYK image */ GCI_MagentaBand=11, |
249 |
/*! Yellow band of CMYK image */ GCI_YellowBand=12, |
250 |
/*! Black band of CMLY image */ GCI_BlackBand=13 |
251 |
} GDALColorInterp; |
252 |
|
253 |
/*! Translate a GDALColorInterp into a user displayable string. */
|
254 |
const char CPL_DLL *GDALGetColorInterpretationName( GDALColorInterp ); |
255 |
|
256 |
/*! Types of color interpretations for a GDALColorTable. */
|
257 |
typedef enum |
258 |
{ |
259 |
/*! Grayscale (in GDALColorEntry.c1) */ GPI_Gray=0, |
260 |
/*! Red, Green, Blue and Alpha in (in c1, c2, c3 and c4) */ GPI_RGB=1, |
261 |
/*! Cyan, Magenta, Yellow and Black (in c1, c2, c3 and c4)*/ GPI_CMYK=2, |
262 |
/*! Hue, Lightness and Saturation (in c1, c2, and c3) */ GPI_HLS=3 |
263 |
} GDALPaletteInterp; |
264 |
|
265 |
/*! Translate a GDALPaletteInterp into a user displayable string. */
|
266 |
const char CPL_DLL *GDALGetPaletteInterpretationName( GDALPaletteInterp ); |
267 |
|
268 |
/* -------------------------------------------------------------------- */
|
269 |
/* GDAL Specific error codes. */
|
270 |
/* */
|
271 |
/* error codes 100 to 299 reserved for GDAL. */
|
272 |
/* -------------------------------------------------------------------- */
|
273 |
#define CPLE_WrongFormat 200 |
274 |
|
275 |
/* -------------------------------------------------------------------- */
|
276 |
/* Define handle types related to various internal classes. */
|
277 |
/* -------------------------------------------------------------------- */
|
278 |
typedef void *GDALMajorObjectH; |
279 |
typedef void *GDALDatasetH; |
280 |
typedef void *GDALRasterBandH; |
281 |
typedef void *GDALDriverH; |
282 |
typedef void *GDALProjDefH; |
283 |
typedef void *GDALColorTableH; |
284 |
|
285 |
/* -------------------------------------------------------------------- */
|
286 |
/* Callback "progress" function. */
|
287 |
/* -------------------------------------------------------------------- */
|
288 |
|
289 |
typedef int (*GDALProgressFunc)(double,const char *, void *); |
290 |
int CPL_DLL GDALDummyProgress( double, const char *, void *); |
291 |
int CPL_DLL GDALTermProgress( double, const char *, void *); |
292 |
int CPL_DLL GDALScaledProgress( double, const char *, void *); |
293 |
void CPL_DLL *GDALCreateScaledProgress( double, double, |
294 |
GDALProgressFunc, void * );
|
295 |
void CPL_DLL GDALDestroyScaledProgress( void * ); |
296 |
|
297 |
/* ==================================================================== */
|
298 |
/* Registration/driver related. */
|
299 |
/* ==================================================================== */
|
300 |
|
301 |
typedef struct { |
302 |
char *pszOptionName;
|
303 |
char *pszValueType; /* "boolean", "int", "float", "string", |
304 |
"string-select" */
|
305 |
char *pszDescription;
|
306 |
char **papszOptions;
|
307 |
} GDALOptionDefinition; |
308 |
|
309 |
#define GDAL_DMD_LONGNAME "DMD_LONGNAME" |
310 |
#define GDAL_DMD_HELPTOPIC "DMD_HELPTOPIC" |
311 |
#define GDAL_DMD_MIMETYPE "DMD_MIMETYPE" |
312 |
#define GDAL_DMD_EXTENSION "DMD_EXTENSION" |
313 |
#define GDAL_DMD_CREATIONOPTIONLIST "DMD_CREATIONOPTIONLIST" |
314 |
#define GDAL_DMD_CREATIONDATATYPES "DMD_CREATIONDATATYPES" |
315 |
|
316 |
#define GDAL_DCAP_CREATE "DCAP_CREATE" |
317 |
#define GDAL_DCAP_CREATECOPY "DCAP_CREATECOPY" |
318 |
|
319 |
void CPL_DLL GDALAllRegister( void ); |
320 |
|
321 |
GDALDatasetH CPL_DLL GDALCreate( GDALDriverH hDriver, |
322 |
const char *, int, int, int, GDALDataType, |
323 |
char ** );
|
324 |
GDALDatasetH CPL_DLL GDALCreateCopy( GDALDriverH, const char *, GDALDatasetH, |
325 |
int, char **, GDALProgressFunc, void * ); |
326 |
|
327 |
GDALDatasetH CPL_DLL GDALOpen( const char *pszFilename, GDALAccess eAccess ); |
328 |
GDALDatasetH CPL_DLL GDALOpenShared( const char *, GDALAccess ); |
329 |
int CPL_DLL GDALDumpOpenDatasets( FILE * );
|
330 |
|
331 |
GDALDriverH CPL_DLL GDALGetDriverByName( const char * ); |
332 |
int CPL_DLL GDALGetDriverCount();
|
333 |
GDALDriverH CPL_DLL GDALGetDriver( int );
|
334 |
int CPL_DLL GDALRegisterDriver( GDALDriverH );
|
335 |
void CPL_DLL GDALDeregisterDriver( GDALDriverH );
|
336 |
void CPL_DLL GDALDestroyDriverManager( void ); |
337 |
CPLErr CPL_DLL GDALDeleteDataset( GDALDriverH, const char * ); |
338 |
|
339 |
/* The following are deprecated */
|
340 |
const char CPL_DLL *GDALGetDriverShortName( GDALDriverH ); |
341 |
const char CPL_DLL *GDALGetDriverLongName( GDALDriverH ); |
342 |
const char CPL_DLL *GDALGetDriverHelpTopic( GDALDriverH ); |
343 |
|
344 |
/* ==================================================================== */
|
345 |
/* GDAL_GCP */
|
346 |
/* ==================================================================== */
|
347 |
|
348 |
/** Ground Control Point */
|
349 |
typedef struct |
350 |
{ |
351 |
/** Unique identifier, often numeric */
|
352 |
char *pszId;
|
353 |
|
354 |
/** Informational message or "" */
|
355 |
char *pszInfo;
|
356 |
|
357 |
/** Pixel (x) location of GCP on raster */
|
358 |
double dfGCPPixel;
|
359 |
/** Line (y) location of GCP on raster */
|
360 |
double dfGCPLine;
|
361 |
|
362 |
/** X position of GCP in georeferenced space */
|
363 |
double dfGCPX;
|
364 |
|
365 |
/** Y position of GCP in georeferenced space */
|
366 |
double dfGCPY;
|
367 |
|
368 |
/** Elevation of GCP, or zero if not known */
|
369 |
double dfGCPZ;
|
370 |
} GDAL_GCP; |
371 |
|
372 |
void CPL_DLL GDALInitGCPs( int, GDAL_GCP * ); |
373 |
void CPL_DLL GDALDeinitGCPs( int, GDAL_GCP * ); |
374 |
GDAL_GCP CPL_DLL *GDALDuplicateGCPs( int, const GDAL_GCP * ); |
375 |
|
376 |
int CPL_DLL GDALGCPsToGeoTransform( int nGCPCount, const GDAL_GCP *pasGCPs, |
377 |
double *padfGeoTransform, int bApproxOK ); |
378 |
int CPL_DLL GDALInvGeoTransform( double *padfGeoTransformIn, |
379 |
double *padfInvGeoTransformOut );
|
380 |
void CPL_DLL GDALApplyGeoTransform( double *, double, double, |
381 |
double *, double * ); |
382 |
|
383 |
/* ==================================================================== */
|
384 |
/* major objects (dataset, and, driver, drivermanager). */
|
385 |
/* ==================================================================== */
|
386 |
|
387 |
char CPL_DLL **GDALGetMetadata( GDALMajorObjectH, const char * ); |
388 |
CPLErr CPL_DLL GDALSetMetadata( GDALMajorObjectH, char **,
|
389 |
const char * ); |
390 |
const char CPL_DLL *GDALGetMetadataItem( GDALMajorObjectH, const char *, |
391 |
const char * ); |
392 |
CPLErr CPL_DLL GDALSetMetadataItem( GDALMajorObjectH, |
393 |
const char *, const char *, |
394 |
const char * ); |
395 |
const char CPL_DLL *GDALGetDescription( GDALMajorObjectH ); |
396 |
void CPL_DLL GDALSetDescription( GDALMajorObjectH, const char * ); |
397 |
|
398 |
/* ==================================================================== */
|
399 |
/* GDALDataset class ... normally this represents one file. */
|
400 |
/* ==================================================================== */
|
401 |
|
402 |
GDALDriverH CPL_DLL GDALGetDatasetDriver( GDALDatasetH ); |
403 |
void CPL_DLL GDALClose( GDALDatasetH );
|
404 |
int CPL_DLL GDALGetRasterXSize( GDALDatasetH );
|
405 |
int CPL_DLL GDALGetRasterYSize( GDALDatasetH );
|
406 |
int CPL_DLL GDALGetRasterCount( GDALDatasetH );
|
407 |
GDALRasterBandH CPL_DLL GDALGetRasterBand( GDALDatasetH, int );
|
408 |
|
409 |
CPLErr CPL_DLL GDALAddBand( GDALDatasetH hDS, GDALDataType eType, |
410 |
char **papszOptions );
|
411 |
|
412 |
CPLErr CPL_DLL GDALDatasetRasterIO( |
413 |
GDALDatasetH hDS, GDALRWFlag eRWFlag, |
414 |
int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize, |
415 |
void * pBuffer, int nBXSize, int nBYSize, GDALDataType eBDataType, |
416 |
int nBandCount, int *panBandCount, |
417 |
int nPixelSpace, int nLineSpace, int nBandSpace); |
418 |
|
419 |
const char CPL_DLL *GDALGetProjectionRef( GDALDatasetH ); |
420 |
CPLErr CPL_DLL GDALSetProjection( GDALDatasetH, const char * ); |
421 |
CPLErr CPL_DLL GDALGetGeoTransform( GDALDatasetH, double * );
|
422 |
CPLErr CPL_DLL GDALSetGeoTransform( GDALDatasetH, double * );
|
423 |
|
424 |
int CPL_DLL GDALGetGCPCount( GDALDatasetH );
|
425 |
const char CPL_DLL *GDALGetGCPProjection( GDALDatasetH ); |
426 |
const GDAL_GCP CPL_DLL *GDALGetGCPs( GDALDatasetH );
|
427 |
CPLErr CPL_DLL GDALSetGCPs( GDALDatasetH, int, const GDAL_GCP *, |
428 |
const char * ); |
429 |
|
430 |
void CPL_DLL *GDALGetInternalHandle( GDALDatasetH, const char * ); |
431 |
int CPL_DLL GDALReferenceDataset( GDALDatasetH );
|
432 |
int CPL_DLL GDALDereferenceDataset( GDALDatasetH );
|
433 |
|
434 |
CPLErr CPL_DLL GDALBuildOverviews( GDALDatasetH, const char *, int, int *, |
435 |
int, int *, GDALProgressFunc, void * ); |
436 |
void CPL_DLL GDALGetOpenDatasets( GDALDatasetH ***hDS, int *pnCount ); |
437 |
int CPL_DLL GDALGetAccess( GDALDatasetH hDS );
|
438 |
void CPL_DLL GDALFlushCache( GDALDatasetH hDS );
|
439 |
|
440 |
/* ==================================================================== */
|
441 |
/* GDALRasterBand ... one band/channel in a dataset. */
|
442 |
/* ==================================================================== */
|
443 |
|
444 |
GDALDataType CPL_DLL GDALGetRasterDataType( GDALRasterBandH ); |
445 |
void CPL_DLL GDALGetBlockSize( GDALRasterBandH,
|
446 |
int * pnXSize, int * pnYSize ); |
447 |
|
448 |
CPLErr CPL_DLL GDALRasterIO( GDALRasterBandH hRBand, GDALRWFlag eRWFlag, |
449 |
int nDSXOff, int nDSYOff, |
450 |
int nDSXSize, int nDSYSize, |
451 |
void * pBuffer, int nBXSize, int nBYSize, |
452 |
GDALDataType eBDataType, |
453 |
int nPixelSpace, int nLineSpace ); |
454 |
CPLErr CPL_DLL GDALReadBlock( GDALRasterBandH, int, int, void * ); |
455 |
CPLErr CPL_DLL GDALWriteBlock( GDALRasterBandH, int, int, void * ); |
456 |
int CPL_DLL GDALGetRasterBandXSize( GDALRasterBandH );
|
457 |
int CPL_DLL GDALGetRasterBandYSize( GDALRasterBandH );
|
458 |
char CPL_DLL **GDALGetRasterMetadata( GDALRasterBandH );
|
459 |
GDALAccess CPL_DLL GDALGetRasterAccess( GDALRasterBandH ); |
460 |
int CPL_DLL GDALGetBandNumber( GDALRasterBandH );
|
461 |
GDALDatasetH CPL_DLL GDALGetBandDataset( GDALRasterBandH ); |
462 |
|
463 |
GDALColorInterp CPL_DLL GDALGetRasterColorInterpretation( GDALRasterBandH ); |
464 |
CPLErr CPL_DLL GDALSetRasterColorInterpretation( GDALRasterBandH, |
465 |
GDALColorInterp ); |
466 |
GDALColorTableH CPL_DLL GDALGetRasterColorTable( GDALRasterBandH ); |
467 |
CPLErr CPL_DLL GDALSetRasterColorTable( GDALRasterBandH, GDALColorTableH ); |
468 |
int CPL_DLL GDALHasArbitraryOverviews( GDALRasterBandH );
|
469 |
int CPL_DLL GDALGetOverviewCount( GDALRasterBandH );
|
470 |
GDALRasterBandH CPL_DLL GDALGetOverview( GDALRasterBandH, int );
|
471 |
double CPL_DLL GDALGetRasterNoDataValue( GDALRasterBandH, int * ); |
472 |
CPLErr CPL_DLL GDALSetRasterNoDataValue( GDALRasterBandH, double );
|
473 |
char CPL_DLL ** GDALGetRasterCategoryNames( GDALRasterBandH );
|
474 |
CPLErr CPL_DLL GDALSetRasterCategoryNames( GDALRasterBandH, char ** );
|
475 |
double CPL_DLL GDALGetRasterMinimum( GDALRasterBandH, int *pbSuccess ); |
476 |
double CPL_DLL GDALGetRasterMaximum( GDALRasterBandH, int *pbSuccess ); |
477 |
const char CPL_DLL *GDALGetRasterUnitType( GDALRasterBandH ); |
478 |
double CPL_DLL GDALGetRasterOffset( GDALRasterBandH, int *pbSuccess ); |
479 |
double CPL_DLL GDALGetRasterScale( GDALRasterBandH, int *pbSuccess ); |
480 |
void CPL_DLL GDALComputeRasterMinMax( GDALRasterBandH hBand, int bApproxOK, |
481 |
double adfMinMax[2] ); |
482 |
CPLErr CPL_DLL GDALFlushRasterCache( GDALRasterBandH hBand ); |
483 |
CPLErr CPL_DLL GDALGetRasterHistogram( GDALRasterBandH hBand, |
484 |
double dfMin, double dfMax, |
485 |
int nBuckets, int *panHistogram, |
486 |
int bIncludeOutOfRange, int bApproxOK, |
487 |
GDALProgressFunc pfnProgress, |
488 |
void * pProgressData );
|
489 |
int CPL_DLL GDALGetRandomRasterSample( GDALRasterBandH, int, float * ); |
490 |
GDALRasterBandH CPL_DLL GDALGetRasterSampleOverview( GDALRasterBandH, int );
|
491 |
CPLErr CPL_DLL GDALFillRaster( GDALRasterBandH hBand, double dfRealValue,
|
492 |
double dfImaginaryValue );
|
493 |
CPLErr GDALComputeBandStats( GDALRasterBandH hBand, int nSampleStep,
|
494 |
double *pdfMean, double *pdfStdDev, |
495 |
GDALProgressFunc pfnProgress, |
496 |
void *pProgressData );
|
497 |
CPLErr GDALOverviewMagnitudeCorrection( GDALRasterBandH hBaseBand, |
498 |
int nOverviewCount,
|
499 |
GDALRasterBandH *pahOverviews, |
500 |
GDALProgressFunc pfnProgress, |
501 |
void *pProgressData );
|
502 |
|
503 |
/* -------------------------------------------------------------------- */
|
504 |
/* Helper functions. */
|
505 |
/* -------------------------------------------------------------------- */
|
506 |
int CPL_DLL GDALGeneralCmdLineProcessor( int nArgc, char ***ppapszArgv, |
507 |
int nOptions );
|
508 |
void CPL_DLL GDALSwapWords( void *pData, int nWordSize, int nWordCount, |
509 |
int nWordSkip );
|
510 |
void CPL_DLL
|
511 |
GDALCopyWords( void * pSrcData, GDALDataType eSrcType, int nSrcPixelOffset, |
512 |
void * pDstData, GDALDataType eDstType, int nDstPixelOffset, |
513 |
int nWordCount );
|
514 |
|
515 |
int CPL_DLL GDALReadWorldFile( const char *pszBaseFilename, |
516 |
const char *pszExtension, |
517 |
double * padfGeoTransform );
|
518 |
int CPL_DLL GDALWriteWorldFile( const char *pszBaseFilename, |
519 |
const char *pszExtension, |
520 |
double * padfGeoTransform );
|
521 |
int CPL_DLL GDALReadTabFile( const char *pszBaseFilename, |
522 |
double *padfGeoTransform, char **ppszWKT, |
523 |
int *pnGCPCount, GDAL_GCP **ppasGCPs );
|
524 |
|
525 |
const char CPL_DLL *GDALDecToDMS( double, const char *, int ); |
526 |
double CPL_DLL GDALPackedDMSToDec( double ); |
527 |
double CPL_DLL GDALDecToPackedDMS( double ); |
528 |
|
529 |
const char CPL_DLL *GDALVersionInfo( const char * ); |
530 |
|
531 |
typedef struct { |
532 |
double dfLINE_OFF;
|
533 |
double dfSAMP_OFF;
|
534 |
double dfLAT_OFF;
|
535 |
double dfLONG_OFF;
|
536 |
double dfHEIGHT_OFF;
|
537 |
|
538 |
double dfLINE_SCALE;
|
539 |
double dfSAMP_SCALE;
|
540 |
double dfLAT_SCALE;
|
541 |
double dfLONG_SCALE;
|
542 |
double dfHEIGHT_SCALE;
|
543 |
|
544 |
double adfLINE_NUM_COEFF[20]; |
545 |
double adfLINE_DEN_COEFF[20]; |
546 |
double adfSAMP_NUM_COEFF[20]; |
547 |
double adfSAMP_DEN_COEFF[20]; |
548 |
|
549 |
double dfMIN_LONG;
|
550 |
double dfMIN_LAT;
|
551 |
double dfMAX_LONG;
|
552 |
double dfMAX_LAT;
|
553 |
|
554 |
} GDALRPCInfo; |
555 |
|
556 |
int CPL_DLL GDALExtractRPCInfo( char **, GDALRPCInfo * ); |
557 |
|
558 |
/* ==================================================================== */
|
559 |
/* Color tables. */
|
560 |
/* ==================================================================== */
|
561 |
/** Color tuple */
|
562 |
typedef struct |
563 |
{ |
564 |
/*! gray, red, cyan or hue */
|
565 |
short c1;
|
566 |
|
567 |
/*! green, magenta, or lightness */
|
568 |
short c2;
|
569 |
|
570 |
/*! blue, yellow, or saturation */
|
571 |
short c3;
|
572 |
|
573 |
/*! alpha or blackband */
|
574 |
short c4;
|
575 |
} GDALColorEntry; |
576 |
|
577 |
GDALColorTableH CPL_DLL GDALCreateColorTable( GDALPaletteInterp ); |
578 |
void CPL_DLL GDALDestroyColorTable( GDALColorTableH );
|
579 |
GDALColorTableH CPL_DLL GDALCloneColorTable( GDALColorTableH ); |
580 |
GDALPaletteInterp CPL_DLL GDALGetPaletteInterpretation( GDALColorTableH ); |
581 |
int CPL_DLL GDALGetColorEntryCount( GDALColorTableH );
|
582 |
const GDALColorEntry CPL_DLL *GDALGetColorEntry( GDALColorTableH, int ); |
583 |
int CPL_DLL GDALGetColorEntryAsRGB( GDALColorTableH, int, GDALColorEntry *); |
584 |
void CPL_DLL GDALSetColorEntry( GDALColorTableH, int, const GDALColorEntry * ); |
585 |
|
586 |
/* ==================================================================== */
|
587 |
/* GDAL Cache Management */
|
588 |
/* ==================================================================== */
|
589 |
|
590 |
void CPL_DLL GDALSetCacheMax( int nBytes ); |
591 |
int CPL_DLL GDALGetCacheMax();
|
592 |
int CPL_DLL GDALGetCacheUsed();
|
593 |
int CPL_DLL GDALFlushCacheBlock();
|
594 |
|
595 |
CPL_C_END |
596 |
|
597 |
#endif /* ndef GDAL_H_INCLUDED */ |