Statistics
| Revision:

svn-gvsig-desktop / tags / v1_1_2_Build_1041 / libraries / libjni-gdal-macosx / include / gdal.h @ 28800

History | View | Annotate | Download (24.4 KB)

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

    
183
#ifndef GDAL_H_INCLUDED
184
#define GDAL_H_INCLUDED
185

    
186
/**
187
 * \file gdal.h
188
 *
189
 * Public (C callable) GDAL entry points.
190
 */
191

    
192
#include "cpl_port.h"
193
#include "cpl_error.h"
194

    
195
/* -------------------------------------------------------------------- */
196
/*      GDAL Version Information.                                       */
197
/* -------------------------------------------------------------------- */
198
#ifndef GDAL_VERSION_NUM
199
#  define GDAL_VERSION_NUM      1210
200
#endif
201
#ifndef GDAL_RELEASE_DATE
202
#  define GDAL_RELEASE_DATE     20040623
203
#endif
204
#ifndef GDAL_RELEASE_NAME
205
#  define GDAL_RELEASE_NAME     "1.2.1.0"
206
#endif
207

    
208
/* -------------------------------------------------------------------- */
209
/*      Significant constants.                                          */
210
/* -------------------------------------------------------------------- */
211

    
212
CPL_C_START
213

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

    
231
int CPL_DLL GDALGetDataTypeSize( GDALDataType );
232
int CPL_DLL GDALDataTypeIsComplex( GDALDataType );
233
const char CPL_DLL *GDALGetDataTypeName( GDALDataType );
234
GDALDataType CPL_DLL GDALGetDataTypeByName( const char * );
235
GDALDataType CPL_DLL GDALDataTypeUnion( GDALDataType, GDALDataType );
236

    
237
/*! Flag indicating read/write, or read-only access to data. */
238
typedef enum {
239
    /*! Read only (no update) access */ GA_ReadOnly = 0,
240
    /*! Read/write access. */           GA_Update = 1
241
} GDALAccess;
242

    
243
/*! Read/Write flag for RasterIO() method */
244
typedef enum {
245
    /*! Read data */   GF_Read = 0,
246
    /*! Write data */  GF_Write = 1
247
} GDALRWFlag;
248

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

    
268
/*! Translate a GDALColorInterp into a user displayable string. */
269
const char CPL_DLL *GDALGetColorInterpretationName( GDALColorInterp );
270

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

    
280
/*! Translate a GDALPaletteInterp into a user displayable string. */
281
const char CPL_DLL *GDALGetPaletteInterpretationName( GDALPaletteInterp );
282

    
283
/* -------------------------------------------------------------------- */
284
/*      GDAL Specific error codes.                                      */
285
/*                                                                      */
286
/*      error codes 100 to 299 reserved for GDAL.                       */
287
/* -------------------------------------------------------------------- */
288
#define CPLE_WrongFormat        200
289

    
290
/* -------------------------------------------------------------------- */
291
/*      Define handle types related to various internal classes.        */
292
/* -------------------------------------------------------------------- */
293
typedef void *GDALMajorObjectH;
294
typedef void *GDALDatasetH;
295
typedef void *GDALRasterBandH;
296
typedef void *GDALDriverH;
297
typedef void *GDALProjDefH;
298
typedef void *GDALColorTableH;
299

    
300
/* -------------------------------------------------------------------- */
301
/*      Callback "progress" function.                                   */
302
/* -------------------------------------------------------------------- */
303

    
304
typedef int (*GDALProgressFunc)(double,const char *, void *);
305
int CPL_DLL GDALDummyProgress( double, const char *, void *);
306
int CPL_DLL GDALTermProgress( double, const char *, void *);
307
int CPL_DLL GDALScaledProgress( double, const char *, void *);
308
void CPL_DLL *GDALCreateScaledProgress( double, double,
309
                                        GDALProgressFunc, void * );
310
void CPL_DLL GDALDestroyScaledProgress( void * );
311

    
312
/* ==================================================================== */
313
/*      Registration/driver related.                                    */
314
/* ==================================================================== */
315

    
316
typedef struct {
317
    char      *pszOptionName;
318
    char      *pszValueType;   /* "boolean", "int", "float", "string", 
319
                                  "string-select" */
320
    char      *pszDescription;
321
    char      **papszOptions;
322
} GDALOptionDefinition;
323

    
324
#define GDAL_DMD_LONGNAME "DMD_LONGNAME"
325
#define GDAL_DMD_HELPTOPIC "DMD_HELPTOPIC"
326
#define GDAL_DMD_MIMETYPE "DMD_MIMETYPE"
327
#define GDAL_DMD_EXTENSION "DMD_EXTENSION"
328
#define GDAL_DMD_CREATIONOPTIONLIST "DMD_CREATIONOPTIONLIST" 
329
#define GDAL_DMD_CREATIONDATATYPES "DMD_CREATIONDATATYPES" 
330

    
331
#define GDAL_DCAP_CREATE     "DCAP_CREATE"
332
#define GDAL_DCAP_CREATECOPY "DCAP_CREATECOPY"
333

    
334
void CPL_DLL GDALAllRegister( void );
335

    
336
GDALDatasetH CPL_DLL GDALCreate( GDALDriverH hDriver,
337
                                 const char *, int, int, int, GDALDataType,
338
                                 char ** );
339
GDALDatasetH CPL_DLL GDALCreateCopy( GDALDriverH, const char *, GDALDatasetH,
340
                                     int, char **, GDALProgressFunc, void * );
341

    
342
GDALDatasetH CPL_DLL GDALOpen( const char *pszFilename, GDALAccess eAccess );
343
GDALDatasetH CPL_DLL GDALOpenShared( const char *, GDALAccess );
344
int          CPL_DLL GDALDumpOpenDatasets( FILE * );
345

    
346
GDALDriverH CPL_DLL GDALGetDriverByName( const char * );
347
int CPL_DLL         GDALGetDriverCount();
348
GDALDriverH CPL_DLL GDALGetDriver( int );
349
int         CPL_DLL GDALRegisterDriver( GDALDriverH );
350
void        CPL_DLL GDALDeregisterDriver( GDALDriverH );
351
void        CPL_DLL GDALDestroyDriverManager( void );
352
CPLErr      CPL_DLL GDALDeleteDataset( GDALDriverH, const char * );
353

    
354
/* The following are deprecated */
355
const char CPL_DLL *GDALGetDriverShortName( GDALDriverH );
356
const char CPL_DLL *GDALGetDriverLongName( GDALDriverH );
357
const char CPL_DLL *GDALGetDriverHelpTopic( GDALDriverH );
358

    
359
/* ==================================================================== */
360
/*      GDAL_GCP                                                        */
361
/* ==================================================================== */
362

    
363
/** Ground Control Point */
364
typedef struct
365
{
366
    /** Unique identifier, often numeric */
367
    char        *pszId; 
368

    
369
    /** Informational message or "" */
370
    char        *pszInfo;
371

    
372
    /** Pixel (x) location of GCP on raster */
373
    double      dfGCPPixel;
374
    /** Line (y) location of GCP on raster */
375
    double      dfGCPLine;
376

    
377
    /** X position of GCP in georeferenced space */
378
    double      dfGCPX;
379

    
380
    /** Y position of GCP in georeferenced space */
381
    double      dfGCPY;
382

    
383
    /** Elevation of GCP, or zero if not known */
384
    double      dfGCPZ;
385
} GDAL_GCP;
386

    
387
void CPL_DLL GDALInitGCPs( int, GDAL_GCP * );
388
void CPL_DLL GDALDeinitGCPs( int, GDAL_GCP * );
389
GDAL_GCP CPL_DLL *GDALDuplicateGCPs( int, const GDAL_GCP * );
390

    
391
int CPL_DLL GDALGCPsToGeoTransform( int nGCPCount, const GDAL_GCP *pasGCPs, 
392
                                    double *padfGeoTransform, int bApproxOK ); 
393
int CPL_DLL GDALInvGeoTransform( double *padfGeoTransformIn, 
394
                                 double *padfInvGeoTransformOut );
395
void CPL_DLL GDALApplyGeoTransform( double *, double, double, 
396
                                    double *, double * );
397

    
398
/* ==================================================================== */
399
/*      major objects (dataset, and, driver, drivermanager).            */
400
/* ==================================================================== */
401

    
402
char CPL_DLL  **GDALGetMetadata( GDALMajorObjectH, const char * );
403
CPLErr CPL_DLL  GDALSetMetadata( GDALMajorObjectH, char **,
404
                                 const char * );
405
const char CPL_DLL *GDALGetMetadataItem( GDALMajorObjectH, const char *, 
406
                                         const char * );
407
CPLErr CPL_DLL  GDALSetMetadataItem( GDALMajorObjectH,
408
                                     const char *, const char *,
409
                                     const char * );
410
const char CPL_DLL *GDALGetDescription( GDALMajorObjectH );
411
void       CPL_DLL  GDALSetDescription( GDALMajorObjectH, const char * );
412

    
413
/* ==================================================================== */
414
/*      GDALDataset class ... normally this represents one file.        */
415
/* ==================================================================== */
416

    
417
GDALDriverH CPL_DLL GDALGetDatasetDriver( GDALDatasetH );
418
void CPL_DLL   GDALClose( GDALDatasetH );
419
int CPL_DLL     GDALGetRasterXSize( GDALDatasetH );
420
int CPL_DLL     GDALGetRasterYSize( GDALDatasetH );
421
int CPL_DLL     GDALGetRasterCount( GDALDatasetH );
422
GDALRasterBandH CPL_DLL GDALGetRasterBand( GDALDatasetH, int );
423

    
424
CPLErr CPL_DLL  GDALAddBand( GDALDatasetH hDS, GDALDataType eType, 
425
                             char **papszOptions );
426

    
427
CPLErr CPL_DLL GDALDatasetRasterIO( 
428
    GDALDatasetH hDS, GDALRWFlag eRWFlag,
429
    int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
430
    void * pBuffer, int nBXSize, int nBYSize, GDALDataType eBDataType,
431
    int nBandCount, int *panBandCount, 
432
    int nPixelSpace, int nLineSpace, int nBandSpace);
433

    
434
const char CPL_DLL *GDALGetProjectionRef( GDALDatasetH );
435
CPLErr CPL_DLL  GDALSetProjection( GDALDatasetH, const char * );
436
CPLErr CPL_DLL  GDALGetGeoTransform( GDALDatasetH, double * );
437
CPLErr CPL_DLL  GDALSetGeoTransform( GDALDatasetH, double * );
438

    
439
int CPL_DLL     GDALGetGCPCount( GDALDatasetH );
440
const char CPL_DLL *GDALGetGCPProjection( GDALDatasetH );
441
const GDAL_GCP CPL_DLL *GDALGetGCPs( GDALDatasetH );
442
CPLErr CPL_DLL  GDALSetGCPs( GDALDatasetH, int, const GDAL_GCP *,
443
                             const char * );
444

    
445
void CPL_DLL   *GDALGetInternalHandle( GDALDatasetH, const char * );
446
int CPL_DLL     GDALReferenceDataset( GDALDatasetH );
447
int CPL_DLL     GDALDereferenceDataset( GDALDatasetH );
448

    
449
CPLErr CPL_DLL  GDALBuildOverviews( GDALDatasetH, const char *, int, int *,
450
                                    int, int *, GDALProgressFunc, void * );
451
void CPL_DLL    GDALGetOpenDatasets( GDALDatasetH ***hDS, int *pnCount );
452
int CPL_DLL     GDALGetAccess( GDALDatasetH hDS );
453
void CPL_DLL    GDALFlushCache( GDALDatasetH hDS );
454

    
455
/* ==================================================================== */
456
/*      GDALRasterBand ... one band/channel in a dataset.               */
457
/* ==================================================================== */
458

    
459
GDALDataType CPL_DLL GDALGetRasterDataType( GDALRasterBandH );
460
void CPL_DLL    GDALGetBlockSize( GDALRasterBandH,
461
                                  int * pnXSize, int * pnYSize );
462

    
463
CPLErr CPL_DLL GDALRasterIO( GDALRasterBandH hRBand, GDALRWFlag eRWFlag,
464
                              int nDSXOff, int nDSYOff,
465
                              int nDSXSize, int nDSYSize,
466
                              void * pBuffer, int nBXSize, int nBYSize,
467
                              GDALDataType eBDataType,
468
                              int nPixelSpace, int nLineSpace );
469
CPLErr CPL_DLL GDALReadBlock( GDALRasterBandH, int, int, void * );
470
CPLErr CPL_DLL GDALWriteBlock( GDALRasterBandH, int, int, void * );
471
int CPL_DLL GDALGetRasterBandXSize( GDALRasterBandH );
472
int CPL_DLL GDALGetRasterBandYSize( GDALRasterBandH );
473
char CPL_DLL  **GDALGetRasterMetadata( GDALRasterBandH );
474
GDALAccess CPL_DLL GDALGetRasterAccess( GDALRasterBandH );
475
int CPL_DLL GDALGetBandNumber( GDALRasterBandH );
476
GDALDatasetH CPL_DLL GDALGetBandDataset( GDALRasterBandH );
477

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

    
518
/* -------------------------------------------------------------------- */
519
/*      Helper functions.                                               */
520
/* -------------------------------------------------------------------- */
521
int CPL_DLL GDALGeneralCmdLineProcessor( int nArgc, char ***ppapszArgv, 
522
                                         int nOptions );
523
void CPL_DLL GDALSwapWords( void *pData, int nWordSize, int nWordCount,
524
                            int nWordSkip );
525
void CPL_DLL
526
    GDALCopyWords( void * pSrcData, GDALDataType eSrcType, int nSrcPixelOffset,
527
                   void * pDstData, GDALDataType eDstType, int nDstPixelOffset,
528
                   int nWordCount );
529

    
530
int CPL_DLL GDALReadWorldFile( const char *pszBaseFilename, 
531
                       const char *pszExtension, 
532
                       double * padfGeoTransform );
533
int CPL_DLL GDALWriteWorldFile( const char *pszBaseFilename, 
534
                       const char *pszExtension, 
535
                       double * padfGeoTransform );
536
int CPL_DLL GDALReadTabFile( const char *pszBaseFilename, 
537
                             double *padfGeoTransform, char **ppszWKT,
538
                             int *pnGCPCount, GDAL_GCP **ppasGCPs );
539

    
540
const char CPL_DLL *GDALDecToDMS( double, const char *, int );
541
double CPL_DLL GDALPackedDMSToDec( double );
542
double CPL_DLL GDALDecToPackedDMS( double );
543

    
544
const char CPL_DLL *GDALVersionInfo( const char * );
545

    
546
typedef struct { 
547
    double      dfLINE_OFF;
548
    double      dfSAMP_OFF;
549
    double      dfLAT_OFF;
550
    double      dfLONG_OFF;
551
    double      dfHEIGHT_OFF;
552

    
553
    double      dfLINE_SCALE;
554
    double      dfSAMP_SCALE;
555
    double      dfLAT_SCALE;
556
    double      dfLONG_SCALE;
557
    double      dfHEIGHT_SCALE;
558

    
559
    double      adfLINE_NUM_COEFF[20];
560
    double      adfLINE_DEN_COEFF[20];
561
    double      adfSAMP_NUM_COEFF[20];
562
    double      adfSAMP_DEN_COEFF[20];
563
    
564
    double        dfMIN_LONG;
565
    double      dfMIN_LAT;
566
    double      dfMAX_LONG;
567
    double        dfMAX_LAT;
568

    
569
} GDALRPCInfo;
570

    
571
int CPL_DLL GDALExtractRPCInfo( char **, GDALRPCInfo * );
572

    
573
/* ==================================================================== */
574
/*      Color tables.                                                   */
575
/* ==================================================================== */
576
/** Color tuple */
577
typedef struct
578
{
579
    /*! gray, red, cyan or hue */
580
    short      c1;      
581

    
582
    /*! green, magenta, or lightness */    
583
    short      c2;      
584

    
585
    /*! blue, yellow, or saturation */
586
    short      c3;      
587

    
588
    /*! alpha or blackband */
589
    short      c4;      
590
} GDALColorEntry;
591

    
592
GDALColorTableH CPL_DLL GDALCreateColorTable( GDALPaletteInterp );
593
void CPL_DLL            GDALDestroyColorTable( GDALColorTableH );
594
GDALColorTableH CPL_DLL GDALCloneColorTable( GDALColorTableH );
595
GDALPaletteInterp CPL_DLL GDALGetPaletteInterpretation( GDALColorTableH );
596
int CPL_DLL             GDALGetColorEntryCount( GDALColorTableH );
597
const GDALColorEntry CPL_DLL *GDALGetColorEntry( GDALColorTableH, int );
598
int CPL_DLL GDALGetColorEntryAsRGB( GDALColorTableH, int, GDALColorEntry *);
599
void CPL_DLL GDALSetColorEntry( GDALColorTableH, int, const GDALColorEntry * );
600

    
601
/* ==================================================================== */
602
/*      GDAL Cache Management                                           */
603
/* ==================================================================== */
604

    
605
void CPL_DLL GDALSetCacheMax( int nBytes );
606
int CPL_DLL GDALGetCacheMax();
607
int CPL_DLL GDALGetCacheUsed();
608
int CPL_DLL GDALFlushCacheBlock();
609

    
610
CPL_C_END
611

    
612
#endif /* ndef GDAL_H_INCLUDED */