gdal.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * $Id: gdal.h,v 1.100 2005/09/28 21:29:30 fwarmerdam Exp $
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  *
00011  * Permission is hereby granted, free of charge, to any person obtaining a
00012  * copy of this software and associated documentation files (the "Software"),
00013  * to deal in the Software without restriction, including without limitation
00014  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00015  * and/or sell copies of the Software, and to permit persons to whom the
00016  * Software is furnished to do so, subject to the following conditions:
00017  *
00018  * The above copyright notice and this permission notice shall be included
00019  * in all copies or substantial portions of the Software.
00020  *
00021  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00022  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00023  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
00024  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00025  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00026  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00027  * DEALINGS IN THE SOFTWARE.
00028  ******************************************************************************
00029  *
00030  * $Log: gdal.h,v $
00031  * Revision 1.100  2005/09/28 21:29:30  fwarmerdam
00032  * added RAT documentation
00033  *
00034  * Revision 1.99  2005/09/24 19:01:52  fwarmerdam
00035  * added RAT related functions
00036  *
00037  * Revision 1.98  2005/09/24 04:18:43  fwarmerdam
00038  * added void declaration for GDALRasterAttributeTableH
00039  *
00040  * Revision 1.97  2005/05/24 18:13:15  dron
00041  * Added GDALGetDriverCreationOptionList() function.
00042  *
00043  * Revision 1.96  2005/05/16 21:34:33  fwarmerdam
00044  * Added SetDefaultHistogram
00045  *
00046  * Revision 1.95  2005/05/11 14:04:08  fwarmerdam
00047  * added getdefaulthistogram
00048  *
00049  * Revision 1.94  2005/04/27 16:28:39  fwarmerdam
00050  * added GDALGetRasterStatistics
00051  *
00052  * Revision 1.93  2005/04/15 18:34:52  fwarmerdam
00053  * Added area or point metadata constants.
00054  *
00055  * Revision 1.92  2005/04/04 15:24:48  fwarmerdam
00056  * Most C entry points now CPL_STDCALL
00057  *
00058  * Revision 1.91  2005/03/16 19:21:35  fwarmerdam
00059  * added methods for setting offset/scale
00060  *
00061  * Revision 1.90  2005/02/23 14:53:43  fwarmerdam
00062  * moved version info into gdal_version.h
00063  *
00064  * Revision 1.89  2005/02/10 04:30:29  fwarmerdam
00065  * added support for YCbCr color space
00066  *
00067  * Revision 1.88  2004/12/02 18:26:07  fwarmerdam
00068  * added CPL_DLL specifier on two functions.
00069  *
00070  * Revision 1.87  2004/11/22 20:06:50  fwarmerdam
00071  * Updated to 1.2.5.
00072  *
00073  * Revision 1.86  2004/11/05 18:00:04  fwarmerdam
00074  * Updated to 1.2.4.0.
00075  *
00076  * Revision 1.85  2004/10/18 17:22:07  fwarmerdam
00077  * added GCI_Max
00078  *
00079  * Revision 1.84  2004/09/25 05:51:03  fwarmerdam
00080  * updated to version 1.2.3
00081  *
00082  * Revision 1.83  2004/09/16 18:30:13  fwarmerdam
00083  * Updated to 1.2.2.
00084  *
00085  * Revision 1.82  2004/06/24 03:10:49  warmerda
00086  * update to GDAL 1.2.1
00087  *
00088  * Revision 1.81  2004/04/29 13:42:58  warmerda
00089  * added C Offset/Scale entry points
00090  *
00091  * Revision 1.80  2004/04/04 20:05:37  warmerda
00092  * mark as 1.2.0.1
00093  *
00094  * Revision 1.79  2004/04/02 17:32:40  warmerda
00095  * added GDALGeneralCmdLineProcessor()
00096  *
00097  * Revision 1.78  2004/03/28 16:01:46  warmerda
00098  * added GDALApplyGeoTransform()
00099  *
00100  * Revision 1.77  2004/03/10 19:18:29  warmerda
00101  * updated date
00102  *
00103  * Revision 1.76  2004/03/01 18:30:44  warmerda
00104  * Updated release date.
00105  *
00106  * Revision 1.75  2004/02/25 09:03:15  dron
00107  * Added GDALPackedDMSToDec() and GDALDecToPackedDMS() functions.
00108  *
00109  * Revision 1.74  2004/02/19 15:55:52  warmerda
00110  * updated to 1.2.0
00111  *
00112  * Revision 1.73  2004/02/04 21:30:12  warmerda
00113  * ensure GDALGetDataTypeByName is exported
00114  *
00115  * Revision 1.72  2004/01/18 16:43:37  dron
00116  * Added GDALGetDataTypeByName() function.
00117  */
00118 
00119 #ifndef GDAL_H_INCLUDED
00120 #define GDAL_H_INCLUDED
00121 
00128 #include "gdal_version.h"
00129 #include "cpl_port.h"
00130 #include "cpl_error.h"
00131 
00132 /* -------------------------------------------------------------------- */
00133 /*      Significant constants.                                          */
00134 /* -------------------------------------------------------------------- */
00135 
00136 CPL_C_START
00137 
00139 typedef enum {
00140     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,
00152     GDT_TypeCount = 12          /* maximum type # + 1 */
00153 } GDALDataType;
00154 
00155 int CPL_DLL CPL_STDCALL GDALGetDataTypeSize( GDALDataType );
00156 int CPL_DLL CPL_STDCALL GDALDataTypeIsComplex( GDALDataType );
00157 const char CPL_DLL * CPL_STDCALL GDALGetDataTypeName( GDALDataType );
00158 GDALDataType CPL_DLL CPL_STDCALL GDALGetDataTypeByName( const char * );
00159 GDALDataType CPL_DLL CPL_STDCALL GDALDataTypeUnion( GDALDataType, GDALDataType );
00160 
00162 typedef enum { GA_ReadOnly = 0,           GA_Update = 1
00165 } GDALAccess;
00166 
00168 typedef enum {   GF_Read = 0,  GF_Write = 1
00171 } GDALRWFlag;
00172 
00174 typedef enum
00175 {
00176     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
00194 } GDALColorInterp;
00195 
00197 const char CPL_DLL *GDALGetColorInterpretationName( GDALColorInterp );
00198 
00200 typedef enum 
00201 {                      GPI_Gray=0,  GPI_RGB=1, GPI_CMYK=2,     GPI_HLS=3
00206 } GDALPaletteInterp;
00207 
00209 const char CPL_DLL *GDALGetPaletteInterpretationName( GDALPaletteInterp );
00210 
00211 /* "well known" metadata items. */
00212 
00213 #define GDALMD_AREA_OR_POINT   "AREA_OR_POINT" 
00214 #  define GDALMD_AOP_AREA      "Area"
00215 #  define GDALMD_AOP_POINT     "Point"
00216 
00217 /* -------------------------------------------------------------------- */
00218 /*      GDAL Specific error codes.                                      */
00219 /*                                                                      */
00220 /*      error codes 100 to 299 reserved for GDAL.                       */
00221 /* -------------------------------------------------------------------- */
00222 #define CPLE_WrongFormat        200
00223 
00224 /* -------------------------------------------------------------------- */
00225 /*      Define handle types related to various internal classes.        */
00226 /* -------------------------------------------------------------------- */
00227 typedef void *GDALMajorObjectH;
00228 typedef void *GDALDatasetH;
00229 typedef void *GDALRasterBandH;
00230 typedef void *GDALDriverH;
00231 typedef void *GDALProjDefH;
00232 typedef void *GDALColorTableH;
00233 typedef void *GDALRasterAttributeTableH;
00234 
00235 /* -------------------------------------------------------------------- */
00236 /*      Callback "progress" function.                                   */
00237 /* -------------------------------------------------------------------- */
00238 
00239 typedef int (CPL_STDCALL *GDALProgressFunc)(double,const char *, void *);
00240 int CPL_DLL CPL_STDCALL GDALDummyProgress( double, const char *, void *);
00241 int CPL_DLL CPL_STDCALL GDALTermProgress( double, const char *, void *);
00242 int CPL_DLL CPL_STDCALL GDALScaledProgress( double, const char *, void *);
00243 void CPL_DLL * CPL_STDCALL GDALCreateScaledProgress( double, double,
00244                                         GDALProgressFunc, void * );
00245 void CPL_DLL CPL_STDCALL GDALDestroyScaledProgress( void * );
00246 
00247 /* ==================================================================== */
00248 /*      Registration/driver related.                                    */
00249 /* ==================================================================== */
00250 
00251 typedef struct {
00252     char      *pszOptionName;
00253     char      *pszValueType;   /* "boolean", "int", "float", "string", 
00254                                   "string-select" */
00255     char      *pszDescription;
00256     char      **papszOptions;
00257 } GDALOptionDefinition;
00258 
00259 #define GDAL_DMD_LONGNAME "DMD_LONGNAME"
00260 #define GDAL_DMD_HELPTOPIC "DMD_HELPTOPIC"
00261 #define GDAL_DMD_MIMETYPE "DMD_MIMETYPE"
00262 #define GDAL_DMD_EXTENSION "DMD_EXTENSION"
00263 #define GDAL_DMD_CREATIONOPTIONLIST "DMD_CREATIONOPTIONLIST" 
00264 #define GDAL_DMD_CREATIONDATATYPES "DMD_CREATIONDATATYPES" 
00265 
00266 #define GDAL_DCAP_CREATE     "DCAP_CREATE"
00267 #define GDAL_DCAP_CREATECOPY "DCAP_CREATECOPY"
00268 
00269 void CPL_DLL CPL_STDCALL GDALAllRegister( void );
00270 
00271 GDALDatasetH CPL_DLL CPL_STDCALL GDALCreate( GDALDriverH hDriver,
00272                                  const char *, int, int, int, GDALDataType,
00273                                  char ** );
00274 GDALDatasetH CPL_DLL CPL_STDCALL
00275 GDALCreateCopy( GDALDriverH, const char *, GDALDatasetH,
00276                 int, char **, GDALProgressFunc, void * );
00277 
00278 GDALDatasetH CPL_DLL CPL_STDCALL
00279 GDALOpen( const char *pszFilename, GDALAccess eAccess );
00280 GDALDatasetH CPL_DLL CPL_STDCALL GDALOpenShared( const char *, GDALAccess );
00281 int          CPL_DLL CPL_STDCALL GDALDumpOpenDatasets( FILE * );
00282 
00283 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriverByName( const char * );
00284 int CPL_DLL         CPL_STDCALL GDALGetDriverCount( void );
00285 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDriver( int );
00286 int         CPL_DLL CPL_STDCALL GDALRegisterDriver( GDALDriverH );
00287 void        CPL_DLL CPL_STDCALL GDALDeregisterDriver( GDALDriverH );
00288 void        CPL_DLL CPL_STDCALL GDALDestroyDriverManager( void );
00289 CPLErr      CPL_DLL CPL_STDCALL GDALDeleteDataset( GDALDriverH, const char * );
00290 
00291 /* The following are deprecated */
00292 const char CPL_DLL * CPL_STDCALL GDALGetDriverShortName( GDALDriverH );
00293 const char CPL_DLL * CPL_STDCALL GDALGetDriverLongName( GDALDriverH );
00294 const char CPL_DLL * CPL_STDCALL GDALGetDriverHelpTopic( GDALDriverH );
00295 const char CPL_DLL * CPL_STDCALL GDALGetDriverCreationOptionList( GDALDriverH );
00296 
00297 /* ==================================================================== */
00298 /*      GDAL_GCP                                                        */
00299 /* ==================================================================== */
00300 
00302 typedef struct
00303 {
00305     char        *pszId; 
00306 
00308     char        *pszInfo;
00309 
00311     double      dfGCPPixel;
00313     double      dfGCPLine;
00314 
00316     double      dfGCPX;
00317 
00319     double      dfGCPY;
00320 
00322     double      dfGCPZ;
00323 } GDAL_GCP;
00324 
00325 void CPL_DLL CPL_STDCALL GDALInitGCPs( int, GDAL_GCP * );
00326 void CPL_DLL CPL_STDCALL GDALDeinitGCPs( int, GDAL_GCP * );
00327 GDAL_GCP CPL_DLL * CPL_STDCALL GDALDuplicateGCPs( int, const GDAL_GCP * );
00328 
00329 int CPL_DLL CPL_STDCALL
00330 GDALGCPsToGeoTransform( int nGCPCount, const GDAL_GCP *pasGCPs, 
00331                         double *padfGeoTransform, int bApproxOK ); 
00332 int CPL_DLL CPL_STDCALL
00333 GDALInvGeoTransform( double *padfGeoTransformIn, 
00334                      double *padfInvGeoTransformOut );
00335 void CPL_DLL CPL_STDCALL GDALApplyGeoTransform( double *, double, double, 
00336                                                 double *, double * );
00337 
00338 /* ==================================================================== */
00339 /*      major objects (dataset, and, driver, drivermanager).            */
00340 /* ==================================================================== */
00341 
00342 char CPL_DLL  ** CPL_STDCALL GDALGetMetadata( GDALMajorObjectH, const char * );
00343 CPLErr CPL_DLL CPL_STDCALL GDALSetMetadata( GDALMajorObjectH, char **,
00344                                             const char * );
00345 const char CPL_DLL * CPL_STDCALL 
00346 GDALGetMetadataItem( GDALMajorObjectH, const char *, const char * );
00347 CPLErr CPL_DLL CPL_STDCALL
00348 GDALSetMetadataItem( GDALMajorObjectH, const char *, const char *,
00349                      const char * );
00350 const char CPL_DLL * CPL_STDCALL GDALGetDescription( GDALMajorObjectH );
00351 void CPL_DLL CPL_STDCALL GDALSetDescription( GDALMajorObjectH, const char * );
00352 
00353 /* ==================================================================== */
00354 /*      GDALDataset class ... normally this represents one file.        */
00355 /* ==================================================================== */
00356 
00357 GDALDriverH CPL_DLL CPL_STDCALL GDALGetDatasetDriver( GDALDatasetH );
00358 void CPL_DLL CPL_STDCALL   GDALClose( GDALDatasetH );
00359 int CPL_DLL CPL_STDCALL     GDALGetRasterXSize( GDALDatasetH );
00360 int CPL_DLL CPL_STDCALL     GDALGetRasterYSize( GDALDatasetH );
00361 int CPL_DLL CPL_STDCALL     GDALGetRasterCount( GDALDatasetH );
00362 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetRasterBand( GDALDatasetH, int );
00363 
00364 CPLErr CPL_DLL  CPL_STDCALL GDALAddBand( GDALDatasetH hDS, GDALDataType eType, 
00365                              char **papszOptions );
00366 
00367 CPLErr CPL_DLL CPL_STDCALL GDALDatasetRasterIO( 
00368     GDALDatasetH hDS, GDALRWFlag eRWFlag,
00369     int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00370     void * pBuffer, int nBXSize, int nBYSize, GDALDataType eBDataType,
00371     int nBandCount, int *panBandCount, 
00372     int nPixelSpace, int nLineSpace, int nBandSpace);
00373 
00374 CPLErr CPL_DLL CPL_STDCALL GDALDatasetAdviseRead( GDALDatasetH hDS, 
00375     int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00376     int nBXSize, int nBYSize, GDALDataType eBDataType,
00377     int nBandCount, int *panBandCount, char **papszOptions );
00378 
00379 const char CPL_DLL * CPL_STDCALL GDALGetProjectionRef( GDALDatasetH );
00380 CPLErr CPL_DLL CPL_STDCALL GDALSetProjection( GDALDatasetH, const char * );
00381 CPLErr CPL_DLL CPL_STDCALL GDALGetGeoTransform( GDALDatasetH, double * );
00382 CPLErr CPL_DLL CPL_STDCALL GDALSetGeoTransform( GDALDatasetH, double * );
00383 
00384 int CPL_DLL CPL_STDCALL  GDALGetGCPCount( GDALDatasetH );
00385 const char CPL_DLL * CPL_STDCALL GDALGetGCPProjection( GDALDatasetH );
00386 const GDAL_GCP CPL_DLL * CPL_STDCALL GDALGetGCPs( GDALDatasetH );
00387 CPLErr CPL_DLL CPL_STDCALL GDALSetGCPs( GDALDatasetH, int, const GDAL_GCP *,
00388                                         const char * );
00389 
00390 void CPL_DLL * CPL_STDCALL GDALGetInternalHandle( GDALDatasetH, const char * );
00391 int CPL_DLL CPL_STDCALL GDALReferenceDataset( GDALDatasetH );
00392 int CPL_DLL CPL_STDCALL GDALDereferenceDataset( GDALDatasetH );
00393 
00394 CPLErr CPL_DLL CPL_STDCALL
00395 GDALBuildOverviews( GDALDatasetH, const char *, int, int *,
00396                     int, int *, GDALProgressFunc, void * );
00397 void CPL_DLL CPL_STDCALL GDALGetOpenDatasets( GDALDatasetH ***hDS, int *pnCount );
00398 int CPL_DLL CPL_STDCALL GDALGetAccess( GDALDatasetH hDS );
00399 void CPL_DLL CPL_STDCALL GDALFlushCache( GDALDatasetH hDS );
00400 
00401 /* ==================================================================== */
00402 /*      GDALRasterBand ... one band/channel in a dataset.               */
00403 /* ==================================================================== */
00404 
00405 GDALDataType CPL_DLL CPL_STDCALL GDALGetRasterDataType( GDALRasterBandH );
00406 void CPL_DLL CPL_STDCALL 
00407 GDALGetBlockSize( GDALRasterBandH, int * pnXSize, int * pnYSize );
00408 
00409 CPLErr CPL_DLL CPL_STDCALL GDALRasterAdviseRead( GDALRasterBandH hRB, 
00410     int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00411     int nBXSize, int nBYSize, GDALDataType eBDataType, char **papszOptions );
00412 
00413 CPLErr CPL_DLL CPL_STDCALL 
00414 GDALRasterIO( GDALRasterBandH hRBand, GDALRWFlag eRWFlag,
00415               int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
00416               void * pBuffer, int nBXSize, int nBYSize,GDALDataType eBDataType,
00417               int nPixelSpace, int nLineSpace );
00418 CPLErr CPL_DLL CPL_STDCALL GDALReadBlock( GDALRasterBandH, int, int, void * );
00419 CPLErr CPL_DLL CPL_STDCALL GDALWriteBlock( GDALRasterBandH, int, int, void * );
00420 int CPL_DLL CPL_STDCALL GDALGetRasterBandXSize( GDALRasterBandH );
00421 int CPL_DLL CPL_STDCALL GDALGetRasterBandYSize( GDALRasterBandH );
00422 char CPL_DLL ** CPL_STDCALL GDALGetRasterMetadata( GDALRasterBandH );
00423 GDALAccess CPL_DLL CPL_STDCALL GDALGetRasterAccess( GDALRasterBandH );
00424 int CPL_DLL CPL_STDCALL GDALGetBandNumber( GDALRasterBandH );
00425 GDALDatasetH CPL_DLL CPL_STDCALL GDALGetBandDataset( GDALRasterBandH );
00426 
00427 GDALColorInterp CPL_DLL CPL_STDCALL
00428 GDALGetRasterColorInterpretation( GDALRasterBandH );
00429 CPLErr CPL_DLL CPL_STDCALL 
00430 GDALSetRasterColorInterpretation( GDALRasterBandH, GDALColorInterp );
00431 GDALColorTableH CPL_DLL CPL_STDCALL GDALGetRasterColorTable( GDALRasterBandH );
00432 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterColorTable( GDALRasterBandH, GDALColorTableH );
00433 int CPL_DLL CPL_STDCALL GDALHasArbitraryOverviews( GDALRasterBandH );
00434 int CPL_DLL CPL_STDCALL GDALGetOverviewCount( GDALRasterBandH );
00435 GDALRasterBandH CPL_DLL CPL_STDCALL GDALGetOverview( GDALRasterBandH, int );
00436 double CPL_DLL CPL_STDCALL GDALGetRasterNoDataValue( GDALRasterBandH, int * );
00437 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterNoDataValue( GDALRasterBandH, double );
00438 char CPL_DLL ** CPL_STDCALL GDALGetRasterCategoryNames( GDALRasterBandH );
00439 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterCategoryNames( GDALRasterBandH, char ** );
00440 double CPL_DLL CPL_STDCALL GDALGetRasterMinimum( GDALRasterBandH, int *pbSuccess );
00441 double CPL_DLL CPL_STDCALL GDALGetRasterMaximum( GDALRasterBandH, int *pbSuccess );
00442 CPLErr CPL_DLL CPL_STDCALL GDALGetRasterStatistics( 
00443     GDALRasterBandH, int bApproxOK, int bForce, 
00444     double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev );
00445 const char CPL_DLL * CPL_STDCALL GDALGetRasterUnitType( GDALRasterBandH );
00446 double CPL_DLL CPL_STDCALL GDALGetRasterOffset( GDALRasterBandH, int *pbSuccess );
00447 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterOffset( GDALRasterBandH hBand, double dfNewOffset);
00448 double CPL_DLL CPL_STDCALL GDALGetRasterScale( GDALRasterBandH, int *pbSuccess );
00449 CPLErr CPL_DLL CPL_STDCALL GDALSetRasterScale( GDALRasterBandH hBand, double dfNewOffset );
00450 void CPL_DLL CPL_STDCALL 
00451 GDALComputeRasterMinMax( GDALRasterBandH hBand, int bApproxOK,
00452                          double adfMinMax[2] );
00453 CPLErr CPL_DLL CPL_STDCALL GDALFlushRasterCache( GDALRasterBandH hBand );
00454 CPLErr CPL_DLL CPL_STDCALL GDALGetRasterHistogram( GDALRasterBandH hBand,
00455                                        double dfMin, double dfMax,
00456                                        int nBuckets, int *panHistogram,
00457                                        int bIncludeOutOfRange, int bApproxOK,
00458                                        GDALProgressFunc pfnProgress,
00459                                        void * pProgressData );
00460 CPLErr CPL_DLL CPL_STDCALL GDALGetDefaultHistogram( GDALRasterBandH hBand,
00461                                        double *pdfMin, double *pdfMax,
00462                                        int *pnBuckets, int **ppanHistogram,
00463                                        int bForce,
00464                                        GDALProgressFunc pfnProgress,
00465                                        void * pProgressData );
00466 CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultHistogram( GDALRasterBandH hBand,
00467                                        double dfMin, double dfMax,
00468                                        int nBuckets, int *panHistogram );
00469 int CPL_DLL CPL_STDCALL
00470 GDALGetRandomRasterSample( GDALRasterBandH, int, float * );
00471 GDALRasterBandH CPL_DLL CPL_STDCALL
00472 GDALGetRasterSampleOverview( GDALRasterBandH, int );
00473 CPLErr CPL_DLL CPL_STDCALL GDALFillRaster( GDALRasterBandH hBand,
00474                           double dfRealValue, double dfImaginaryValue );
00475 CPLErr CPL_DLL CPL_STDCALL
00476 GDALComputeBandStats( GDALRasterBandH hBand, int nSampleStep, 
00477                              double *pdfMean, double *pdfStdDev, 
00478                              GDALProgressFunc pfnProgress,
00479                              void *pProgressData );
00480 CPLErr CPL_DLL  GDALOverviewMagnitudeCorrection( GDALRasterBandH hBaseBand, 
00481                                         int nOverviewCount, 
00482                                         GDALRasterBandH *pahOverviews, 
00483                                         GDALProgressFunc pfnProgress, 
00484                                         void *pProgressData );
00485 
00486 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL GDALGetDefaultRAT( 
00487     GDALRasterBandH hBand );
00488 CPLErr CPL_DLL CPL_STDCALL GDALSetDefaultRAT( GDALRasterBandH, 
00489                                               GDALRasterAttributeTableH );
00490 
00491 /* -------------------------------------------------------------------- */
00492 /*      Helper functions.                                               */
00493 /* -------------------------------------------------------------------- */
00494 int CPL_DLL CPL_STDCALL GDALGeneralCmdLineProcessor( int nArgc, char ***ppapszArgv, 
00495                                          int nOptions );
00496 void CPL_DLL CPL_STDCALL GDALSwapWords( void *pData, int nWordSize, int nWordCount,
00497                             int nWordSkip );
00498 void CPL_DLL CPL_STDCALL 
00499     GDALCopyWords( void * pSrcData, GDALDataType eSrcType, int nSrcPixelOffset,
00500                    void * pDstData, GDALDataType eDstType, int nDstPixelOffset,
00501                    int nWordCount );
00502 
00503 int CPL_DLL CPL_STDCALL GDALReadWorldFile( const char *pszBaseFilename, 
00504                        const char *pszExtension, 
00505                        double * padfGeoTransform );
00506 int CPL_DLL CPL_STDCALL GDALWriteWorldFile( const char *pszBaseFilename, 
00507                        const char *pszExtension, 
00508                        double * padfGeoTransform );
00509 int CPL_DLL CPL_STDCALL GDALReadTabFile( const char *pszBaseFilename, 
00510                              double *padfGeoTransform, char **ppszWKT,
00511                              int *pnGCPCount, GDAL_GCP **ppasGCPs );
00512 
00513 const char CPL_DLL * CPL_STDCALL GDALDecToDMS( double, const char *, int );
00514 double CPL_DLL CPL_STDCALL GDALPackedDMSToDec( double );
00515 double CPL_DLL CPL_STDCALL GDALDecToPackedDMS( double );
00516 
00517 const char CPL_DLL * CPL_STDCALL GDALVersionInfo( const char * );
00518 
00519 typedef struct { 
00520     double      dfLINE_OFF;
00521     double      dfSAMP_OFF;
00522     double      dfLAT_OFF;
00523     double      dfLONG_OFF;
00524     double      dfHEIGHT_OFF;
00525 
00526     double      dfLINE_SCALE;
00527     double      dfSAMP_SCALE;
00528     double      dfLAT_SCALE;
00529     double      dfLONG_SCALE;
00530     double      dfHEIGHT_SCALE;
00531 
00532     double      adfLINE_NUM_COEFF[20];
00533     double      adfLINE_DEN_COEFF[20];
00534     double      adfSAMP_NUM_COEFF[20];
00535     double      adfSAMP_DEN_COEFF[20];
00536     
00537     double      dfMIN_LONG;
00538     double      dfMIN_LAT;
00539     double      dfMAX_LONG;
00540     double      dfMAX_LAT;
00541 
00542 } GDALRPCInfo;
00543 
00544 int CPL_DLL CPL_STDCALL GDALExtractRPCInfo( char **, GDALRPCInfo * );
00545 
00546 /* ==================================================================== */
00547 /*      Color tables.                                                   */
00548 /* ==================================================================== */
00550 typedef struct
00551 {
00553     short      c1;      
00554 
00556     short      c2;      
00557 
00559     short      c3;      
00560 
00562     short      c4;      
00563 } GDALColorEntry;
00564 
00565 GDALColorTableH CPL_DLL CPL_STDCALL GDALCreateColorTable( GDALPaletteInterp );
00566 void CPL_DLL CPL_STDCALL GDALDestroyColorTable( GDALColorTableH );
00567 GDALColorTableH CPL_DLL CPL_STDCALL GDALCloneColorTable( GDALColorTableH );
00568 GDALPaletteInterp CPL_DLL CPL_STDCALL GDALGetPaletteInterpretation( GDALColorTableH );
00569 int CPL_DLL CPL_STDCALL GDALGetColorEntryCount( GDALColorTableH );
00570 const GDALColorEntry CPL_DLL * CPL_STDCALL GDALGetColorEntry( GDALColorTableH, int );
00571 int CPL_DLL CPL_STDCALL GDALGetColorEntryAsRGB( GDALColorTableH, int, GDALColorEntry *);
00572 void CPL_DLL CPL_STDCALL GDALSetColorEntry( GDALColorTableH, int, const GDALColorEntry * );
00573 
00574 /* ==================================================================== */
00575 /*      Raster Attribute Table                                          */
00576 /* ==================================================================== */
00577 
00578 typedef enum {             GFT_Integer ,    GFT_Real,                    GFT_String
00582 } GDALRATFieldType;
00583 
00584 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
00604 } GDALRATFieldUsage;
00605 
00606 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL 
00607                                            GDALCreateRasterAttributeTable(void);
00608 void CPL_DLL CPL_STDCALL GDALDestroyRasterAttributeTable(
00609     GDALRasterAttributeTableH );
00610 
00611 int CPL_DLL CPL_STDCALL GDALRATGetColumnCount( GDALRasterAttributeTableH );
00612 
00613 const char CPL_DLL * CPL_STDCALL GDALRATGetNameOfCol( 
00614     GDALRasterAttributeTableH, int );
00615 GDALRATFieldUsage CPL_DLL CPL_STDCALL GDALRATGetUsageOfCol( 
00616     GDALRasterAttributeTableH, int );
00617 GDALRATFieldType CPL_DLL CPL_STDCALL GDALRATGetTypeOfCol( 
00618     GDALRasterAttributeTableH, int );
00619 
00620 int CPL_DLL CPL_STDCALL GDALRATGetColOfUsage( GDALRasterAttributeTableH, 
00621                                               GDALRATFieldType );
00622 int CPL_DLL CPL_STDCALL GDALRATGetRowCount( GDALRasterAttributeTableH );
00623 
00624 const char CPL_DLL * CPL_STDCALL GDALRATGetValueAsString( 
00625     GDALRasterAttributeTableH, int );
00626 int CPL_DLL CPL_STDCALL GDALRATGetValueAsInt( 
00627     GDALRasterAttributeTableH, int );
00628 double CPL_DLL CPL_STDCALL GDALRATGetValueAsDouble( 
00629     GDALRasterAttributeTableH, int );
00630 
00631 void CPL_DLL CPL_STDCALL GDALRATSetValueAsString( GDALRasterAttributeTableH, 
00632                                                   const char * );
00633 void CPL_DLL CPL_STDCALL GDALRATSetValueAsInt( GDALRasterAttributeTableH, 
00634                                                int );
00635 void CPL_DLL CPL_STDCALL GDALRATSetValueAsDouble( GDALRasterAttributeTableH, 
00636                                                   double );
00637 void CPL_DLL CPL_STDCALL GDALRATSetRowCount( GDALRasterAttributeTableH, 
00638                                              int );
00639 CPLErr CPL_DLL CPL_STDCALL GDALRATCreateColumn( GDALRasterAttributeTableH, 
00640                                                 const char *, 
00641                                                 GDALRATFieldType, 
00642                                                 GDALRATFieldUsage );
00643 CPLErr CPL_DLL CPL_STDCALL GDALRATSetLinearBinning( GDALRasterAttributeTableH, 
00644                                                     double, double );
00645 int CPL_DLL CPL_STDCALL GDALRATGetLinearBinning( GDALRasterAttributeTableH, 
00646                                                  double *, double * );
00647 void CPL_DLL CPL_STDCALL GDALRATIntitializeFromColorTable(
00648     GDALRasterAttributeTableH, GDALColorTableH );
00649 void CPL_DLL CPL_STDCALL GDALRATDumpReadable( GDALRasterAttributeTableH, 
00650                                               FILE * );
00651 GDALRasterAttributeTableH CPL_DLL CPL_STDCALL 
00652     GDALRATClone( GDALRasterAttributeTableH );
00653 
00654 /* ==================================================================== */
00655 /*      GDAL Cache Management                                           */
00656 /* ==================================================================== */
00657 
00658 void CPL_DLL CPL_STDCALL GDALSetCacheMax( int nBytes );
00659 int CPL_DLL CPL_STDCALL GDALGetCacheMax(void);
00660 int CPL_DLL CPL_STDCALL GDALGetCacheUsed(void);
00661 int CPL_DLL CPL_STDCALL GDALFlushCacheBlock(void);
00662 
00663 CPL_C_END
00664 
00665 #endif /* ndef GDAL_H_INCLUDED */

Generated on Sun Jul 2 22:18:26 2006 for GDAL by  doxygen 1.4.6