Statistics
| Revision:

svn-gvsig-desktop / tags / v1_9_Build_1242 / libraries / libjni-gdal-macosx / include / gdal.h @ 33960

History | View | Annotate | Download (24.2 KB)

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

    
174
#ifndef GDAL_H_INCLUDED
175
#define GDAL_H_INCLUDED
176

    
177
/**
178
 * \file gdal.h
179
 *
180
 * Public (C callable) GDAL entry points.
181
 */
182

    
183
#include "cpl_port.h"
184
#include "cpl_error.h"
185

    
186
/* -------------------------------------------------------------------- */
187
/*      GDAL Version Information.                                       */
188
/* -------------------------------------------------------------------- */
189
#ifndef GDAL_VERSION_NUM
190
#  define GDAL_VERSION_NUM      1210
191
#endif
192
#ifndef GDAL_RELEASE_DATE
193
#  define GDAL_RELEASE_DATE     20040623
194
#endif
195
#ifndef GDAL_RELEASE_NAME
196
#  define GDAL_RELEASE_NAME     "1.2.1.0"
197
#endif
198

    
199
/* -------------------------------------------------------------------- */
200
/*      Significant constants.                                          */
201
/* -------------------------------------------------------------------- */
202

    
203
CPL_C_START
204

    
205
/*! Pixel data types */
206
typedef enum {
207
    GDT_Unknown = 0,
208
    /*! Eight bit unsigned integer */           GDT_Byte = 1,
209
    /*! Sixteen bit unsigned integer */         GDT_UInt16 = 2,
210
    /*! Sixteen bit signed integer */           GDT_Int16 = 3,
211
    /*! Thirty two bit unsigned integer */      GDT_UInt32 = 4,
212
    /*! Thirty two bit signed integer */        GDT_Int32 = 5,
213
    /*! Thirty two bit floating point */        GDT_Float32 = 6,
214
    /*! Sixty four bit floating point */        GDT_Float64 = 7,
215
    /*! Complex Int16 */                        GDT_CInt16 = 8,
216
    /*! Complex Int32 */                        GDT_CInt32 = 9,
217
    /*! Complex Float32 */                      GDT_CFloat32 = 10,
218
    /*! Complex Float64 */                      GDT_CFloat64 = 11,
219
    GDT_TypeCount = 12          /* maximum type # + 1 */
220
} GDALDataType;
221

    
222
int CPL_DLL GDALGetDataTypeSize( GDALDataType );
223
int CPL_DLL GDALDataTypeIsComplex( GDALDataType );
224
const char CPL_DLL *GDALGetDataTypeName( GDALDataType );
225
GDALDataType CPL_DLL GDALGetDataTypeByName( const char * );
226
GDALDataType CPL_DLL GDALDataTypeUnion( GDALDataType, GDALDataType );
227

    
228
/*! Flag indicating read/write, or read-only access to data. */
229
typedef enum {
230
    /*! Read only (no update) access */ GA_ReadOnly = 0,
231
    /*! Read/write access. */           GA_Update = 1
232
} GDALAccess;
233

    
234
/*! Read/Write flag for RasterIO() method */
235
typedef enum {
236
    /*! Read data */   GF_Read = 0,
237
    /*! Write data */  GF_Write = 1
238
} GDALRWFlag;
239

    
240
/*! Types of color interpretation for raster bands. */
241
typedef enum
242
{
243
    GCI_Undefined=0,
244
    /*! Greyscale */                                      GCI_GrayIndex=1,
245
    /*! Paletted (see associated color table) */          GCI_PaletteIndex=2,
246
    /*! Red band of RGBA image */                         GCI_RedBand=3,
247
    /*! Green band of RGBA image */                       GCI_GreenBand=4,
248
    /*! Blue band of RGBA image */                        GCI_BlueBand=5,
249
    /*! Alpha (0=transparent, 255=opaque) */              GCI_AlphaBand=6,
250
    /*! Hue band of HLS image */                          GCI_HueBand=7,
251
    /*! Saturation band of HLS image */                   GCI_SaturationBand=8,
252
    /*! Lightness band of HLS image */                    GCI_LightnessBand=9,
253
    /*! Cyan band of CMYK image */                        GCI_CyanBand=10,
254
    /*! Magenta band of CMYK image */                     GCI_MagentaBand=11,
255
    /*! Yellow band of CMYK image */                      GCI_YellowBand=12,
256
    /*! Black band of CMLY image */                       GCI_BlackBand=13
257
} GDALColorInterp;
258

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

    
262
/*! Types of color interpretations for a GDALColorTable. */
263
typedef enum 
264
{
265
  /*! Grayscale (in GDALColorEntry.c1) */                      GPI_Gray=0,
266
  /*! Red, Green, Blue and Alpha in (in c1, c2, c3 and c4) */  GPI_RGB=1,
267
  /*! Cyan, Magenta, Yellow and Black (in c1, c2, c3 and c4)*/ GPI_CMYK=2,
268
  /*! Hue, Lightness and Saturation (in c1, c2, and c3) */     GPI_HLS=3
269
} GDALPaletteInterp;
270

    
271
/*! Translate a GDALPaletteInterp into a user displayable string. */
272
const char CPL_DLL *GDALGetPaletteInterpretationName( GDALPaletteInterp );
273

    
274
/* -------------------------------------------------------------------- */
275
/*      GDAL Specific error codes.                                      */
276
/*                                                                      */
277
/*      error codes 100 to 299 reserved for GDAL.                       */
278
/* -------------------------------------------------------------------- */
279
#define CPLE_WrongFormat        200
280

    
281
/* -------------------------------------------------------------------- */
282
/*      Define handle types related to various internal classes.        */
283
/* -------------------------------------------------------------------- */
284
typedef void *GDALMajorObjectH;
285
typedef void *GDALDatasetH;
286
typedef void *GDALRasterBandH;
287
typedef void *GDALDriverH;
288
typedef void *GDALProjDefH;
289
typedef void *GDALColorTableH;
290

    
291
/* -------------------------------------------------------------------- */
292
/*      Callback "progress" function.                                   */
293
/* -------------------------------------------------------------------- */
294

    
295
typedef int (*GDALProgressFunc)(double,const char *, void *);
296
int CPL_DLL GDALDummyProgress( double, const char *, void *);
297
int CPL_DLL GDALTermProgress( double, const char *, void *);
298
int CPL_DLL GDALScaledProgress( double, const char *, void *);
299
void CPL_DLL *GDALCreateScaledProgress( double, double,
300
                                        GDALProgressFunc, void * );
301
void CPL_DLL GDALDestroyScaledProgress( void * );
302

    
303
/* ==================================================================== */
304
/*      Registration/driver related.                                    */
305
/* ==================================================================== */
306

    
307
typedef struct {
308
    char      *pszOptionName;
309
    char      *pszValueType;   /* "boolean", "int", "float", "string", 
310
                                  "string-select" */
311
    char      *pszDescription;
312
    char      **papszOptions;
313
} GDALOptionDefinition;
314

    
315
#define GDAL_DMD_LONGNAME "DMD_LONGNAME"
316
#define GDAL_DMD_HELPTOPIC "DMD_HELPTOPIC"
317
#define GDAL_DMD_MIMETYPE "DMD_MIMETYPE"
318
#define GDAL_DMD_EXTENSION "DMD_EXTENSION"
319
#define GDAL_DMD_CREATIONOPTIONLIST "DMD_CREATIONOPTIONLIST" 
320
#define GDAL_DMD_CREATIONDATATYPES "DMD_CREATIONDATATYPES" 
321

    
322
#define GDAL_DCAP_CREATE     "DCAP_CREATE"
323
#define GDAL_DCAP_CREATECOPY "DCAP_CREATECOPY"
324

    
325
void CPL_DLL GDALAllRegister( void );
326

    
327
GDALDatasetH CPL_DLL GDALCreate( GDALDriverH hDriver,
328
                                 const char *, int, int, int, GDALDataType,
329
                                 char ** );
330
GDALDatasetH CPL_DLL GDALCreateCopy( GDALDriverH, const char *, GDALDatasetH,
331
                                     int, char **, GDALProgressFunc, void * );
332

    
333
GDALDatasetH CPL_DLL GDALOpen( const char *pszFilename, GDALAccess eAccess );
334
GDALDatasetH CPL_DLL GDALOpenShared( const char *, GDALAccess );
335
int          CPL_DLL GDALDumpOpenDatasets( FILE * );
336

    
337
GDALDriverH CPL_DLL GDALGetDriverByName( const char * );
338
int CPL_DLL         GDALGetDriverCount();
339
GDALDriverH CPL_DLL GDALGetDriver( int );
340
int         CPL_DLL GDALRegisterDriver( GDALDriverH );
341
void        CPL_DLL GDALDeregisterDriver( GDALDriverH );
342
void        CPL_DLL GDALDestroyDriverManager( void );
343
CPLErr      CPL_DLL GDALDeleteDataset( GDALDriverH, const char * );
344

    
345
/* The following are deprecated */
346
const char CPL_DLL *GDALGetDriverShortName( GDALDriverH );
347
const char CPL_DLL *GDALGetDriverLongName( GDALDriverH );
348
const char CPL_DLL *GDALGetDriverHelpTopic( GDALDriverH );
349

    
350
/* ==================================================================== */
351
/*      GDAL_GCP                                                        */
352
/* ==================================================================== */
353

    
354
/** Ground Control Point */
355
typedef struct
356
{
357
    /** Unique identifier, often numeric */
358
    char        *pszId; 
359

    
360
    /** Informational message or "" */
361
    char        *pszInfo;
362

    
363
    /** Pixel (x) location of GCP on raster */
364
    double      dfGCPPixel;
365
    /** Line (y) location of GCP on raster */
366
    double      dfGCPLine;
367

    
368
    /** X position of GCP in georeferenced space */
369
    double      dfGCPX;
370

    
371
    /** Y position of GCP in georeferenced space */
372
    double      dfGCPY;
373

    
374
    /** Elevation of GCP, or zero if not known */
375
    double      dfGCPZ;
376
} GDAL_GCP;
377

    
378
void CPL_DLL GDALInitGCPs( int, GDAL_GCP * );
379
void CPL_DLL GDALDeinitGCPs( int, GDAL_GCP * );
380
GDAL_GCP CPL_DLL *GDALDuplicateGCPs( int, const GDAL_GCP * );
381

    
382
int CPL_DLL GDALGCPsToGeoTransform( int nGCPCount, const GDAL_GCP *pasGCPs, 
383
                                    double *padfGeoTransform, int bApproxOK ); 
384
int CPL_DLL GDALInvGeoTransform( double *padfGeoTransformIn, 
385
                                 double *padfInvGeoTransformOut );
386
void CPL_DLL GDALApplyGeoTransform( double *, double, double, 
387
                                    double *, double * );
388

    
389
/* ==================================================================== */
390
/*      major objects (dataset, and, driver, drivermanager).            */
391
/* ==================================================================== */
392

    
393
char CPL_DLL  **GDALGetMetadata( GDALMajorObjectH, const char * );
394
CPLErr CPL_DLL  GDALSetMetadata( GDALMajorObjectH, char **,
395
                                 const char * );
396
const char CPL_DLL *GDALGetMetadataItem( GDALMajorObjectH, const char *, 
397
                                         const char * );
398
CPLErr CPL_DLL  GDALSetMetadataItem( GDALMajorObjectH,
399
                                     const char *, const char *,
400
                                     const char * );
401
const char CPL_DLL *GDALGetDescription( GDALMajorObjectH );
402
void       CPL_DLL  GDALSetDescription( GDALMajorObjectH, const char * );
403

    
404
/* ==================================================================== */
405
/*      GDALDataset class ... normally this represents one file.        */
406
/* ==================================================================== */
407

    
408
GDALDriverH CPL_DLL GDALGetDatasetDriver( GDALDatasetH );
409
void CPL_DLL   GDALClose( GDALDatasetH );
410
int CPL_DLL     GDALGetRasterXSize( GDALDatasetH );
411
int CPL_DLL     GDALGetRasterYSize( GDALDatasetH );
412
int CPL_DLL     GDALGetRasterCount( GDALDatasetH );
413
GDALRasterBandH CPL_DLL GDALGetRasterBand( GDALDatasetH, int );
414

    
415
CPLErr CPL_DLL  GDALAddBand( GDALDatasetH hDS, GDALDataType eType, 
416
                             char **papszOptions );
417

    
418
CPLErr CPL_DLL GDALDatasetRasterIO( 
419
    GDALDatasetH hDS, GDALRWFlag eRWFlag,
420
    int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
421
    void * pBuffer, int nBXSize, int nBYSize, GDALDataType eBDataType,
422
    int nBandCount, int *panBandCount, 
423
    int nPixelSpace, int nLineSpace, int nBandSpace);
424

    
425
const char CPL_DLL *GDALGetProjectionRef( GDALDatasetH );
426
CPLErr CPL_DLL  GDALSetProjection( GDALDatasetH, const char * );
427
CPLErr CPL_DLL  GDALGetGeoTransform( GDALDatasetH, double * );
428
CPLErr CPL_DLL  GDALSetGeoTransform( GDALDatasetH, double * );
429

    
430
int CPL_DLL     GDALGetGCPCount( GDALDatasetH );
431
const char CPL_DLL *GDALGetGCPProjection( GDALDatasetH );
432
const GDAL_GCP CPL_DLL *GDALGetGCPs( GDALDatasetH );
433
CPLErr CPL_DLL  GDALSetGCPs( GDALDatasetH, int, const GDAL_GCP *,
434
                             const char * );
435

    
436
void CPL_DLL   *GDALGetInternalHandle( GDALDatasetH, const char * );
437
int CPL_DLL     GDALReferenceDataset( GDALDatasetH );
438
int CPL_DLL     GDALDereferenceDataset( GDALDatasetH );
439

    
440
CPLErr CPL_DLL  GDALBuildOverviews( GDALDatasetH, const char *, int, int *,
441
                                    int, int *, GDALProgressFunc, void * );
442
void CPL_DLL    GDALGetOpenDatasets( GDALDatasetH ***hDS, int *pnCount );
443
int CPL_DLL     GDALGetAccess( GDALDatasetH hDS );
444
void CPL_DLL    GDALFlushCache( GDALDatasetH hDS );
445

    
446
/* ==================================================================== */
447
/*      GDALRasterBand ... one band/channel in a dataset.               */
448
/* ==================================================================== */
449

    
450
GDALDataType CPL_DLL GDALGetRasterDataType( GDALRasterBandH );
451
void CPL_DLL    GDALGetBlockSize( GDALRasterBandH,
452
                                  int * pnXSize, int * pnYSize );
453

    
454
CPLErr CPL_DLL GDALRasterIO( GDALRasterBandH hRBand, GDALRWFlag eRWFlag,
455
                              int nDSXOff, int nDSYOff,
456
                              int nDSXSize, int nDSYSize,
457
                              void * pBuffer, int nBXSize, int nBYSize,
458
                              GDALDataType eBDataType,
459
                              int nPixelSpace, int nLineSpace );
460
CPLErr CPL_DLL GDALReadBlock( GDALRasterBandH, int, int, void * );
461
CPLErr CPL_DLL GDALWriteBlock( GDALRasterBandH, int, int, void * );
462
int CPL_DLL GDALGetRasterBandXSize( GDALRasterBandH );
463
int CPL_DLL GDALGetRasterBandYSize( GDALRasterBandH );
464
char CPL_DLL  **GDALGetRasterMetadata( GDALRasterBandH );
465
GDALAccess CPL_DLL GDALGetRasterAccess( GDALRasterBandH );
466
int CPL_DLL GDALGetBandNumber( GDALRasterBandH );
467
GDALDatasetH CPL_DLL GDALGetBandDataset( GDALRasterBandH );
468

    
469
GDALColorInterp CPL_DLL GDALGetRasterColorInterpretation( GDALRasterBandH );
470
CPLErr CPL_DLL GDALSetRasterColorInterpretation( GDALRasterBandH,
471
                                                 GDALColorInterp );
472
GDALColorTableH CPL_DLL GDALGetRasterColorTable( GDALRasterBandH );
473
CPLErr CPL_DLL GDALSetRasterColorTable( GDALRasterBandH, GDALColorTableH );
474
int CPL_DLL     GDALHasArbitraryOverviews( GDALRasterBandH );
475
int CPL_DLL             GDALGetOverviewCount( GDALRasterBandH );
476
GDALRasterBandH CPL_DLL GDALGetOverview( GDALRasterBandH, int );
477
double CPL_DLL GDALGetRasterNoDataValue( GDALRasterBandH, int * );
478
CPLErr CPL_DLL GDALSetRasterNoDataValue( GDALRasterBandH, double );
479
char CPL_DLL ** GDALGetRasterCategoryNames( GDALRasterBandH );
480
CPLErr CPL_DLL GDALSetRasterCategoryNames( GDALRasterBandH, char ** );
481
double CPL_DLL GDALGetRasterMinimum( GDALRasterBandH, int *pbSuccess );
482
double CPL_DLL GDALGetRasterMaximum( GDALRasterBandH, int *pbSuccess );
483
const char CPL_DLL *GDALGetRasterUnitType( GDALRasterBandH );
484
double CPL_DLL GDALGetRasterOffset( GDALRasterBandH, int *pbSuccess );
485
double CPL_DLL GDALGetRasterScale( GDALRasterBandH, int *pbSuccess );
486
void CPL_DLL GDALComputeRasterMinMax( GDALRasterBandH hBand, int bApproxOK,
487
                                      double adfMinMax[2] );
488
CPLErr CPL_DLL GDALFlushRasterCache( GDALRasterBandH hBand );
489
CPLErr CPL_DLL GDALGetRasterHistogram( GDALRasterBandH hBand,
490
                                       double dfMin, double dfMax,
491
                                       int nBuckets, int *panHistogram,
492
                                       int bIncludeOutOfRange, int bApproxOK,
493
                                       GDALProgressFunc pfnProgress,
494
                                       void * pProgressData );
495
int CPL_DLL GDALGetRandomRasterSample( GDALRasterBandH, int, float * );
496
GDALRasterBandH CPL_DLL GDALGetRasterSampleOverview( GDALRasterBandH, int );
497
CPLErr CPL_DLL GDALFillRaster( GDALRasterBandH hBand, double dfRealValue,
498
                       double dfImaginaryValue );
499
CPLErr GDALComputeBandStats( GDALRasterBandH hBand, int nSampleStep, 
500
                             double *pdfMean, double *pdfStdDev, 
501
                             GDALProgressFunc pfnProgress,
502
                             void *pProgressData );
503
CPLErr GDALOverviewMagnitudeCorrection( GDALRasterBandH hBaseBand, 
504
                                        int nOverviewCount, 
505
                                        GDALRasterBandH *pahOverviews, 
506
                                        GDALProgressFunc pfnProgress, 
507
                                        void *pProgressData );
508

    
509
/* -------------------------------------------------------------------- */
510
/*      Helper functions.                                               */
511
/* -------------------------------------------------------------------- */
512
int CPL_DLL GDALGeneralCmdLineProcessor( int nArgc, char ***ppapszArgv, 
513
                                         int nOptions );
514
void CPL_DLL GDALSwapWords( void *pData, int nWordSize, int nWordCount,
515
                            int nWordSkip );
516
void CPL_DLL
517
    GDALCopyWords( void * pSrcData, GDALDataType eSrcType, int nSrcPixelOffset,
518
                   void * pDstData, GDALDataType eDstType, int nDstPixelOffset,
519
                   int nWordCount );
520

    
521
int CPL_DLL GDALReadWorldFile( const char *pszBaseFilename, 
522
                       const char *pszExtension, 
523
                       double * padfGeoTransform );
524
int CPL_DLL GDALWriteWorldFile( const char *pszBaseFilename, 
525
                       const char *pszExtension, 
526
                       double * padfGeoTransform );
527
int CPL_DLL GDALReadTabFile( const char *pszBaseFilename, 
528
                             double *padfGeoTransform, char **ppszWKT,
529
                             int *pnGCPCount, GDAL_GCP **ppasGCPs );
530

    
531
const char CPL_DLL *GDALDecToDMS( double, const char *, int );
532
double CPL_DLL GDALPackedDMSToDec( double );
533
double CPL_DLL GDALDecToPackedDMS( double );
534

    
535
const char CPL_DLL *GDALVersionInfo( const char * );
536

    
537
typedef struct { 
538
    double      dfLINE_OFF;
539
    double      dfSAMP_OFF;
540
    double      dfLAT_OFF;
541
    double      dfLONG_OFF;
542
    double      dfHEIGHT_OFF;
543

    
544
    double      dfLINE_SCALE;
545
    double      dfSAMP_SCALE;
546
    double      dfLAT_SCALE;
547
    double      dfLONG_SCALE;
548
    double      dfHEIGHT_SCALE;
549

    
550
    double      adfLINE_NUM_COEFF[20];
551
    double      adfLINE_DEN_COEFF[20];
552
    double      adfSAMP_NUM_COEFF[20];
553
    double      adfSAMP_DEN_COEFF[20];
554
    
555
    double        dfMIN_LONG;
556
    double      dfMIN_LAT;
557
    double      dfMAX_LONG;
558
    double        dfMAX_LAT;
559

    
560
} GDALRPCInfo;
561

    
562
int CPL_DLL GDALExtractRPCInfo( char **, GDALRPCInfo * );
563

    
564
/* ==================================================================== */
565
/*      Color tables.                                                   */
566
/* ==================================================================== */
567
/** Color tuple */
568
typedef struct
569
{
570
    /*! gray, red, cyan or hue */
571
    short      c1;      
572

    
573
    /*! green, magenta, or lightness */    
574
    short      c2;      
575

    
576
    /*! blue, yellow, or saturation */
577
    short      c3;      
578

    
579
    /*! alpha or blackband */
580
    short      c4;      
581
} GDALColorEntry;
582

    
583
GDALColorTableH CPL_DLL GDALCreateColorTable( GDALPaletteInterp );
584
void CPL_DLL            GDALDestroyColorTable( GDALColorTableH );
585
GDALColorTableH CPL_DLL GDALCloneColorTable( GDALColorTableH );
586
GDALPaletteInterp CPL_DLL GDALGetPaletteInterpretation( GDALColorTableH );
587
int CPL_DLL             GDALGetColorEntryCount( GDALColorTableH );
588
const GDALColorEntry CPL_DLL *GDALGetColorEntry( GDALColorTableH, int );
589
int CPL_DLL GDALGetColorEntryAsRGB( GDALColorTableH, int, GDALColorEntry *);
590
void CPL_DLL GDALSetColorEntry( GDALColorTableH, int, const GDALColorEntry * );
591

    
592
/* ==================================================================== */
593
/*      GDAL Cache Management                                           */
594
/* ==================================================================== */
595

    
596
void CPL_DLL GDALSetCacheMax( int nBytes );
597
int CPL_DLL GDALGetCacheMax();
598
int CPL_DLL GDALGetCacheUsed();
599
int CPL_DLL GDALFlushCacheBlock();
600

    
601
CPL_C_END
602

    
603
#endif /* ndef GDAL_H_INCLUDED */