Statistics
| Revision:

svn-gvsig-desktop / tags / v1_2_Build_1201 / libraries / libjni-gdal / include / gdal.h @ 32257

History | View | Annotate | Download (24.2 KB)

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

    
177
#ifndef GDAL_H_INCLUDED
178
#define GDAL_H_INCLUDED
179

    
180
/**
181
 * \file gdal.h
182
 *
183
 * Public (C callable) GDAL entry points.
184
 */
185

    
186
#include "cpl_port.h"
187
#include "cpl_error.h"
188

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

    
202
/* -------------------------------------------------------------------- */
203
/*      Significant constants.                                          */
204
/* -------------------------------------------------------------------- */
205

    
206
CPL_C_START
207

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

    
225
int CPL_DLL GDALGetDataTypeSize( GDALDataType );
226
int CPL_DLL GDALDataTypeIsComplex( GDALDataType );
227
const char CPL_DLL *GDALGetDataTypeName( GDALDataType );
228
GDALDataType CPL_DLL GDALGetDataTypeByName( const char * );
229
GDALDataType CPL_DLL GDALDataTypeUnion( GDALDataType, GDALDataType );
230

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

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

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

    
262
/*! Translate a GDALColorInterp into a user displayable string. */
263
const char CPL_DLL *GDALGetColorInterpretationName( GDALColorInterp );
264

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

    
274
/*! Translate a GDALPaletteInterp into a user displayable string. */
275
const char CPL_DLL *GDALGetPaletteInterpretationName( GDALPaletteInterp );
276

    
277
/* -------------------------------------------------------------------- */
278
/*      GDAL Specific error codes.                                      */
279
/*                                                                      */
280
/*      error codes 100 to 299 reserved for GDAL.                       */
281
/* -------------------------------------------------------------------- */
282
#define CPLE_WrongFormat        200
283

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

    
294
/* -------------------------------------------------------------------- */
295
/*      Callback "progress" function.                                   */
296
/* -------------------------------------------------------------------- */
297

    
298
typedef int (*GDALProgressFunc)(double,const char *, void *);
299
int CPL_DLL GDALDummyProgress( double, const char *, void *);
300
int CPL_DLL GDALTermProgress( double, const char *, void *);
301
int CPL_DLL GDALScaledProgress( double, const char *, void *);
302
void CPL_DLL *GDALCreateScaledProgress( double, double,
303
                                        GDALProgressFunc, void * );
304
void CPL_DLL GDALDestroyScaledProgress( void * );
305

    
306
/* ==================================================================== */
307
/*      Registration/driver related.                                    */
308
/* ==================================================================== */
309

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

    
318
#define GDAL_DMD_LONGNAME "DMD_LONGNAME"
319
#define GDAL_DMD_HELPTOPIC "DMD_HELPTOPIC"
320
#define GDAL_DMD_MIMETYPE "DMD_MIMETYPE"
321
#define GDAL_DMD_EXTENSION "DMD_EXTENSION"
322
#define GDAL_DMD_CREATIONOPTIONLIST "DMD_CREATIONOPTIONLIST" 
323
#define GDAL_DMD_CREATIONDATATYPES "DMD_CREATIONDATATYPES" 
324

    
325
#define GDAL_DCAP_CREATE     "DCAP_CREATE"
326
#define GDAL_DCAP_CREATECOPY "DCAP_CREATECOPY"
327

    
328
void CPL_DLL GDALAllRegister( void );
329

    
330
GDALDatasetH CPL_DLL GDALCreate( GDALDriverH hDriver,
331
                                 const char *, int, int, int, GDALDataType,
332
                                 char ** );
333
GDALDatasetH CPL_DLL GDALCreateCopy( GDALDriverH, const char *, GDALDatasetH,
334
                                     int, char **, GDALProgressFunc, void * );
335

    
336
GDALDatasetH CPL_DLL GDALOpen( const char *pszFilename, GDALAccess eAccess );
337
GDALDatasetH CPL_DLL GDALOpenShared( const char *, GDALAccess );
338
int          CPL_DLL GDALDumpOpenDatasets( FILE * );
339

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

    
348
/* The following are deprecated */
349
const char CPL_DLL *GDALGetDriverShortName( GDALDriverH );
350
const char CPL_DLL *GDALGetDriverLongName( GDALDriverH );
351
const char CPL_DLL *GDALGetDriverHelpTopic( GDALDriverH );
352

    
353
/* ==================================================================== */
354
/*      GDAL_GCP                                                        */
355
/* ==================================================================== */
356

    
357
/** Ground Control Point */
358
typedef struct
359
{
360
    /** Unique identifier, often numeric */
361
    char        *pszId; 
362

    
363
    /** Informational message or "" */
364
    char        *pszInfo;
365

    
366
    /** Pixel (x) location of GCP on raster */
367
    double      dfGCPPixel;
368
    /** Line (y) location of GCP on raster */
369
    double      dfGCPLine;
370

    
371
    /** X position of GCP in georeferenced space */
372
    double      dfGCPX;
373

    
374
    /** Y position of GCP in georeferenced space */
375
    double      dfGCPY;
376

    
377
    /** Elevation of GCP, or zero if not known */
378
    double      dfGCPZ;
379
} GDAL_GCP;
380

    
381
void CPL_DLL GDALInitGCPs( int, GDAL_GCP * );
382
void CPL_DLL GDALDeinitGCPs( int, GDAL_GCP * );
383
GDAL_GCP CPL_DLL *GDALDuplicateGCPs( int, const GDAL_GCP * );
384

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

    
392
/* ==================================================================== */
393
/*      major objects (dataset, and, driver, drivermanager).            */
394
/* ==================================================================== */
395

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

    
407
/* ==================================================================== */
408
/*      GDALDataset class ... normally this represents one file.        */
409
/* ==================================================================== */
410

    
411
GDALDriverH CPL_DLL GDALGetDatasetDriver( GDALDatasetH );
412
void CPL_DLL   GDALClose( GDALDatasetH );
413
int CPL_DLL     GDALGetRasterXSize( GDALDatasetH );
414
int CPL_DLL     GDALGetRasterYSize( GDALDatasetH );
415
int CPL_DLL     GDALGetRasterCount( GDALDatasetH );
416
GDALRasterBandH CPL_DLL GDALGetRasterBand( GDALDatasetH, int );
417

    
418
CPLErr CPL_DLL  GDALAddBand( GDALDatasetH hDS, GDALDataType eType, 
419
                             char **papszOptions );
420

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

    
428
const char CPL_DLL *GDALGetProjectionRef( GDALDatasetH );
429
CPLErr CPL_DLL  GDALSetProjection( GDALDatasetH, const char * );
430
CPLErr CPL_DLL  GDALGetGeoTransform( GDALDatasetH, double * );
431
CPLErr CPL_DLL  GDALSetGeoTransform( GDALDatasetH, double * );
432

    
433
int CPL_DLL     GDALGetGCPCount( GDALDatasetH );
434
const char CPL_DLL *GDALGetGCPProjection( GDALDatasetH );
435
const GDAL_GCP CPL_DLL *GDALGetGCPs( GDALDatasetH );
436
CPLErr CPL_DLL  GDALSetGCPs( GDALDatasetH, int, const GDAL_GCP *,
437
                             const char * );
438

    
439
void CPL_DLL   *GDALGetInternalHandle( GDALDatasetH, const char * );
440
int CPL_DLL     GDALReferenceDataset( GDALDatasetH );
441
int CPL_DLL     GDALDereferenceDataset( GDALDatasetH );
442

    
443
CPLErr CPL_DLL  GDALBuildOverviews( GDALDatasetH, const char *, int, int *,
444
                                    int, int *, GDALProgressFunc, void * );
445
void CPL_DLL    GDALGetOpenDatasets( GDALDatasetH ***hDS, int *pnCount );
446
int CPL_DLL     GDALGetAccess( GDALDatasetH hDS );
447
void CPL_DLL    GDALFlushCache( GDALDatasetH hDS );
448

    
449
/* ==================================================================== */
450
/*      GDALRasterBand ... one band/channel in a dataset.               */
451
/* ==================================================================== */
452

    
453
GDALDataType CPL_DLL GDALGetRasterDataType( GDALRasterBandH );
454
void CPL_DLL    GDALGetBlockSize( GDALRasterBandH,
455
                                  int * pnXSize, int * pnYSize );
456

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

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

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

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

    
534
const char CPL_DLL *GDALDecToDMS( double, const char *, int );
535
double CPL_DLL GDALPackedDMSToDec( double );
536
double CPL_DLL GDALDecToPackedDMS( double );
537

    
538
const char CPL_DLL *GDALVersionInfo( const char * );
539

    
540
typedef struct { 
541
    double      dfLINE_OFF;
542
    double      dfSAMP_OFF;
543
    double      dfLAT_OFF;
544
    double      dfLONG_OFF;
545
    double      dfHEIGHT_OFF;
546

    
547
    double      dfLINE_SCALE;
548
    double      dfSAMP_SCALE;
549
    double      dfLAT_SCALE;
550
    double      dfLONG_SCALE;
551
    double      dfHEIGHT_SCALE;
552

    
553
    double      adfLINE_NUM_COEFF[20];
554
    double      adfLINE_DEN_COEFF[20];
555
    double      adfSAMP_NUM_COEFF[20];
556
    double      adfSAMP_DEN_COEFF[20];
557
    
558
    double        dfMIN_LONG;
559
    double      dfMIN_LAT;
560
    double      dfMAX_LONG;
561
    double        dfMAX_LAT;
562

    
563
} GDALRPCInfo;
564

    
565
int CPL_DLL GDALExtractRPCInfo( char **, GDALRPCInfo * );
566

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

    
576
    /*! green, magenta, or lightness */    
577
    short      c2;      
578

    
579
    /*! blue, yellow, or saturation */
580
    short      c3;      
581

    
582
    /*! alpha or blackband */
583
    short      c4;      
584
} GDALColorEntry;
585

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

    
595
/* ==================================================================== */
596
/*      GDAL Cache Management                                           */
597
/* ==================================================================== */
598

    
599
void CPL_DLL GDALSetCacheMax( int nBytes );
600
int CPL_DLL GDALGetCacheMax();
601
int CPL_DLL GDALGetCacheUsed();
602
int CPL_DLL GDALFlushCacheBlock();
603

    
604
CPL_C_END
605

    
606
#endif /* ndef GDAL_H_INCLUDED */