GDAL
gdal.h
Go to the documentation of this file.
1 /******************************************************************************
2  * $Id: gdal.h 23431 2011-11-27 15:02:24Z rouault $
3  *
4  * Project: GDAL Core
5  * Purpose: GDAL Core C/Public declarations.
6  * Author: Frank Warmerdam, warmerdam@pobox.com
7  *
8  ******************************************************************************
9  * Copyright (c) 1998, 2002 Frank Warmerdam
10  *
11  * Permission is hereby granted, free of charge, to any person obtaining a
12  * copy of this software and associated documentation files (the "Software"),
13  * to deal in the Software without restriction, including without limitation
14  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
15  * and/or sell copies of the Software, and to permit persons to whom the
16  * Software is furnished to do so, subject to the following conditions:
17  *
18  * The above copyright notice and this permission notice shall be included
19  * in all copies or substantial portions of the Software.
20  *
21  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27  * DEALINGS IN THE SOFTWARE.
28  ****************************************************************************/
29 
30 #ifndef GDAL_H_INCLUDED
31 #define GDAL_H_INCLUDED
32 
39 #ifndef DOXYGEN_SKIP
40 #include "gdal_version.h"
41 #include "cpl_port.h"
42 #include "cpl_error.h"
43 #endif
44 
45 /* -------------------------------------------------------------------- */
46 /* Significant constants. */
47 /* -------------------------------------------------------------------- */
48 
49 CPL_C_START
50 
52 typedef enum { GDT_Unknown = 0, GDT_Byte = 1, GDT_UInt16 = 2, GDT_Int16 = 3, GDT_UInt32 = 4, GDT_Int32 = 5, GDT_Float32 = 6, GDT_Float64 = 7, GDT_CInt16 = 8, GDT_CInt32 = 9, GDT_CFloat32 = 10, GDT_CFloat64 = 11,
65  GDT_TypeCount = 12 /* maximum type # + 1 */
66 } GDALDataType;
67 
68 int CPL_DLL CPL_STDCALL GDALGetDataTypeSize( GDALDataType );
69 int CPL_DLL CPL_STDCALL GDALDataTypeIsComplex( GDALDataType );
70 const char CPL_DLL * CPL_STDCALL GDALGetDataTypeName( GDALDataType );
71 GDALDataType CPL_DLL CPL_STDCALL GDALGetDataTypeByName( const char * );
73 
77 typedef enum
78 {
79  GARIO_PENDING = 0,
80  GARIO_UPDATE = 1,
81  GARIO_ERROR = 2,
82  GARIO_COMPLETE = 3,
83  GARIO_TypeCount = 4
85 
86 const char CPL_DLL * CPL_STDCALL GDALGetAsyncStatusTypeName( GDALAsyncStatusType );
87 GDALAsyncStatusType CPL_DLL CPL_STDCALL GDALGetAsyncStatusTypeByName( const char * );
88 
90 typedef enum { GA_ReadOnly = 0, GA_Update = 1
93 } GDALAccess;
94 
96 typedef enum { GF_Read = 0, GF_Write = 1
99 } GDALRWFlag;
100 
102 typedef enum
103 {
123 
124 const char CPL_DLL *GDALGetColorInterpretationName( GDALColorInterp );
125 GDALColorInterp CPL_DLL GDALGetColorInterpretationByName( const char *pszName );
126 
128 typedef enum
129 { GPI_Gray=0, GPI_RGB=1, GPI_CMYK=2, GPI_HLS=3
135 
137 
138 /* "well known" metadata items. */
139 
140 #define GDALMD_AREA_OR_POINT "AREA_OR_POINT"
141 # define GDALMD_AOP_AREA "Area"
142 # define GDALMD_AOP_POINT "Point"
143 
144 /* -------------------------------------------------------------------- */
145 /* GDAL Specific error codes. */
146 /* */
147 /* error codes 100 to 299 reserved for GDAL. */
148 /* -------------------------------------------------------------------- */
149 #define CPLE_WrongFormat 200
150 
151 /* -------------------------------------------------------------------- */
152 /* Define handle types related to various internal classes. */
153 /* -------------------------------------------------------------------- */
154 
156 typedef void *GDALMajorObjectH;
157 
159 typedef void *GDALDatasetH;
160 
162 typedef void *GDALRasterBandH;
163 
165 typedef void *GDALDriverH;
166 
167 #ifndef DOXYGEN_SKIP
168 /* Deprecated / unused */
169 typedef void *GDALProjDefH;
170 #endif
171 
173 typedef void *GDALColorTableH;
174 
177 
179 typedef void *GDALAsyncReaderH;
180 
181 /* -------------------------------------------------------------------- */
182 /* Callback "progress" function. */
183 /* -------------------------------------------------------------------- */
184 
185 typedef int (CPL_STDCALL *GDALProgressFunc)(double dfComplete, const char *pszMessage, void *pProgressArg);
186 
187 int CPL_DLL CPL_STDCALL GDALDummyProgress( double, const char *, void *);
188 int CPL_DLL CPL_STDCALL GDALTermProgress( double, const char *, void *);
189 int CPL_DLL CPL_STDCALL GDALScaledProgress( double, const char *, void *);
190 void CPL_DLL * CPL_STDCALL GDALCreateScaledProgress( double, double,
191  GDALProgressFunc, void * );
192 void CPL_DLL CPL_STDCALL GDALDestroyScaledProgress( void * );
193 
194 /* ==================================================================== */
195 /* Registration/driver related. */
196 /* ==================================================================== */
197 
198 #ifndef DOXYGEN_SKIP
199 /* Deprecated / unused */
200 typedef struct {
201  char *pszOptionName;
202  char *pszValueType; /* "boolean", "int", "float", "string",
203  "string-select" */
204  char *pszDescription;
205  char **papszOptions;
206 } GDALOptionDefinition;
207 #endif
208 
209 #define GDAL_DMD_LONGNAME "DMD_LONGNAME"
210 #define GDAL_DMD_HELPTOPIC "DMD_HELPTOPIC"
211 #define GDAL_DMD_MIMETYPE "DMD_MIMETYPE"
212 #define GDAL_DMD_EXTENSION "DMD_EXTENSION"
213 #define GDAL_DMD_CREATIONOPTIONLIST "DMD_CREATIONOPTIONLIST"
214 #define GDAL_DMD_CREATIONDATATYPES "DMD_CREATIONDATATYPES"
215 
216 #define GDAL_DCAP_CREATE "DCAP_CREATE"
217 #define GDAL_DCAP_CREATECOPY "DCAP_CREATECOPY"
218 #define GDAL_DCAP_VIRTUALIO "DCAP_VIRTUALIO"
219 
220 void CPL_DLL CPL_STDCALL GDALAllRegister( void );
221 
222 GDALDatasetH CPL_DLL CPL_STDCALL GDALCreate( GDALDriverH hDriver,
223  const char *, int, int, int, GDALDataType,
224  char ** ) CPL_WARN_UNUSED_RESULT;
225 GDALDatasetH CPL_DLL CPL_STDCALL
226 GDALCreateCopy( GDALDriverH, const char *, GDALDatasetH,
227  int, char **, GDALProgressFunc, void * ) CPL_WARN_UNUSED_RESULT;
228 
229 GDALDriverH CPL_DLL CPL_STDCALL GDALIdentifyDriver( const char * pszFilename,
230  char ** papszFileList );
231 GDALDatasetH CPL_DLL CPL_STDCALL
232 GDALOpen( const char *pszFilename, GDALAccess eAccess ) CPL_WARN_UNUSED_RESULT;
233 GDALDatasetH CPL_DLL CPL_STDCALL GDALOpenShared( const char *, GDALAccess ) CPL_WARN_UNUSED_RESULT;
234 int CPL_DLL CPL_STDCALL GDALDumpOpenDatasets( FILE * );
235 
236 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriverByName( const char * );
237 int CPL_DLL CPL_STDCALL GDALGetDriverCount( void );
238 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriver( int );
239 void CPL_DLL CPL_STDCALL GDALDestroyDriver( GDALDriverH );
240 int CPL_DLL CPL_STDCALL GDALRegisterDriver( GDALDriverH );
241 void CPL_DLL CPL_STDCALL GDALDeregisterDriver( GDALDriverH );
242 void CPL_DLL CPL_STDCALL GDALDestroyDriverManager( void );
243 CPLErr CPL_DLL CPL_STDCALL GDALDeleteDataset( GDALDriverH, const char * );
244 CPLErr CPL_DLL CPL_STDCALL GDALRenameDataset( GDALDriverH,
245  const char * pszNewName,
246  const char * pszOldName );
247 CPLErr CPL_DLL CPL_STDCALL GDALCopyDatasetFiles( GDALDriverH,
248  const char * pszNewName,
249  const char * pszOldName);
250 int CPL_DLL CPL_STDCALL GDALValidateCreationOptions( GDALDriverH,
251  char** papszCreationOptions);
252 
253 /* The following are deprecated */
254 const char CPL_DLL * CPL_STDCALL GDALGetDriverShortName( GDALDriverH );
255 const char CPL_DLL * CPL_STDCALL GDALGetDriverLongName( GDALDriverH );
256 const char CPL_DLL * CPL_STDCALL GDALGetDriverHelpTopic( GDALDriverH );
257 const char CPL_DLL * CPL_STDCALL GDALGetDriverCreationOptionList( GDALDriverH );
258 
259 /* ==================================================================== */
260 /* GDAL_GCP */
261 /* ==================================================================== */
262 
264 typedef struct
265 {
267  char *pszId;
268 
270  char *pszInfo;
271 
273  double dfGCPPixel;
275  double dfGCPLine;
276 
278  double dfGCPX;
279 
281  double dfGCPY;
282 
284  double dfGCPZ;
285 } GDAL_GCP;
286 
287 void CPL_DLL CPL_STDCALL GDALInitGCPs( int, GDAL_GCP * );
288 void CPL_DLL CPL_STDCALL GDALDeinitGCPs( int, GDAL_GCP * );
289 GDAL_GCP CPL_DLL * CPL_STDCALL GDALDuplicateGCPs( int, const GDAL_GCP * );
290 
291 int CPL_DLL CPL_STDCALL
292 GDALGCPsToGeoTransform( int nGCPCount, const GDAL_GCP *pasGCPs,
293  double *padfGeoTransform, int bApproxOK );
294 int CPL_DLL CPL_STDCALL
295 GDALInvGeoTransform( double *padfGeoTransformIn,
296  double *padfInvGeoTransformOut );
297 void CPL_DLL CPL_STDCALL GDALApplyGeoTransform( double *, double, double,
298  double *, double * );
299 
300 /* ==================================================================== */
301 /* major objects (dataset, and, driver, drivermanager). */
302 /* ==================================================================== */
303 
304 char CPL_DLL ** CPL_STDCALL GDALGetMetadata( GDALMajorObjectH, const char * );
305 CPLErr CPL_DLL CPL_STDCALL GDALSetMetadata( GDALMajorObjectH, char **,
306  const char * );
307 const char CPL_DLL * CPL_STDCALL
308 GDALGetMetadataItem( GDALMajorObjectH, const char *, const char * );
309 CPLErr CPL_DLL CPL_STDCALL
310 GDALSetMetadataItem( GDALMajorObjectH, const char *, const char *,
311  const char * );
312 const char CPL_DLL * CPL_STDCALL GDALGetDescription( GDALMajorObjectH );
313 void CPL_DLL CPL_STDCALL GDALSetDescription( GDALMajorObjectH, const char * );
314 
315 /* ==================================================================== */
316 /* GDALDataset class ... normally this represents one file. */
317 /* ==================================================================== */
318 
319 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDatasetDriver( GDALDatasetH );
320 char CPL_DLL ** CPL_STDCALL GDALGetFileList( GDALDatasetH );
321 void CPL_DLL CPL_STDCALL GDALClose( GDALDatasetH );
322 int CPL_DLL CPL_STDCALL GDALGetRasterXSize( GDALDatasetH );
323 int CPL_DLL CPL_STDCALL GDALGetRasterYSize( GDALDatasetH );
324 int CPL_DLL CPL_STDCALL GDALGetRasterCount( GDALDatasetH );
325 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetRasterBand( GDALDatasetH, int );
326 
327 CPLErr CPL_DLL CPL_STDCALL GDALAddBand( GDALDatasetH hDS, GDALDataType eType,
328  char **papszOptions );
329 
330 GDALAsyncReaderH CPL_DLL CPL_STDCALL
331 GDALBeginAsyncReader(GDALDatasetH hDS, int nXOff, int nYOff,
332  int nXSize, int nYSize,
333  void *pBuf, int nBufXSize, int nBufYSize,
334  GDALDataType eBufType, int nBandCount, int* panBandMap,
335  int nPixelSpace, int nLineSpace, int nBandSpace,
336  char **papszOptions);
337 
338 void CPL_DLL CPL_STDCALL
339 GDALEndAsyncReader(GDALDatasetH hDS, GDALAsyncReaderH hAsynchReaderH);
340 
341 CPLErr CPL_DLL CPL_STDCALL GDALDatasetRasterIO(
342  GDALDatasetH hDS, GDALRWFlag eRWFlag,
343  int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
344  void * pBuffer, int nBXSize, int nBYSize, GDALDataType eBDataType,
345  int nBandCount, int *panBandCount,
346  int nPixelSpace, int nLineSpace, int nBandSpace);
347 
348 CPLErr CPL_DLL CPL_STDCALL GDALDatasetAdviseRead( GDALDatasetH hDS,
349  int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
350  int nBXSize, int nBYSize, GDALDataType eBDataType,
351  int nBandCount, int *panBandCount, char **papszOptions );
352 
353 const char CPL_DLL * CPL_STDCALL GDALGetProjectionRef( GDALDatasetH );
354 CPLErr CPL_DLL CPL_STDCALL GDALSetProjection( GDALDatasetH, const char * );
355 CPLErr CPL_DLL CPL_STDCALL GDALGetGeoTransform( GDALDatasetH, double * );
356 CPLErr CPL_DLL CPL_STDCALL GDALSetGeoTransform( GDALDatasetH, double * );
357 
358 int CPL_DLL CPL_STDCALL GDALGetGCPCount( GDALDatasetH );
359 const char CPL_DLL * CPL_STDCALL GDALGetGCPProjection( GDALDatasetH );
360 const GDAL_GCP CPL_DLL * CPL_STDCALL GDALGetGCPs( GDALDatasetH );
361 CPLErr CPL_DLL CPL_STDCALL GDALSetGCPs( GDALDatasetH, int, const GDAL_GCP *,
362  const char * );
363 
364 void CPL_DLL * CPL_STDCALL GDALGetInternalHandle( GDALDatasetH, const char * );
365 int CPL_DLL CPL_STDCALL GDALReferenceDataset( GDALDatasetH );
366 int CPL_DLL CPL_STDCALL GDALDereferenceDataset( GDALDatasetH );
367 
368 CPLErr CPL_DLL CPL_STDCALL
369 GDALBuildOverviews( GDALDatasetH, const char *, int, int *,
370  int, int *, GDALProgressFunc, void * );
371 void CPL_DLL CPL_STDCALL GDALGetOpenDatasets( GDALDatasetH **hDS, int *pnCount );
372 int CPL_DLL CPL_STDCALL GDALGetAccess( GDALDatasetH hDS );
373 void CPL_DLL CPL_STDCALL GDALFlushCache( GDALDatasetH hDS );
374 
375 CPLErr CPL_DLL CPL_STDCALL
376  GDALCreateDatasetMaskBand( GDALDatasetH hDS, int nFlags );
377 
378 CPLErr CPL_DLL CPL_STDCALL GDALDatasetCopyWholeRaster(
379  GDALDatasetH hSrcDS, GDALDatasetH hDstDS, char **papszOptions,
380  GDALProgressFunc pfnProgress, void *pProgressData );
381 
382 CPLErr CPL_DLL CPL_STDCALL GDALRasterBandCopyWholeRaster(
383  GDALRasterBandH hSrcBand, GDALRasterBandH hDstBand, char **papszOptions,
384  GDALProgressFunc pfnProgress, void *pProgressData );
385 
386 CPLErr CPL_DLL
388  int nOverviewCount, GDALRasterBandH *pahOverviewBands,
389  const char *pszResampling,
390  GDALProgressFunc pfnProgress, void *pProgressData );
391 
392 /* ==================================================================== */
393 /* GDALRasterBand ... one band/channel in a dataset. */
394 /* ==================================================================== */
395 
400 #define SRCVAL(papoSource, eSrcType, ii) \
401  (eSrcType == GDT_Byte ? \
402  ((GByte *)papoSource)[ii] : \
403  (eSrcType == GDT_Float32 ? \
404  ((float *)papoSource)[ii] : \
405  (eSrcType == GDT_Float64 ? \
406  ((double *)papoSource)[ii] : \
407  (eSrcType == GDT_Int32 ? \
408  ((GInt32 *)papoSource)[ii] : \
409  (eSrcType == GDT_UInt16 ? \
410  ((GUInt16 *)papoSource)[ii] : \
411  (eSrcType == GDT_Int16 ? \
412  ((GInt16 *)papoSource)[ii] : \
413  (eSrcType == GDT_UInt32 ? \
414  ((GUInt32 *)papoSource)[ii] : \
415  (eSrcType == GDT_CInt16 ? \
416  ((GInt16 *)papoSource)[ii * 2] : \
417  (eSrcType == GDT_CInt32 ? \
418  ((GInt32 *)papoSource)[ii * 2] : \
419  (eSrcType == GDT_CFloat32 ? \
420  ((float *)papoSource)[ii * 2] : \
421  (eSrcType == GDT_CFloat64 ? \
422  ((double *)papoSource)[ii * 2] : 0)))))))))))
423 
424 typedef CPLErr
425 (*GDALDerivedPixelFunc)(void **papoSources, int nSources, void *pData,
426  int nBufXSize, int nBufYSize,
427  GDALDataType eSrcType, GDALDataType eBufType,
428  int nPixelSpace, int nLineSpace);
429 
430 GDALDataType CPL_DLL CPL_STDCALL GDALGetRasterDataType( GDALRasterBandH );
431 void CPL_DLL CPL_STDCALL
432 GDALGetBlockSize( GDALRasterBandH, int * pnXSize, int * pnYSize );
433 
434 CPLErr CPL_DLL CPL_STDCALL GDALRasterAdviseRead( GDALRasterBandH hRB,
435  int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
436  int nBXSize, int nBYSize, GDALDataType eBDataType, char **papszOptions );
437 
438 CPLErr CPL_DLL CPL_STDCALL
439 GDALRasterIO( GDALRasterBandH hRBand, GDALRWFlag eRWFlag,
440  int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
441  void * pBuffer, int nBXSize, int nBYSize,GDALDataType eBDataType,
442  int nPixelSpace, int nLineSpace );
443 CPLErr CPL_DLL CPL_STDCALL GDALReadBlock( GDALRasterBandH, int, int, void * );
444 CPLErr CPL_DLL CPL_STDCALL GDALWriteBlock( GDALRasterBandH, int, int, void * );
445 int CPL_DLL CPL_STDCALL GDALGetRasterBandXSize( GDALRasterBandH );
446 int CPL_DLL CPL_STDCALL GDALGetRasterBandYSize( GDALRasterBandH );
447 GDALAccess CPL_DLL CPL_STDCALL GDALGetRasterAccess( GDALRasterBandH );
448 int CPL_DLL CPL_STDCALL GDALGetBandNumber( GDALRasterBandH );
449 GDALDatasetH CPL_DLL CPL_STDCALL GDALGetBandDataset( GDALRasterBandH );
450 
451 GDALColorInterp CPL_DLL CPL_STDCALL
453 CPLErr CPL_DLL CPL_STDCALL
456 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterColorTable( GDALRasterBandH, GDALColorTableH );
457 int CPL_DLL CPL_STDCALL GDALHasArbitraryOverviews( GDALRasterBandH );
458 int CPL_DLL CPL_STDCALL GDALGetOverviewCount( GDALRasterBandH );
459 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetOverview( GDALRasterBandH, int );
460 double CPL_DLL CPL_STDCALL GDALGetRasterNoDataValue( GDALRasterBandH, int * );
461 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterNoDataValue( GDALRasterBandH, double );
462 char CPL_DLL ** CPL_STDCALL GDALGetRasterCategoryNames( GDALRasterBandH );
463 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterCategoryNames( GDALRasterBandH, char ** );
464 double CPL_DLL CPL_STDCALL GDALGetRasterMinimum( GDALRasterBandH, int *pbSuccess );
465 double CPL_DLL CPL_STDCALL GDALGetRasterMaximum( GDALRasterBandH, int *pbSuccess );
466 CPLErr CPL_DLL CPL_STDCALL GDALGetRasterStatistics(
467  GDALRasterBandH, int bApproxOK, int bForce,
468  double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev );
469 CPLErr CPL_DLL CPL_STDCALL GDALComputeRasterStatistics(
470  GDALRasterBandH, int bApproxOK,
471  double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev,
472  GDALProgressFunc pfnProgress, void *pProgressData );
473 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterStatistics(
474  GDALRasterBandH hBand,
475  double dfMin, double dfMax, double dfMean, double dfStdDev );
476 
477 const char CPL_DLL * CPL_STDCALL GDALGetRasterUnitType( GDALRasterBandH );
478 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterUnitType( GDALRasterBandH hBand, const char *pszNewValue );
479 double CPL_DLL CPL_STDCALL GDALGetRasterOffset( GDALRasterBandH, int *pbSuccess );
480 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterOffset( GDALRasterBandH hBand, double dfNewOffset);
481 double CPL_DLL CPL_STDCALL GDALGetRasterScale( GDALRasterBandH, int *pbSuccess );
482 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterScale( GDALRasterBandH hBand, double dfNewOffset );
483 void CPL_DLL CPL_STDCALL
484 GDALComputeRasterMinMax( GDALRasterBandH hBand, int bApproxOK,
485  double adfMinMax[2] );
486 CPLErr CPL_DLL CPL_STDCALL GDALFlushRasterCache( GDALRasterBandH hBand );
487 CPLErr CPL_DLL CPL_STDCALL GDALGetRasterHistogram( GDALRasterBandH hBand,
488  double dfMin, double dfMax,
489  int nBuckets, int *panHistogram,
490  int bIncludeOutOfRange, int bApproxOK,
491  GDALProgressFunc pfnProgress,
492  void * pProgressData );
493 CPLErr CPL_DLL CPL_STDCALL GDALGetDefaultHistogram( GDALRasterBandH hBand,
494  double *pdfMin, double *pdfMax,
495  int *pnBuckets, int **ppanHistogram,
496  int bForce,
497  GDALProgressFunc pfnProgress,
498  void * pProgressData );
499 CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultHistogram( GDALRasterBandH hBand,
500  double dfMin, double dfMax,
501  int nBuckets, int *panHistogram );
502 int CPL_DLL CPL_STDCALL
503 GDALGetRandomRasterSample( GDALRasterBandH, int, float * );
504 GDALRasterBandH CPL_DLL CPL_STDCALL
506 CPLErr CPL_DLL CPL_STDCALL GDALFillRaster( GDALRasterBandH hBand,
507  double dfRealValue, double dfImaginaryValue );
508 CPLErr CPL_DLL CPL_STDCALL
509 GDALComputeBandStats( GDALRasterBandH hBand, int nSampleStep,
510  double *pdfMean, double *pdfStdDev,
511  GDALProgressFunc pfnProgress,
512  void *pProgressData );
513 CPLErr CPL_DLL GDALOverviewMagnitudeCorrection( GDALRasterBandH hBaseBand,
514  int nOverviewCount,
515  GDALRasterBandH *pahOverviews,
516  GDALProgressFunc pfnProgress,
517  void *pProgressData );
518 
519 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL GDALGetDefaultRAT(
520  GDALRasterBandH hBand );
521 CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultRAT( GDALRasterBandH,
523 CPLErr CPL_DLL CPL_STDCALL GDALAddDerivedBandPixelFunc( const char *pszName,
524  GDALDerivedPixelFunc pfnPixelFunc );
525 
526 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetMaskBand( GDALRasterBandH hBand );
527 int CPL_DLL CPL_STDCALL GDALGetMaskFlags( GDALRasterBandH hBand );
528 CPLErr CPL_DLL CPL_STDCALL
529  GDALCreateMaskBand( GDALRasterBandH hBand, int nFlags );
530 
531 #define GMF_ALL_VALID 0x01
532 #define GMF_PER_DATASET 0x02
533 #define GMF_ALPHA 0x04
534 #define GMF_NODATA 0x08
535 
536 /* ==================================================================== */
537 /* GDALAsyncReader */
538 /* ==================================================================== */
539 
540 GDALAsyncStatusType CPL_DLL CPL_STDCALL
541 GDALARGetNextUpdatedRegion(GDALAsyncReaderH hARIO, double dfTimeout,
542  int* pnXBufOff, int* pnYBufOff,
543  int* pnXBufSize, int* pnYBufSize );
544 int CPL_DLL CPL_STDCALL GDALARLockBuffer(GDALAsyncReaderH hARIO,
545  double dfTimeout);
546 void CPL_DLL CPL_STDCALL GDALARUnlockBuffer(GDALAsyncReaderH hARIO);
547 
548 /* -------------------------------------------------------------------- */
549 /* Helper functions. */
550 /* -------------------------------------------------------------------- */
551 int CPL_DLL CPL_STDCALL GDALGeneralCmdLineProcessor( int nArgc, char ***ppapszArgv,
552  int nOptions );
553 void CPL_DLL CPL_STDCALL GDALSwapWords( void *pData, int nWordSize, int nWordCount,
554  int nWordSkip );
555 void CPL_DLL CPL_STDCALL
556  GDALCopyWords( void * pSrcData, GDALDataType eSrcType, int nSrcPixelOffset,
557  void * pDstData, GDALDataType eDstType, int nDstPixelOffset,
558  int nWordCount );
559 
560 void CPL_DLL
561 GDALCopyBits( const GByte *pabySrcData, int nSrcOffset, int nSrcStep,
562  GByte *pabyDstData, int nDstOffset, int nDstStep,
563  int nBitCount, int nStepCount );
564 
565 int CPL_DLL CPL_STDCALL GDALLoadWorldFile( const char *, double * );
566 int CPL_DLL CPL_STDCALL GDALReadWorldFile( const char *, const char *,
567  double * );
568 int CPL_DLL CPL_STDCALL GDALWriteWorldFile( const char *, const char *,
569  double * );
570 int CPL_DLL CPL_STDCALL GDALLoadTabFile( const char *, double *, char **,
571  int *, GDAL_GCP ** );
572 int CPL_DLL CPL_STDCALL GDALReadTabFile( const char *, double *, char **,
573  int *, GDAL_GCP ** );
574 int CPL_DLL CPL_STDCALL GDALLoadOziMapFile( const char *, double *, char **,
575  int *, GDAL_GCP ** );
576 int CPL_DLL CPL_STDCALL GDALReadOziMapFile( const char * , double *,
577  char **, int *, GDAL_GCP ** );
578 char CPL_DLL ** CPL_STDCALL GDALLoadRPBFile( const char *pszFilename,
579  char **papszSiblingFiles );
580 char CPL_DLL ** CPL_STDCALL GDALLoadRPCFile( const char *pszFilename,
581  char **papszSiblingFiles );
582 CPLErr CPL_DLL CPL_STDCALL GDALWriteRPBFile( const char *pszFilename,
583  char **papszMD );
584 char CPL_DLL ** CPL_STDCALL GDALLoadIMDFile( const char *pszFilename,
585  char **papszSiblingFiles );
586 CPLErr CPL_DLL CPL_STDCALL GDALWriteIMDFile( const char *pszFilename,
587  char **papszMD );
588 
589 const char CPL_DLL * CPL_STDCALL GDALDecToDMS( double, const char *, int );
590 double CPL_DLL CPL_STDCALL GDALPackedDMSToDec( double );
591 double CPL_DLL CPL_STDCALL GDALDecToPackedDMS( double );
592 
593 /* Note to developers : please keep this section in sync with ogr_core.h */
594 
595 #ifndef GDAL_VERSION_INFO_DEFINED
596 #define GDAL_VERSION_INFO_DEFINED
597 const char CPL_DLL * CPL_STDCALL GDALVersionInfo( const char * );
598 #endif
599 
600 #ifndef GDAL_CHECK_VERSION
601 
602 int CPL_DLL CPL_STDCALL GDALCheckVersion( int nVersionMajor, int nVersionMinor,
603  const char* pszCallingComponentName);
604 
608 #define GDAL_CHECK_VERSION(pszCallingComponentName) \
609  GDALCheckVersion(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, pszCallingComponentName)
610 
611 #endif
612 
613 typedef struct {
614  double dfLINE_OFF;
615  double dfSAMP_OFF;
616  double dfLAT_OFF;
617  double dfLONG_OFF;
618  double dfHEIGHT_OFF;
619 
620  double dfLINE_SCALE;
621  double dfSAMP_SCALE;
622  double dfLAT_SCALE;
623  double dfLONG_SCALE;
624  double dfHEIGHT_SCALE;
625 
626  double adfLINE_NUM_COEFF[20];
627  double adfLINE_DEN_COEFF[20];
628  double adfSAMP_NUM_COEFF[20];
629  double adfSAMP_DEN_COEFF[20];
630 
631  double dfMIN_LONG;
632  double dfMIN_LAT;
633  double dfMAX_LONG;
634  double dfMAX_LAT;
635 
636 } GDALRPCInfo;
637 
638 int CPL_DLL CPL_STDCALL GDALExtractRPCInfo( char **, GDALRPCInfo * );
639 
640 /* ==================================================================== */
641 /* Color tables. */
642 /* ==================================================================== */
643 
645 typedef struct
646 {
648  short c1;
649 
651  short c2;
652 
654  short c3;
655 
657  short c4;
659 
661 void CPL_DLL CPL_STDCALL GDALDestroyColorTable( GDALColorTableH );
664 int CPL_DLL CPL_STDCALL GDALGetColorEntryCount( GDALColorTableH );
665 const GDALColorEntry CPL_DLL * CPL_STDCALL GDALGetColorEntry( GDALColorTableH, int );
666 int CPL_DLL CPL_STDCALL GDALGetColorEntryAsRGB( GDALColorTableH, int, GDALColorEntry *);
667 void CPL_DLL CPL_STDCALL GDALSetColorEntry( GDALColorTableH, int, const GDALColorEntry * );
668 void CPL_DLL CPL_STDCALL GDALCreateColorRamp( GDALColorTableH hTable,
669  int nStartIndex, const GDALColorEntry *psStartColor,
670  int nEndIndex, const GDALColorEntry *psEndColor );
671 
672 /* ==================================================================== */
673 /* Raster Attribute Table */
674 /* ==================================================================== */
675 
677 typedef enum { GFT_Integer , GFT_Real, GFT_String
682 
684 typedef enum { GFU_Generic = 0, GFU_PixelCount = 1, GFU_Name = 2, GFU_Min = 3, GFU_Max = 4, GFU_MinMax = 5, GFU_Red = 6, GFU_Green = 7, GFU_Blue = 8, GFU_Alpha = 9, GFU_RedMin = 10, GFU_GreenMin = 11, GFU_BlueMin = 12, GFU_AlphaMin = 13, GFU_RedMax = 14, GFU_GreenMax = 15, GFU_BlueMax = 16, GFU_AlphaMax = 17, GFU_MaxCount
705 
706 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL
708 void CPL_DLL CPL_STDCALL GDALDestroyRasterAttributeTable(
710 
711 int CPL_DLL CPL_STDCALL GDALRATGetColumnCount( GDALRasterAttributeTableH );
712 
713 const char CPL_DLL * CPL_STDCALL GDALRATGetNameOfCol(
715 GDALRATFieldUsage CPL_DLL CPL_STDCALL GDALRATGetUsageOfCol(
717 GDALRATFieldType CPL_DLL CPL_STDCALL GDALRATGetTypeOfCol(
719 
720 int CPL_DLL CPL_STDCALL GDALRATGetColOfUsage( GDALRasterAttributeTableH,
722 int CPL_DLL CPL_STDCALL GDALRATGetRowCount( GDALRasterAttributeTableH );
723 
724 const char CPL_DLL * CPL_STDCALL GDALRATGetValueAsString(
725  GDALRasterAttributeTableH, int ,int);
726 int CPL_DLL CPL_STDCALL GDALRATGetValueAsInt(
727  GDALRasterAttributeTableH, int ,int);
728 double CPL_DLL CPL_STDCALL GDALRATGetValueAsDouble(
729  GDALRasterAttributeTableH, int ,int);
730 
731 void CPL_DLL CPL_STDCALL GDALRATSetValueAsString( GDALRasterAttributeTableH, int, int,
732  const char * );
733 void CPL_DLL CPL_STDCALL GDALRATSetValueAsInt( GDALRasterAttributeTableH, int, int,
734  int );
735 void CPL_DLL CPL_STDCALL GDALRATSetValueAsDouble( GDALRasterAttributeTableH, int, int,
736  double );
737 void CPL_DLL CPL_STDCALL GDALRATSetRowCount( GDALRasterAttributeTableH,
738  int );
739 CPLErr CPL_DLL CPL_STDCALL GDALRATCreateColumn( GDALRasterAttributeTableH,
740  const char *,
743 CPLErr CPL_DLL CPL_STDCALL GDALRATSetLinearBinning( GDALRasterAttributeTableH,
744  double, double );
745 int CPL_DLL CPL_STDCALL GDALRATGetLinearBinning( GDALRasterAttributeTableH,
746  double *, double * );
747 CPLErr CPL_DLL CPL_STDCALL GDALRATInitializeFromColorTable(
750  GDALRasterAttributeTableH, int nEntryCount );
751 void CPL_DLL CPL_STDCALL GDALRATDumpReadable( GDALRasterAttributeTableH,
752  FILE * );
753 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL
755 
756 int CPL_DLL CPL_STDCALL GDALRATGetRowOfValue( GDALRasterAttributeTableH , double );
757 
758 
759 /* ==================================================================== */
760 /* GDAL Cache Management */
761 /* ==================================================================== */
762 
763 void CPL_DLL CPL_STDCALL GDALSetCacheMax( int nBytes );
764 int CPL_DLL CPL_STDCALL GDALGetCacheMax(void);
765 int CPL_DLL CPL_STDCALL GDALGetCacheUsed(void);
766 void CPL_DLL CPL_STDCALL GDALSetCacheMax64( GIntBig nBytes );
767 GIntBig CPL_DLL CPL_STDCALL GDALGetCacheMax64(void);
768 GIntBig CPL_DLL CPL_STDCALL GDALGetCacheUsed64(void);
769 
770 int CPL_DLL CPL_STDCALL GDALFlushCacheBlock(void);
771 
772 CPL_C_END
773 
774 #endif /* ndef GDAL_H_INCLUDED */

Generated for GDAL by doxygen 1.8.1.1.