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