Statistics
| Revision:

svn-gvsig-desktop / trunk / libraries / libjni-gdal / include / gdal.h @ 716

History | View | Annotate | Download (23.9 KB)

1
/******************************************************************************
2
 * $Id: gdal.h 716 2004-12-28 14:07:11Z igbrotru $
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.1  2004-12-28 14:06:59  igbrotru
33
 * *** empty log message ***
34
 *
35
 * Revision 1.1  2004/10/28 12:08:47  igbrotru
36
 * *** empty log message ***
37
 *
38
 * Revision 1.1  2004/10/05 11:56:56  igbrotru
39
 * *** empty log message ***
40
 *
41
 * Revision 1.82  2004/06/24 03:10:49  warmerda
42
 * update to GDAL 1.2.1
43
 *
44
 * Revision 1.81  2004/04/29 13:42:58  warmerda
45
 * added C Offset/Scale entry points
46
 *
47
 * Revision 1.80  2004/04/04 20:05:37  warmerda
48
 * mark as 1.2.0.1
49
 *
50
 * Revision 1.79  2004/04/02 17:32:40  warmerda
51
 * added GDALGeneralCmdLineProcessor()
52
 *
53
 * Revision 1.78  2004/03/28 16:01:46  warmerda
54
 * added GDALApplyGeoTransform()
55
 *
56
 * Revision 1.77  2004/03/10 19:18:29  warmerda
57
 * updated date
58
 *
59
 * Revision 1.76  2004/03/01 18:30:44  warmerda
60
 * Updated release date.
61
 *
62
 * Revision 1.75  2004/02/25 09:03:15  dron
63
 * Added GDALPackedDMSToDec() and GDALDecToPackedDMS() functions.
64
 *
65
 * Revision 1.74  2004/02/19 15:55:52  warmerda
66
 * updated to 1.2.0
67
 *
68
 * Revision 1.73  2004/02/04 21:30:12  warmerda
69
 * ensure GDALGetDataTypeByName is exported
70
 *
71
 * Revision 1.72  2004/01/18 16:43:37  dron
72
 * Added GDALGetDataTypeByName() function.
73
 *
74
 * Revision 1.71  2003/07/18 04:46:48  sperkins
75
 * added CPL_DLL to GDALFillRaster
76
 *
77
 * Revision 1.70  2003/06/27 20:03:11  warmerda
78
 * updated version to 1.1.9
79
 *
80
 * Revision 1.69  2003/06/03 19:44:00  warmerda
81
 * added GDALRPCInfo support
82
 *
83
 * Revision 1.68  2003/05/06 05:20:38  sperkins
84
 * cleaned up comments
85
 *
86
 * Revision 1.67  2003/05/06 05:13:36  sperkins
87
 * added Fill() and GDALFillRaster()
88
 *
89
 * Revision 1.66  2003/05/02 19:47:57  warmerda
90
 * added C GetBandNumber and GetBandDataset entry points
91
 *
92
 * Revision 1.65  2003/04/30 17:13:48  warmerda
93
 * added docs for many C functions
94
 *
95
 * Revision 1.64  2003/04/30 15:48:31  warmerda
96
 * Fixed email address, trimmed log messages.
97
 *
98
 * Revision 1.63  2003/04/25 19:46:13  warmerda
99
 * added GDALDatasetRasterIO
100
 *
101
 * Revision 1.62  2003/03/18 06:01:03  warmerda
102
 * Added GDALFlushCache()
103
 *
104
 * Revision 1.61  2003/02/20 18:34:12  warmerda
105
 * added GDALGetRasterAccess()
106
 *
107
 * Revision 1.60  2003/01/27 21:55:52  warmerda
108
 * various documentation improvements
109
 *
110
 * Revision 1.59  2002/12/21 17:28:35  warmerda
111
 * actually, lets use 1.1.8.0
112
 *
113
 * Revision 1.58  2002/12/21 17:26:43  warmerda
114
 * updated version to 1.1.7.5
115
 *
116
 * Revision 1.57  2002/12/05 15:46:38  warmerda
117
 * added GDALReadTabFile()
118
 *
119
 * Revision 1.56  2002/11/23 18:07:41  warmerda
120
 * added DMD_CREATIONDATATYPES
121
 *
122
 * Revision 1.55  2002/10/24 14:18:29  warmerda
123
 * intermediate version update
124
 *
125
 * Revision 1.54  2002/09/11 14:17:38  warmerda
126
 * added C GDALSetDescription()
127
 *
128
 * Revision 1.53  2002/09/06 01:29:55  warmerda
129
 * added C entry points for GetAccess() and GetOpenDatasets()
130
 *
131
 * Revision 1.52  2002/09/04 06:52:35  warmerda
132
 * added GDALDestroyDriverManager
133
 *
134
 * Revision 1.51  2002/07/09 20:33:12  warmerda
135
 * expand tabs
136
 *
137
 * Revision 1.50  2002/06/12 21:13:27  warmerda
138
 * use metadata based driver info
139
 *
140
 * Revision 1.49  2002/05/28 18:55:46  warmerda
141
 * added GDALOpenShared() and GDALDumpOpenDatasets
142
 *
143
 * Revision 1.48  2002/05/14 21:38:32  warmerda
144
 * make INST_DATA overidable with binary patch
145
 *
146
 * Revision 1.47  2002/05/06 21:37:29  warmerda
147
 * added GDALGCPsToGeoTransform
148
 *
149
 * Revision 1.46  2002/04/24 16:25:04  warmerda
150
 * Ensure that GDAL{Read,Write}WorldFile() are exported on Windows.
151
 *
152
 * Revision 1.45  2002/04/19 12:22:05  dron
153
 * added GDALWriteWorldFile()
154
 *
155
 * Revision 1.44  2002/04/16 13:59:33  warmerda
156
 * added GDALVersionInfo
157
 *
158
 * Revision 1.43  2002/04/16 13:26:08  warmerda
159
 * upgrade to version 1.1.7
160
 */
161

    
162
#ifndef GDAL_H_INCLUDED
163
#define GDAL_H_INCLUDED
164

    
165
/**
166
 * \file gdal.h
167
 *
168
 * Public (C callable) GDAL entry points.
169
 */
170

    
171
#include "cpl_port.h"
172
#include "cpl_error.h"
173

    
174
/* -------------------------------------------------------------------- */
175
/*      GDAL Version Information.                                       */
176
/* -------------------------------------------------------------------- */
177
#ifndef GDAL_VERSION_NUM
178
#  define GDAL_VERSION_NUM      1210
179
#endif
180
#ifndef GDAL_RELEASE_DATE
181
#  define GDAL_RELEASE_DATE     20040623
182
#endif
183
#ifndef GDAL_RELEASE_NAME
184
#  define GDAL_RELEASE_NAME     "1.2.1.0"
185
#endif
186

    
187
/* -------------------------------------------------------------------- */
188
/*      Significant constants.                                          */
189
/* -------------------------------------------------------------------- */
190

    
191
CPL_C_START
192

    
193
/*! Pixel data types */
194
typedef enum {
195
    GDT_Unknown = 0,
196
    /*! Eight bit unsigned integer */           GDT_Byte = 1,
197
    /*! Sixteen bit unsigned integer */         GDT_UInt16 = 2,
198
    /*! Sixteen bit signed integer */           GDT_Int16 = 3,
199
    /*! Thirty two bit unsigned integer */      GDT_UInt32 = 4,
200
    /*! Thirty two bit signed integer */        GDT_Int32 = 5,
201
    /*! Thirty two bit floating point */        GDT_Float32 = 6,
202
    /*! Sixty four bit floating point */        GDT_Float64 = 7,
203
    /*! Complex Int16 */                        GDT_CInt16 = 8,
204
    /*! Complex Int32 */                        GDT_CInt32 = 9,
205
    /*! Complex Float32 */                      GDT_CFloat32 = 10,
206
    /*! Complex Float64 */                      GDT_CFloat64 = 11,
207
    GDT_TypeCount = 12          /* maximum type # + 1 */
208
} GDALDataType;
209

    
210
int CPL_DLL GDALGetDataTypeSize( GDALDataType );
211
int CPL_DLL GDALDataTypeIsComplex( GDALDataType );
212
const char CPL_DLL *GDALGetDataTypeName( GDALDataType );
213
GDALDataType CPL_DLL GDALGetDataTypeByName( const char * );
214
GDALDataType CPL_DLL GDALDataTypeUnion( GDALDataType, GDALDataType );
215

    
216
/*! Flag indicating read/write, or read-only access to data. */
217
typedef enum {
218
    /*! Read only (no update) access */ GA_ReadOnly = 0,
219
    /*! Read/write access. */           GA_Update = 1
220
} GDALAccess;
221

    
222
/*! Read/Write flag for RasterIO() method */
223
typedef enum {
224
    /*! Read data */   GF_Read = 0,
225
    /*! Write data */  GF_Write = 1
226
} GDALRWFlag;
227

    
228
/*! Types of color interpretation for raster bands. */
229
typedef enum
230
{
231
    GCI_Undefined=0,
232
    /*! Greyscale */                                      GCI_GrayIndex=1,
233
    /*! Paletted (see associated color table) */          GCI_PaletteIndex=2,
234
    /*! Red band of RGBA image */                         GCI_RedBand=3,
235
    /*! Green band of RGBA image */                       GCI_GreenBand=4,
236
    /*! Blue band of RGBA image */                        GCI_BlueBand=5,
237
    /*! Alpha (0=transparent, 255=opaque) */              GCI_AlphaBand=6,
238
    /*! Hue band of HLS image */                          GCI_HueBand=7,
239
    /*! Saturation band of HLS image */                   GCI_SaturationBand=8,
240
    /*! Lightness band of HLS image */                    GCI_LightnessBand=9,
241
    /*! Cyan band of CMYK image */                        GCI_CyanBand=10,
242
    /*! Magenta band of CMYK image */                     GCI_MagentaBand=11,
243
    /*! Yellow band of CMYK image */                      GCI_YellowBand=12,
244
    /*! Black band of CMLY image */                       GCI_BlackBand=13
245
} GDALColorInterp;
246

    
247
/*! Translate a GDALColorInterp into a user displayable string. */
248
const char CPL_DLL *GDALGetColorInterpretationName( GDALColorInterp );
249

    
250
/*! Types of color interpretations for a GDALColorTable. */
251
typedef enum 
252
{
253
  /*! Grayscale (in GDALColorEntry.c1) */                      GPI_Gray=0,
254
  /*! Red, Green, Blue and Alpha in (in c1, c2, c3 and c4) */  GPI_RGB=1,
255
  /*! Cyan, Magenta, Yellow and Black (in c1, c2, c3 and c4)*/ GPI_CMYK=2,
256
  /*! Hue, Lightness and Saturation (in c1, c2, and c3) */     GPI_HLS=3
257
} GDALPaletteInterp;
258

    
259
/*! Translate a GDALPaletteInterp into a user displayable string. */
260
const char CPL_DLL *GDALGetPaletteInterpretationName( GDALPaletteInterp );
261

    
262
/* -------------------------------------------------------------------- */
263
/*      GDAL Specific error codes.                                      */
264
/*                                                                      */
265
/*      error codes 100 to 299 reserved for GDAL.                       */
266
/* -------------------------------------------------------------------- */
267
#define CPLE_WrongFormat        200
268

    
269
/* -------------------------------------------------------------------- */
270
/*      Define handle types related to various internal classes.        */
271
/* -------------------------------------------------------------------- */
272
typedef void *GDALMajorObjectH;
273
typedef void *GDALDatasetH;
274
typedef void *GDALRasterBandH;
275
typedef void *GDALDriverH;
276
typedef void *GDALProjDefH;
277
typedef void *GDALColorTableH;
278

    
279
/* -------------------------------------------------------------------- */
280
/*      Callback "progress" function.                                   */
281
/* -------------------------------------------------------------------- */
282

    
283
typedef int (*GDALProgressFunc)(double,const char *, void *);
284
int CPL_DLL GDALDummyProgress( double, const char *, void *);
285
int CPL_DLL GDALTermProgress( double, const char *, void *);
286
int CPL_DLL GDALScaledProgress( double, const char *, void *);
287
void CPL_DLL *GDALCreateScaledProgress( double, double,
288
                                        GDALProgressFunc, void * );
289
void CPL_DLL GDALDestroyScaledProgress( void * );
290

    
291
/* ==================================================================== */
292
/*      Registration/driver related.                                    */
293
/* ==================================================================== */
294

    
295
typedef struct {
296
    char      *pszOptionName;
297
    char      *pszValueType;   /* "boolean", "int", "float", "string", 
298
                                  "string-select" */
299
    char      *pszDescription;
300
    char      **papszOptions;
301
} GDALOptionDefinition;
302

    
303
#define GDAL_DMD_LONGNAME "DMD_LONGNAME"
304
#define GDAL_DMD_HELPTOPIC "DMD_HELPTOPIC"
305
#define GDAL_DMD_MIMETYPE "DMD_MIMETYPE"
306
#define GDAL_DMD_EXTENSION "DMD_EXTENSION"
307
#define GDAL_DMD_CREATIONOPTIONLIST "DMD_CREATIONOPTIONLIST" 
308
#define GDAL_DMD_CREATIONDATATYPES "DMD_CREATIONDATATYPES" 
309

    
310
#define GDAL_DCAP_CREATE     "DCAP_CREATE"
311
#define GDAL_DCAP_CREATECOPY "DCAP_CREATECOPY"
312

    
313
void CPL_DLL GDALAllRegister( void );
314

    
315
GDALDatasetH CPL_DLL GDALCreate( GDALDriverH hDriver,
316
                                 const char *, int, int, int, GDALDataType,
317
                                 char ** );
318
GDALDatasetH CPL_DLL GDALCreateCopy( GDALDriverH, const char *, GDALDatasetH,
319
                                     int, char **, GDALProgressFunc, void * );
320

    
321
GDALDatasetH CPL_DLL GDALOpen( const char *pszFilename, GDALAccess eAccess );
322
GDALDatasetH CPL_DLL GDALOpenShared( const char *, GDALAccess );
323
int          CPL_DLL GDALDumpOpenDatasets( FILE * );
324

    
325
GDALDriverH CPL_DLL GDALGetDriverByName( const char * );
326
int CPL_DLL         GDALGetDriverCount();
327
GDALDriverH CPL_DLL GDALGetDriver( int );
328
int         CPL_DLL GDALRegisterDriver( GDALDriverH );
329
void        CPL_DLL GDALDeregisterDriver( GDALDriverH );
330
void        CPL_DLL GDALDestroyDriverManager( void );
331
CPLErr      CPL_DLL GDALDeleteDataset( GDALDriverH, const char * );
332

    
333
/* The following are deprecated */
334
const char CPL_DLL *GDALGetDriverShortName( GDALDriverH );
335
const char CPL_DLL *GDALGetDriverLongName( GDALDriverH );
336
const char CPL_DLL *GDALGetDriverHelpTopic( GDALDriverH );
337

    
338
/* ==================================================================== */
339
/*      GDAL_GCP                                                        */
340
/* ==================================================================== */
341

    
342
/** Ground Control Point */
343
typedef struct
344
{
345
    /** Unique identifier, often numeric */
346
    char        *pszId; 
347

    
348
    /** Informational message or "" */
349
    char        *pszInfo;
350

    
351
    /** Pixel (x) location of GCP on raster */
352
    double      dfGCPPixel;
353
    /** Line (y) location of GCP on raster */
354
    double      dfGCPLine;
355

    
356
    /** X position of GCP in georeferenced space */
357
    double      dfGCPX;
358

    
359
    /** Y position of GCP in georeferenced space */
360
    double      dfGCPY;
361

    
362
    /** Elevation of GCP, or zero if not known */
363
    double      dfGCPZ;
364
} GDAL_GCP;
365

    
366
void CPL_DLL GDALInitGCPs( int, GDAL_GCP * );
367
void CPL_DLL GDALDeinitGCPs( int, GDAL_GCP * );
368
GDAL_GCP CPL_DLL *GDALDuplicateGCPs( int, const GDAL_GCP * );
369

    
370
int CPL_DLL GDALGCPsToGeoTransform( int nGCPCount, const GDAL_GCP *pasGCPs, 
371
                                    double *padfGeoTransform, int bApproxOK ); 
372
int CPL_DLL GDALInvGeoTransform( double *padfGeoTransformIn, 
373
                                 double *padfInvGeoTransformOut );
374
void CPL_DLL GDALApplyGeoTransform( double *, double, double, 
375
                                    double *, double * );
376

    
377
/* ==================================================================== */
378
/*      major objects (dataset, and, driver, drivermanager).            */
379
/* ==================================================================== */
380

    
381
char CPL_DLL  **GDALGetMetadata( GDALMajorObjectH, const char * );
382
CPLErr CPL_DLL  GDALSetMetadata( GDALMajorObjectH, char **,
383
                                 const char * );
384
const char CPL_DLL *GDALGetMetadataItem( GDALMajorObjectH, const char *, 
385
                                         const char * );
386
CPLErr CPL_DLL  GDALSetMetadataItem( GDALMajorObjectH,
387
                                     const char *, const char *,
388
                                     const char * );
389
const char CPL_DLL *GDALGetDescription( GDALMajorObjectH );
390
void       CPL_DLL  GDALSetDescription( GDALMajorObjectH, const char * );
391

    
392
/* ==================================================================== */
393
/*      GDALDataset class ... normally this represents one file.        */
394
/* ==================================================================== */
395

    
396
GDALDriverH CPL_DLL GDALGetDatasetDriver( GDALDatasetH );
397
void CPL_DLL   GDALClose( GDALDatasetH );
398
int CPL_DLL     GDALGetRasterXSize( GDALDatasetH );
399
int CPL_DLL     GDALGetRasterYSize( GDALDatasetH );
400
int CPL_DLL     GDALGetRasterCount( GDALDatasetH );
401
GDALRasterBandH CPL_DLL GDALGetRasterBand( GDALDatasetH, int );
402

    
403
CPLErr CPL_DLL  GDALAddBand( GDALDatasetH hDS, GDALDataType eType, 
404
                             char **papszOptions );
405

    
406
CPLErr CPL_DLL GDALDatasetRasterIO( 
407
    GDALDatasetH hDS, GDALRWFlag eRWFlag,
408
    int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
409
    void * pBuffer, int nBXSize, int nBYSize, GDALDataType eBDataType,
410
    int nBandCount, int *panBandCount, 
411
    int nPixelSpace, int nLineSpace, int nBandSpace);
412

    
413
const char CPL_DLL *GDALGetProjectionRef( GDALDatasetH );
414
CPLErr CPL_DLL  GDALSetProjection( GDALDatasetH, const char * );
415
CPLErr CPL_DLL  GDALGetGeoTransform( GDALDatasetH, double * );
416
CPLErr CPL_DLL  GDALSetGeoTransform( GDALDatasetH, double * );
417

    
418
int CPL_DLL     GDALGetGCPCount( GDALDatasetH );
419
const char CPL_DLL *GDALGetGCPProjection( GDALDatasetH );
420
const GDAL_GCP CPL_DLL *GDALGetGCPs( GDALDatasetH );
421
CPLErr CPL_DLL  GDALSetGCPs( GDALDatasetH, int, const GDAL_GCP *,
422
                             const char * );
423

    
424
void CPL_DLL   *GDALGetInternalHandle( GDALDatasetH, const char * );
425
int CPL_DLL     GDALReferenceDataset( GDALDatasetH );
426
int CPL_DLL     GDALDereferenceDataset( GDALDatasetH );
427

    
428
CPLErr CPL_DLL  GDALBuildOverviews( GDALDatasetH, const char *, int, int *,
429
                                    int, int *, GDALProgressFunc, void * );
430
void CPL_DLL    GDALGetOpenDatasets( GDALDatasetH ***hDS, int *pnCount );
431
int CPL_DLL     GDALGetAccess( GDALDatasetH hDS );
432
void CPL_DLL    GDALFlushCache( GDALDatasetH hDS );
433

    
434
/* ==================================================================== */
435
/*      GDALRasterBand ... one band/channel in a dataset.               */
436
/* ==================================================================== */
437

    
438
GDALDataType CPL_DLL GDALGetRasterDataType( GDALRasterBandH );
439
void CPL_DLL    GDALGetBlockSize( GDALRasterBandH,
440
                                  int * pnXSize, int * pnYSize );
441

    
442
CPLErr CPL_DLL GDALRasterIO( GDALRasterBandH hRBand, GDALRWFlag eRWFlag,
443
                              int nDSXOff, int nDSYOff,
444
                              int nDSXSize, int nDSYSize,
445
                              void * pBuffer, int nBXSize, int nBYSize,
446
                              GDALDataType eBDataType,
447
                              int nPixelSpace, int nLineSpace );
448
CPLErr CPL_DLL GDALReadBlock( GDALRasterBandH, int, int, void * );
449
CPLErr CPL_DLL GDALWriteBlock( GDALRasterBandH, int, int, void * );
450
int CPL_DLL GDALGetRasterBandXSize( GDALRasterBandH );
451
int CPL_DLL GDALGetRasterBandYSize( GDALRasterBandH );
452
char CPL_DLL  **GDALGetRasterMetadata( GDALRasterBandH );
453
GDALAccess CPL_DLL GDALGetRasterAccess( GDALRasterBandH );
454
int CPL_DLL GDALGetBandNumber( GDALRasterBandH );
455
GDALDatasetH CPL_DLL GDALGetBandDataset( GDALRasterBandH );
456

    
457
GDALColorInterp CPL_DLL GDALGetRasterColorInterpretation( GDALRasterBandH );
458
CPLErr CPL_DLL GDALSetRasterColorInterpretation( GDALRasterBandH,
459
                                                 GDALColorInterp );
460
GDALColorTableH CPL_DLL GDALGetRasterColorTable( GDALRasterBandH );
461
CPLErr CPL_DLL GDALSetRasterColorTable( GDALRasterBandH, GDALColorTableH );
462
int CPL_DLL     GDALHasArbitraryOverviews( GDALRasterBandH );
463
int CPL_DLL             GDALGetOverviewCount( GDALRasterBandH );
464
GDALRasterBandH CPL_DLL GDALGetOverview( GDALRasterBandH, int );
465
double CPL_DLL GDALGetRasterNoDataValue( GDALRasterBandH, int * );
466
CPLErr CPL_DLL GDALSetRasterNoDataValue( GDALRasterBandH, double );
467
char CPL_DLL ** GDALGetRasterCategoryNames( GDALRasterBandH );
468
CPLErr CPL_DLL GDALSetRasterCategoryNames( GDALRasterBandH, char ** );
469
double CPL_DLL GDALGetRasterMinimum( GDALRasterBandH, int *pbSuccess );
470
double CPL_DLL GDALGetRasterMaximum( GDALRasterBandH, int *pbSuccess );
471
const char CPL_DLL *GDALGetRasterUnitType( GDALRasterBandH );
472
double CPL_DLL GDALGetRasterOffset( GDALRasterBandH, int *pbSuccess );
473
double CPL_DLL GDALGetRasterScale( GDALRasterBandH, int *pbSuccess );
474
void CPL_DLL GDALComputeRasterMinMax( GDALRasterBandH hBand, int bApproxOK,
475
                                      double adfMinMax[2] );
476
CPLErr CPL_DLL GDALFlushRasterCache( GDALRasterBandH hBand );
477
CPLErr CPL_DLL GDALGetRasterHistogram( GDALRasterBandH hBand,
478
                                       double dfMin, double dfMax,
479
                                       int nBuckets, int *panHistogram,
480
                                       int bIncludeOutOfRange, int bApproxOK,
481
                                       GDALProgressFunc pfnProgress,
482
                                       void * pProgressData );
483
int CPL_DLL GDALGetRandomRasterSample( GDALRasterBandH, int, float * );
484
GDALRasterBandH CPL_DLL GDALGetRasterSampleOverview( GDALRasterBandH, int );
485
CPLErr CPL_DLL GDALFillRaster( GDALRasterBandH hBand, double dfRealValue,
486
                       double dfImaginaryValue );
487
CPLErr GDALComputeBandStats( GDALRasterBandH hBand, int nSampleStep, 
488
                             double *pdfMean, double *pdfStdDev, 
489
                             GDALProgressFunc pfnProgress,
490
                             void *pProgressData );
491
CPLErr GDALOverviewMagnitudeCorrection( GDALRasterBandH hBaseBand, 
492
                                        int nOverviewCount, 
493
                                        GDALRasterBandH *pahOverviews, 
494
                                        GDALProgressFunc pfnProgress, 
495
                                        void *pProgressData );
496

    
497
/* -------------------------------------------------------------------- */
498
/*      Helper functions.                                               */
499
/* -------------------------------------------------------------------- */
500
int CPL_DLL GDALGeneralCmdLineProcessor( int nArgc, char ***ppapszArgv, 
501
                                         int nOptions );
502
void CPL_DLL GDALSwapWords( void *pData, int nWordSize, int nWordCount,
503
                            int nWordSkip );
504
void CPL_DLL
505
    GDALCopyWords( void * pSrcData, GDALDataType eSrcType, int nSrcPixelOffset,
506
                   void * pDstData, GDALDataType eDstType, int nDstPixelOffset,
507
                   int nWordCount );
508

    
509
int CPL_DLL GDALReadWorldFile( const char *pszBaseFilename, 
510
                       const char *pszExtension, 
511
                       double * padfGeoTransform );
512
int CPL_DLL GDALWriteWorldFile( const char *pszBaseFilename, 
513
                       const char *pszExtension, 
514
                       double * padfGeoTransform );
515
int CPL_DLL GDALReadTabFile( const char *pszBaseFilename, 
516
                             double *padfGeoTransform, char **ppszWKT,
517
                             int *pnGCPCount, GDAL_GCP **ppasGCPs );
518

    
519
const char CPL_DLL *GDALDecToDMS( double, const char *, int );
520
double CPL_DLL GDALPackedDMSToDec( double );
521
double CPL_DLL GDALDecToPackedDMS( double );
522

    
523
const char CPL_DLL *GDALVersionInfo( const char * );
524

    
525
typedef struct { 
526
    double      dfLINE_OFF;
527
    double      dfSAMP_OFF;
528
    double      dfLAT_OFF;
529
    double      dfLONG_OFF;
530
    double      dfHEIGHT_OFF;
531

    
532
    double      dfLINE_SCALE;
533
    double      dfSAMP_SCALE;
534
    double      dfLAT_SCALE;
535
    double      dfLONG_SCALE;
536
    double      dfHEIGHT_SCALE;
537

    
538
    double      adfLINE_NUM_COEFF[20];
539
    double      adfLINE_DEN_COEFF[20];
540
    double      adfSAMP_NUM_COEFF[20];
541
    double      adfSAMP_DEN_COEFF[20];
542
    
543
    double        dfMIN_LONG;
544
    double      dfMIN_LAT;
545
    double      dfMAX_LONG;
546
    double        dfMAX_LAT;
547

    
548
} GDALRPCInfo;
549

    
550
int CPL_DLL GDALExtractRPCInfo( char **, GDALRPCInfo * );
551

    
552
/* ==================================================================== */
553
/*      Color tables.                                                   */
554
/* ==================================================================== */
555
/** Color tuple */
556
typedef struct
557
{
558
    /*! gray, red, cyan or hue */
559
    short      c1;      
560

    
561
    /*! green, magenta, or lightness */    
562
    short      c2;      
563

    
564
    /*! blue, yellow, or saturation */
565
    short      c3;      
566

    
567
    /*! alpha or blackband */
568
    short      c4;      
569
} GDALColorEntry;
570

    
571
GDALColorTableH CPL_DLL GDALCreateColorTable( GDALPaletteInterp );
572
void CPL_DLL            GDALDestroyColorTable( GDALColorTableH );
573
GDALColorTableH CPL_DLL GDALCloneColorTable( GDALColorTableH );
574
GDALPaletteInterp CPL_DLL GDALGetPaletteInterpretation( GDALColorTableH );
575
int CPL_DLL             GDALGetColorEntryCount( GDALColorTableH );
576
const GDALColorEntry CPL_DLL *GDALGetColorEntry( GDALColorTableH, int );
577
int CPL_DLL GDALGetColorEntryAsRGB( GDALColorTableH, int, GDALColorEntry *);
578
void CPL_DLL GDALSetColorEntry( GDALColorTableH, int, const GDALColorEntry * );
579

    
580
/* ==================================================================== */
581
/*      GDAL Cache Management                                           */
582
/* ==================================================================== */
583

    
584
void CPL_DLL GDALSetCacheMax( int nBytes );
585
int CPL_DLL GDALGetCacheMax();
586
int CPL_DLL GDALGetCacheUsed();
587
int CPL_DLL GDALFlushCacheBlock();
588

    
589
CPL_C_END
590

    
591
#endif /* ndef GDAL_H_INCLUDED */