GDAL
gdal.h
Go to the documentation of this file.
00001 /******************************************************************************
00002  * $Id: gdal.h 39834 2017-08-16 12:20:23Z rouault $
00003  *
00004  * Project:  GDAL Core
00005  * Purpose:  GDAL Core C/Public declarations.
00006  * Author:   Frank Warmerdam, warmerdam@pobox.com
00007  *
00008  ******************************************************************************
00009  * Copyright (c) 1998, 2002 Frank Warmerdam
00010  * Copyright (c) 2007-2014, Even Rouault <even dot rouault at mines-paris dot org>
00011  *
00012  * Permission is hereby granted, free of charge, to any person obtaining a
00013  * copy of this software and associated documentation files (the "Software"),
00014  * to deal in the Software without restriction, including without limitation
00015  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00016  * and/or sell copies of the Software, and to permit persons to whom the
00017  * Software is furnished to do so, subject to the following conditions:
00018  *
00019  * The above copyright notice and this permission notice shall be included
00020  * in all copies or substantial portions of the Software.
00021  *
00022  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00023  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00024  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
00025  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00026  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00027  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00028  * DEALINGS IN THE SOFTWARE.
00029  ****************************************************************************/
00030 
00031 #ifndef GDAL_H_INCLUDED
00032 #define GDAL_H_INCLUDED
00033 
00040 #ifndef DOXYGEN_SKIP
00041 #include "gdal_version.h"
00042 #include "cpl_port.h"
00043 #include "cpl_error.h"
00044 #include "cpl_progress.h"
00045 #include "cpl_virtualmem.h"
00046 #include "cpl_minixml.h"
00047 #include "ogr_api.h"
00048 #endif
00049 
00050 /* -------------------------------------------------------------------- */
00051 /*      Significant constants.                                          */
00052 /* -------------------------------------------------------------------- */
00053 
00054 CPL_C_START
00055 
00057 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,
00070     GDT_TypeCount = 12          /* maximum type # + 1 */
00071 } GDALDataType;
00072 
00073 int CPL_DLL CPL_STDCALL GDALGetDataTypeSize( GDALDataType );  // Deprecated.
00074 int CPL_DLL CPL_STDCALL GDALGetDataTypeSizeBits( GDALDataType eDataType );
00075 int CPL_DLL CPL_STDCALL GDALGetDataTypeSizeBytes( GDALDataType );
00076 int CPL_DLL CPL_STDCALL GDALDataTypeIsComplex( GDALDataType );
00077 const char CPL_DLL * CPL_STDCALL GDALGetDataTypeName( GDALDataType );
00078 GDALDataType CPL_DLL CPL_STDCALL GDALGetDataTypeByName( const char * );
00079 GDALDataType CPL_DLL CPL_STDCALL GDALDataTypeUnion( GDALDataType, GDALDataType );
00080 double CPL_DLL GDALAdjustValueToDataType( GDALDataType eDT, double dfValue, int* pbClamped, int* pbRounded );
00081 GDALDataType CPL_STDCALL GDALGetNonComplexDataType( GDALDataType );
00082 
00086 typedef enum
00087 {
00088     GARIO_PENDING = 0,
00089     GARIO_UPDATE = 1,
00090     GARIO_ERROR = 2,
00091     GARIO_COMPLETE = 3,
00092     GARIO_TypeCount = 4
00093 } GDALAsyncStatusType;
00094 
00095 const char CPL_DLL * CPL_STDCALL GDALGetAsyncStatusTypeName( GDALAsyncStatusType );
00096 GDALAsyncStatusType CPL_DLL CPL_STDCALL GDALGetAsyncStatusTypeByName( const char * );
00097 
00099 typedef enum { GA_ReadOnly = 0,           GA_Update = 1
00102 } GDALAccess;
00103 
00105 typedef enum {   GF_Read = 0,  GF_Write = 1
00108 } GDALRWFlag;
00109 
00110 /* NOTE: values are selected to be consistent with GDALResampleAlg of alg/gdalwarper.h */
00114 typedef enum
00115 {                            GRIORA_NearestNeighbour = 0,                        GRIORA_Bilinear = 1, GRIORA_Cubic = 2,    GRIORA_CubicSpline = 3, GRIORA_Lanczos = 4,                                      GRIORA_Average = 5,
00123                                                         GRIORA_Mode = 6,                               GRIORA_Gauss = 7
00125     /* NOTE: values 8 to 12 are reserved for max,min,med,Q1,Q3 */
00126 } GDALRIOResampleAlg;
00127 
00128 /* NOTE to developers: only add members, and if so edit INIT_RASTERIO_EXTRA_ARG */
00129 /* and INIT_RASTERIO_EXTRA_ARG */
00133 typedef struct
00134 {
00136     int                    nVersion;
00137 
00139     GDALRIOResampleAlg     eResampleAlg;
00140 
00142     GDALProgressFunc       pfnProgress;
00144     void                  *pProgressData;
00145 
00150     int                    bFloatingPointWindowValidity;
00152     double                 dfXOff;
00154     double                 dfYOff;
00156     double                 dfXSize;
00158     double                 dfYSize;
00159 } GDALRasterIOExtraArg;
00160 
00161 #ifndef DOXYGEN_SKIP
00162 #define RASTERIO_EXTRA_ARG_CURRENT_VERSION  1
00163 #endif
00164 
00168 #define INIT_RASTERIO_EXTRA_ARG(s)  \
00169     do { (s).nVersion = RASTERIO_EXTRA_ARG_CURRENT_VERSION; \
00170          (s).eResampleAlg = GRIORA_NearestNeighbour; \
00171          (s).pfnProgress = NULL; \
00172          (s).pProgressData = NULL; \
00173          (s).bFloatingPointWindowValidity = FALSE; } while(0)
00174 
00176 typedef enum
00177 {
00178     GCI_Undefined=0,                                      GCI_GrayIndex=1,          GCI_PaletteIndex=2,                         GCI_RedBand=3,                       GCI_GreenBand=4,                        GCI_BlueBand=5,              GCI_AlphaBand=6,                          GCI_HueBand=7,                   GCI_SaturationBand=8,                    GCI_LightnessBand=9,                        GCI_CyanBand=10,                     GCI_MagentaBand=11,                      GCI_YellowBand=12,                       GCI_BlackBand=13,                                    GCI_YCbCr_YBand=14,                                      GCI_YCbCr_CbBand=15,                                      GCI_YCbCr_CrBand=16,                              GCI_Max=16
00196 } GDALColorInterp;
00197 
00198 const char CPL_DLL *GDALGetColorInterpretationName( GDALColorInterp );
00199 GDALColorInterp CPL_DLL GDALGetColorInterpretationByName( const char *pszName );
00200 
00202 typedef enum
00203 {                      GPI_Gray=0,  GPI_RGB=1, GPI_CMYK=2,     GPI_HLS=3
00208 } GDALPaletteInterp;
00209 
00210 const char CPL_DLL *GDALGetPaletteInterpretationName( GDALPaletteInterp );
00211 
00212 /* "well known" metadata items. */
00213 
00216 #define GDALMD_AREA_OR_POINT   "AREA_OR_POINT"
00217 
00219 #  define GDALMD_AOP_AREA      "Area"
00220 
00222 #  define GDALMD_AOP_POINT     "Point"
00223 
00224 /* -------------------------------------------------------------------- */
00225 /*      GDAL Specific error codes.                                      */
00226 /*                                                                      */
00227 /*      error codes 100 to 299 reserved for GDAL.                       */
00228 /* -------------------------------------------------------------------- */
00229 #ifndef DOXYGEN_SKIP
00230 #define CPLE_WrongFormat        (CPLErrorNum)200
00231 #endif
00232 
00233 /* -------------------------------------------------------------------- */
00234 /*      Define handle types related to various internal classes.        */
00235 /* -------------------------------------------------------------------- */
00236 
00238 typedef void *GDALMajorObjectH;
00239 
00241 typedef void *GDALDatasetH;
00242 
00244 typedef void *GDALRasterBandH;
00245 
00247 typedef void *GDALDriverH;
00248 
00250 typedef void *GDALColorTableH;
00251 
00253 typedef void *GDALRasterAttributeTableH;
00254 
00256 typedef void *GDALAsyncReaderH;
00257 
00259 typedef GIntBig GSpacing;
00260 
00261 /* ==================================================================== */
00262 /*      Registration/driver related.                                    */
00263 /* ==================================================================== */
00264 
00266 #define GDAL_DMD_LONGNAME "DMD_LONGNAME"
00267 
00269 #define GDAL_DMD_HELPTOPIC "DMD_HELPTOPIC"
00270 
00272 #define GDAL_DMD_MIMETYPE "DMD_MIMETYPE"
00273 
00275 #define GDAL_DMD_EXTENSION "DMD_EXTENSION"
00276 
00281 #define GDAL_DMD_CONNECTION_PREFIX "DMD_CONNECTION_PREFIX"
00282 
00286 #define GDAL_DMD_EXTENSIONS "DMD_EXTENSIONS"
00287 
00289 #define GDAL_DMD_CREATIONOPTIONLIST "DMD_CREATIONOPTIONLIST"
00290 
00294 #define GDAL_DMD_OPENOPTIONLIST "DMD_OPENOPTIONLIST"
00295 
00297 #define GDAL_DMD_CREATIONDATATYPES "DMD_CREATIONDATATYPES"
00298 
00302 #define GDAL_DMD_CREATIONFIELDDATATYPES "DMD_CREATIONFIELDDATATYPES"
00303 
00305 #define GDAL_DMD_SUBDATASETS "DMD_SUBDATASETS"
00306 
00308 #define GDAL_DCAP_OPEN       "DCAP_OPEN"
00309 
00311 #define GDAL_DCAP_CREATE     "DCAP_CREATE"
00312 
00314 #define GDAL_DCAP_CREATECOPY "DCAP_CREATECOPY"
00315 
00317 #define GDAL_DCAP_VIRTUALIO  "DCAP_VIRTUALIO"
00318 
00322 #define GDAL_DCAP_RASTER     "DCAP_RASTER"
00323 
00327 #define GDAL_DCAP_VECTOR     "DCAP_VECTOR"
00328 
00332 #define GDAL_DCAP_GNM         "DCAP_GNM"
00333 
00337 #define GDAL_DCAP_NOTNULL_FIELDS "DCAP_NOTNULL_FIELDS"
00338 
00342 #define GDAL_DCAP_DEFAULT_FIELDS "DCAP_DEFAULT_FIELDS"
00343 
00347 #define GDAL_DCAP_NOTNULL_GEOMFIELDS "DCAP_NOTNULL_GEOMFIELDS"
00348 
00349 void CPL_DLL CPL_STDCALL GDALAllRegister( void );
00350 
00351 GDALDatasetH CPL_DLL CPL_STDCALL GDALCreate( GDALDriverH hDriver,
00352                                  const char *, int, int, int, GDALDataType,
00353                                  char ** ) CPL_WARN_UNUSED_RESULT;
00354 GDALDatasetH CPL_DLL CPL_STDCALL
00355 GDALCreateCopy( GDALDriverH, const char *, GDALDatasetH,
00356                 int, char **, GDALProgressFunc, void * ) CPL_WARN_UNUSED_RESULT;
00357 
00358 GDALDriverH CPL_DLL CPL_STDCALL GDALIdentifyDriver( const char * pszFilename,
00359                                             char ** papszFileList );
00360 
00361 GDALDriverH CPL_DLL CPL_STDCALL GDALIdentifyDriverEx(
00362     const char *pszFilename, unsigned int nIdentifyFlags,
00363     const char *const *papszAllowedDrivers, const char *const *papszFileList);
00364 
00365 GDALDatasetH CPL_DLL CPL_STDCALL
00366 GDALOpen( const char *pszFilename, GDALAccess eAccess ) CPL_WARN_UNUSED_RESULT;
00367 GDALDatasetH CPL_DLL CPL_STDCALL GDALOpenShared( const char *, GDALAccess ) CPL_WARN_UNUSED_RESULT;
00368 
00369 /* Note: we define GDAL_OF_READONLY and GDAL_OF_UPDATE to be on purpose */
00370 /* equals to GA_ReadOnly and GA_Update */
00371 
00376 #define     GDAL_OF_READONLY        0x00
00377 
00382 #define     GDAL_OF_UPDATE          0x01
00383 
00388 #define     GDAL_OF_ALL             0x00
00389 
00394 #define     GDAL_OF_RASTER          0x02
00395 
00400 #define     GDAL_OF_VECTOR          0x04
00401 
00406 #define     GDAL_OF_GNM             0x08
00407 
00408 /* Some space for GDAL 3.0 new types ;-) */
00409 /*#define     GDAL_OF_OTHER_KIND1   0x08 */
00410 /*#define     GDAL_OF_OTHER_KIND2   0x10 */
00411 #ifndef DOXYGEN_SKIP
00412 #define     GDAL_OF_KIND_MASK       0x1E
00413 #endif
00414 
00419 #define     GDAL_OF_SHARED          0x20
00420 
00425 #define     GDAL_OF_VERBOSE_ERROR   0x40
00426 
00433 #define     GDAL_OF_INTERNAL        0x80
00434 
00444 #define     GDAL_OF_DEFAULT_BLOCK_ACCESS  0
00445 
00454 #define     GDAL_OF_ARRAY_BLOCK_ACCESS    0x100
00455 
00464 #define     GDAL_OF_HASHSET_BLOCK_ACCESS  0x200
00465 
00466 #ifndef DOXYGEN_SKIP
00467 /* Reserved for a potential future alternative to GDAL_OF_ARRAY_BLOCK_ACCESS
00468  * and GDAL_OF_HASHSET_BLOCK_ACCESS */
00469 #define     GDAL_OF_RESERVED_1            0x300
00470 
00472 #define     GDAL_OF_BLOCK_ACCESS_MASK     0x300
00473 #endif
00474 
00475 GDALDatasetH CPL_DLL CPL_STDCALL GDALOpenEx( const char* pszFilename,
00476                                              unsigned int nOpenFlags,
00477                                              const char* const* papszAllowedDrivers,
00478                                              const char* const* papszOpenOptions,
00479                                              const char* const* papszSiblingFiles ) CPL_WARN_UNUSED_RESULT;
00480 
00481 int          CPL_DLL CPL_STDCALL GDALDumpOpenDatasets( FILE * );
00482 
00483 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriverByName( const char * );
00484 int CPL_DLL         CPL_STDCALL GDALGetDriverCount( void );
00485 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriver( int );
00486 GDALDriverH CPL_DLL CPL_STDCALL GDALCreateDriver( void );
00487 void        CPL_DLL CPL_STDCALL GDALDestroyDriver( GDALDriverH );
00488 int         CPL_DLL CPL_STDCALL GDALRegisterDriver( GDALDriverH );
00489 void        CPL_DLL CPL_STDCALL GDALDeregisterDriver( GDALDriverH );
00490 void        CPL_DLL CPL_STDCALL GDALDestroyDriverManager( void );
00491 #ifndef DOXYGEN_SKIP
00492 void        CPL_DLL             GDALDestroy( void );
00493 #endif
00494 CPLErr      CPL_DLL CPL_STDCALL GDALDeleteDataset( GDALDriverH, const char * );
00495 CPLErr      CPL_DLL CPL_STDCALL GDALRenameDataset( GDALDriverH,
00496                                                    const char * pszNewName,
00497                                                    const char * pszOldName );
00498 CPLErr      CPL_DLL CPL_STDCALL GDALCopyDatasetFiles( GDALDriverH,
00499                                                       const char * pszNewName,
00500                                                       const char * pszOldName);
00501 int         CPL_DLL CPL_STDCALL GDALValidateCreationOptions( GDALDriverH,
00502                                                              char** papszCreationOptions);
00503 
00504 /* The following are deprecated */
00505 const char CPL_DLL * CPL_STDCALL GDALGetDriverShortName( GDALDriverH );
00506 const char CPL_DLL * CPL_STDCALL GDALGetDriverLongName( GDALDriverH );
00507 const char CPL_DLL * CPL_STDCALL GDALGetDriverHelpTopic( GDALDriverH );
00508 const char CPL_DLL * CPL_STDCALL GDALGetDriverCreationOptionList( GDALDriverH );
00509 
00510 /* ==================================================================== */
00511 /*      GDAL_GCP                                                        */
00512 /* ==================================================================== */
00513 
00515 typedef struct
00516 {
00518     char        *pszId;
00519 
00521     char        *pszInfo;
00522 
00524     double      dfGCPPixel;
00526     double      dfGCPLine;
00527 
00529     double      dfGCPX;
00530 
00532     double      dfGCPY;
00533 
00535     double      dfGCPZ;
00536 } GDAL_GCP;
00537 
00538 void CPL_DLL CPL_STDCALL GDALInitGCPs( int, GDAL_GCP * );
00539 void CPL_DLL CPL_STDCALL GDALDeinitGCPs( int, GDAL_GCP * );
00540 GDAL_GCP CPL_DLL * CPL_STDCALL GDALDuplicateGCPs( int, const GDAL_GCP * );
00541 
00542 int CPL_DLL CPL_STDCALL
00543 GDALGCPsToGeoTransform( int nGCPCount, const GDAL_GCP *pasGCPs,
00544                         double *padfGeoTransform, int bApproxOK )  CPL_WARN_UNUSED_RESULT;
00545 int CPL_DLL CPL_STDCALL
00546 GDALInvGeoTransform( double *padfGeoTransformIn,
00547                      double *padfInvGeoTransformOut ) CPL_WARN_UNUSED_RESULT;
00548 void CPL_DLL CPL_STDCALL GDALApplyGeoTransform( double *, double, double,
00549                                                 double *, double * );
00550 void CPL_DLL GDALComposeGeoTransforms(const double *padfGeoTransform1,
00551                                       const double *padfGeoTransform2,
00552                                       double *padfGeoTransformOut);
00553 
00554 /* ==================================================================== */
00555 /*      major objects (dataset, and, driver, drivermanager).            */
00556 /* ==================================================================== */
00557 
00558 char CPL_DLL  ** CPL_STDCALL GDALGetMetadataDomainList( GDALMajorObjectH hObject );
00559 char CPL_DLL  ** CPL_STDCALL GDALGetMetadata( GDALMajorObjectH, const char * );
00560 CPLErr CPL_DLL CPL_STDCALL GDALSetMetadata( GDALMajorObjectH, char **,
00561                                             const char * );
00562 const char CPL_DLL * CPL_STDCALL
00563 GDALGetMetadataItem( GDALMajorObjectH, const char *, const char * );
00564 CPLErr CPL_DLL CPL_STDCALL
00565 GDALSetMetadataItem( GDALMajorObjectH, const char *, const char *,
00566                      const char * );
00567 const char CPL_DLL * CPL_STDCALL GDALGetDescription( GDALMajorObjectH );
00568 void CPL_DLL CPL_STDCALL GDALSetDescription( GDALMajorObjectH, const char * );
00569 
00570 /* ==================================================================== */
00571 /*      GDALDataset class ... normally this represents one file.        */
00572 /* ==================================================================== */
00573 
00575 #define GDAL_DS_LAYER_CREATIONOPTIONLIST "DS_LAYER_CREATIONOPTIONLIST"
00576 
00577 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDatasetDriver( GDALDatasetH );
00578 char CPL_DLL ** CPL_STDCALL GDALGetFileList( GDALDatasetH );
00579 void CPL_DLL CPL_STDCALL   GDALClose( GDALDatasetH );
00580 int CPL_DLL CPL_STDCALL     GDALGetRasterXSize( GDALDatasetH );
00581 int CPL_DLL CPL_STDCALL     GDALGetRasterYSize( GDALDatasetH );
00582 int CPL_DLL CPL_STDCALL     GDALGetRasterCount( GDALDatasetH );
00583 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetRasterBand( GDALDatasetH, int );
00584 
00585 CPLErr CPL_DLL  CPL_STDCALL GDALAddBand( GDALDatasetH hDS, GDALDataType eType,
00586                              char **papszOptions );
00587 
00588 GDALAsyncReaderH CPL_DLL CPL_STDCALL
00589 GDALBeginAsyncReader(GDALDatasetH hDS, int nXOff, int nYOff,
00590                      int nXSize, int nYSize,
00591                      void *pBuf, int nBufXSize, int nBufYSize,
00592                      GDALDataType eBufType, int nBandCount, int* panBandMap,
00593                      int nPixelSpace, int nLineSpace, int nBandSpace,
00594                      char **papszOptions) CPL_WARN_UNUSED_RESULT;
00595 
00596 void  CPL_DLL CPL_STDCALL
00597 GDALEndAsyncReader(GDALDatasetH hDS, GDALAsyncReaderH hAsynchReaderH);
00598 
00599 CPLErr CPL_DLL CPL_STDCALL GDALDatasetRasterIO(
00600     GDALDatasetH hDS, GDALRWFlag eRWFlag,
00601     int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00602     void * pBuffer, int nBXSize, int nBYSize, GDALDataType eBDataType,
00603     int nBandCount, int *panBandCount,
00604     int nPixelSpace, int nLineSpace, int nBandSpace) CPL_WARN_UNUSED_RESULT;
00605 
00606 CPLErr CPL_DLL CPL_STDCALL GDALDatasetRasterIOEx(
00607     GDALDatasetH hDS, GDALRWFlag eRWFlag,
00608     int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00609     void * pBuffer, int nBXSize, int nBYSize, GDALDataType eBDataType,
00610     int nBandCount, int *panBandCount,
00611     GSpacing nPixelSpace, GSpacing nLineSpace, GSpacing nBandSpace,
00612     GDALRasterIOExtraArg* psExtraArg) CPL_WARN_UNUSED_RESULT;
00613 
00614 CPLErr CPL_DLL CPL_STDCALL GDALDatasetAdviseRead( GDALDatasetH hDS,
00615     int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00616     int nBXSize, int nBYSize, GDALDataType eBDataType,
00617     int nBandCount, int *panBandCount, char **papszOptions );
00618 
00619 const char CPL_DLL * CPL_STDCALL GDALGetProjectionRef( GDALDatasetH );
00620 CPLErr CPL_DLL CPL_STDCALL GDALSetProjection( GDALDatasetH, const char * );
00621 CPLErr CPL_DLL CPL_STDCALL GDALGetGeoTransform( GDALDatasetH, double * );
00622 CPLErr CPL_DLL CPL_STDCALL GDALSetGeoTransform( GDALDatasetH, double * );
00623 
00624 int CPL_DLL CPL_STDCALL  GDALGetGCPCount( GDALDatasetH );
00625 const char CPL_DLL * CPL_STDCALL GDALGetGCPProjection( GDALDatasetH );
00626 const GDAL_GCP CPL_DLL * CPL_STDCALL GDALGetGCPs( GDALDatasetH );
00627 CPLErr CPL_DLL CPL_STDCALL GDALSetGCPs( GDALDatasetH, int, const GDAL_GCP *,
00628                                         const char * );
00629 
00630 void CPL_DLL * CPL_STDCALL GDALGetInternalHandle( GDALDatasetH, const char * );
00631 int CPL_DLL CPL_STDCALL GDALReferenceDataset( GDALDatasetH );
00632 int CPL_DLL CPL_STDCALL GDALDereferenceDataset( GDALDatasetH );
00633 int CPL_DLL CPL_STDCALL GDALReleaseDataset( GDALDatasetH );
00634 
00635 CPLErr CPL_DLL CPL_STDCALL
00636 GDALBuildOverviews( GDALDatasetH, const char *, int, int *,
00637                     int, int *, GDALProgressFunc, void * ) CPL_WARN_UNUSED_RESULT;
00638 void CPL_DLL CPL_STDCALL GDALGetOpenDatasets( GDALDatasetH **hDS, int *pnCount );
00639 int CPL_DLL CPL_STDCALL GDALGetAccess( GDALDatasetH hDS );
00640 void CPL_DLL CPL_STDCALL GDALFlushCache( GDALDatasetH hDS );
00641 
00642 CPLErr CPL_DLL CPL_STDCALL
00643               GDALCreateDatasetMaskBand( GDALDatasetH hDS, int nFlags );
00644 
00645 CPLErr CPL_DLL CPL_STDCALL GDALDatasetCopyWholeRaster(
00646     GDALDatasetH hSrcDS, GDALDatasetH hDstDS, char **papszOptions,
00647     GDALProgressFunc pfnProgress, void *pProgressData ) CPL_WARN_UNUSED_RESULT;
00648 
00649 CPLErr CPL_DLL CPL_STDCALL GDALRasterBandCopyWholeRaster(
00650     GDALRasterBandH hSrcBand, GDALRasterBandH hDstBand,
00651     const char * const * constpapszOptions,
00652     GDALProgressFunc pfnProgress, void *pProgressData ) CPL_WARN_UNUSED_RESULT;
00653 
00654 CPLErr CPL_DLL
00655 GDALRegenerateOverviews( GDALRasterBandH hSrcBand,
00656                          int nOverviewCount, GDALRasterBandH *pahOverviewBands,
00657                          const char *pszResampling,
00658                          GDALProgressFunc pfnProgress, void *pProgressData );
00659 
00660 int    CPL_DLL GDALDatasetGetLayerCount( GDALDatasetH );
00661 OGRLayerH CPL_DLL GDALDatasetGetLayer( GDALDatasetH, int );
00662 OGRLayerH CPL_DLL GDALDatasetGetLayerByName( GDALDatasetH, const char * );
00663 OGRErr    CPL_DLL GDALDatasetDeleteLayer( GDALDatasetH, int );
00664 OGRLayerH CPL_DLL GDALDatasetCreateLayer( GDALDatasetH, const char *,
00665                                       OGRSpatialReferenceH, OGRwkbGeometryType,
00666                                       char ** );
00667 OGRLayerH CPL_DLL GDALDatasetCopyLayer( GDALDatasetH, OGRLayerH, const char *,
00668                                         char ** );
00669 void CPL_DLL GDALDatasetResetReading( GDALDatasetH );
00670 OGRFeatureH CPL_DLL GDALDatasetGetNextFeature( GDALDatasetH hDS,
00671                                                OGRLayerH* phBelongingLayer,
00672                                                double* pdfProgressPct,
00673                                                GDALProgressFunc pfnProgress,
00674                                                void* pProgressData );
00675 int    CPL_DLL GDALDatasetTestCapability( GDALDatasetH, const char * );
00676 OGRLayerH CPL_DLL GDALDatasetExecuteSQL( GDALDatasetH, const char *,
00677                                      OGRGeometryH, const char * );
00678 void   CPL_DLL GDALDatasetReleaseResultSet( GDALDatasetH, OGRLayerH );
00679 OGRStyleTableH CPL_DLL GDALDatasetGetStyleTable( GDALDatasetH );
00680 void   CPL_DLL GDALDatasetSetStyleTableDirectly( GDALDatasetH, OGRStyleTableH );
00681 void   CPL_DLL GDALDatasetSetStyleTable( GDALDatasetH, OGRStyleTableH );
00682 OGRErr CPL_DLL GDALDatasetStartTransaction(GDALDatasetH hDS, int bForce);
00683 OGRErr CPL_DLL GDALDatasetCommitTransaction(GDALDatasetH hDS);
00684 OGRErr CPL_DLL GDALDatasetRollbackTransaction(GDALDatasetH hDS);
00685 
00686 /* ==================================================================== */
00687 /*      GDALRasterBand ... one band/channel in a dataset.               */
00688 /* ==================================================================== */
00689 
00694 #define SRCVAL(papoSource, eSrcType, ii) \
00695       (eSrcType == GDT_Byte ? \
00696           ((GByte *)papoSource)[ii] : \
00697       (eSrcType == GDT_Float32 ? \
00698           ((float *)papoSource)[ii] : \
00699       (eSrcType == GDT_Float64 ? \
00700           ((double *)papoSource)[ii] : \
00701       (eSrcType == GDT_Int32 ? \
00702           ((GInt32 *)papoSource)[ii] : \
00703       (eSrcType == GDT_UInt16 ? \
00704           ((GUInt16 *)papoSource)[ii] : \
00705       (eSrcType == GDT_Int16 ? \
00706           ((GInt16 *)papoSource)[ii] : \
00707       (eSrcType == GDT_UInt32 ? \
00708           ((GUInt32 *)papoSource)[ii] : \
00709       (eSrcType == GDT_CInt16 ? \
00710           ((GInt16 *)papoSource)[ii * 2] : \
00711       (eSrcType == GDT_CInt32 ? \
00712           ((GInt32 *)papoSource)[ii * 2] : \
00713       (eSrcType == GDT_CFloat32 ? \
00714           ((float *)papoSource)[ii * 2] : \
00715       (eSrcType == GDT_CFloat64 ? \
00716           ((double *)papoSource)[ii * 2] : 0)))))))))))
00717 
00720 typedef CPLErr
00721 (*GDALDerivedPixelFunc)(void **papoSources, int nSources, void *pData,
00722                         int nBufXSize, int nBufYSize,
00723                         GDALDataType eSrcType, GDALDataType eBufType,
00724                         int nPixelSpace, int nLineSpace);
00725 
00726 GDALDataType CPL_DLL CPL_STDCALL GDALGetRasterDataType( GDALRasterBandH );
00727 void CPL_DLL CPL_STDCALL
00728 GDALGetBlockSize( GDALRasterBandH, int * pnXSize, int * pnYSize );
00729 
00730 CPLErr CPL_DLL CPL_STDCALL
00731 GDALGetActualBlockSize( GDALRasterBandH, int nXBlockOff, int nYBlockOff,
00732                         int *pnXValid, int *pnYValid );
00733 
00734 CPLErr CPL_DLL CPL_STDCALL GDALRasterAdviseRead( GDALRasterBandH hRB,
00735     int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00736     int nBXSize, int nBYSize, GDALDataType eBDataType, char **papszOptions );
00737 
00738 CPLErr CPL_DLL CPL_STDCALL
00739 GDALRasterIO( GDALRasterBandH hRBand, GDALRWFlag eRWFlag,
00740               int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00741               void * pBuffer, int nBXSize, int nBYSize,GDALDataType eBDataType,
00742               int nPixelSpace, int nLineSpace ) CPL_WARN_UNUSED_RESULT;
00743 CPLErr CPL_DLL CPL_STDCALL
00744 GDALRasterIOEx( GDALRasterBandH hRBand, GDALRWFlag eRWFlag,
00745               int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00746               void * pBuffer, int nBXSize, int nBYSize,GDALDataType eBDataType,
00747               GSpacing nPixelSpace, GSpacing nLineSpace,
00748               GDALRasterIOExtraArg* psExtraArg ) CPL_WARN_UNUSED_RESULT;
00749 CPLErr CPL_DLL CPL_STDCALL GDALReadBlock( GDALRasterBandH, int, int, void * ) CPL_WARN_UNUSED_RESULT;
00750 CPLErr CPL_DLL CPL_STDCALL GDALWriteBlock( GDALRasterBandH, int, int, void * ) CPL_WARN_UNUSED_RESULT;
00751 int CPL_DLL CPL_STDCALL GDALGetRasterBandXSize( GDALRasterBandH );
00752 int CPL_DLL CPL_STDCALL GDALGetRasterBandYSize( GDALRasterBandH );
00753 GDALAccess CPL_DLL CPL_STDCALL GDALGetRasterAccess( GDALRasterBandH );
00754 int CPL_DLL CPL_STDCALL GDALGetBandNumber( GDALRasterBandH );
00755 GDALDatasetH CPL_DLL CPL_STDCALL GDALGetBandDataset( GDALRasterBandH );
00756 
00757 GDALColorInterp CPL_DLL CPL_STDCALL
00758 GDALGetRasterColorInterpretation( GDALRasterBandH );
00759 CPLErr CPL_DLL CPL_STDCALL
00760 GDALSetRasterColorInterpretation( GDALRasterBandH, GDALColorInterp );
00761 GDALColorTableH CPL_DLL CPL_STDCALL GDALGetRasterColorTable( GDALRasterBandH );
00762 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterColorTable( GDALRasterBandH, GDALColorTableH );
00763 int CPL_DLL CPL_STDCALL GDALHasArbitraryOverviews( GDALRasterBandH );
00764 int CPL_DLL CPL_STDCALL GDALGetOverviewCount( GDALRasterBandH );
00765 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetOverview( GDALRasterBandH, int );
00766 double CPL_DLL CPL_STDCALL GDALGetRasterNoDataValue( GDALRasterBandH, int * );
00767 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterNoDataValue( GDALRasterBandH, double );
00768 CPLErr CPL_DLL CPL_STDCALL GDALDeleteRasterNoDataValue( GDALRasterBandH );
00769 char CPL_DLL ** CPL_STDCALL GDALGetRasterCategoryNames( GDALRasterBandH );
00770 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterCategoryNames( GDALRasterBandH, char ** );
00771 double CPL_DLL CPL_STDCALL GDALGetRasterMinimum( GDALRasterBandH, int *pbSuccess );
00772 double CPL_DLL CPL_STDCALL GDALGetRasterMaximum( GDALRasterBandH, int *pbSuccess );
00773 CPLErr CPL_DLL CPL_STDCALL GDALGetRasterStatistics(
00774     GDALRasterBandH, int bApproxOK, int bForce,
00775     double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev );
00776 CPLErr CPL_DLL CPL_STDCALL GDALComputeRasterStatistics(
00777     GDALRasterBandH, int bApproxOK,
00778     double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev,
00779     GDALProgressFunc pfnProgress, void *pProgressData );
00780 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterStatistics(
00781     GDALRasterBandH hBand,
00782     double dfMin, double dfMax, double dfMean, double dfStdDev );
00783 
00784 const char CPL_DLL * CPL_STDCALL GDALGetRasterUnitType( GDALRasterBandH );
00785 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterUnitType( GDALRasterBandH hBand, const char *pszNewValue );
00786 double CPL_DLL CPL_STDCALL GDALGetRasterOffset( GDALRasterBandH, int *pbSuccess );
00787 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterOffset( GDALRasterBandH hBand, double dfNewOffset);
00788 double CPL_DLL CPL_STDCALL GDALGetRasterScale( GDALRasterBandH, int *pbSuccess );
00789 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterScale( GDALRasterBandH hBand, double dfNewOffset );
00790 void CPL_DLL CPL_STDCALL
00791 GDALComputeRasterMinMax( GDALRasterBandH hBand, int bApproxOK,
00792                          double adfMinMax[2] );
00793 CPLErr CPL_DLL CPL_STDCALL GDALFlushRasterCache( GDALRasterBandH hBand );
00794 CPLErr CPL_DLL CPL_STDCALL GDALGetRasterHistogram( GDALRasterBandH hBand,
00795                                        double dfMin, double dfMax,
00796                                        int nBuckets, int *panHistogram,
00797                                        int bIncludeOutOfRange, int bApproxOK,
00798                                        GDALProgressFunc pfnProgress,
00799                                        void * pProgressData ) CPL_WARN_DEPRECATED("Use GDALGetRasterHistogramEx() instead");
00800 CPLErr CPL_DLL CPL_STDCALL GDALGetRasterHistogramEx( GDALRasterBandH hBand,
00801                                        double dfMin, double dfMax,
00802                                        int nBuckets, GUIntBig *panHistogram,
00803                                        int bIncludeOutOfRange, int bApproxOK,
00804                                        GDALProgressFunc pfnProgress,
00805                                        void * pProgressData );
00806 CPLErr CPL_DLL CPL_STDCALL GDALGetDefaultHistogram( GDALRasterBandH hBand,
00807                                        double *pdfMin, double *pdfMax,
00808                                        int *pnBuckets, int **ppanHistogram,
00809                                        int bForce,
00810                                        GDALProgressFunc pfnProgress,
00811                                        void * pProgressData ) CPL_WARN_DEPRECATED("Use GDALGetDefaultHistogramEx() instead");
00812 CPLErr CPL_DLL CPL_STDCALL GDALGetDefaultHistogramEx( GDALRasterBandH hBand,
00813                                        double *pdfMin, double *pdfMax,
00814                                        int *pnBuckets, GUIntBig **ppanHistogram,
00815                                        int bForce,
00816                                        GDALProgressFunc pfnProgress,
00817                                        void * pProgressData );
00818 CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultHistogram( GDALRasterBandH hBand,
00819                                        double dfMin, double dfMax,
00820                                        int nBuckets, int *panHistogram ) CPL_WARN_DEPRECATED("Use GDALSetDefaultHistogramEx() instead");
00821 CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultHistogramEx( GDALRasterBandH hBand,
00822                                        double dfMin, double dfMax,
00823                                        int nBuckets, GUIntBig *panHistogram );
00824 int CPL_DLL CPL_STDCALL
00825 GDALGetRandomRasterSample( GDALRasterBandH, int, float * );
00826 GDALRasterBandH CPL_DLL CPL_STDCALL
00827 GDALGetRasterSampleOverview( GDALRasterBandH, int );
00828 GDALRasterBandH CPL_DLL CPL_STDCALL
00829 GDALGetRasterSampleOverviewEx( GDALRasterBandH, GUIntBig );
00830 CPLErr CPL_DLL CPL_STDCALL GDALFillRaster( GDALRasterBandH hBand,
00831                           double dfRealValue, double dfImaginaryValue );
00832 CPLErr CPL_DLL CPL_STDCALL
00833 GDALComputeBandStats( GDALRasterBandH hBand, int nSampleStep,
00834                              double *pdfMean, double *pdfStdDev,
00835                              GDALProgressFunc pfnProgress,
00836                              void *pProgressData );
00837 CPLErr CPL_DLL  GDALOverviewMagnitudeCorrection( GDALRasterBandH hBaseBand,
00838                                         int nOverviewCount,
00839                                         GDALRasterBandH *pahOverviews,
00840                                         GDALProgressFunc pfnProgress,
00841                                         void *pProgressData );
00842 
00843 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL GDALGetDefaultRAT(
00844     GDALRasterBandH hBand );
00845 CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultRAT( GDALRasterBandH,
00846                                               GDALRasterAttributeTableH );
00847 CPLErr CPL_DLL CPL_STDCALL GDALAddDerivedBandPixelFunc( const char *pszName,
00848                                     GDALDerivedPixelFunc pfnPixelFunc );
00849 
00850 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetMaskBand( GDALRasterBandH hBand );
00851 int CPL_DLL CPL_STDCALL GDALGetMaskFlags( GDALRasterBandH hBand );
00852 CPLErr CPL_DLL CPL_STDCALL
00853                        GDALCreateMaskBand( GDALRasterBandH hBand, int nFlags );
00854 
00856 #define GMF_ALL_VALID     0x01
00857 
00859 #define GMF_PER_DATASET   0x02
00860 
00862 #define GMF_ALPHA         0x04
00863 
00865 #define GMF_NODATA        0x08
00866 
00870 #define GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED 0x01
00871 
00876 #define GDAL_DATA_COVERAGE_STATUS_DATA          0x02
00877 
00883 #define GDAL_DATA_COVERAGE_STATUS_EMPTY         0x04
00884 
00885 int CPL_DLL CPL_STDCALL GDALGetDataCoverageStatus( GDALRasterBandH hBand,
00886                                                    int nXOff, int nYOff,
00887                                                    int nXSize, int nYSize,
00888                                                    int nMaskFlagStop,
00889                                                    double* pdfDataPct );
00890 
00891 /* ==================================================================== */
00892 /*     GDALAsyncReader                                                  */
00893 /* ==================================================================== */
00894 
00895 GDALAsyncStatusType CPL_DLL CPL_STDCALL
00896 GDALARGetNextUpdatedRegion(GDALAsyncReaderH hARIO, double dfTimeout,
00897                          int* pnXBufOff, int* pnYBufOff,
00898                          int* pnXBufSize, int* pnYBufSize );
00899 int CPL_DLL CPL_STDCALL GDALARLockBuffer(GDALAsyncReaderH hARIO,
00900                                         double dfTimeout);
00901 void CPL_DLL CPL_STDCALL GDALARUnlockBuffer(GDALAsyncReaderH hARIO);
00902 
00903 /* -------------------------------------------------------------------- */
00904 /*      Helper functions.                                               */
00905 /* -------------------------------------------------------------------- */
00906 int CPL_DLL CPL_STDCALL GDALGeneralCmdLineProcessor( int nArgc, char ***ppapszArgv,
00907                                          int nOptions );
00908 void CPL_DLL CPL_STDCALL GDALSwapWords( void *pData, int nWordSize, int nWordCount,
00909                             int nWordSkip );
00910 void CPL_DLL CPL_STDCALL GDALSwapWordsEx( void *pData, int nWordSize, size_t nWordCount,
00911                                   int nWordSkip );
00912 
00913 void CPL_DLL CPL_STDCALL
00914     GDALCopyWords( const void * CPL_RESTRICT pSrcData,
00915                    GDALDataType eSrcType, int nSrcPixelOffset,
00916                    void * CPL_RESTRICT pDstData,
00917                    GDALDataType eDstType, int nDstPixelOffset,
00918                    int nWordCount );
00919 
00920 void CPL_DLL
00921 GDALCopyBits( const GByte *pabySrcData, int nSrcOffset, int nSrcStep,
00922               GByte *pabyDstData, int nDstOffset, int nDstStep,
00923               int nBitCount, int nStepCount );
00924 
00925 int CPL_DLL CPL_STDCALL GDALLoadWorldFile( const char *, double * );
00926 int CPL_DLL CPL_STDCALL GDALReadWorldFile( const char *, const char *,
00927                                            double * );
00928 int CPL_DLL CPL_STDCALL GDALWriteWorldFile( const char *, const char *,
00929                                             double * );
00930 int CPL_DLL CPL_STDCALL GDALLoadTabFile( const char *, double *, char **,
00931                                          int *, GDAL_GCP ** );
00932 int CPL_DLL CPL_STDCALL GDALReadTabFile( const char *, double *, char **,
00933                                          int *, GDAL_GCP ** );
00934 int CPL_DLL CPL_STDCALL GDALLoadOziMapFile( const char *, double *, char **,
00935                                             int *, GDAL_GCP ** );
00936 int CPL_DLL CPL_STDCALL GDALReadOziMapFile( const char *,  double *,
00937                                             char **, int *, GDAL_GCP ** );
00938 
00939 const char CPL_DLL * CPL_STDCALL GDALDecToDMS( double, const char *, int );
00940 double CPL_DLL CPL_STDCALL GDALPackedDMSToDec( double );
00941 double CPL_DLL CPL_STDCALL GDALDecToPackedDMS( double );
00942 
00943 /* Note to developers : please keep this section in sync with ogr_core.h */
00944 
00945 #ifndef GDAL_VERSION_INFO_DEFINED
00946 #ifndef DOXYGEN_SKIP
00947 #define GDAL_VERSION_INFO_DEFINED
00948 #endif
00949 const char CPL_DLL * CPL_STDCALL GDALVersionInfo( const char * );
00950 #endif
00951 
00952 #ifndef GDAL_CHECK_VERSION
00953 
00954 int CPL_DLL CPL_STDCALL GDALCheckVersion( int nVersionMajor, int nVersionMinor,
00955                                           const char* pszCallingComponentName);
00956 
00960 #define GDAL_CHECK_VERSION(pszCallingComponentName) \
00961  GDALCheckVersion(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, pszCallingComponentName)
00962 
00963 #endif
00964 
00967 typedef struct
00968 {
00969     double dfLINE_OFF;   
00970     double dfSAMP_OFF;   
00971     double dfLAT_OFF;    
00972     double dfLONG_OFF;   
00973     double dfHEIGHT_OFF; 
00975     double dfLINE_SCALE;   
00976     double dfSAMP_SCALE;   
00977     double dfLAT_SCALE;    
00978     double dfLONG_SCALE;   
00979     double dfHEIGHT_SCALE; 
00981     double adfLINE_NUM_COEFF[20]; 
00982     double adfLINE_DEN_COEFF[20]; 
00983     double adfSAMP_NUM_COEFF[20]; 
00984     double adfSAMP_DEN_COEFF[20]; 
00986     double dfMIN_LONG; 
00987     double dfMIN_LAT;  
00988     double dfMAX_LONG; 
00989     double dfMAX_LAT;  
00990 } GDALRPCInfo;
00991 
00992 int CPL_DLL CPL_STDCALL GDALExtractRPCInfo( char **, GDALRPCInfo * );
00993 
00994 /* ==================================================================== */
00995 /*      Color tables.                                                   */
00996 /* ==================================================================== */
00997 
00999 typedef struct
01000 {
01002     short      c1;
01003 
01005     short      c2;
01006 
01008     short      c3;
01009 
01011     short      c4;
01012 } GDALColorEntry;
01013 
01014 GDALColorTableH CPL_DLL CPL_STDCALL GDALCreateColorTable( GDALPaletteInterp ) CPL_WARN_UNUSED_RESULT;
01015 void CPL_DLL CPL_STDCALL GDALDestroyColorTable( GDALColorTableH );
01016 GDALColorTableH CPL_DLL CPL_STDCALL GDALCloneColorTable( GDALColorTableH );
01017 GDALPaletteInterp CPL_DLL CPL_STDCALL GDALGetPaletteInterpretation( GDALColorTableH );
01018 int CPL_DLL CPL_STDCALL GDALGetColorEntryCount( GDALColorTableH );
01019 const GDALColorEntry CPL_DLL * CPL_STDCALL GDALGetColorEntry( GDALColorTableH, int );
01020 int CPL_DLL CPL_STDCALL GDALGetColorEntryAsRGB( GDALColorTableH, int, GDALColorEntry *);
01021 void CPL_DLL CPL_STDCALL GDALSetColorEntry( GDALColorTableH, int, const GDALColorEntry * );
01022 void CPL_DLL CPL_STDCALL GDALCreateColorRamp( GDALColorTableH hTable,
01023             int nStartIndex, const GDALColorEntry *psStartColor,
01024             int nEndIndex, const GDALColorEntry *psEndColor );
01025 
01026 /* ==================================================================== */
01027 /*      Raster Attribute Table                                          */
01028 /* ==================================================================== */
01029 
01031 typedef enum {                   GFT_Integer,   GFT_Real,                    GFT_String
01035 } GDALRATFieldType;
01036 
01038 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
01058 } GDALRATFieldUsage;
01059 
01060 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL
01061                                            GDALCreateRasterAttributeTable(void) CPL_WARN_UNUSED_RESULT;
01062 void CPL_DLL CPL_STDCALL GDALDestroyRasterAttributeTable(
01063     GDALRasterAttributeTableH );
01064 
01065 int CPL_DLL CPL_STDCALL GDALRATGetColumnCount( GDALRasterAttributeTableH );
01066 
01067 const char CPL_DLL * CPL_STDCALL GDALRATGetNameOfCol(
01068     GDALRasterAttributeTableH, int );
01069 GDALRATFieldUsage CPL_DLL CPL_STDCALL GDALRATGetUsageOfCol(
01070     GDALRasterAttributeTableH, int );
01071 GDALRATFieldType CPL_DLL CPL_STDCALL GDALRATGetTypeOfCol(
01072     GDALRasterAttributeTableH, int );
01073 
01074 int CPL_DLL CPL_STDCALL GDALRATGetColOfUsage( GDALRasterAttributeTableH,
01075                                               GDALRATFieldUsage );
01076 int CPL_DLL CPL_STDCALL GDALRATGetRowCount( GDALRasterAttributeTableH );
01077 
01078 const char CPL_DLL * CPL_STDCALL GDALRATGetValueAsString(
01079     GDALRasterAttributeTableH, int, int);
01080 int CPL_DLL CPL_STDCALL GDALRATGetValueAsInt(
01081     GDALRasterAttributeTableH, int, int);
01082 double CPL_DLL CPL_STDCALL GDALRATGetValueAsDouble(
01083     GDALRasterAttributeTableH, int, int);
01084 
01085 void CPL_DLL CPL_STDCALL GDALRATSetValueAsString( GDALRasterAttributeTableH, int, int,
01086                                                   const char * );
01087 void CPL_DLL CPL_STDCALL GDALRATSetValueAsInt( GDALRasterAttributeTableH, int, int,
01088                                                int );
01089 void CPL_DLL CPL_STDCALL GDALRATSetValueAsDouble( GDALRasterAttributeTableH, int, int,
01090                                                   double );
01091 
01092 int CPL_DLL CPL_STDCALL GDALRATChangesAreWrittenToFile( GDALRasterAttributeTableH hRAT );
01093 
01094 CPLErr CPL_DLL CPL_STDCALL GDALRATValuesIOAsDouble( GDALRasterAttributeTableH hRAT, GDALRWFlag eRWFlag,
01095                                         int iField, int iStartRow, int iLength, double *pdfData );
01096 CPLErr CPL_DLL CPL_STDCALL GDALRATValuesIOAsInteger( GDALRasterAttributeTableH hRAT, GDALRWFlag eRWFlag,
01097                                         int iField, int iStartRow, int iLength, int *pnData);
01098 CPLErr CPL_DLL CPL_STDCALL GDALRATValuesIOAsString( GDALRasterAttributeTableH hRAT, GDALRWFlag eRWFlag,
01099                                         int iField, int iStartRow, int iLength, char **papszStrList);
01100 
01101 void CPL_DLL CPL_STDCALL GDALRATSetRowCount( GDALRasterAttributeTableH,
01102                                              int );
01103 CPLErr CPL_DLL CPL_STDCALL GDALRATCreateColumn( GDALRasterAttributeTableH,
01104                                                 const char *,
01105                                                 GDALRATFieldType,
01106                                                 GDALRATFieldUsage );
01107 CPLErr CPL_DLL CPL_STDCALL GDALRATSetLinearBinning( GDALRasterAttributeTableH,
01108                                                     double, double );
01109 int CPL_DLL CPL_STDCALL GDALRATGetLinearBinning( GDALRasterAttributeTableH,
01110                                                  double *, double * );
01111 CPLErr CPL_DLL CPL_STDCALL GDALRATInitializeFromColorTable(
01112     GDALRasterAttributeTableH, GDALColorTableH );
01113 GDALColorTableH CPL_DLL CPL_STDCALL GDALRATTranslateToColorTable(
01114     GDALRasterAttributeTableH, int nEntryCount );
01115 void CPL_DLL CPL_STDCALL GDALRATDumpReadable( GDALRasterAttributeTableH,
01116                                               FILE * );
01117 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL
01118     GDALRATClone( GDALRasterAttributeTableH );
01119 
01120 void CPL_DLL* CPL_STDCALL
01121     GDALRATSerializeJSON( GDALRasterAttributeTableH ) CPL_WARN_UNUSED_RESULT;
01122 
01123 int CPL_DLL CPL_STDCALL GDALRATGetRowOfValue( GDALRasterAttributeTableH, double );
01124 
01125 /* ==================================================================== */
01126 /*      GDAL Cache Management                                           */
01127 /* ==================================================================== */
01128 
01129 void CPL_DLL CPL_STDCALL GDALSetCacheMax( int nBytes );
01130 int CPL_DLL CPL_STDCALL GDALGetCacheMax(void);
01131 int CPL_DLL CPL_STDCALL GDALGetCacheUsed(void);
01132 void CPL_DLL CPL_STDCALL GDALSetCacheMax64( GIntBig nBytes );
01133 GIntBig CPL_DLL CPL_STDCALL GDALGetCacheMax64(void);
01134 GIntBig CPL_DLL CPL_STDCALL GDALGetCacheUsed64(void);
01135 
01136 int CPL_DLL CPL_STDCALL GDALFlushCacheBlock(void);
01137 
01138 /* ==================================================================== */
01139 /*      GDAL virtual memory                                             */
01140 /* ==================================================================== */
01141 
01142 CPLVirtualMem CPL_DLL* GDALDatasetGetVirtualMem( GDALDatasetH hDS,
01143                                                  GDALRWFlag eRWFlag,
01144                                                  int nXOff, int nYOff,
01145                                                  int nXSize, int nYSize,
01146                                                  int nBufXSize, int nBufYSize,
01147                                                  GDALDataType eBufType,
01148                                                  int nBandCount, int* panBandMap,
01149                                                  int nPixelSpace,
01150                                                  GIntBig nLineSpace,
01151                                                  GIntBig nBandSpace,
01152                                                  size_t nCacheSize,
01153                                                  size_t nPageSizeHint,
01154                                                  int bSingleThreadUsage,
01155                                                  char **papszOptions ) CPL_WARN_UNUSED_RESULT;
01156 
01157 CPLVirtualMem CPL_DLL* GDALRasterBandGetVirtualMem( GDALRasterBandH hBand,
01158                                          GDALRWFlag eRWFlag,
01159                                          int nXOff, int nYOff,
01160                                          int nXSize, int nYSize,
01161                                          int nBufXSize, int nBufYSize,
01162                                          GDALDataType eBufType,
01163                                          int nPixelSpace,
01164                                          GIntBig nLineSpace,
01165                                          size_t nCacheSize,
01166                                          size_t nPageSizeHint,
01167                                          int bSingleThreadUsage,
01168                                          char **papszOptions ) CPL_WARN_UNUSED_RESULT;
01169 
01170 CPLVirtualMem CPL_DLL* GDALGetVirtualMemAuto( GDALRasterBandH hBand,
01171                                               GDALRWFlag eRWFlag,
01172                                               int *pnPixelSpace,
01173                                               GIntBig *pnLineSpace,
01174                                               char **papszOptions ) CPL_WARN_UNUSED_RESULT;
01175 
01177 typedef enum
01178 {
01180     GTO_TIP,
01182     GTO_BIT,
01184     GTO_BSQ
01185 } GDALTileOrganization;
01186 
01187 CPLVirtualMem CPL_DLL* GDALDatasetGetTiledVirtualMem( GDALDatasetH hDS,
01188                                                       GDALRWFlag eRWFlag,
01189                                                       int nXOff, int nYOff,
01190                                                       int nXSize, int nYSize,
01191                                                       int nTileXSize, int nTileYSize,
01192                                                       GDALDataType eBufType,
01193                                                       int nBandCount, int* panBandMap,
01194                                                       GDALTileOrganization eTileOrganization,
01195                                                       size_t nCacheSize,
01196                                                       int bSingleThreadUsage,
01197                                                       char **papszOptions ) CPL_WARN_UNUSED_RESULT;
01198 
01199 CPLVirtualMem CPL_DLL* GDALRasterBandGetTiledVirtualMem( GDALRasterBandH hBand,
01200                                                          GDALRWFlag eRWFlag,
01201                                                          int nXOff, int nYOff,
01202                                                          int nXSize, int nYSize,
01203                                                          int nTileXSize, int nTileYSize,
01204                                                          GDALDataType eBufType,
01205                                                          size_t nCacheSize,
01206                                                          int bSingleThreadUsage,
01207                                                          char **papszOptions ) CPL_WARN_UNUSED_RESULT;
01208 
01209 /* ==================================================================== */
01210 /*      VRTPansharpenedDataset class.                                   */
01211 /* ==================================================================== */
01212 
01213 GDALDatasetH CPL_DLL GDALCreatePansharpenedVRT( const char* pszXML,
01214                                             GDALRasterBandH hPanchroBand,
01215                                             int nInputSpectralBands,
01216                                             GDALRasterBandH* pahInputSpectralBands ) CPL_WARN_UNUSED_RESULT;
01217 
01218 /* =================================================================== */
01219 /*      Misc API                                                        */
01220 /* ==================================================================== */
01221 
01222 CPLXMLNode CPL_DLL* GDALGetJPEG2000Structure(const char* pszFilename,
01223                                              char** papszOptions) CPL_WARN_UNUSED_RESULT;
01224 
01225 CPL_C_END
01226 
01227 #endif /* ndef GDAL_H_INCLUDED */

Generated for GDAL by doxygen 1.7.6.1.