1 /* Converted to D from C:/devLibs/gdal21/include/ogr_core.h by htod */
2 module gdal.ogr.core;
3 /******************************************************************************
4  * $Id: ogr_core.h 33680 2016-03-08 09:59:03Z rouault $
5  *
6  * Project:  OpenGIS Simple Features Reference Implementation
7  * Purpose:  Define some core portability services for cross-platform OGR code.
8  * Author:   Frank Warmerdam, warmerdam@pobox.com
9  *
10  ******************************************************************************
11  * Copyright (c) 1999, 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 import gdal.cpl.port;
34 import gdal.gdalversion;
35 
36 /**
37  * \file
38  *
39  * Core portability services for cross-platform OGR code.
40  */
41 
42 /**
43  * Simple container for a bounding region.
44  */
45 struct _N1
46 {
47     double MinX;
48     double MaxX;
49     double MinY;
50     double MaxY;
51 }
52 extern (C):
53 alias _N1 OGREnvelope;
54 
55 /**
56  * Simple container for a bounding region in 3D.
57  */
58 struct _N2
59 {
60     double MinX;
61     double MaxX;
62     double MinY;
63     double MaxY;
64     double MinZ;
65     double MaxZ;
66 }
67 alias _N2 OGREnvelope3D;
68 
69 void * OGRMalloc(size_t );
70 void * OGRCalloc(size_t , size_t );
71 void * OGRRealloc(void *, size_t );
72 char * OGRStrdup(const(char) *);
73 void  OGRFree(void *);
74 
75 alias int OGRErr;
76 
77 enum OGRERR_NONE                      = 0;
78 enum OGRERR_NOT_ENOUGH_DATA           = 1;
79 enum OGRERR_NOT_ENOUGH_MEMORY         = 2;
80 enum OGRERR_UNSUPPORTED_GEOMETRY_TYPE = 3;
81 enum OGRERR_UNSUPPORTED_OPERATION     = 4;
82 enum OGRERR_CORRUPT_DATA              = 5;
83 enum OGRERR_FAILURE                   = 6;
84 enum OGRERR_UNSUPPORTED_SRS           = 7;
85 enum OGRERR_INVALID_HANDLE            = 8;
86 enum OGRERR_NON_EXISTING_FEATURE      = 9;
87 alias int OGRBoolean;
88 
89 /* -------------------------------------------------------------------- */
90 /*      ogr_geometry.h related definitions.                             */
91 /* -------------------------------------------------------------------- */
92 
93 /**
94  * List of well known binary geometry types.  These are used within the BLOBs
95  * but are also returned from OGRGeometry::getGeometryType() to identify the
96  * type of a geometry object.
97  */
98 enum
99 {
100     wkbUnknown               =    0,
101     wkbPoint                 =    1,
102     wkbLineString            =    2,
103     wkbPolygon               =    3,
104     wkbMultiPoint            =    4,
105     wkbMultiLineString       =    5,
106     wkbMultiPolygon          =    6,
107     wkbGeometryCollection    =    7,
108     wkbCircularString        =    8,
109     wkbCompoundCurve         =    9,
110     wkbCurvePolygon          =   10,
111     wkbMultiCurve            =   11,
112     wkbMultiSurface          =   12,
113     wkbCurve                 =   13,
114     wkbSurface               =   14,
115     wkbPolyhedralSurface     =   15,
116     wkbTIN                   =   16,
117     wkbTriangle              =   17,
118     wkbNone                  =  100,
119     wkbLinearRing            =  101,
120     wkbCircularStringZ       = 1008,
121     wkbCompoundCurveZ        = 1009,
122     wkbCurvePolygonZ         = 1010,
123     wkbMultiCurveZ           = 1011,
124     wkbMultiSurfaceZ         = 1012,
125     wkbCurveZ                = 1013,
126     wkbSurfaceZ              = 1014,
127     wkbPolyhedralSurfaceZ    = 1015,
128     wkbTINZ                  = 1016,
129     wkbTriangleZ             = 1017,
130     wkbPointM                = 2001,
131     wkbLineStringM           = 2002,
132     wkbPolygonM              = 2003,
133     wkbMultiPointM           = 2004,
134     wkbMultiLineStringM      = 2005,
135     wkbMultiPolygonM         = 2006,
136     wkbGeometryCollectionM   = 2007,
137     wkbCircularStringM       = 2008,
138     wkbCompoundCurveM        = 2009,
139     wkbCurvePolygonM         = 2010,
140     wkbMultiCurveM           = 2011,
141     wkbMultiSurfaceM         = 2012,
142     wkbCurveM                = 2013,
143     wkbSurfaceM              = 2014,
144     wkbPolyhedralSurfaceM    = 2015,
145     wkbTINM                  = 2016,
146     wkbTriangleM             = 2017,
147     wkbPointZM               = 3001,
148     wkbLineStringZM          = 3002,
149     wkbPolygonZM             = 3003,
150     wkbMultiPointZM          = 3004,
151     wkbMultiLineStringZM     = 3005,
152     wkbMultiPolygonZM        = 3006,
153     wkbGeometryCollectionZM  = 3007,
154     wkbCircularStringZM      = 3008,
155     wkbCompoundCurveZM       = 3009,
156     wkbCurvePolygonZM        = 3010,
157     wkbMultiCurveZM          = 3011,
158     wkbMultiSurfaceZM        = 3012,
159     wkbCurveZM               = 3013,
160     wkbSurfaceZM             = 3014,
161     wkbPolyhedralSurfaceZM   = 3015,
162     wkbTINZM                 = 3016,
163     wkbTriangleZM            = 3017,
164     wkbPoint25D              = -2147483647, // 0x80000001
165     wkbLineString25D         = -2147483646, // 0x80000002
166     wkbPolygon25D            = -2147483645, // 0x80000003
167     wkbMultiPoint25D         = -2147483644, // 0x80000004
168     wkbMultiLineString25D    = -2147483643, // 0x80000005
169     wkbMultiPolygon25D       = -2147483642, // 0x80000006
170     wkbGeometryCollection25D = -2147483641, // 0x80000007
171 }
172 alias int OGRwkbGeometryType;
173 
174 /**
175  * Output variants of WKB we support.
176  *
177  * 99-402 was a short-lived extension to SFSQL 1.1 that used a high-bit flag
178  * to indicate the presence of Z coordinates in a WKB geometry.
179  *
180  * SQL/MM Part 3 and SFSQL 1.2 use offsets of 1000 (Z), 2000 (M) and 3000 (ZM)
181  * to indicate the present of higher dimensional coordinates in a WKB geometry.
182  * Reference: <a href="https://portal.opengeospatial.org/files/?artifact_id=320243">
183  * 09-009_Committee_Draft_ISOIEC_CD_13249-3_SQLMM_Spatial.pdf</a>,
184  * ISO/IEC JTC 1/SC 32 N 1820, ISO/IEC CD 13249-3:201x(E), Date: 2009-01-16.
185  * The codes are also found in §8.2.3 of <a href="http://portal.opengeospatial.org/files/?artifact_id=25355">
186  * OGC 06-103r4 "OpenGIS® Implementation Standard for Geographic information - Simple feature access - Part 1: Common architecture", v1.2.1</a>
187  */
188 enum
189 {
190     wkbVariantOldOgc,    /**< Old-style 99-402 extended dimension (Z) WKB types */
191     wkbVariantIso,       /**< SFSQL 1.2 and ISO SQL/MM Part 3 extended dimension (Z&M) WKB types */
192     wkbVariantPostGIS1,  /**< PostGIS 1.X has different codes for CurvePolygon, MultiCurve and MultiSurface */
193 }
194 alias int OGRwkbVariant;
195 
196 /** @deprecated in GDAL 2.0. Use wkbHasZ() or wkbSetZ() instead */
197 deprecated enum wkb25DBit = 0x80000000;
198 
199 /** Return the 2D geometry type corresponding to the specified geometry type */
200 alias wkbFlatten = OGR_GT_Flatten;
201 
202 /** Return if the geometry type is a 3D geometry type
203   * @since GDAL 2.0
204   */
205 bool  wkbHasZ(OGRwkbGeometryType x) { return OGR_GT_HasZ(x) != 0; }
206 
207 /** Return the 3D geometry type corresponding to the specified geometry type.
208   * @since GDAL 2.0
209   */
210 alias wkbSetZ = OGR_GT_SetZ;
211 
212 /** Return if the geometry type is a measured geometry type
213   * @since GDAL 2.1
214   */
215 bool wkbHasM(OGRwkbGeometryType x) { return OGR_GT_HasM(x) != 0; }
216 
217 /** Return the measured geometry type corresponding to the specified geometry type.
218   * @since GDAL 2.1
219   */
220 alias wkbSetM = OGR_GT_SetM;
221 
222 enum ogrZMarker = 0x21125711;
223 
224 const(char) * OGRGeometryTypeToName(OGRwkbGeometryType eType);
225 OGRwkbGeometryType  OGRMergeGeometryTypes(OGRwkbGeometryType eMain, OGRwkbGeometryType eExtra);
226 OGRwkbGeometryType  OGRMergeGeometryTypesEx(OGRwkbGeometryType eMain, OGRwkbGeometryType eExtra, int bAllowPromotingToCurves);
227 OGRwkbGeometryType  OGR_GT_Flatten(OGRwkbGeometryType eType);
228 OGRwkbGeometryType  OGR_GT_SetZ(OGRwkbGeometryType eType);
229 OGRwkbGeometryType  OGR_GT_SetM(OGRwkbGeometryType eType);
230 OGRwkbGeometryType  OGR_GT_SetModifier(OGRwkbGeometryType eType, int bSetZ, int bSetM);
231 int  OGR_GT_HasZ(OGRwkbGeometryType eType);
232 int  OGR_GT_HasM(OGRwkbGeometryType eType);
233 int  OGR_GT_IsSubClassOf(OGRwkbGeometryType eType, OGRwkbGeometryType eSuperType);
234 int  OGR_GT_IsCurve(OGRwkbGeometryType );
235 int  OGR_GT_IsSurface(OGRwkbGeometryType );
236 int  OGR_GT_IsNonLinear(OGRwkbGeometryType );
237 OGRwkbGeometryType  OGR_GT_GetCollection(OGRwkbGeometryType eType);
238 OGRwkbGeometryType  OGR_GT_GetCurve(OGRwkbGeometryType eType);
239 OGRwkbGeometryType  OGR_GT_GetLinear(OGRwkbGeometryType eType);
240 
241 enum
242 {
243     wkbXDR,  /* MSB/Sun/Motoroloa: Most Significant Byte First   */
244     wkbNDR,  /* LSB/Intel/Vax: Least Significant Byte First      */
245 }
246 alias int OGRwkbByteOrder;
247 
248 
249 
250 /** Alter field name.
251  * Used by OGR_L_AlterFieldDefn().
252  */
253 enum ALTER_NAME_FLAG = 0x1;
254 
255 /** Alter field type.
256  * Used by OGR_L_AlterFieldDefn().
257  */
258 enum ALTER_TYPE_FLAG = 0x2;
259 
260 /** Alter field width and precision.
261  * Used by OGR_L_AlterFieldDefn().
262  */
263 enum ALTER_WIDTH_PRECISION_FLAG = 0x4;
264 
265 /** Alter field NOT NULL constraint.
266  * Used by OGR_L_AlterFieldDefn().
267  * @since GDAL 2.0
268  */
269 enum ALTER_NULLABLE_FLAG = 0x8;
270 
271 /** Alter field DEFAULT value.
272  * Used by OGR_L_AlterFieldDefn().
273  * @since GDAL 2.0
274  */
275 enum ALTER_DEFAULT_FLAG = 0x10;
276 
277 /** Alter all parameters of field definition.
278  * Used by OGR_L_AlterFieldDefn().
279  */
280 enum ALTER_ALL_FLAG = (ALTER_NAME_FLAG | ALTER_TYPE_FLAG | ALTER_WIDTH_PRECISION_FLAG | ALTER_NULLABLE_FLAG | ALTER_DEFAULT_FLAG);
281 
282 
283 /** Validate that fields respect not-null constraints.
284  * Used by OGR_F_Validate().
285  * @since GDAL 2.0
286  */
287 enum OGR_F_VAL_NULL = 0x00000001;
288 
289 /** Validate that geometries respect geometry column type.
290  * Used by OGR_F_Validate().
291  * @since GDAL 2.0
292  */
293 enum OGR_F_VAL_GEOM_TYPE = 0x00000002;
294 
295 /** Validate that (string) fields respect field width.
296  * Used by OGR_F_Validate().
297  * @since GDAL 2.0
298  */
299 enum OGR_F_VAL_WIDTH = 0x00000004;
300 
301 /** Allow fields that are null when there's an associated default value.
302  * This can be used for drivers where the low-level layers will automatically set the
303  * field value to the associated default value.
304  * This flag only makes sense if OGR_F_VAL_NULL is set too.
305  * Used by OGR_F_Validate().
306  * @since GDAL 2.0
307  */
308 enum OGR_F_VAL_ALLOW_NULL_WHEN_DEFAULT = 0x00000008;
309 
310 /** Allow geometry fields to have a different coordinate dimension that their
311  * geometry column type.
312  * This flag only makes sense if OGR_F_VAL_GEOM_TYPE is set too.
313  * Used by OGR_F_Validate().
314  * @since GDAL 2.1
315  */
316 enum OGR_F_VAL_ALLOW_DIFFERENT_GEOM_DIM = 0x00000010;
317 
318 /** Enable all validation tests (except OGR_F_VAL_ALLOW_DIFFERENT_GEOM_DIM)
319  * Used by OGR_F_Validate().
320  * @since GDAL 2.0
321  */
322 enum OGR_F_VAL_ALL = (0x7FFFFFFF & ~OGR_F_VAL_ALLOW_DIFFERENT_GEOM_DIM);
323 
324 /************************************************************************/
325 /*                  ogr_feature.h related definitions.                  */
326 /************************************************************************/
327 
328 /**
329  * List of feature field types.  This list is likely to be extended in the
330  * future ... avoid coding applications based on the assumption that all
331  * field types can be known.
332  */
333 enum
334 {
335     OFTInteger        =  0, /** Simple 32bit integer */
336     OFTIntegerList    =  1, /** List of 32bit integers */
337     OFTReal           =  2, /** Double Precision floating point */
338     OFTRealList       =  3, /** List of doubles */
339     OFTString         =  4, /** String of ASCII chars */
340     OFTStringList     =  5, /** Array of strings */
341     OFTWideString     =  6, /** deprecated */
342     OFTWideStringList =  7, /** deprecated */
343     OFTBinary         =  8, /** Raw Binary data */
344     OFTDate           =  9, /** Date */
345     OFTTime           = 10, /** Time */
346     OFTDateTime       = 11, /** Date and Time */
347     OFTInteger64      = 12, /** Single 64bit integer */
348     OFTInteger64List  = 13, /** List of 64bit integers */
349     OFTMaxType        = 13,
350 }
351 alias int OGRFieldType;
352 
353 /**
354  * List of field subtypes. A subtype represents a hint, a restriction of the
355  * main type, that is not strictly necessary to consult.
356  * This list is likely to be extended in the
357  * future ... avoid coding applications based on the assumption that all
358  * field types can be known.
359  * Most subtypes only make sense for a restricted set of main types.
360  * @since GDAL 2.0
361  */
362 enum
363 {
364     OFSTNone       = 0, /** No subtype. This is the default value                                             */
365     OFSTBoolean    = 1, /** Boolean integer. Only valid for OFTInteger and OFTIntegerList.                    */
366     OFSTInt16      = 2, /** Signed 16-bit integer. Only valid for OFTInteger and OFTIntegerList.              */
367     OFSTFloat32    = 3, /** Single precision (32 bit) floating point. Only valid for OFTReal and OFTRealList. */
368     OFSTMaxSubType = 3,
369 }
370 alias int OGRFieldSubType;
371 
372 /**
373  * Display justification for field values.
374  */
375 enum
376 {
377     OJUndefined = 0,
378     OJLeft      = 1,
379     OJRight     = 2,
380 }
381 alias int OGRJustification;
382 
383 const OGRNullFID = -1;
384 const OGRUnsetMarker = -21121;
385 /************************************************************************/
386 /*                               OGRField                               */
387 /************************************************************************/
388 
389 /**
390  * OGRFeature field attribute value union.
391  */
392 struct _N10
393 {
394     int nCount;
395     int *paList;
396 }
397 alias _N10 IntegerList;
398 
399 struct _N11
400 {
401     int nCount;
402     GIntBig *paList;
403 }
404 alias _N11 Integer64List;
405 
406 struct _N12
407 {
408     int nCount;
409     double *paList;
410 }
411 alias _N12 RealList;
412 
413 struct _N13
414 {
415     int nCount;
416     char **paList;
417 }
418 alias _N13 StringList;
419 
420 struct _N14
421 {
422     int nCount;
423     GByte *paData;
424 }
425 alias _N14 Binary;
426 
427 struct _N15
428 {
429     int nMarker1;
430     int nMarker2;
431 }
432 alias _N15 Set;
433 
434 struct _N16
435 {
436     GInt16 Year;
437     GByte Month;
438     GByte Day;
439     GByte Hour;
440     GByte Minute;
441     GByte TZFlag;   /* 0=unknown, 1=localtime(ambiguous), 100=GMT, 104=GMT+1, 80=GMT-5, etc                        */
442     GByte Reserved; /* must be set to 0                                                                            */
443     float Second;   /* with millisecond accuracy. at the end of the structure, so as to keep it 12 bytes on 32 bit */
444 } 
445 alias _N16 Date;
446 
447 union _N9
448 {
449     int Integer;
450     GIntBig Integer64;
451     double Real;
452     char *String;
453     _N10 IntegerList;
454     _N11 Integer64List;
455     _N12 RealList;
456     _N13 StringList;
457     _N14 Binary;
458     _N15 Set;
459     _N16 Date;
460 }
461 alias _N9 OGRField;
462 
463 int OGR_GET_MS(double floatingpoint_sec)
464 { 
465   return 
466     cast(int)((floatingpoint_sec - cast(int)(floatingpoint_sec)) * 1000 + 0.5);
467 }
468 
469 int  OGRParseDate(const(char) *pszInput, OGRField *psOutput, int nOptions);
470 
471 /* -------------------------------------------------------------------- */
472 /*      Constants from ogrsf_frmts.h for capabilities.                  */
473 /* -------------------------------------------------------------------- */
474 enum OLCRandomRead           = "RandomRead";
475 enum OLCSequentialWrite      = "SequentialWrite";
476 enum OLCRandomWrite          = "RandomWrite";
477 enum OLCFastSpatialFilter    = "FastSpatialFilter";
478 enum OLCFastFeatureCount     = "FastFeatureCount";
479 enum OLCFastGetExtent        = "FastGetExtent";
480 enum OLCCreateField          = "CreateField";
481 enum OLCDeleteField          = "DeleteField";
482 enum OLCReorderFields        = "ReorderFields";
483 enum OLCAlterFieldDefn       = "AlterFieldDefn";
484 enum OLCTransactions         = "Transactions";
485 enum OLCDeleteFeature        = "DeleteFeature";
486 enum OLCFastSetNextByIndex   = "FastSetNextByIndex";
487 enum OLCStringsAsUTF8        = "StringsAsUTF8";
488 enum OLCIgnoreFields         = "IgnoreFields";
489 enum OLCCreateGeomField      = "CreateGeomField";
490 enum OLCCurveGeometries      = "CurveGeometries";
491 enum OLCMeasuredGeometries   = "MeasuredGeometries";
492 enum ODsCCreateLayer         = "CreateLayer";
493 enum ODsCDeleteLayer         = "DeleteLayer";
494 enum ODsCCreateGeomFieldAfterCreateLayer    = "CreateGeomFieldAfterCreateLayer";
495 enum ODsCCurveGeometries     = "CurveGeometries";
496 enum ODsCTransactions        = "Transactions";
497 enum ODsCEmulatedTransactions  = "EmulatedTransactions";
498 enum ODsCMeasuredGeometries  = "MeasuredGeometries";
499 enum ODrCCreateDataSource    = "CreateDataSource";
500 enum ODrCDeleteDataSource    = "DeleteDataSource";
501 
502 /* -------------------------------------------------------------------- */
503 /*      Layer metadata items.                                           */
504 /* -------------------------------------------------------------------- */
505 /** Capability set to YES as metadata on a layer that has features with
506   * 64 bit identifiers.
507   @since GDAL 2.0
508   */
509 enum OLMD_FID64 = "OLMD_FID64";
510 
511 /************************************************************************/
512 /*                  ogr_featurestyle.h related definitions.             */
513 /************************************************************************/
514 
515 /**
516  * OGRStyleTool derived class types (returned by GetType()).
517  */
518 enum ogr_style_tool_class_id
519 {
520     OGRSTCNone   = 0,
521     OGRSTCPen    = 1,
522     OGRSTCBrush  = 2,
523     OGRSTCSymbol = 3,
524     OGRSTCLabel  = 4,
525     OGRSTCVector = 5,
526 }
527 alias ogr_style_tool_class_id OGRSTClassId;
528 
529 /**
530  * List of units supported by OGRStyleTools.
531  */
532 enum ogr_style_tool_units_id
533 {
534     OGRSTUGround = 0,
535     OGRSTUPixel  = 1,
536     OGRSTUPoints = 2,
537     OGRSTUMM     = 3,
538     OGRSTUCM     = 4,
539     OGRSTUInches = 5,
540 }
541 alias ogr_style_tool_units_id OGRSTUnitId;
542 
543 /**
544  * List of parameters for use with OGRStylePen.
545  */
546 enum ogr_style_tool_param_pen_id
547 {
548     OGRSTPenColor     = 0,
549     OGRSTPenWidth     = 1,
550     OGRSTPenPattern   = 2,
551     OGRSTPenId        = 3,
552     OGRSTPenPerOffset = 4,
553     OGRSTPenCap       = 5,
554     OGRSTPenJoin      = 6,
555     OGRSTPenPriority  = 7,
556     OGRSTPenLast      = 8,
557 }
558 alias ogr_style_tool_param_pen_id OGRSTPenParam;
559 
560 /**
561  * List of parameters for use with OGRStyleBrush.
562  */
563 enum ogr_style_tool_param_brush_id
564 {
565     OGRSTBrushFColor   = 0,
566     OGRSTBrushBColor   = 1,
567     OGRSTBrushId       = 2,
568     OGRSTBrushAngle    = 3,
569     OGRSTBrushSize     = 4,
570     OGRSTBrushDx       = 5,
571     OGRSTBrushDy       = 6,
572     OGRSTBrushPriority = 7,
573     OGRSTBrushLast     = 8,
574 }
575 alias ogr_style_tool_param_brush_id OGRSTBrushParam;
576 
577 
578 /**
579  * List of parameters for use with OGRStyleSymbol.
580  */
581 enum ogr_style_tool_param_symbol_id
582 {
583     OGRSTSymbolId       =  0,
584     OGRSTSymbolAngle    =  1,
585     OGRSTSymbolColor    =  2,
586     OGRSTSymbolSize     =  3,
587     OGRSTSymbolDx       =  4,
588     OGRSTSymbolDy       =  5,
589     OGRSTSymbolStep     =  6,
590     OGRSTSymbolPerp     =  7,
591     OGRSTSymbolOffset   =  8,
592     OGRSTSymbolPriority =  9,
593     OGRSTSymbolFontName = 10,
594     OGRSTSymbolOColor   = 11,
595     OGRSTSymbolLast     = 12,
596 }
597 alias ogr_style_tool_param_symbol_id OGRSTSymbolParam;
598 
599 /**
600  * List of parameters for use with OGRStyleLabel.
601  */
602 enum ogr_style_tool_param_label_id
603 {
604     OGRSTLabelFontName   =  0,
605     OGRSTLabelSize       =  1,
606     OGRSTLabelTextString =  2,
607     OGRSTLabelAngle      =  3,
608     OGRSTLabelFColor     =  4,
609     OGRSTLabelBColor     =  5,
610     OGRSTLabelPlacement  =  6,
611     OGRSTLabelAnchor     =  7,
612     OGRSTLabelDx         =  8,
613     OGRSTLabelDy         =  9,
614     OGRSTLabelPerp       = 10,
615     OGRSTLabelBold       = 11,
616     OGRSTLabelItalic     = 12,
617     OGRSTLabelUnderline  = 13,
618     OGRSTLabelPriority   = 14,
619     OGRSTLabelStrikeout  = 15,
620     OGRSTLabelStretch    = 16,
621     OGRSTLabelAdjHor     = 17,
622     OGRSTLabelAdjVert    = 18,
623     OGRSTLabelHColor     = 19,
624     OGRSTLabelOColor     = 20,
625     OGRSTLabelLast       = 21,
626 }
627 alias ogr_style_tool_param_label_id OGRSTLabelParam;
628 
629 /* ------------------------------------------------------------------- */
630 /*                        Version checking                             */
631 /* -------------------------------------------------------------------- */
632 
633 /* Note to developers : please keep this section in sync with gdal.h */
634 
635 extern (Windows):
636 const(char) * GDALVersionInfo(const(char) *);
637 
638 
639 /** Return TRUE if GDAL library version at runtime matches nVersionMajor.nVersionMinor.
640 
641     The purpose of this method is to ensure that calling code will run with the GDAL
642     version it is compiled for. It is primarily indented for external plugins.
643 
644     @param nVersionMajor Major version to be tested against
645     @param nVersionMinor Minor version to be tested against
646     @param pszCallingComponentName If not NULL, in case of version mismatch, the method
647                                    will issue a failure mentioning the name of
648                                    the calling component.
649   */
650 int  GDALCheckVersion(int nVersionMajor, int nVersionMinor, const(char) *pszCallingComponentName);