1 /* Converted to D from C:/devLibs/gdal21/include/ogr_api.h by htod */
2 module gdal.ogr.api;
3 /******************************************************************************
4  * $Id: ogr_api.h 33631 2016-03-04 06:28:09Z goatbar $
5  *
6  * Project:  OpenGIS Simple Features Reference Implementation
7  * Purpose:  C API for OGR Geometry, Feature, Layers, DataSource and drivers.
8  * Author:   Frank Warmerdam, warmerdam@pobox.com
9  *
10  ******************************************************************************
11  * Copyright (c) 2002, Frank Warmerdam
12  * Copyright (c) 2008-2013, 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 ogr_api.h
35  *
36  * C API and defines for OGRFeature, OGRGeometry, and OGRDataSource
37  * related classes.
38  *
39  * See also: ogr_geometry.h, ogr_feature.h, ogrsf_frmts.h, ogr_featurestyle.h
40  */
41 import gdal.cpl.progress;
42 import gdal.cpl.minixml;
43 import gdal.ogr.core;
44 import core.stdc.stdio : FILE;
45 
46 import gdal.cpl.port;
47 
48 /* -------------------------------------------------------------------- */
49 /*      Geometry related functions (ogr_geometry.h)                     */
50 /* -------------------------------------------------------------------- */
51 extern (C):
52 alias void *OGRGeometryH;
53 alias void *OGRSpatialReferenceH;
54 alias void *OGRCoordinateTransformationH;
55 
56 /* From base OGRGeometry class */
57 OGRErr  OGR_G_CreateFromWkb(ubyte *, OGRSpatialReferenceH , OGRGeometryH *, int ) nothrow @nogc;
58 OGRErr  OGR_G_CreateFromWkt(char **, OGRSpatialReferenceH , OGRGeometryH *) nothrow @nogc;
59 OGRErr  OGR_G_CreateFromFgf(ubyte *, OGRSpatialReferenceH , OGRGeometryH *, int , int *) nothrow @nogc;
60 void  OGR_G_DestroyGeometry(OGRGeometryH ) nothrow @nogc;
61 OGRGeometryH  OGR_G_CreateGeometry(OGRwkbGeometryType ) nothrow @nogc;
62 OGRGeometryH  OGR_G_ApproximateArcAngles(double dfCenterX, double dfCenterY, double dfZ, double dfPrimaryRadius, double dfSecondaryAxis, double dfRotation, double dfStartAngle, double dfEndAngle, double dfMaxAngleStepSizeDegrees) nothrow @nogc;
63 
64 OGRGeometryH  OGR_G_ForceToPolygon(OGRGeometryH ) nothrow @nogc;
65 OGRGeometryH  OGR_G_ForceToLineString(OGRGeometryH ) nothrow @nogc;
66 OGRGeometryH  OGR_G_ForceToMultiPolygon(OGRGeometryH ) nothrow @nogc;
67 OGRGeometryH  OGR_G_ForceToMultiPoint(OGRGeometryH ) nothrow @nogc;
68 OGRGeometryH  OGR_G_ForceToMultiLineString(OGRGeometryH ) nothrow @nogc;
69 OGRGeometryH  OGR_G_ForceTo(OGRGeometryH hGeom, OGRwkbGeometryType eTargetType, char **papszOptions) nothrow @nogc;
70 
71 int  OGR_G_GetDimension(OGRGeometryH ) nothrow @nogc;
72 int  OGR_G_GetCoordinateDimension(OGRGeometryH ) nothrow @nogc;
73 int  OGR_G_CoordinateDimension(OGRGeometryH ) nothrow @nogc;
74 void  OGR_G_SetCoordinateDimension(OGRGeometryH , int ) nothrow @nogc;
75 int  OGR_G_Is3D(OGRGeometryH ) nothrow @nogc;
76 int  OGR_G_IsMeasured(OGRGeometryH ) nothrow @nogc;
77 void  OGR_G_Set3D(OGRGeometryH , int ) nothrow @nogc;
78 void  OGR_G_SetMeasured(OGRGeometryH , int ) nothrow @nogc;
79 OGRGeometryH  OGR_G_Clone(OGRGeometryH ) nothrow @nogc;
80 void  OGR_G_GetEnvelope(OGRGeometryH , OGREnvelope *) nothrow @nogc;
81 void  OGR_G_GetEnvelope3D(OGRGeometryH , OGREnvelope3D *) nothrow @nogc;
82 OGRErr  OGR_G_ImportFromWkb(OGRGeometryH , ubyte *, int ) nothrow @nogc;
83 OGRErr  OGR_G_ExportToWkb(OGRGeometryH , OGRwkbByteOrder , ubyte *) nothrow @nogc;
84 OGRErr  OGR_G_ExportToIsoWkb(OGRGeometryH , OGRwkbByteOrder , ubyte *) nothrow @nogc;
85 int  OGR_G_WkbSize(OGRGeometryH hGeom) nothrow @nogc;
86 OGRErr  OGR_G_ImportFromWkt(OGRGeometryH , char **) nothrow @nogc;
87 OGRErr  OGR_G_ExportToWkt(OGRGeometryH , char **) nothrow @nogc;
88 OGRErr  OGR_G_ExportToIsoWkt(OGRGeometryH , char **) nothrow @nogc;
89 OGRwkbGeometryType  OGR_G_GetGeometryType(OGRGeometryH ) nothrow @nogc;
90 const(char) * OGR_G_GetGeometryName(OGRGeometryH ) nothrow @nogc;
91 void  OGR_G_DumpReadable(OGRGeometryH , FILE *, const(char) *) nothrow @nogc;
92 void  OGR_G_FlattenTo2D(OGRGeometryH ) nothrow @nogc;
93 void  OGR_G_CloseRings(OGRGeometryH ) nothrow @nogc;
94 
95 OGRGeometryH  OGR_G_CreateFromGML(const(char) *) nothrow @nogc;
96 char * OGR_G_ExportToGML(OGRGeometryH ) nothrow @nogc;
97 char * OGR_G_ExportToGMLEx(OGRGeometryH , char **papszOptions) nothrow @nogc;
98 
99 OGRGeometryH  OGR_G_CreateFromGMLTree(CPLXMLNode *) nothrow @nogc;
100 CPLXMLNode * OGR_G_ExportToGMLTree(OGRGeometryH ) nothrow @nogc;
101 CPLXMLNode * OGR_G_ExportEnvelopeToGMLTree(OGRGeometryH ) nothrow @nogc;
102 
103 char * OGR_G_ExportToKML(OGRGeometryH , const(char) *pszAltitudeMode) nothrow @nogc;
104 
105 char * OGR_G_ExportToJson(OGRGeometryH ) nothrow @nogc;
106 char * OGR_G_ExportToJsonEx(OGRGeometryH , char **papszOptions) nothrow @nogc;
107 OGRGeometryH  OGR_G_CreateGeometryFromJson(const(char) *) nothrow @nogc;
108 
109 void  OGR_G_AssignSpatialReference(OGRGeometryH , OGRSpatialReferenceH ) nothrow @nogc;
110 OGRSpatialReferenceH  OGR_G_GetSpatialReference(OGRGeometryH ) nothrow @nogc;
111 OGRErr  OGR_G_Transform(OGRGeometryH , OGRCoordinateTransformationH ) nothrow @nogc;
112 OGRErr  OGR_G_TransformTo(OGRGeometryH , OGRSpatialReferenceH ) nothrow @nogc;
113 
114 OGRGeometryH  OGR_G_Simplify(OGRGeometryH hThis, double tolerance) nothrow @nogc;
115 OGRGeometryH  OGR_G_SimplifyPreserveTopology(OGRGeometryH hThis, double tolerance) nothrow @nogc;
116 OGRGeometryH  OGR_G_DelaunayTriangulation(OGRGeometryH hThis, double dfTolerance, int bOnlyEdges) nothrow @nogc;
117 
118 void  OGR_G_Segmentize(OGRGeometryH hGeom, double dfMaxLength) nothrow @nogc;
119 int  OGR_G_Intersects(OGRGeometryH , OGRGeometryH ) nothrow @nogc;
120 int  OGR_G_Equals(OGRGeometryH , OGRGeometryH ) nothrow @nogc;
121 int  OGR_G_Disjoint(OGRGeometryH , OGRGeometryH ) nothrow @nogc;
122 int  OGR_G_Touches(OGRGeometryH , OGRGeometryH ) nothrow @nogc;
123 int  OGR_G_Crosses(OGRGeometryH , OGRGeometryH ) nothrow @nogc;
124 int  OGR_G_Within(OGRGeometryH , OGRGeometryH ) nothrow @nogc;
125 int  OGR_G_Contains(OGRGeometryH , OGRGeometryH ) nothrow @nogc;
126 int  OGR_G_Overlaps(OGRGeometryH , OGRGeometryH ) nothrow @nogc;
127 
128 OGRGeometryH  OGR_G_Boundary(OGRGeometryH ) nothrow @nogc;
129 OGRGeometryH  OGR_G_ConvexHull(OGRGeometryH ) nothrow @nogc;
130 OGRGeometryH  OGR_G_Buffer(OGRGeometryH , double , int ) nothrow @nogc;
131 OGRGeometryH  OGR_G_Intersection(OGRGeometryH , OGRGeometryH ) nothrow @nogc;
132 OGRGeometryH  OGR_G_Union(OGRGeometryH , OGRGeometryH ) nothrow @nogc;
133 OGRGeometryH  OGR_G_UnionCascaded(OGRGeometryH ) nothrow @nogc;
134 OGRGeometryH  OGR_G_PointOnSurface(OGRGeometryH ) nothrow @nogc;
135 
136 OGRGeometryH  OGR_G_Difference(OGRGeometryH , OGRGeometryH ) nothrow @nogc;
137 OGRGeometryH  OGR_G_SymDifference(OGRGeometryH , OGRGeometryH ) nothrow @nogc;
138 double  OGR_G_Distance(OGRGeometryH , OGRGeometryH ) nothrow @nogc;
139 double  OGR_G_Length(OGRGeometryH ) nothrow @nogc;
140 double  OGR_G_Area(OGRGeometryH ) nothrow @nogc;
141 int  OGR_G_Centroid(OGRGeometryH , OGRGeometryH ) nothrow @nogc;
142 OGRGeometryH  OGR_G_Value(OGRGeometryH , double dfDistance) nothrow @nogc;
143 
144 void  OGR_G_Empty(OGRGeometryH ) nothrow @nogc;
145 int  OGR_G_IsEmpty(OGRGeometryH ) nothrow @nogc;
146 int  OGR_G_IsValid(OGRGeometryH ) nothrow @nogc;
147 /*char    CPL_DLL *OGR_G_IsValidReason( OGRGeometryH );*/
148 int  OGR_G_IsSimple(OGRGeometryH ) nothrow @nogc;
149 int  OGR_G_IsRing(OGRGeometryH ) nothrow @nogc;
150 
151 OGRGeometryH  OGR_G_Polygonize(OGRGeometryH ) nothrow @nogc;
152 
153 /* backward compatibility (non-standard methods) */
154 int  OGR_G_Intersect(OGRGeometryH , OGRGeometryH ) nothrow @nogc;
155 int  OGR_G_Equal(OGRGeometryH , OGRGeometryH ) nothrow @nogc;
156 OGRGeometryH  OGR_G_SymmetricDifference(OGRGeometryH , OGRGeometryH ) nothrow @nogc;
157 double  OGR_G_GetArea(OGRGeometryH ) nothrow @nogc;
158 OGRGeometryH  OGR_G_GetBoundary(OGRGeometryH ) nothrow @nogc;
159 
160 /* Methods for getting/setting vertices in points, line strings and rings */
161 int  OGR_G_GetPointCount(OGRGeometryH ) nothrow @nogc;
162 int  OGR_G_GetPoints(OGRGeometryH hGeom, void *pabyX, int nXStride, void *pabyY, int nYStride, void *pabyZ, int nZStride) nothrow @nogc;
163 int  OGR_G_GetPointsZM(OGRGeometryH hGeom, void *pabyX, int nXStride, void *pabyY, int nYStride, void *pabyZ, int nZStride, void *pabyM, int nMStride) nothrow @nogc;
164 double  OGR_G_GetX(OGRGeometryH , int ) nothrow @nogc;
165 double  OGR_G_GetY(OGRGeometryH , int ) nothrow @nogc;
166 double  OGR_G_GetZ(OGRGeometryH , int ) nothrow @nogc;
167 double  OGR_G_GetM(OGRGeometryH , int ) nothrow @nogc;
168 void  OGR_G_GetPoint(OGRGeometryH , int iPoint, double *, double *, double *) nothrow @nogc;
169 void  OGR_G_GetPointZM(OGRGeometryH , int iPoint, double *, double *, double *, double *) nothrow @nogc;
170 void  OGR_G_SetPointCount(OGRGeometryH hGeom, int nNewPointCount) nothrow @nogc;
171 void  OGR_G_SetPoint(OGRGeometryH , int iPoint, double , double , double ) nothrow @nogc;
172 void  OGR_G_SetPoint_2D(OGRGeometryH , int iPoint, double , double ) nothrow @nogc;
173 void  OGR_G_SetPointM(OGRGeometryH , int iPoint, double , double , double ) nothrow @nogc;
174 void  OGR_G_SetPointZM(OGRGeometryH , int iPoint, double , double , double , double ) nothrow @nogc;
175 void  OGR_G_AddPoint(OGRGeometryH , double , double , double ) nothrow @nogc;
176 void  OGR_G_AddPoint_2D(OGRGeometryH , double , double ) nothrow @nogc;
177 void  OGR_G_AddPointM(OGRGeometryH , double , double , double ) nothrow @nogc;
178 void  OGR_G_AddPointZM(OGRGeometryH , double , double , double , double ) nothrow @nogc;
179 void  OGR_G_SetPoints(OGRGeometryH hGeom, int nPointsIn, void *pabyX, int nXStride, void *pabyY, int nYStride, void *pabyZ, int nZStride) nothrow @nogc;
180 void  OGR_G_SetPointsZM(OGRGeometryH hGeom, int nPointsIn, void *pabyX, int nXStride, void *pabyY, int nYStride, void *pabyZ, int nZStride, void *pabyM, int nMStride) nothrow @nogc;
181 
182 /* Methods for getting/setting rings and members collections */
183 
184 int  OGR_G_GetGeometryCount(OGRGeometryH ) nothrow @nogc;
185 OGRGeometryH  OGR_G_GetGeometryRef(OGRGeometryH , int ) nothrow @nogc;
186 OGRErr  OGR_G_AddGeometry(OGRGeometryH , OGRGeometryH ) nothrow @nogc;
187 OGRErr  OGR_G_AddGeometryDirectly(OGRGeometryH , OGRGeometryH ) nothrow @nogc;
188 OGRErr  OGR_G_RemoveGeometry(OGRGeometryH , int , int ) nothrow @nogc;
189 
190 int  OGR_G_HasCurveGeometry(OGRGeometryH , int bLookForNonLinear) nothrow @nogc;
191 OGRGeometryH  OGR_G_GetLinearGeometry(OGRGeometryH hGeom, double dfMaxAngleStepSizeDegrees, char **papszOptions) nothrow @nogc;
192 OGRGeometryH  OGR_G_GetCurveGeometry(OGRGeometryH hGeom, char **papszOptions) nothrow @nogc;
193 
194 OGRGeometryH  OGRBuildPolygonFromEdges(OGRGeometryH hLinesAsCollection, int bBestEffort, int bAutoClose, double dfTolerance, OGRErr *peErr) nothrow @nogc;
195 
196 OGRErr  OGRSetGenerate_DB2_V72_BYTE_ORDER(int bGenerate_DB2_V72_BYTE_ORDER) nothrow @nogc;
197 
198 int  OGRGetGenerate_DB2_V72_BYTE_ORDER() nothrow @nogc;
199 
200 void  OGRSetNonLinearGeometriesEnabledFlag(int bFlag) nothrow @nogc;
201 int  OGRGetNonLinearGeometriesEnabledFlag() nothrow @nogc;
202 
203 /* -------------------------------------------------------------------- */
204 /*      Feature related (ogr_feature.h)                                 */
205 /* -------------------------------------------------------------------- */
206 
207 alias void* OGRFieldDefnH;
208 alias void* OGRFeatureDefnH;
209 alias void* OGRFeatureH;
210 alias void* OGRStyleTableH;
211 //alias OGRGeomFieldDefnHS *OGRGeomFieldDefnH;
212 alias void* OGRGeomFieldDefnH;
213 
214 /* OGRFieldDefn */
215 
216 OGRFieldDefnH  OGR_Fld_Create(const(char) *, OGRFieldType ) nothrow @nogc;
217 void  OGR_Fld_Destroy(OGRFieldDefnH ) nothrow @nogc;
218 
219 void  OGR_Fld_SetName(OGRFieldDefnH , const(char) *) nothrow @nogc;
220 const(char) * OGR_Fld_GetNameRef(OGRFieldDefnH ) nothrow @nogc;
221 OGRFieldType  OGR_Fld_GetType(OGRFieldDefnH ) nothrow @nogc;
222 void  OGR_Fld_SetType(OGRFieldDefnH , OGRFieldType ) nothrow @nogc;
223 OGRFieldSubType  OGR_Fld_GetSubType(OGRFieldDefnH ) nothrow @nogc;
224 void  OGR_Fld_SetSubType(OGRFieldDefnH , OGRFieldSubType ) nothrow @nogc;
225 OGRJustification  OGR_Fld_GetJustify(OGRFieldDefnH ) nothrow @nogc;
226 void  OGR_Fld_SetJustify(OGRFieldDefnH , OGRJustification ) nothrow @nogc;
227 int  OGR_Fld_GetWidth(OGRFieldDefnH ) nothrow @nogc;
228 void  OGR_Fld_SetWidth(OGRFieldDefnH , int ) nothrow @nogc;
229 int  OGR_Fld_GetPrecision(OGRFieldDefnH ) nothrow @nogc;
230 void  OGR_Fld_SetPrecision(OGRFieldDefnH , int ) nothrow @nogc;
231 void  OGR_Fld_Set(OGRFieldDefnH , const(char) *, OGRFieldType , int , int , OGRJustification ) nothrow @nogc;
232 int  OGR_Fld_IsIgnored(OGRFieldDefnH hDefn) nothrow @nogc;
233 void  OGR_Fld_SetIgnored(OGRFieldDefnH hDefn, int ) nothrow @nogc;
234 int  OGR_Fld_IsNullable(OGRFieldDefnH hDefn) nothrow @nogc;
235 void  OGR_Fld_SetNullable(OGRFieldDefnH hDefn, int ) nothrow @nogc;
236 const(char) * OGR_Fld_GetDefault(OGRFieldDefnH hDefn) nothrow @nogc;
237 void  OGR_Fld_SetDefault(OGRFieldDefnH hDefn, const(char) *) nothrow @nogc;
238 int  OGR_Fld_IsDefaultDriverSpecific(OGRFieldDefnH hDefn) nothrow @nogc;
239 
240 const(char) * OGR_GetFieldTypeName(OGRFieldType ) nothrow @nogc;
241 const(char) * OGR_GetFieldSubTypeName(OGRFieldSubType ) nothrow @nogc;
242 int  OGR_AreTypeSubTypeCompatible(OGRFieldType eType, OGRFieldSubType eSubType) nothrow @nogc;
243 
244 /* OGRGeomFieldDefnH */
245 
246 OGRGeomFieldDefnH  OGR_GFld_Create(const(char) *, OGRwkbGeometryType ) nothrow @nogc;
247 void  OGR_GFld_Destroy(OGRGeomFieldDefnH ) nothrow @nogc;
248 
249 void  OGR_GFld_SetName(OGRGeomFieldDefnH , const(char) *) nothrow @nogc;
250 const(char) * OGR_GFld_GetNameRef(OGRGeomFieldDefnH ) nothrow @nogc;
251 
252 OGRwkbGeometryType  OGR_GFld_GetType(OGRGeomFieldDefnH ) nothrow @nogc;
253 void  OGR_GFld_SetType(OGRGeomFieldDefnH , OGRwkbGeometryType ) nothrow @nogc;
254 
255 OGRSpatialReferenceH  OGR_GFld_GetSpatialRef(OGRGeomFieldDefnH ) nothrow @nogc;
256 void  OGR_GFld_SetSpatialRef(OGRGeomFieldDefnH , OGRSpatialReferenceH hSRS) nothrow @nogc;
257 
258 int  OGR_GFld_IsNullable(OGRGeomFieldDefnH hDefn) nothrow @nogc;
259 void  OGR_GFld_SetNullable(OGRGeomFieldDefnH hDefn, int ) nothrow @nogc;
260 
261 int  OGR_GFld_IsIgnored(OGRGeomFieldDefnH hDefn) nothrow @nogc;
262 void  OGR_GFld_SetIgnored(OGRGeomFieldDefnH hDefn, int ) nothrow @nogc;
263 
264 /* OGRFeatureDefn */
265 
266 OGRFeatureDefnH  OGR_FD_Create(const(char) *) nothrow @nogc;
267 void  OGR_FD_Destroy(OGRFeatureDefnH ) nothrow @nogc;
268 void  OGR_FD_Release(OGRFeatureDefnH ) nothrow @nogc;
269 const(char) * OGR_FD_GetName(OGRFeatureDefnH ) nothrow @nogc;
270 int  OGR_FD_GetFieldCount(OGRFeatureDefnH ) nothrow @nogc;
271 OGRFieldDefnH  OGR_FD_GetFieldDefn(OGRFeatureDefnH , int ) nothrow @nogc;
272 int  OGR_FD_GetFieldIndex(OGRFeatureDefnH , const(char) *) nothrow @nogc;
273 void  OGR_FD_AddFieldDefn(OGRFeatureDefnH , OGRFieldDefnH ) nothrow @nogc;
274 OGRErr  OGR_FD_DeleteFieldDefn(OGRFeatureDefnH hDefn, int iField) nothrow @nogc;
275 OGRErr  OGR_FD_ReorderFieldDefns(OGRFeatureDefnH hDefn, int *panMap) nothrow @nogc;
276 OGRwkbGeometryType  OGR_FD_GetGeomType(OGRFeatureDefnH ) nothrow @nogc;
277 void  OGR_FD_SetGeomType(OGRFeatureDefnH , OGRwkbGeometryType ) nothrow @nogc;
278 int  OGR_FD_IsGeometryIgnored(OGRFeatureDefnH ) nothrow @nogc;
279 void  OGR_FD_SetGeometryIgnored(OGRFeatureDefnH , int ) nothrow @nogc;
280 int  OGR_FD_IsStyleIgnored(OGRFeatureDefnH ) nothrow @nogc;
281 void  OGR_FD_SetStyleIgnored(OGRFeatureDefnH , int ) nothrow @nogc;
282 int  OGR_FD_Reference(OGRFeatureDefnH ) nothrow @nogc;
283 int  OGR_FD_Dereference(OGRFeatureDefnH ) nothrow @nogc;
284 int  OGR_FD_GetReferenceCount(OGRFeatureDefnH ) nothrow @nogc;
285 
286 int  OGR_FD_GetGeomFieldCount(OGRFeatureDefnH hFDefn) nothrow @nogc;
287 OGRGeomFieldDefnH  OGR_FD_GetGeomFieldDefn(OGRFeatureDefnH hFDefn, int i) nothrow @nogc;
288 int  OGR_FD_GetGeomFieldIndex(OGRFeatureDefnH hFDefn, const(char) *pszName) nothrow @nogc;
289 
290 void  OGR_FD_AddGeomFieldDefn(OGRFeatureDefnH hFDefn, OGRGeomFieldDefnH hGFldDefn) nothrow @nogc;
291 OGRErr  OGR_FD_DeleteGeomFieldDefn(OGRFeatureDefnH hFDefn, int iGeomField) nothrow @nogc;
292 int  OGR_FD_IsSame(OGRFeatureDefnH hFDefn, OGRFeatureDefnH hOtherFDefn) nothrow @nogc;
293 /* OGRFeature */
294 
295 OGRFeatureH  OGR_F_Create(OGRFeatureDefnH ) nothrow @nogc;
296 void  OGR_F_Destroy(OGRFeatureH ) nothrow @nogc;
297 OGRFeatureDefnH  OGR_F_GetDefnRef(OGRFeatureH ) nothrow @nogc;
298 
299 OGRErr  OGR_F_SetGeometryDirectly(OGRFeatureH , OGRGeometryH ) nothrow @nogc;
300 OGRErr  OGR_F_SetGeometry(OGRFeatureH , OGRGeometryH ) nothrow @nogc;
301 OGRGeometryH  OGR_F_GetGeometryRef(OGRFeatureH ) nothrow @nogc;
302 OGRGeometryH  OGR_F_StealGeometry(OGRFeatureH ) nothrow @nogc;
303 OGRFeatureH  OGR_F_Clone(OGRFeatureH ) nothrow @nogc;
304 int  OGR_F_Equal(OGRFeatureH , OGRFeatureH ) nothrow @nogc;
305 
306 int  OGR_F_GetFieldCount(OGRFeatureH ) nothrow @nogc;
307 OGRFieldDefnH  OGR_F_GetFieldDefnRef(OGRFeatureH , int ) nothrow @nogc;
308 int  OGR_F_GetFieldIndex(OGRFeatureH , const(char) *) nothrow @nogc;
309 
310 int  OGR_F_IsFieldSet(OGRFeatureH , int ) nothrow @nogc;
311 void  OGR_F_UnsetField(OGRFeatureH , int ) nothrow @nogc;
312 OGRField * OGR_F_GetRawFieldRef(OGRFeatureH , int ) nothrow @nogc;
313 
314 int  OGR_F_GetFieldAsInteger(OGRFeatureH , int ) nothrow @nogc;
315 GIntBig  OGR_F_GetFieldAsInteger64(OGRFeatureH , int ) nothrow @nogc;
316 double  OGR_F_GetFieldAsDouble(OGRFeatureH , int ) nothrow @nogc;
317 const(char) * OGR_F_GetFieldAsString(OGRFeatureH , int ) nothrow @nogc;
318 int * OGR_F_GetFieldAsIntegerList(OGRFeatureH , int , int *) nothrow @nogc;
319 GIntBig * OGR_F_GetFieldAsInteger64List(OGRFeatureH , int , int *) nothrow @nogc;
320 double * OGR_F_GetFieldAsDoubleList(OGRFeatureH , int , int *) nothrow @nogc;
321 char ** OGR_F_GetFieldAsStringList(OGRFeatureH , int ) nothrow @nogc;
322 GByte * OGR_F_GetFieldAsBinary(OGRFeatureH , int , int *) nothrow @nogc;
323 int  OGR_F_GetFieldAsDateTime(OGRFeatureH , int , int *, int *, int *, int *, int *, int *, int *) nothrow @nogc;
324 int  OGR_F_GetFieldAsDateTimeEx(OGRFeatureH hFeat, int iField, int *pnYear, int *pnMonth, int *pnDay, int *pnHour, int *pnMinute, float *pfSecond, int *pnTZFlag) nothrow @nogc;
325 
326 void  OGR_F_SetFieldInteger(OGRFeatureH , int , int ) nothrow @nogc;
327 void  OGR_F_SetFieldInteger64(OGRFeatureH , int , GIntBig ) nothrow @nogc;
328 void  OGR_F_SetFieldDouble(OGRFeatureH , int , double ) nothrow @nogc;
329 void  OGR_F_SetFieldString(OGRFeatureH , int , const(char) *) nothrow @nogc;
330 void  OGR_F_SetFieldIntegerList(OGRFeatureH , int , int , int *) nothrow @nogc;
331 void  OGR_F_SetFieldInteger64List(OGRFeatureH , int , int , GIntBig *) nothrow @nogc;
332 void  OGR_F_SetFieldDoubleList(OGRFeatureH , int , int , double *) nothrow @nogc;
333 void  OGR_F_SetFieldStringList(OGRFeatureH , int , char **) nothrow @nogc;
334 void  OGR_F_SetFieldRaw(OGRFeatureH , int , OGRField *) nothrow @nogc;
335 void  OGR_F_SetFieldBinary(OGRFeatureH , int , int , GByte *) nothrow @nogc;
336 void  OGR_F_SetFieldDateTime(OGRFeatureH , int , int , int , int , int , int , int , int ) nothrow @nogc;
337 void  OGR_F_SetFieldDateTimeEx(OGRFeatureH , int , int , int , int , int , int , float , int ) nothrow @nogc;
338 
339 int  OGR_F_GetGeomFieldCount(OGRFeatureH hFeat) nothrow @nogc;
340 OGRGeomFieldDefnH  OGR_F_GetGeomFieldDefnRef(OGRFeatureH hFeat, int iField) nothrow @nogc;
341 int  OGR_F_GetGeomFieldIndex(OGRFeatureH hFeat, const(char) *pszName) nothrow @nogc;
342 
343 OGRGeometryH  OGR_F_GetGeomFieldRef(OGRFeatureH hFeat, int iField) nothrow @nogc;
344 OGRErr  OGR_F_SetGeomFieldDirectly(OGRFeatureH hFeat, int iField, OGRGeometryH hGeom) nothrow @nogc;
345 OGRErr  OGR_F_SetGeomField(OGRFeatureH hFeat, int iField, OGRGeometryH hGeom) nothrow @nogc;
346 
347 GIntBig  OGR_F_GetFID(OGRFeatureH ) nothrow @nogc;
348 OGRErr  OGR_F_SetFID(OGRFeatureH , GIntBig ) nothrow @nogc;
349 void  OGR_F_DumpReadable(OGRFeatureH , FILE *) nothrow @nogc;
350 OGRErr  OGR_F_SetFrom(OGRFeatureH , OGRFeatureH , int ) nothrow @nogc;
351 OGRErr  OGR_F_SetFromWithMap(OGRFeatureH , OGRFeatureH , int , int *) nothrow @nogc;
352 
353 const(char) * OGR_F_GetStyleString(OGRFeatureH ) nothrow @nogc;
354 void  OGR_F_SetStyleString(OGRFeatureH , const(char) *) nothrow @nogc;
355 void  OGR_F_SetStyleStringDirectly(OGRFeatureH , char *) nothrow @nogc;
356 OGRStyleTableH  OGR_F_GetStyleTable(OGRFeatureH ) nothrow @nogc;
357 void  OGR_F_SetStyleTableDirectly(OGRFeatureH , OGRStyleTableH ) nothrow @nogc;
358 void  OGR_F_SetStyleTable(OGRFeatureH , OGRStyleTableH ) nothrow @nogc;
359 
360 const(char) * OGR_F_GetNativeData(OGRFeatureH ) nothrow @nogc;
361 void  OGR_F_SetNativeData(OGRFeatureH , const(char) *) nothrow @nogc;
362 const(char) * OGR_F_GetNativeMediaType(OGRFeatureH ) nothrow @nogc;
363 void  OGR_F_SetNativeMediaType(OGRFeatureH , const(char) *) nothrow @nogc;
364 
365 void  OGR_F_FillUnsetWithDefault(OGRFeatureH hFeat, int bNotNullableOnly, char **papszOptions) nothrow @nogc;
366 int  OGR_F_Validate(OGRFeatureH , int nValidateFlags, int bEmitError) nothrow @nogc;
367 
368 /* -------------------------------------------------------------------- */
369 /*      ogrsf_frmts.h                                                   */
370 /* -------------------------------------------------------------------- */
371 
372 alias void *OGRLayerH;
373 alias void *OGRDataSourceH;
374 alias void *OGRSFDriverH;
375 
376 /* OGRLayer */
377 
378 const(char) * OGR_L_GetName(OGRLayerH ) nothrow @nogc;
379 OGRwkbGeometryType  OGR_L_GetGeomType(OGRLayerH ) nothrow @nogc;
380 OGRGeometryH  OGR_L_GetSpatialFilter(OGRLayerH ) nothrow @nogc;
381 void  OGR_L_SetSpatialFilter(OGRLayerH , OGRGeometryH ) nothrow @nogc;
382 void  OGR_L_SetSpatialFilterRect(OGRLayerH , double , double , double , double ) nothrow @nogc;
383 void  OGR_L_SetSpatialFilterEx(OGRLayerH , int iGeomField, OGRGeometryH hGeom) nothrow @nogc;
384 void  OGR_L_SetSpatialFilterRectEx(OGRLayerH , int iGeomField, double dfMinX, double dfMinY, double dfMaxX, double dfMaxY) nothrow @nogc;
385 OGRErr  OGR_L_SetAttributeFilter(OGRLayerH , const(char) *) nothrow @nogc;
386 void  OGR_L_ResetReading(OGRLayerH ) nothrow @nogc;
387 OGRFeatureH  OGR_L_GetNextFeature(OGRLayerH ) nothrow @nogc;
388 OGRErr  OGR_L_SetNextByIndex(OGRLayerH , GIntBig ) nothrow @nogc;
389 OGRFeatureH  OGR_L_GetFeature(OGRLayerH , GIntBig ) nothrow @nogc;
390 OGRErr  OGR_L_SetFeature(OGRLayerH , OGRFeatureH ) nothrow @nogc;
391 OGRErr  OGR_L_CreateFeature(OGRLayerH , OGRFeatureH ) nothrow @nogc;
392 OGRErr  OGR_L_DeleteFeature(OGRLayerH , GIntBig ) nothrow @nogc;
393 OGRFeatureDefnH  OGR_L_GetLayerDefn(OGRLayerH ) nothrow @nogc;
394 OGRSpatialReferenceH  OGR_L_GetSpatialRef(OGRLayerH ) nothrow @nogc;
395 int  OGR_L_FindFieldIndex(OGRLayerH , const(char) *, int bExactMatch) nothrow @nogc;
396 GIntBig  OGR_L_GetFeatureCount(OGRLayerH , int ) nothrow @nogc;
397 OGRErr  OGR_L_GetExtent(OGRLayerH , OGREnvelope *, int ) nothrow @nogc;
398 OGRErr  OGR_L_GetExtentEx(OGRLayerH , int iGeomField, OGREnvelope *psExtent, int bForce) nothrow @nogc;
399 int  OGR_L_TestCapability(OGRLayerH , const(char) *) nothrow @nogc;
400 OGRErr  OGR_L_CreateField(OGRLayerH , OGRFieldDefnH , int ) nothrow @nogc;
401 OGRErr  OGR_L_CreateGeomField(OGRLayerH hLayer, OGRGeomFieldDefnH hFieldDefn, int bForce) nothrow @nogc;
402 OGRErr  OGR_L_DeleteField(OGRLayerH , int iField) nothrow @nogc;
403 OGRErr  OGR_L_ReorderFields(OGRLayerH , int *panMap) nothrow @nogc;
404 OGRErr  OGR_L_ReorderField(OGRLayerH , int iOldFieldPos, int iNewFieldPos) nothrow @nogc;
405 OGRErr  OGR_L_AlterFieldDefn(OGRLayerH , int iField, OGRFieldDefnH hNewFieldDefn, int nFlags) nothrow @nogc;
406 OGRErr  OGR_L_StartTransaction(OGRLayerH ) nothrow @nogc;
407 OGRErr  OGR_L_CommitTransaction(OGRLayerH ) nothrow @nogc;
408 OGRErr  OGR_L_RollbackTransaction(OGRLayerH ) nothrow @nogc;
409 int  OGR_L_Reference(OGRLayerH ) nothrow @nogc;
410 int  OGR_L_Dereference(OGRLayerH ) nothrow @nogc;
411 int  OGR_L_GetRefCount(OGRLayerH ) nothrow @nogc;
412 OGRErr  OGR_L_SyncToDisk(OGRLayerH ) nothrow @nogc;
413 GIntBig  OGR_L_GetFeaturesRead(OGRLayerH ) nothrow @nogc;
414 const(char) * OGR_L_GetFIDColumn(OGRLayerH ) nothrow @nogc;
415 const(char) * OGR_L_GetGeometryColumn(OGRLayerH ) nothrow @nogc;
416 OGRStyleTableH  OGR_L_GetStyleTable(OGRLayerH ) nothrow @nogc;
417 void  OGR_L_SetStyleTableDirectly(OGRLayerH , OGRStyleTableH ) nothrow @nogc;
418 void  OGR_L_SetStyleTable(OGRLayerH , OGRStyleTableH ) nothrow @nogc;
419 OGRErr  OGR_L_SetIgnoredFields(OGRLayerH , const(char*)*) nothrow @nogc;
420 OGRErr  OGR_L_Intersection(OGRLayerH , OGRLayerH , OGRLayerH , char **, GDALProgressFunc , void *) nothrow @nogc;
421 OGRErr  OGR_L_Union(OGRLayerH , OGRLayerH , OGRLayerH , char **, GDALProgressFunc , void *) nothrow @nogc;
422 OGRErr  OGR_L_SymDifference(OGRLayerH , OGRLayerH , OGRLayerH , char **, GDALProgressFunc , void *) nothrow @nogc;
423 OGRErr  OGR_L_Identity(OGRLayerH , OGRLayerH , OGRLayerH , char **, GDALProgressFunc , void *) nothrow @nogc;
424 OGRErr  OGR_L_Update(OGRLayerH , OGRLayerH , OGRLayerH , char **, GDALProgressFunc , void *) nothrow @nogc;
425 OGRErr  OGR_L_Clip(OGRLayerH , OGRLayerH , OGRLayerH , char **, GDALProgressFunc , void *) nothrow @nogc;
426 OGRErr  OGR_L_Erase(OGRLayerH , OGRLayerH , OGRLayerH , char **, GDALProgressFunc , void *) nothrow @nogc;
427 
428 /* OGRDataSource */
429 
430 void  OGR_DS_Destroy(OGRDataSourceH ) nothrow @nogc;
431 const(char) * OGR_DS_GetName(OGRDataSourceH ) nothrow @nogc;
432 int  OGR_DS_GetLayerCount(OGRDataSourceH ) nothrow @nogc;
433 OGRLayerH  OGR_DS_GetLayer(OGRDataSourceH , int ) nothrow @nogc;
434 OGRLayerH  OGR_DS_GetLayerByName(OGRDataSourceH , const(char) *) nothrow @nogc;
435 OGRErr  OGR_DS_DeleteLayer(OGRDataSourceH , int ) nothrow @nogc;
436 OGRSFDriverH  OGR_DS_GetDriver(OGRDataSourceH ) nothrow @nogc;
437 OGRLayerH  OGR_DS_CreateLayer(OGRDataSourceH , const(char) *, OGRSpatialReferenceH , OGRwkbGeometryType , char **) nothrow @nogc;
438 OGRLayerH  OGR_DS_CopyLayer(OGRDataSourceH , OGRLayerH , const(char) *, char **) nothrow @nogc;
439 int  OGR_DS_TestCapability(OGRDataSourceH , const(char) *) nothrow @nogc;
440 OGRLayerH  OGR_DS_ExecuteSQL(OGRDataSourceH , const(char) *, OGRGeometryH , const(char) *) nothrow @nogc;
441 void  OGR_DS_ReleaseResultSet(OGRDataSourceH , OGRLayerH ) nothrow @nogc;
442 int  OGR_DS_Reference(OGRDataSourceH ) nothrow @nogc;
443 int  OGR_DS_Dereference(OGRDataSourceH ) nothrow @nogc;
444 int  OGR_DS_GetRefCount(OGRDataSourceH ) nothrow @nogc;
445 int  OGR_DS_GetSummaryRefCount(OGRDataSourceH ) nothrow @nogc;
446 OGRErr  OGR_DS_SyncToDisk(OGRDataSourceH ) nothrow @nogc;
447 OGRStyleTableH  OGR_DS_GetStyleTable(OGRDataSourceH ) nothrow @nogc;
448 void  OGR_DS_SetStyleTableDirectly(OGRDataSourceH , OGRStyleTableH ) nothrow @nogc;
449 void  OGR_DS_SetStyleTable(OGRDataSourceH , OGRStyleTableH ) nothrow @nogc;
450 
451 /* OGRSFDriver */
452 
453 const(char) * OGR_Dr_GetName(OGRSFDriverH ) nothrow @nogc;
454 OGRDataSourceH  OGR_Dr_Open(OGRSFDriverH , const(char) *, int ) nothrow @nogc;
455 int  OGR_Dr_TestCapability(OGRSFDriverH , const(char) *) nothrow @nogc;
456 OGRDataSourceH  OGR_Dr_CreateDataSource(OGRSFDriverH , const(char) *, char **) nothrow @nogc;
457 OGRDataSourceH  OGR_Dr_CopyDataSource(OGRSFDriverH , OGRDataSourceH , const(char) *, char **) nothrow @nogc;
458 OGRErr  OGR_Dr_DeleteDataSource(OGRSFDriverH , const(char) *) nothrow @nogc;
459 
460 /* OGRSFDriverRegistrar */
461 
462 OGRDataSourceH  OGROpen(const(char) *, int , OGRSFDriverH *) nothrow @nogc;
463 OGRDataSourceH  OGROpenShared(const(char) *, int , OGRSFDriverH *) nothrow @nogc;
464 OGRErr  OGRReleaseDataSource(OGRDataSourceH ) nothrow @nogc;
465 void  OGRRegisterDriver(OGRSFDriverH ) nothrow @nogc;
466 void  OGRDeregisterDriver(OGRSFDriverH ) nothrow @nogc;
467 int  OGRGetDriverCount() nothrow @nogc;
468 OGRSFDriverH  OGRGetDriver(int ) nothrow @nogc;
469 OGRSFDriverH  OGRGetDriverByName(const(char) *) nothrow @nogc;
470 int  OGRGetOpenDSCount() nothrow @nogc;
471 OGRDataSourceH  OGRGetOpenDS(int iDS) nothrow @nogc;
472 
473 
474 /* note: this is also declared in ogrsf_frmts.h */
475 void  OGRRegisterAll() nothrow @nogc;
476 void  OGRCleanupAll() nothrow @nogc;
477 
478 /* -------------------------------------------------------------------- */
479 /*      ogrsf_featurestyle.h                                            */
480 /* -------------------------------------------------------------------- */
481 
482 alias void *OGRStyleMgrH;
483 alias void *OGRStyleToolH;
484 
485 /* OGRStyleMgr */
486 
487 OGRStyleMgrH  OGR_SM_Create(OGRStyleTableH hStyleTable) nothrow @nogc;
488 void  OGR_SM_Destroy(OGRStyleMgrH hSM) nothrow @nogc;
489 
490 const(char) * OGR_SM_InitFromFeature(OGRStyleMgrH hSM, OGRFeatureH hFeat) nothrow @nogc;
491 int  OGR_SM_InitStyleString(OGRStyleMgrH hSM, const(char) *pszStyleString) nothrow @nogc;
492 int  OGR_SM_GetPartCount(OGRStyleMgrH hSM, const(char) *pszStyleString) nothrow @nogc;
493 OGRStyleToolH  OGR_SM_GetPart(OGRStyleMgrH hSM, int nPartId, const(char) *pszStyleString) nothrow @nogc;
494 int  OGR_SM_AddPart(OGRStyleMgrH hSM, OGRStyleToolH hST) nothrow @nogc;
495 int  OGR_SM_AddStyle(OGRStyleMgrH hSM, const(char) *pszStyleName, const(char) *pszStyleString) nothrow @nogc;
496 
497 /* OGRStyleTool */
498 
499 OGRStyleToolH  OGR_ST_Create(OGRSTClassId eClassId) nothrow @nogc;
500 void  OGR_ST_Destroy(OGRStyleToolH hST) nothrow @nogc;
501 
502 OGRSTClassId  OGR_ST_GetType(OGRStyleToolH hST) nothrow @nogc;
503 
504 OGRSTUnitId  OGR_ST_GetUnit(OGRStyleToolH hST) nothrow @nogc;
505 void  OGR_ST_SetUnit(OGRStyleToolH hST, OGRSTUnitId eUnit, double dfGroundPaperScale) nothrow @nogc;
506 
507 const(char) * OGR_ST_GetParamStr(OGRStyleToolH hST, int eParam, int *bValueIsNull) nothrow @nogc;
508 int  OGR_ST_GetParamNum(OGRStyleToolH hST, int eParam, int *bValueIsNull) nothrow @nogc;
509 double  OGR_ST_GetParamDbl(OGRStyleToolH hST, int eParam, int *bValueIsNull) nothrow @nogc;
510 void  OGR_ST_SetParamStr(OGRStyleToolH hST, int eParam, const(char) *pszValue) nothrow @nogc;
511 void  OGR_ST_SetParamNum(OGRStyleToolH hST, int eParam, int nValue) nothrow @nogc;
512 void  OGR_ST_SetParamDbl(OGRStyleToolH hST, int eParam, double dfValue) nothrow @nogc;
513 const(char) * OGR_ST_GetStyleString(OGRStyleToolH hST) nothrow @nogc;
514 
515 int  OGR_ST_GetRGBFromString(OGRStyleToolH hST, const(char) *pszColor, int *pnRed, int *pnGreen, int *pnBlue, int *pnAlpha) nothrow @nogc;
516 
517 /* OGRStyleTable */
518 
519 OGRStyleTableH  OGR_STBL_Create() nothrow @nogc;
520 void  OGR_STBL_Destroy(OGRStyleTableH hSTBL) nothrow @nogc;
521 int  OGR_STBL_AddStyle(OGRStyleTableH hStyleTable, const(char) *pszName, const(char) *pszStyleString) nothrow @nogc;
522 int  OGR_STBL_SaveStyleTable(OGRStyleTableH hStyleTable, const(char) *pszFilename) nothrow @nogc;
523 int  OGR_STBL_LoadStyleTable(OGRStyleTableH hStyleTable, const(char) *pszFilename) nothrow @nogc;
524 const(char) * OGR_STBL_Find(OGRStyleTableH hStyleTable, char *pszName) nothrow @nogc;
525 void  OGR_STBL_ResetStyleStringReading(OGRStyleTableH hStyleTable) nothrow @nogc;
526 const(char) * OGR_STBL_GetNextStyle(OGRStyleTableH hStyleTable) nothrow @nogc;
527 const(char) * OGR_STBL_GetLastStyleName(OGRStyleTableH hStyleTable) nothrow @nogc;