1 /* Converted to D from C:/devLibs/gdal21/include/gdal.h by htod */
2 module gdal.gdal;
3 /******************************************************************************
4  * $Id: gdal.h 33852 2016-04-01 23:27:53Z goatbar $
5  *
6  * Project:  GDAL Core
7  * Purpose:  GDAL Core C/Public declarations.
8  * Author:   Frank Warmerdam, warmerdam@pobox.com
9  *
10  ******************************************************************************
11  * Copyright (c) 1998, 2002 Frank Warmerdam
12  * Copyright (c) 2007-2014, Even Rouault <even dot rouault at mines-paris dot org>
13  *
14  * Permission is hereby granted, free of charge, to any person obtaining a
15  * copy of this software and associated documentation files (the "Software"),
16  * to deal in the Software without restriction, including without limitation
17  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
18  * and/or sell copies of the Software, and to permit persons to whom the
19  * Software is furnished to do so, subject to the following conditions:
20  *
21  * The above copyright notice and this permission notice shall be included
22  * in all copies or substantial portions of the Software.
23  *
24  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30  * DEALINGS IN THE SOFTWARE.
31  ****************************************************************************/
32 
33 /**
34  * \file gdal.h
35  *
36  * Public (C callable) GDAL entry points.
37  */
38 import gdal.gdalversion;
39 import gdal.cpl.port;
40 import gdal.cpl.error;
41 import gdal.cpl.progress;
42 // not needed import gdal.cplvirtualmem;
43 import gdal.cpl.minixml;
44 import gdal.ogr.api;
45 import gdal.ogr.core;
46 
47 import core.stdc.stdio : FILE;
48 
49 /* -------------------------------------------------------------------- */
50 /*      Significant constants.                                          */
51 /* -------------------------------------------------------------------- */
52 /*! Pixel data types */
53 enum
54 {
55     GDT_Unknown,   /*! Unknown or unspecified type     */
56     GDT_Byte,      /*! Eight bit unsigned integer      */
57     GDT_UInt16,    /*! Sixteen bit unsigned integer    */
58     GDT_Int16,     /*! Sixteen bit signed integer      */
59     GDT_UInt32,    /*! Thirty two bit unsigned integer */
60     GDT_Int32,     /*! Thirty two bit signed integer   */
61     GDT_Float32,   /*! Thirty two bit floating point   */
62     GDT_Float64,   /*! Sixty four bit floating point   */
63     GDT_CInt16,    /*! Complex Int16                   */
64     GDT_CInt32,    /*! Complex Int32                   */
65     GDT_CFloat32,  /*! Complex Float32                 */
66     GDT_CFloat64,  /*! Complex Float64                 */
67     GDT_TypeCount, /*  maximum type # + 1              */
68 }
69 extern (C):
70 alias int GDALDataType;
71 
72 extern (System):
73 
74 //C     int CPL_DLL CPL_STDCALL GDALGetDataTypeSize( GDALDataType );  // Deprecated.
75 deprecated ("Use GDALGetDataTypeSizeBits instead.") 
76 int  GDALGetDataTypeSize(GDALDataType ) pure nothrow @nogc; 
77 
78 int  GDALGetDataTypeSizeBits(GDALDataType eDataType) pure nothrow @nogc;
79 int  GDALGetDataTypeSizeBytes(GDALDataType ) pure nothrow @nogc;
80 int  GDALDataTypeIsComplex(GDALDataType ) pure nothrow @nogc;
81 const(char) * GDALGetDataTypeName(GDALDataType ) nothrow @nogc;
82 GDALDataType  GDALGetDataTypeByName(const char *) pure nothrow @nogc;
83 GDALDataType  GDALDataTypeUnion(GDALDataType , GDALDataType ) pure nothrow @nogc;
84 
85 extern (C):
86 double  GDALAdjustValueToDataType(GDALDataType eDT, double dfValue, int *pbClamped, int *pbRounded) nothrow @nogc;
87 
88 /**
89 * status of the asynchronous stream
90 */
91 enum
92 {
93     GARIO_PENDING,
94     GARIO_UPDATE,
95     GARIO_ERROR,
96     GARIO_COMPLETE,
97     GARIO_TypeCount,
98 }
99 alias int GDALAsyncStatusType;
100 
101 extern (System):
102 const(char) * GDALGetAsyncStatusTypeName(GDALAsyncStatusType ) nothrow @nogc;
103 GDALAsyncStatusType  GDALGetAsyncStatusTypeByName(const char *) nothrow @nogc;
104 
105 /*! Flag indicating read/write, or read-only access to data. */
106 enum
107 {
108     GA_ReadOnly, /*! Read only (no update) access */
109     GA_Update,   /*! Read/write access.           */
110 }
111 extern (C):
112 alias int GDALAccess;
113 
114 /*! Read/Write flag for RasterIO() method */
115 enum
116 {
117     GF_Read,    /*! Read data  */
118     GF_Write,   /*! Write data */
119 }
120 alias int GDALRWFlag;
121 
122 /* NOTE: values are selected to be consistent with GDALResampleAlg of alg/gdalwarper.h */
123 /** RasterIO() resampling method.
124   * @since GDAL 2.0
125   */
126 enum
127 {
128     GRIORA_NearestNeighbour = 0, /*! Nearest neighbour                                                           */
129     GRIORA_Bilinear         = 1, /*! Bilinear (2x2 kernel)                                                       */
130     GRIORA_Cubic            = 2, /*! Cubic Convolution Approximation (4x4 kernel)                                */
131     GRIORA_CubicSpline      = 3, /*! Cubic B-Spline Approximation (4x4 kernel)                                   */
132     GRIORA_Lanczos          = 4, /*! Lanczos windowed sinc interpolation (6x6 kernel)                            */
133     GRIORA_Average          = 5, /*! Average                                                                     */
134     GRIORA_Mode             = 6, /*! Mode (selects the value which appears most often of all the sampled points) */
135     GRIORA_Gauss            = 7, /*! Gauss blurring                                                              */
136     /* NOTE: values 8 to 12 are reserved for max,min,med,Q1,Q3 */
137 }
138 alias int GDALRIOResampleAlg;
139 
140 /* NOTE to developers: only add members, and if so edit INIT_RASTERIO_EXTRA_ARG */
141 /* and INIT_RASTERIO_EXTRA_ARG                                                  */
142 /** Structure to pass extra arguments to RasterIO() method
143   * @since GDAL 2.0
144   */
145 struct _N25
146 {
147     int nVersion;                    /*! Version of structure (to allow future extensions of the structure)                          */
148     GDALRIOResampleAlg eResampleAlg; /*! Resampling algorithm                                                                        */
149     GDALProgressFunc pfnProgress;    /*! Progress callback                                                                           */
150     void *pProgressData;             /*! Progress callback user data                                                                 */
151     /*! Indicate if dfXOff, dfYOff, dfXSize and dfYSize are set. Mostly reserved from the VRT driver to communicate a more precise
152         source window. Must be such that dfXOff - nXOff < 1.0 and dfYOff - nYOff < 1.0 and nXSize - dfXSize < 1.0 and 
153         nYSize - dfYSize < 1.0                                                                                                       */
154     int bFloatingPointWindowValidity;
155     double dfXOff;                   /*! Pixel offset to the top left corner. Only valid if bFloatingPointWindowValidity = TRUE      */
156     double dfYOff;                   /*! Line offset to the top left corner. Only valid if bFloatingPointWindowValidity = TRUE       */
157     double dfXSize;                  /*! Width in pixels of the area of interest. Only valid if bFloatingPointWindowValidity = TRUE  */
158     double dfYSize;                  /*! Height in pixels of the area of interest. Only valid if bFloatingPointWindowValidity = TRUE */
159 }
160 alias _N25 GDALRasterIOExtraArg;
161 
162 //C     #define RASTERIO_EXTRA_ARG_CURRENT_VERSION  1
163 enum RASTERIO_EXTRA_ARG_CURRENT_VERSION = 1;
164 /** Macro to initialize an instance of GDALRasterIOExtraArg structure.
165   * @since GDAL 2.0
166   */
167 //C     #define INIT_RASTERIO_EXTRA_ARG(s)....... 
168 void INIT_RASTERIO_EXTRA_ARG(ref GDALRasterIOExtraArg s) nothrow @nogc
169 { 
170     s.nVersion = RASTERIO_EXTRA_ARG_CURRENT_VERSION;          
171     s.eResampleAlg = GRIORA_NearestNeighbour;
172     s.pfnProgress = null;
173     s.pProgressData = null;
174     s.bFloatingPointWindowValidity = FALSE;
175 }
176 
177 /*! Types of color interpretation for raster bands. */
178 enum
179 {
180     GCI_Undefined      =  0,
181     GCI_GrayIndex      =  1, /*! Greyscale                             */
182     GCI_PaletteIndex   =  2, /*! Paletted (see associated color table) */
183     GCI_RedBand        =  3, /*! Red band of RGBA image                */
184     GCI_GreenBand      =  4, /*! Blue band of RGBA image               */
185     GCI_BlueBand       =  5, /*! Alpha (0=transparent, 255=opaque)     */
186     GCI_AlphaBand      =  6, /*! Alpha (0=transparent, 255=opaque)     */
187     GCI_HueBand        =  7, /*! Hue band of HLS image                 */
188     GCI_SaturationBand =  8, /*! Saturation band of HLS image          */
189     GCI_LightnessBand  =  9, /*! Lightness band of HLS image           */
190     GCI_CyanBand       = 10, /*! Cyan band of CMYK image               */
191     GCI_MagentaBand    = 11, /*! Magenta band of CMYK image            */
192     GCI_YellowBand     = 12, /*! Yellow band of CMYK image             */
193     GCI_BlackBand      = 13, /*! Black band of CMLY image              */
194     GCI_YCbCr_YBand    = 14, /*! Y Luminance                           */
195     GCI_YCbCr_CbBand   = 15, /*! Cb Chroma                             */
196     GCI_YCbCr_CrBand   = 16, /*! Cr Chroma                             */
197     GCI_Max            = 16, /*! Max current value                     */
198 }
199 alias int GDALColorInterp;
200 
201 const(char) * GDALGetColorInterpretationName(GDALColorInterp ) nothrow @nogc;
202 GDALColorInterp  GDALGetColorInterpretationByName(const char *pszName) nothrow @nogc;
203 
204 /*! Types of color interpretations for a GDALColorTable. */
205 enum
206 {
207     GPI_Gray = 0, /*! Grayscale (in GDALColorEntry.c1)                       */
208     GPI_RGB  = 1, /*! Red, Green, Blue and Alpha in (in c1, c2, c3 and c4)   */
209     GPI_CMYK = 2, /*! Cyan, Magenta, Yellow and Black (in c1, c2, c3 and c4) */
210     GPI_HLS  = 3, /*! Hue, Lightness and Saturation (in c1, c2, and c3)      */
211 }
212 alias int GDALPaletteInterp;
213 
214 const(char) * GDALGetPaletteInterpretationName(GDALPaletteInterp ) nothrow @nogc;
215 
216 /* "well known" metadata items. */
217 enum GDALMD_AREA_OR_POINT = "AREA_OR_POINT";
218 enum GDALMD_AOP_AREA      = "Area";
219 enum GDALMD_AOP_POINT     = "Point";
220 
221 /* -------------------------------------------------------------------- */
222 /*      GDAL Specific error codes.                                      */
223 /*                                                                      */
224 /*      error codes 100 to 299 reserved for GDAL.                       */
225 /* -------------------------------------------------------------------- */
226 enum CPLErrorNum CPLE_WrongFormat = cast(CPLErrorNum)200;
227 
228 /* -------------------------------------------------------------------- */
229 /*      Define handle types related to various internal classes.        */
230 /* -------------------------------------------------------------------- */
231 
232 /** Opaque type used for the C bindings of the C++ GDALMajorObject class */
233 alias void *GDALMajorObjectH;
234 
235 /** Opaque type used for the C bindings of the C++ GDALDataset class */
236 alias void *GDALDatasetH;
237 
238 /** Opaque type used for the C bindings of the C++ GDALRasterBand class */
239 alias void *GDALRasterBandH;
240 
241 /** Opaque type used for the C bindings of the C++ GDALDriver class */
242 alias void *GDALDriverH;
243 
244 /** Opaque type used for the C bindings of the C++ GDALColorTable class */
245 alias void *GDALColorTableH;
246 
247 /** Opaque type used for the C bindings of the C++ GDALRasterAttributeTable class */
248 alias void *GDALRasterAttributeTableH;
249 
250 /** Opaque type used for the C bindings of the C++ GDALAsyncReader class */
251 alias void *GDALAsyncReaderH;
252 
253 /** Type to express pixel, line or band spacing. Signed 64 bit integer. */
254 alias GIntBig GSpacing;
255 
256 /* ==================================================================== */
257 /*      Registration/driver related.                                    */
258 /* ==================================================================== */
259 
260 /** Long name of the driver */
261 enum GDAL_DMD_LONGNAME = "DMD_LONGNAME";
262 
263 /** URL (relative to http://gdal.org/) to the help page of the driver */
264 enum GDAL_DMD_HELPTOPIC = "DMD_HELPTOPIC";
265 
266 /** MIME type handled by the driver. */
267 enum GDAL_DMD_MIMETYPE = "DMD_MIMETYPE";
268 
269 /** Extension handled by the driver. */
270 enum GDAL_DMD_EXTENSION = "DMD_EXTENSION";
271 
272 /** Connection prefix to provide as the file name of the open function.
273  * Typically set for non-file based drivers. Generally used with open options.
274  * @since GDAL 2.0
275  */
276 enum GDAL_DMD_CONNECTION_PREFIX = "DMD_CONNECTION_PREFIX";
277 
278 /** List of (space separated) extensions handled by the driver.
279  * @since GDAL 2.0
280  */
281 enum GDAL_DMD_EXTENSIONS = "DMD_EXTENSIONS";
282 
283 /** XML snippet with creation options. */
284 enum GDAL_DMD_CREATIONOPTIONLIST = "DMD_CREATIONOPTIONLIST";
285 
286 /** XML snippet with open options.
287  * @since GDAL 2.0
288  */
289 enum GDAL_DMD_OPENOPTIONLIST = "DMD_OPENOPTIONLIST";
290 
291 /** List of (space separated) raster data types support by the Create()/CreateCopy() API. */
292 enum GDAL_DMD_CREATIONDATATYPES = "DMD_CREATIONDATATYPES";
293 
294 /** List of (space separated) vector field types support by the CreateField() API.
295  * @since GDAL 2.0
296  * */
297 enum GDAL_DMD_CREATIONFIELDDATATYPES = "DMD_CREATIONFIELDDATATYPES";
298 
299 /** Capability set by a driver that exposes Subdatasets. */
300 enum GDAL_DMD_SUBDATASETS = "DMD_SUBDATASETS";
301 
302 /** Capability set by a driver that implements the Open() API. */
303 enum GDAL_DCAP_OPEN = "DCAP_OPEN";
304 
305 /** Capability set by a driver that implements the Create() API. */
306 enum GDAL_DCAP_CREATE = "DCAP_CREATE";
307 
308 /** Capability set by a driver that implements the CreateCopy() API. */
309 enum GDAL_DCAP_CREATECOPY = "DCAP_CREATECOPY";
310 
311 /** Capability set by a driver that can read/create datasets through the VSI*L API. */
312 enum GDAL_DCAP_VIRTUALIO  = "DCAP_VIRTUALIO";
313 
314 /** Capability set by a driver having raster capability.
315  * @since GDAL 2.0
316  */
317 enum GDAL_DCAP_RASTER = "DCAP_RASTER";
318 
319 /** Capability set by a driver having vector capability.
320  * @since GDAL 2.0
321  */
322 enum GDAL_DCAP_VECTOR = "DCAP_VECTOR";
323 
324 /** Capability set by a driver having vector capability.
325  * @since GDAL 2.1
326  */
327 enum GDAL_DCAP_GNM = "DCAP_GNM";
328 
329 /** Capability set by a driver that can create fields with NOT NULL constraint.
330  * @since GDAL 2.0
331  */
332 enum GDAL_DCAP_NOTNULL_FIELDS = "DCAP_NOTNULL_FIELDS";
333 
334 /** Capability set by a driver that can create fields with DEFAULT values.
335  * @since GDAL 2.0
336  */
337 enum GDAL_DCAP_DEFAULT_FIELDS = "DCAP_DEFAULT_FIELDS";
338 
339 /** Capability set by a driver that can create geometry fields with NOT NULL constraint.
340  * @since GDAL 2.0
341  */
342 enum GDAL_DCAP_NOTNULL_GEOMFIELDS = "DCAP_NOTNULL_GEOMFIELDS";
343 
344 extern (System):
345 void  GDALAllRegister() nothrow @nogc;
346 GDALDatasetH  GDALCreate(GDALDriverH hDriver, const char *, int , int , int , GDALDataType , char **) nothrow @nogc;
347 GDALDatasetH  GDALCreateCopy(GDALDriverH , const char *, GDALDatasetH , int , char **, GDALProgressFunc , void *) nothrow @nogc;
348 GDALDriverH  GDALIdentifyDriver(const char *pszFilename, char **papszFileList) nothrow @nogc;
349 GDALDatasetH  GDALOpen(const(char) *pszFilename, GDALAccess eAccess) nothrow @nogc;
350 GDALDatasetH  GDALOpenShared(const char *, GDALAccess ) nothrow @nogc;
351 
352 /* Note: we define GDAL_OF_READONLY and GDAL_OF_UPDATE to be on purpose */
353 /* equals to GA_ReadOnly and GA_Update */
354 
355 /** Open in read-only mode.
356  * Used by GDALOpenEx().
357  * @since GDAL 2.0
358  */
359 enum GDAL_OF_READONLY = 0x00;
360 
361 /** Open in update mode.
362  * Used by GDALOpenEx().
363  * @since GDAL 2.0
364  */
365 enum GDAL_OF_UPDATE = 0x01;
366 
367 /** Allow raster and vector drivers to be used.
368  * Used by GDALOpenEx().
369  * @since GDAL 2.0
370  */
371 enum GDAL_OF_ALL = 0x00;
372 
373 /** Allow raster drivers to be used.
374  * Used by GDALOpenEx().
375  * @since GDAL 2.0
376  */
377 enum GDAL_OF_RASTER = 0x02;
378 
379 /** Allow vector drivers to be used.
380  * Used by GDALOpenEx().
381  * @since GDAL 2.0
382  */
383 enum GDAL_OF_VECTOR = 0x04;
384 
385 /** Allow gnm drivers to be used.
386  * Used by GDALOpenEx().
387  * @since GDAL 2.1
388  */
389 enum GDAL_OF_GNM = 0x08;
390 
391 /* Some space for GDAL 3.0 new types ;-) */
392 /*#define     GDAL_OF_OTHER_KIND1   0x08 */
393 /*#define     GDAL_OF_OTHER_KIND2   0x10 */
394 enum GDAL_OF_KIND_MASK = 0x1E;
395 
396 /** Open in shared mode.
397  * Used by GDALOpenEx().
398  * @since GDAL 2.0
399  */
400 enum GDAL_OF_SHARED = 0x20;
401 
402 /** Emit error message in case of failed open.
403  * Used by GDALOpenEx().
404  * @since GDAL 2.0
405  */
406 enum GDAL_OF_VERBOSE_ERROR = 0x40;
407 /** Open as internal dataset. Such dataset isn't registered in the global list
408  * of opened dataset. Cannot be used with GDAL_OF_SHARED.
409  *
410  * Used by GDALOpenEx().
411  * @since GDAL 2.0
412  */
413 enum GDAL_OF_INTERNAL = 0x80;
414 
415 /** Let GDAL decide if a array-based or hashset-based storage strategy for
416  * cached blocks must be used.
417  *
418  * GDAL_OF_DEFAULT_BLOCK_ACCESS, GDAL_OF_ARRAY_BLOCK_ACCESS and
419  * GDAL_OF_HASHSET_BLOCK_ACCESS are mutually exclusive.
420  *
421  * Used by GDALOpenEx().
422  * @since GDAL 2.1
423  */
424 enum GDAL_OF_DEFAULT_BLOCK_ACCESS = 0;
425 
426 /** Use a array-based storage strategy for cached blocks.
427  *
428  * GDAL_OF_DEFAULT_BLOCK_ACCESS, GDAL_OF_ARRAY_BLOCK_ACCESS and
429  * GDAL_OF_HASHSET_BLOCK_ACCESS are mutually exclusive.
430  *
431  * Used by GDALOpenEx().
432  * @since GDAL 2.1
433  */
434 enum GDAL_OF_ARRAY_BLOCK_ACCESS = 0x100;
435 
436 /** Use a hashset-based storage strategy for cached blocks.
437  *
438  * GDAL_OF_DEFAULT_BLOCK_ACCESS, GDAL_OF_ARRAY_BLOCK_ACCESS and
439  * GDAL_OF_HASHSET_BLOCK_ACCESS are mutually exclusive.
440  *
441  * Used by GDALOpenEx().
442  * @since GDAL 2.1
443  */
444 enum GDAL_OF_HASHSET_BLOCK_ACCESS = 0x200;
445 
446 enum GDAL_OF_RESERVED_1 = 0x300;
447 enum GDAL_OF_BLOCK_ACCESS_MASK = 0x300;
448 
449 GDALDatasetH  GDALOpenEx(const char *pszFilename, uint nOpenFlags, const char **papszAllowedDrivers, const char **papszOpenOptions, const char **papszSiblingFiles) nothrow @nogc;
450 int  GDALDumpOpenDatasets(FILE *) nothrow @nogc; // This is the FILE in stdio.h
451 GDALDriverH  GDALGetDriverByName(const char *) nothrow @nogc;
452 int  GDALGetDriverCount() nothrow @nogc;
453 GDALDriverH  GDALGetDriver(int ) nothrow @nogc;
454 void  GDALDestroyDriver(GDALDriverH ) nothrow @nogc;
455 int  GDALRegisterDriver(GDALDriverH ) nothrow @nogc;
456 void  GDALDeregisterDriver(GDALDriverH ) nothrow @nogc;
457 void  GDALDestroyDriverManager() nothrow @nogc;
458 
459 extern (C):
460 void  GDALDestroy() nothrow @nogc;
461 
462 extern (System):
463 CPLErr  GDALDeleteDataset(GDALDriverH , const char *) nothrow @nogc;
464 CPLErr  GDALRenameDataset(GDALDriverH , const char *pszNewName, const char *pszOldName) nothrow @nogc;
465 CPLErr  GDALCopyDatasetFiles(GDALDriverH , const char *pszNewName, const char *pszOldName) nothrow @nogc;
466 int  GDALValidateCreationOptions(GDALDriverH , char **papszCreationOptions) nothrow @nogc;
467 
468 /* The following are deprecated */
469 deprecated const(char) * GDALGetDriverShortName(GDALDriverH ) nothrow @nogc;
470 deprecated const(char) * GDALGetDriverLongName(GDALDriverH ) nothrow @nogc;
471 deprecated const(char) * GDALGetDriverHelpTopic(GDALDriverH ) nothrow @nogc;
472 deprecated const(char) * GDALGetDriverCreationOptionList(GDALDriverH ) nothrow @nogc;
473 
474 /* ==================================================================== */
475 /*      GDAL_GCP                                                        */
476 /* ==================================================================== */
477 
478 /** Ground Control Point */
479 struct _N28
480 {
481     char *pszId;       /** Unique identifier, often numeric         */
482     char *pszInfo;     /** Informational message or ""              */
483     double dfGCPPixel; /** Pixel (x) location of GCP on raster      */
484     double dfGCPLine;  /** Line (y) location of GCP on raster       */
485     double dfGCPX;     /** X position of GCP in georeferenced space */
486     double dfGCPY;     /** Y position of GCP in georeferenced space */
487     double dfGCPZ;     /** Elevation of GCP, or zero if not known   */
488 }
489 extern (C):
490 alias _N28 GDAL_GCP;
491 
492 extern (System):
493 void  GDALInitGCPs(int , GDAL_GCP *) nothrow @nogc;
494 void  GDALDeinitGCPs(int , GDAL_GCP *) nothrow @nogc;
495 GDAL_GCP * GDALDuplicateGCPs(int , GDAL_GCP *) nothrow @nogc;
496 
497 int  GDALGCPsToGeoTransform(int nGCPCount, GDAL_GCP *pasGCPs, double *padfGeoTransform, int bApproxOK) nothrow @nogc;
498 int  GDALInvGeoTransform(double *padfGeoTransformIn, double *padfInvGeoTransformOut) nothrow @nogc;
499 void  GDALApplyGeoTransform(double *, double , double , double *, double *) nothrow @nogc;
500 
501 extern (C):
502 void  GDALComposeGeoTransforms(double *padfGeoTransform1, double *padfGeoTransform2, double *padfGeoTransformOut) nothrow @nogc;
503 
504 /* ==================================================================== */
505 /*      major objects (dataset, and, driver, drivermanager).            */
506 /* ==================================================================== */
507 extern (System):
508 char ** GDALGetMetadataDomainList(GDALMajorObjectH hObject) nothrow @nogc;
509 char ** GDALGetMetadata(GDALMajorObjectH , const char *) nothrow @nogc;
510 CPLErr  GDALSetMetadata(GDALMajorObjectH , const char **, const char *) nothrow @nogc;
511 const(char) * GDALGetMetadataItem(GDALMajorObjectH , const char *, const char *) nothrow @nogc;
512 CPLErr  GDALSetMetadataItem(GDALMajorObjectH , const char *, const char *, const char *) nothrow @nogc;
513 const(char) * GDALGetDescription(GDALMajorObjectH ) nothrow @nogc;
514 void  GDALSetDescription(GDALMajorObjectH , const char *) nothrow @nogc;
515 
516 /* ==================================================================== */
517 /*      GDALDataset class ... normally this represents one file.        */
518 /* ==================================================================== */
519 enum GDAL_DS_LAYER_CREATIONOPTIONLIST = "DS_LAYER_CREATIONOPTIONLIST";
520 
521 GDALDriverH  GDALGetDatasetDriver(GDALDatasetH ) nothrow @nogc; 
522 char ** GDALGetFileList(GDALDatasetH ) nothrow @nogc;
523 void  GDALClose(GDALDatasetH ) nothrow @nogc;
524 int  GDALGetRasterXSize(GDALDatasetH ) nothrow @nogc;
525 int  GDALGetRasterYSize(GDALDatasetH ) nothrow @nogc;
526 int  GDALGetRasterCount(GDALDatasetH ) nothrow @nogc;
527 GDALRasterBandH  GDALGetRasterBand(GDALDatasetH , int ) nothrow @nogc;
528 
529 CPLErr  GDALAddBand(GDALDatasetH hDS, GDALDataType eType, char **papszOptions) nothrow @nogc;
530 GDALAsyncReaderH  GDALBeginAsyncReader(GDALDatasetH hDS, int nXOff, int nYOff, int nXSize, int nYSize, void *pBuf, int nBufXSize, int nBufYSize, GDALDataType eBufType, int nBandCount, int *panBandMap, int nPixelSpace, int nLineSpace, int nBandSpace, char **papszOptions) nothrow @nogc;
531 void  GDALEndAsyncReader(GDALDatasetH hDS, GDALAsyncReaderH hAsynchReaderH) nothrow @nogc;
532 CPLErr  GDALDatasetRasterIO(GDALDatasetH hDS, GDALRWFlag eRWFlag, int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize, void *pBuffer, int nBXSize, int nBYSize, GDALDataType eBDataType, int nBandCount, int *panBandCount, int nPixelSpace, int nLineSpace, int nBandSpace) nothrow @nogc;
533 CPLErr  GDALDatasetRasterIOEx(GDALDatasetH hDS, GDALRWFlag eRWFlag, int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize, void *pBuffer, int nBXSize, int nBYSize, GDALDataType eBDataType, int nBandCount, int *panBandCount, GSpacing nPixelSpace, GSpacing nLineSpace, GSpacing nBandSpace, GDALRasterIOExtraArg *psExtraArg) nothrow @nogc;
534 CPLErr  GDALDatasetAdviseRead(GDALDatasetH hDS, int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize, int nBXSize, int nBYSize, GDALDataType eBDataType, int nBandCount, int *panBandCount, char **papszOptions) nothrow @nogc;
535 const(char) * GDALGetProjectionRef(GDALDatasetH ) nothrow @nogc;
536 CPLErr  GDALSetProjection(GDALDatasetH , const char *) nothrow @nogc;
537 CPLErr  GDALGetGeoTransform(GDALDatasetH , double *) nothrow @nogc;
538 CPLErr  GDALSetGeoTransform(GDALDatasetH , double *) nothrow @nogc;
539 
540 int  GDALGetGCPCount(GDALDatasetH ) nothrow @nogc;
541 const(char) * GDALGetGCPProjection(GDALDatasetH ) nothrow @nogc;
542 GDAL_GCP * GDALGetGCPs(GDALDatasetH ) nothrow @nogc;
543 CPLErr  GDALSetGCPs(GDALDatasetH , int , GDAL_GCP *, const char *) nothrow @nogc;
544 
545 void * GDALGetInternalHandle(GDALDatasetH , const char *) nothrow @nogc;
546 int  GDALReferenceDataset(GDALDatasetH ) nothrow @nogc;
547 int  GDALDereferenceDataset(GDALDatasetH ) nothrow @nogc;
548 
549 CPLErr  GDALBuildOverviews(GDALDatasetH , const char *, int , int *, int , int *, GDALProgressFunc , void *) nothrow @nogc;
550 void  GDALGetOpenDatasets(GDALDatasetH **hDS, int *pnCount) nothrow @nogc;
551 int  GDALGetAccess(GDALDatasetH hDS) nothrow @nogc;
552 void  GDALFlushCache(GDALDatasetH hDS) nothrow @nogc;
553 
554 CPLErr  GDALCreateDatasetMaskBand(GDALDatasetH hDS, int nFlags) nothrow @nogc;
555 
556 CPLErr  GDALDatasetCopyWholeRaster(GDALDatasetH hSrcDS, GDALDatasetH hDstDS, char **papszOptions, GDALProgressFunc pfnProgress, void *pProgressData) nothrow @nogc;
557 
558 CPLErr  GDALRasterBandCopyWholeRaster(GDALRasterBandH hSrcBand, GDALRasterBandH hDstBand, char **papszOptions, GDALProgressFunc pfnProgress, void *pProgressData) nothrow @nogc;
559 
560 extern (C):
561 CPLErr  GDALRegenerateOverviews(GDALRasterBandH hSrcBand, int nOverviewCount, GDALRasterBandH *pahOverviewBands, const char *pszResampling, GDALProgressFunc pfnProgress, void *pProgressData) nothrow @nogc;
562 
563 int  GDALDatasetGetLayerCount(GDALDatasetH ) nothrow @nogc;
564 OGRLayerH  GDALDatasetGetLayer(GDALDatasetH , int ) nothrow @nogc;
565 OGRLayerH  GDALDatasetGetLayerByName(GDALDatasetH , const char *) nothrow @nogc;
566 OGRErr  GDALDatasetDeleteLayer(GDALDatasetH , int ) nothrow @nogc;
567 OGRLayerH  GDALDatasetCreateLayer(GDALDatasetH , const char *, OGRSpatialReferenceH , OGRwkbGeometryType , char **) nothrow @nogc;
568 OGRLayerH  GDALDatasetCopyLayer(GDALDatasetH , OGRLayerH , const char *, char **) nothrow @nogc;
569 int  GDALDatasetTestCapability(GDALDatasetH , const char *) nothrow @nogc;
570 OGRLayerH  GDALDatasetExecuteSQL(GDALDatasetH , const char *, OGRGeometryH , const char *) nothrow @nogc;
571 void  GDALDatasetReleaseResultSet(GDALDatasetH , OGRLayerH ) nothrow @nogc;
572 OGRStyleTableH  GDALDatasetGetStyleTable(GDALDatasetH ) nothrow @nogc;
573 void  GDALDatasetSetStyleTableDirectly(GDALDatasetH , OGRStyleTableH ) nothrow @nogc;
574 void  GDALDatasetSetStyleTable(GDALDatasetH , OGRStyleTableH ) nothrow @nogc;
575 OGRErr  GDALDatasetStartTransaction(GDALDatasetH hDS, int bForce) nothrow @nogc;
576 OGRErr  GDALDatasetCommitTransaction(GDALDatasetH hDS) nothrow @nogc;
577 OGRErr  GDALDatasetRollbackTransaction(GDALDatasetH hDS) nothrow @nogc;
578 
579 /* ==================================================================== */
580 /*      GDALRasterBand ... one band/channel in a dataset.               */
581 /* ==================================================================== */
582 
583 /**
584  * SRCVAL - Macro which may be used by pixel functions to obtain
585  *          a pixel from a source buffer.
586  */
587 //C     #define SRCVAL(papoSource, eSrcType, ii)
588 template SRCVAL(void* papoSource, GDALDataType eSrcType, size_t ii)
589 {
590     static if( eSrcType == GDT_Byte) 
591         enum GByte SRCVAL = (cast(GByte*)papoSource)[ii];
592     else static if ( eSrcType == GDT_Float32)
593         enum float SRCVAL = (cast(float*)papoSource)[ii];
594     else static if ( eSrcType == GDT_Float64)
595         enum double SRCVAL = (cast(double*)papoSource)[ii];
596     else static if ( eSrcType == GDT_Int32)
597         enum GInt32 SRCVAL = (cast(GInt32*)papoSource)[ii];
598     else static if ( eSrcType == GDT_UInt16)
599         enum GUInt16 SRCVAL = (cast(GUInt16*)papoSource)[ii];
600     else static if ( eSrcType == GDT_Int16)
601         enum GInt16 SRCVAL = (cast(GInt16*)papoSource)[ii];
602     else static if ( eSrcType == GDT_UInt32)
603         enum GUInt32 SRCVAL = (cast(GUInt32*)papoSource)[ii];
604     else static if ( eSrcType == GDT_CInt16)
605         enum GInt16 SRCVAL = (cast(GInt16*)papoSource)[ii * 2];
606     else static if ( eSrcType == GDT_CInt32)
607         enum GInt32 SRCVAL = (cast(GInt32*)papoSource)[ii * 2];
608     else static if ( eSrcType == GDT_CFloat32)
609         enum float SRCVAL = (cast(float*)papoSource)[ii * 2];
610     else static if ( eSrcType == GDT_CFloat64)
611         enum double SRCVAL = (cast(double*)papoSource)[ii * 2];
612     else
613         enum int SRCVAL = 0;
614 }
615 
616 alias GDALDerivedPixelFunc = CPLErr function(void **papoSources, int nSources, 
617     void *pData, int nBufXSize, int nBufYSize, GDALDataType eSrcType, 
618     GDALDataType eBufType, int nPixelSpace, int nLineSpace);
619 
620 extern (System):
621 GDALDataType  GDALGetRasterDataType(GDALRasterBandH ) nothrow @nogc;
622 void  GDALGetBlockSize(GDALRasterBandH , int *pnXSize, int *pnYSize) nothrow @nogc;
623 
624 CPLErr  GDALRasterAdviseRead(GDALRasterBandH hRB, int nDSXOff, int nDSYOff, 
625     int nDSXSize, int nDSYSize, int nBXSize, int nBYSize, 
626     GDALDataType eBDataType, char **papszOptions) nothrow @nogc;
627 
628 CPLErr  GDALRasterIO(GDALRasterBandH hRBand, GDALRWFlag eRWFlag, int nDSXOff, 
629     int nDSYOff, int nDSXSize, int nDSYSize, void *pBuffer, int nBXSize, 
630     int nBYSize, GDALDataType eBDataType, int nPixelSpace, int nLineSpace) nothrow @nogc;
631 CPLErr  GDALRasterIOEx(GDALRasterBandH hRBand, GDALRWFlag eRWFlag, int nDSXOff,
632     int nDSYOff, int nDSXSize, int nDSYSize, void *pBuffer, int nBXSize, 
633     int nBYSize, GDALDataType eBDataType, GSpacing nPixelSpace, 
634     GSpacing nLineSpace, GDALRasterIOExtraArg *psExtraArg) nothrow @nogc;
635 CPLErr  GDALReadBlock(GDALRasterBandH , int , int , void *) nothrow @nogc;
636 CPLErr  GDALWriteBlock(GDALRasterBandH , int , int , void *) nothrow @nogc;
637 int  GDALGetRasterBandXSize(GDALRasterBandH ) nothrow @nogc;
638 int  GDALGetRasterBandYSize(GDALRasterBandH ) nothrow @nogc;
639 GDALAccess  GDALGetRasterAccess(GDALRasterBandH ) nothrow @nogc;
640 int  GDALGetBandNumber(GDALRasterBandH ) nothrow @nogc;
641 GDALDatasetH  GDALGetBandDataset(GDALRasterBandH ) nothrow @nogc;
642 
643 GDALColorInterp  GDALGetRasterColorInterpretation(GDALRasterBandH ) nothrow @nogc;
644 CPLErr  GDALSetRasterColorInterpretation(GDALRasterBandH , GDALColorInterp ) nothrow @nogc;
645 GDALColorTableH  GDALGetRasterColorTable(GDALRasterBandH ) nothrow @nogc;
646 CPLErr  GDALSetRasterColorTable(GDALRasterBandH , GDALColorTableH ) nothrow @nogc;
647 int  GDALHasArbitraryOverviews(GDALRasterBandH ) nothrow @nogc;
648 int  GDALGetOverviewCount(GDALRasterBandH ) nothrow @nogc;
649 GDALRasterBandH  GDALGetOverview(GDALRasterBandH , int ) nothrow @nogc;
650 double  GDALGetRasterNoDataValue(GDALRasterBandH , int *) nothrow @nogc;
651 CPLErr  GDALSetRasterNoDataValue(GDALRasterBandH , double ) nothrow @nogc;
652 CPLErr  GDALDeleteRasterNoDataValue(GDALRasterBandH ) nothrow @nogc;
653 char ** GDALGetRasterCategoryNames(GDALRasterBandH ) nothrow @nogc;
654 CPLErr  GDALSetRasterCategoryNames(GDALRasterBandH , char **) nothrow @nogc;
655 double  GDALGetRasterMinimum(GDALRasterBandH , int *pbSuccess) nothrow @nogc;
656 double  GDALGetRasterMaximum(GDALRasterBandH , int *pbSuccess) nothrow @nogc;
657 CPLErr  GDALGetRasterStatistics(GDALRasterBandH , int bApproxOK, int bForce, 
658     double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev) nothrow @nogc;
659 CPLErr  GDALComputeRasterStatistics(GDALRasterBandH , int bApproxOK, double 
660     *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev, 
661     GDALProgressFunc pfnProgress, void *pProgressData) nothrow @nogc;
662 CPLErr  GDALSetRasterStatistics(GDALRasterBandH hBand, double dfMin, 
663     double dfMax, double dfMean, double dfStdDev) nothrow @nogc;
664 
665 const(char) * GDALGetRasterUnitType(GDALRasterBandH ) nothrow @nogc;
666 CPLErr  GDALSetRasterUnitType(GDALRasterBandH hBand, const char *pszNewValue) nothrow @nogc;
667 double  GDALGetRasterOffset(GDALRasterBandH , int *pbSuccess) nothrow @nogc;
668 CPLErr  GDALSetRasterOffset(GDALRasterBandH hBand, double dfNewOffset) nothrow @nogc;
669 double  GDALGetRasterScale(GDALRasterBandH , int *pbSuccess) nothrow @nogc;
670 CPLErr  GDALSetRasterScale(GDALRasterBandH hBand, double dfNewOffset) nothrow @nogc;
671 void  GDALComputeRasterMinMax(GDALRasterBandH hBand, int bApproxOK, 
672     double *adfMinMax) nothrow @nogc;
673 CPLErr  GDALFlushRasterCache(GDALRasterBandH hBand) nothrow @nogc;
674 CPLErr  GDALGetRasterHistogram(GDALRasterBandH hBand, double dfMin, 
675     double dfMax, int nBuckets, int *panHistogram, int bIncludeOutOfRange, 
676     int bApproxOK, GDALProgressFunc pfnProgress, void *pProgressData) nothrow @nogc;
677 CPLErr  GDALGetRasterHistogramEx(GDALRasterBandH hBand, double dfMin, 
678     double dfMax, int nBuckets, GUIntBig *panHistogram, int bIncludeOutOfRange, 
679     int bApproxOK, GDALProgressFunc pfnProgress, void *pProgressData) nothrow @nogc;
680 CPLErr  GDALGetDefaultHistogram(GDALRasterBandH hBand, double *pdfMin, 
681     double *pdfMax, int *pnBuckets, int **ppanHistogram, int bForce, 
682     GDALProgressFunc pfnProgress, void *pProgressData) nothrow @nogc;
683 CPLErr  GDALGetDefaultHistogramEx(GDALRasterBandH hBand, double *pdfMin, 
684     double *pdfMax, int *pnBuckets, GUIntBig **ppanHistogram, int bForce, 
685     GDALProgressFunc pfnProgress, void *pProgressData) nothrow @nogc;
686 CPLErr  GDALSetDefaultHistogram(GDALRasterBandH hBand, double dfMin, 
687     double dfMax, int nBuckets, int *panHistogram) nothrow @nogc;
688 CPLErr  GDALSetDefaultHistogramEx(GDALRasterBandH hBand, double dfMin, 
689     double dfMax, int nBuckets, GUIntBig *panHistogram) nothrow @nogc;
690 int  GDALGetRandomRasterSample(GDALRasterBandH , int , float *) nothrow @nogc;
691 GDALRasterBandH  GDALGetRasterSampleOverview(GDALRasterBandH , int ) nothrow @nogc;
692 GDALRasterBandH  GDALGetRasterSampleOverviewEx(GDALRasterBandH , GUIntBig ) nothrow @nogc;
693 CPLErr  GDALFillRaster(GDALRasterBandH hBand, double dfRealValue, 
694     double dfImaginaryValue) nothrow @nogc;
695 CPLErr  GDALComputeBandStats(GDALRasterBandH hBand, int nSampleStep, 
696     double *pdfMean, double *pdfStdDev, GDALProgressFunc pfnProgress, 
697     void *pProgressData) nothrow @nogc;
698 
699 extern (C):
700 CPLErr  GDALOverviewMagnitudeCorrection(GDALRasterBandH hBaseBand, 
701     int nOverviewCount, GDALRasterBandH *pahOverviews, 
702     GDALProgressFunc pfnProgress, void *pProgressData) nothrow @nogc;
703 
704 extern (System):
705 GDALRasterAttributeTableH  GDALGetDefaultRAT(GDALRasterBandH hBand) nothrow @nogc;
706 CPLErr  GDALSetDefaultRAT(GDALRasterBandH , GDALRasterAttributeTableH ) nothrow @nogc;
707 CPLErr  GDALAddDerivedBandPixelFunc(const char *pszName, 
708     GDALDerivedPixelFunc pfnPixelFunc) nothrow @nogc;
709 
710 GDALRasterBandH  GDALGetMaskBand(GDALRasterBandH hBand) nothrow @nogc;
711 int  GDALGetMaskFlags(GDALRasterBandH hBand) nothrow @nogc;
712 CPLErr  GDALCreateMaskBand(GDALRasterBandH hBand, int nFlags) nothrow @nogc;
713 
714 enum GMF_ALL_VALID   = 0x01;
715 enum GMF_PER_DATASET = 0x02;
716 enum GMF_ALPHA       = 0x04;
717 enum GMF_NODATA      = 0x08;
718 /* ==================================================================== */
719 /*     GDALAsyncReader                                                  */
720 /* ==================================================================== */
721 
722 GDALAsyncStatusType  GDALARGetNextUpdatedRegion(GDALAsyncReaderH hARIO, 
723     double dfTimeout, int *pnXBufOff, int *pnYBufOff, int *pnXBufSize, 
724     int *pnYBufSize) nothrow @nogc;
725 int  GDALARLockBuffer(GDALAsyncReaderH hARIO, double dfTimeout) nothrow @nogc;
726 void  GDALARUnlockBuffer(GDALAsyncReaderH hARIO) nothrow @nogc;
727 
728 /* -------------------------------------------------------------------- */
729 /*      Helper functions.                                               */
730 /* -------------------------------------------------------------------- */
731 int  GDALGeneralCmdLineProcessor(int nArgc, char ***ppapszArgv, int nOptions) nothrow @nogc;
732 void  GDALSwapWords(void *pData, int nWordSize, int nWordCount, int nWordSkip) nothrow @nogc;
733 void  GDALSwapWordsEx(void *pData, int nWordSize, size_t nWordCount, 
734     int nWordSkip) nothrow @nogc;
735 
736 void  GDALCopyWords(void *pSrcData, GDALDataType eSrcType, int nSrcPixelOffset, 
737     void *pDstData, GDALDataType eDstType, int nDstPixelOffset, int nWordCount) nothrow @nogc;
738 
739 extern (C):
740 void  GDALCopyBits(GByte *pabySrcData, int nSrcOffset, int nSrcStep, 
741     GByte *pabyDstData, int nDstOffset, int nDstStep, int nBitCount, 
742     int nStepCount) nothrow @nogc;
743 
744 extern (System):
745 int  GDALLoadWorldFile(const char *, double *) nothrow @nogc;
746 int  GDALReadWorldFile(const char *, const char *, double *) nothrow @nogc;
747 int  GDALWriteWorldFile(const char *, const char *, double *) nothrow @nogc;
748 int  GDALLoadTabFile(const char *, double *, char **, int *, GDAL_GCP **) nothrow @nogc;
749 int  GDALReadTabFile(const char *, double *, char **, int *, GDAL_GCP **) nothrow @nogc;
750 int  GDALLoadOziMapFile(const char *, double *, char **, int *, GDAL_GCP **) nothrow @nogc;
751 int  GDALReadOziMapFile(const char *, double *, char **, int *, GDAL_GCP **) nothrow @nogc;
752 
753 const(char) * GDALDecToDMS(double , const char *, int ) nothrow @nogc;
754 double  GDALPackedDMSToDec(double ) nothrow @nogc;
755 double  GDALDecToPackedDMS(double ) nothrow @nogc;
756 
757 /* Note to developers : please keep this section in sync with ogr_core.h */
758 const(char)* GDALVersionInfo( const char * ) nothrow @nogc;
759 int GDALCheckVersion( int nVersionMajor, int nVersionMinor,
760     const char* pszCallingComponentName) nothrow @nogc;
761 
762 /** Helper macro for GDALCheckVersion()
763   @see GDALCheckVersion()
764   */
765 void GDAL_CHECK_VERSION(const char* pszCallingComponentName) nothrow @nogc
766 {  
767   GDALCheckVersion(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, 
768     pszCallingComponentName);
769 }
770 
771 struct _N29
772 {
773     double dfLINE_OFF;
774     double dfSAMP_OFF;
775     double dfLAT_OFF;
776     double dfLONG_OFF;
777     double dfHEIGHT_OFF;
778     double dfLINE_SCALE;
779     double dfSAMP_SCALE;
780     double dfLAT_SCALE;
781     double dfLONG_SCALE;
782     double dfHEIGHT_SCALE;
783     double[20] adfLINE_NUM_COEFF;
784     double[20] adfLINE_DEN_COEFF;
785     double[20] adfSAMP_NUM_COEFF;
786     double[20] adfSAMP_DEN_COEFF;
787     double dfMIN_LONG;
788     double dfMIN_LAT;
789     double dfMAX_LONG;
790     double dfMAX_LAT;
791 }
792 extern (C):
793 alias _N29 GDALRPCInfo;
794 
795 //C     int CPL_DLL CPL_STDCALL GDALExtractRPCInfo( char **, GDALRPCInfo * );
796 extern (System):
797 int  GDALExtractRPCInfo(char **, GDALRPCInfo *) nothrow @nogc;
798 
799 /* ==================================================================== */
800 /*      Color tables.                                                   */
801 /* ==================================================================== */
802 
803 /** Color tuple */
804 struct _N30
805 {
806     short c1; /*! gray, red, cyan or hue       */
807     short c2; /*! green, magenta, or lightness */
808     short c3; /*! blue, yellow, or saturation  */
809     short c4; /*! alpha or blackband           */
810 }
811 extern (C):
812 alias _N30 GDALColorEntry;
813 
814 extern (System):
815 GDALColorTableH  GDALCreateColorTable(GDALPaletteInterp ) nothrow @nogc;
816 void  GDALDestroyColorTable(GDALColorTableH ) nothrow @nogc;
817 GDALColorTableH  GDALCloneColorTable(GDALColorTableH ) nothrow @nogc;
818 GDALPaletteInterp  GDALGetPaletteInterpretation(GDALColorTableH ) nothrow @nogc;
819 int  GDALGetColorEntryCount(GDALColorTableH ) nothrow @nogc;
820 GDALColorEntry * GDALGetColorEntry(GDALColorTableH , int ) nothrow @nogc;
821 int  GDALGetColorEntryAsRGB(GDALColorTableH , int , GDALColorEntry *) nothrow @nogc;
822 void  GDALSetColorEntry(GDALColorTableH , int , GDALColorEntry *) nothrow @nogc;
823 void  GDALCreateColorRamp(GDALColorTableH hTable, int nStartIndex, 
824     GDALColorEntry *psStartColor, int nEndIndex, GDALColorEntry *psEndColor) nothrow @nogc;
825 
826 /* ==================================================================== */
827 /*      Raster Attribute Table				                            */
828 /* ==================================================================== */
829 
830 /** Field type of raster attribute table */
831 enum
832 {
833     GFT_Integer, /*! Integer field                 */
834     GFT_Real,    /*! Floating point (double) field */
835     GFT_String,  /*! String field                  */
836 }
837 extern (C):
838 alias int GDALRATFieldType;
839 
840 /** Field usage of raster attribute table */
841 enum
842 {
843     GFU_Generic    =  0,  /*! General purpose field.           */
844     GFU_PixelCount =  1,  /*! Histogram pixel count            */
845     GFU_Name       =  2,  /*! Class name                       */
846     GFU_Min        =  3,  /*! Class range minimum              */
847     GFU_Max        =  4,  /*! Class range maximum              */
848     GFU_MinMax     =  5,  /*! Class value (min=max)            */
849     GFU_Red        =  6,  /*! Red class color (0-255)          */
850     GFU_Green      =  7,  /*! Green class color (0-255)        */
851     GFU_Blue       =  8,  /*! Blue class color (0-255)         */
852     GFU_Alpha      =  9,  /*! Alpha (0=transparent,255=opaque) */
853     GFU_RedMin     = 10,  /*! Color Range Red Minimum          */
854     GFU_GreenMin   = 11,  /*! Color Range Green Minimum        */
855     GFU_BlueMin    = 12,  /*! Color Range Blue Minimum         */
856     GFU_AlphaMin   = 13,  /*! Color Range Alpha Minimum        */
857     GFU_RedMax     = 14,  /*! Color Range Red Maximum          */
858     GFU_GreenMax   = 15,  /*! Color Range Green Maximum        */
859     GFU_BlueMax    = 16,  /*! Color Range Blue Maximum         */
860     GFU_AlphaMax   = 17,  /*! Color Range Alpha Maximum        */
861     GFU_MaxCount,         /*! Class range maximum              */
862 }
863 alias int GDALRATFieldUsage;
864 
865 extern (System):
866 GDALRasterAttributeTableH  GDALCreateRasterAttributeTable();
867 void  GDALDestroyRasterAttributeTable(GDALRasterAttributeTableH ) nothrow @nogc;
868 
869 int  GDALRATGetColumnCount(GDALRasterAttributeTableH ) nothrow @nogc;
870 
871 const(char) * GDALRATGetNameOfCol(GDALRasterAttributeTableH , int ) nothrow @nogc;
872 GDALRATFieldUsage  GDALRATGetUsageOfCol(GDALRasterAttributeTableH , int ) nothrow @nogc;
873 GDALRATFieldType  GDALRATGetTypeOfCol(GDALRasterAttributeTableH , int ) nothrow @nogc;
874 
875 int  GDALRATGetColOfUsage(GDALRasterAttributeTableH , GDALRATFieldUsage ) nothrow @nogc;
876 int  GDALRATGetRowCount(GDALRasterAttributeTableH ) nothrow @nogc;
877 
878 const(char) * GDALRATGetValueAsString(GDALRasterAttributeTableH , int , int ) nothrow @nogc;
879 int  GDALRATGetValueAsInt(GDALRasterAttributeTableH , int , int ) nothrow @nogc;
880 double  GDALRATGetValueAsDouble(GDALRasterAttributeTableH , int , int ) nothrow @nogc;
881 
882 void  GDALRATSetValueAsString(GDALRasterAttributeTableH , int , int , const char *) nothrow @nogc;
883 void  GDALRATSetValueAsInt(GDALRasterAttributeTableH , int , int , int ) nothrow @nogc;
884 void  GDALRATSetValueAsDouble(GDALRasterAttributeTableH , int , int , double ) nothrow @nogc;
885 
886 int  GDALRATChangesAreWrittenToFile(GDALRasterAttributeTableH hRAT) nothrow @nogc;
887 
888 CPLErr  GDALRATValuesIOAsDouble(GDALRasterAttributeTableH hRAT, 
889     GDALRWFlag eRWFlag, int iField, int iStartRow, int iLength, 
890     double *pdfData) nothrow @nogc;
891 CPLErr  GDALRATValuesIOAsInteger(GDALRasterAttributeTableH hRAT, 
892     GDALRWFlag eRWFlag, int iField, int iStartRow, int iLength, int *pnData) nothrow @nogc;
893 CPLErr  GDALRATValuesIOAsString(GDALRasterAttributeTableH hRAT, 
894     GDALRWFlag eRWFlag, int iField, int iStartRow, int iLength, 
895     char **papszStrList) nothrow @nogc;
896 
897 void  GDALRATSetRowCount(GDALRasterAttributeTableH , int ) nothrow @nogc;
898 CPLErr  GDALRATCreateColumn(GDALRasterAttributeTableH , const char *,
899  GDALRATFieldType , GDALRATFieldUsage ) nothrow @nogc;
900 CPLErr  GDALRATSetLinearBinning(GDALRasterAttributeTableH , double , double ) nothrow @nogc;
901 int  GDALRATGetLinearBinning(GDALRasterAttributeTableH , double *, double *) nothrow @nogc;
902 CPLErr  GDALRATInitializeFromColorTable(GDALRasterAttributeTableH , 
903     GDALColorTableH ) nothrow @nogc;
904 GDALColorTableH  GDALRATTranslateToColorTable(GDALRasterAttributeTableH , 
905     int nEntryCount) nothrow @nogc;
906 void  GDALRATDumpReadable(GDALRasterAttributeTableH , FILE *) nothrow @nogc;
907 GDALRasterAttributeTableH  GDALRATClone(GDALRasterAttributeTableH ) nothrow @nogc;
908 
909 void * GDALRATSerializeJSON(GDALRasterAttributeTableH ) nothrow @nogc;
910 
911 int  GDALRATGetRowOfValue(GDALRasterAttributeTableH , double ) nothrow @nogc;
912 
913 /* ==================================================================== */
914 /*      GDAL Cache Management                                           */
915 /* ==================================================================== */
916 
917 void  GDALSetCacheMax(int nBytes) nothrow @nogc;
918 int  GDALGetCacheMax() nothrow @nogc;
919 int  GDALGetCacheUsed() nothrow @nogc;
920 void  GDALSetCacheMax64(GIntBig nBytes) nothrow @nogc;
921 GIntBig  GDALGetCacheMax64() nothrow @nogc;
922 GIntBig  GDALGetCacheUsed64() nothrow @nogc;
923 int  GDALFlushCacheBlock() nothrow @nogc;
924 
925 /* ==================================================================== */
926 /*      GDAL virtual memory                                             */
927 /* ==================================================================== */
928 
929 extern (C):
930 /+
931 
932 Documentation says the virtual memory only works on linux currently. Using the 
933 virtual memory requires me to create bindings to cpl_virtualmem.h, which then
934 has other requirements. So for the D binding, I chose to not support the virtual
935 memory portion of the API.
936 
937 CPLVirtualMem * GDALDatasetGetVirtualMem(GDALDatasetH hDS, GDALRWFlag eRWFlag, 
938     int nXOff, int nYOff, int nXSize, int nYSize, int nBufXSize, int nBufYSize, 
939     GDALDataType eBufType, int nBandCount, int *panBandMap, int nPixelSpace, 
940     GIntBig nLineSpace, GIntBig nBandSpace, size_t nCacheSize, 
941     size_t nPageSizeHint, int bSingleThreadUsage, char **papszOptions);
942 
943 CPLVirtualMem * GDALRasterBandGetVirtualMem(GDALRasterBandH hBand, 
944     GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, int nYSize, 
945     int nBufXSize, int nBufYSize, GDALDataType eBufType, int nPixelSpace, 
946     GIntBig nLineSpace, size_t nCacheSize, size_t nPageSizeHint, 
947     int bSingleThreadUsage, char **papszOptions);
948 
949 CPLVirtualMem * GDALGetVirtualMemAuto(GDALRasterBandH hBand, 
950     GDALRWFlag eRWFlag, int *pnPixelSpace, GIntBig *pnLineSpace, 
951     char **papszOptions);
952 
953 enum
954 {
955     GTO_TIP, /*! Tile Interleaved by Pixel: tile (0,0) with internal band interleaved by pixel organization, tile (1, 0), ...                                  */
956     GTO_BIT, /*! Band Interleaved by Tile : tile (0,0) of first band, tile (0,0) of second band, ... tile (1,0) of first band, tile (1,0) of second band, ... */
957     GTO_BSQ, /*! Band SeQuential : all the tiles of first band, all the tiles of following band...                                                            */
958 }
959 alias int GDALTileOrganization;
960 
961 CPLVirtualMem * GDALDatasetGetTiledVirtualMem(GDALDatasetH hDS, 
962     GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, int nYSize, 
963     int nTileXSize, int nTileYSize, GDALDataType eBufType, int nBandCount, 
964     int *panBandMap, GDALTileOrganization eTileOrganization, size_t nCacheSize, 
965     int bSingleThreadUsage, char **papszOptions);
966 
967 CPLVirtualMem * GDALRasterBandGetTiledVirtualMem(GDALRasterBandH hBand, 
968     GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, int nYSize, 
969     int nTileXSize, int nTileYSize, GDALDataType eBufType, size_t nCacheSize, 
970     int bSingleThreadUsage, char **papszOptions);
971 +/
972 
973 /* ==================================================================== */
974 /*      VRTPansharpenedDataset class.                                   */
975 /* ==================================================================== */
976 
977 GDALDatasetH  GDALCreatePansharpenedVRT(const char *pszXML, 
978     GDALRasterBandH hPanchroBand, int nInputSpectralBands, 
979     GDALRasterBandH *pahInputSpectralBands) nothrow @nogc;
980 
981 /* =================================================================== */
982 /*      Misc API                                                        */
983 /* ==================================================================== */
984 
985 CPLXMLNode * GDALGetJPEG2000Structure(const char *pszFilename, char **papszOptions) nothrow @nogc;