OGR
ogr_api.h
Go to the documentation of this file.
1 /******************************************************************************
2  * $Id: ogr_api.h 28900 2015-04-14 09:40:34Z rouault $
3  *
4  * Project: OpenGIS Simple Features Reference Implementation
5  * Purpose: C API for OGR Geometry, Feature, Layers, DataSource and drivers.
6  * Author: Frank Warmerdam, warmerdam@pobox.com
7  *
8  ******************************************************************************
9  * Copyright (c) 2002, Frank Warmerdam
10  * Copyright (c) 2008-2013, Even Rouault <even dot rouault at mines-paris dot org>
11  *
12  * Permission is hereby granted, free of charge, to any person obtaining a
13  * copy of this software and associated documentation files (the "Software"),
14  * to deal in the Software without restriction, including without limitation
15  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16  * and/or sell copies of the Software, and to permit persons to whom the
17  * Software is furnished to do so, subject to the following conditions:
18  *
19  * The above copyright notice and this permission notice shall be included
20  * in all copies or substantial portions of the Software.
21  *
22  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
28  * DEALINGS IN THE SOFTWARE.
29  ****************************************************************************/
30 
31 #ifndef OGR_API_H_INCLUDED
32 #define OGR_API_H_INCLUDED
33 
43 #include "cpl_progress.h"
44 #include "cpl_minixml.h"
45 #include "ogr_core.h"
46 
47 CPL_C_START
48 
49 /* -------------------------------------------------------------------- */
50 /* Geometry related functions (ogr_geometry.h) */
51 /* -------------------------------------------------------------------- */
52 #ifdef DEBUG
53 typedef struct OGRGeometryHS *OGRGeometryH;
54 #else
55 typedef void *OGRGeometryH;
56 #endif
57 
58 #ifndef _DEFINED_OGRSpatialReferenceH
59 #define _DEFINED_OGRSpatialReferenceH
60 
61 #ifdef DEBUG
62 typedef struct OGRSpatialReferenceHS *OGRSpatialReferenceH;
63 typedef struct OGRCoordinateTransformationHS *OGRCoordinateTransformationH;
64 #else
65 typedef void *OGRSpatialReferenceH;
66 typedef void *OGRCoordinateTransformationH;
67 #endif
68 
69 #endif
70 
71 struct _CPLXMLNode;
72 
73 /* From base OGRGeometry class */
74 
75 OGRErr CPL_DLL OGR_G_CreateFromWkb( unsigned char *, OGRSpatialReferenceH,
76  OGRGeometryH *, int );
77 OGRErr CPL_DLL OGR_G_CreateFromWkt( char **, OGRSpatialReferenceH,
78  OGRGeometryH * );
79 OGRErr CPL_DLL OGR_G_CreateFromFgf( unsigned char *, OGRSpatialReferenceH,
80  OGRGeometryH *, int, int * );
81 void CPL_DLL OGR_G_DestroyGeometry( OGRGeometryH );
82 OGRGeometryH CPL_DLL OGR_G_CreateGeometry( OGRwkbGeometryType );
83 OGRGeometryH CPL_DLL
85  double dfCenterX, double dfCenterY, double dfZ,
86  double dfPrimaryRadius, double dfSecondaryAxis, double dfRotation,
87  double dfStartAngle, double dfEndAngle,
88  double dfMaxAngleStepSizeDegrees );
89 
90 OGRGeometryH CPL_DLL OGR_G_ForceToPolygon( OGRGeometryH );
91 OGRGeometryH CPL_DLL OGR_G_ForceToLineString( OGRGeometryH );
92 OGRGeometryH CPL_DLL OGR_G_ForceToMultiPolygon( OGRGeometryH );
93 OGRGeometryH CPL_DLL OGR_G_ForceToMultiPoint( OGRGeometryH );
94 OGRGeometryH CPL_DLL OGR_G_ForceToMultiLineString( OGRGeometryH );
95 OGRGeometryH CPL_DLL OGR_G_ForceTo( OGRGeometryH hGeom,
96  OGRwkbGeometryType eTargetType,
97  char** papszOptions );
98 
99 int CPL_DLL OGR_G_GetDimension( OGRGeometryH );
100 int CPL_DLL OGR_G_GetCoordinateDimension( OGRGeometryH );
101 void CPL_DLL OGR_G_SetCoordinateDimension( OGRGeometryH, int );
102 OGRGeometryH CPL_DLL OGR_G_Clone( OGRGeometryH );
103 void CPL_DLL OGR_G_GetEnvelope( OGRGeometryH, OGREnvelope * );
104 void CPL_DLL OGR_G_GetEnvelope3D( OGRGeometryH, OGREnvelope3D * );
105 OGRErr CPL_DLL OGR_G_ImportFromWkb( OGRGeometryH, unsigned char *, int );
106 OGRErr CPL_DLL OGR_G_ExportToWkb( OGRGeometryH, OGRwkbByteOrder, unsigned char*);
107 OGRErr CPL_DLL OGR_G_ExportToIsoWkb( OGRGeometryH, OGRwkbByteOrder, unsigned char*);
108 int CPL_DLL OGR_G_WkbSize( OGRGeometryH hGeom );
109 OGRErr CPL_DLL OGR_G_ImportFromWkt( OGRGeometryH, char ** );
110 OGRErr CPL_DLL OGR_G_ExportToWkt( OGRGeometryH, char ** );
111 OGRErr CPL_DLL OGR_G_ExportToIsoWkt( OGRGeometryH, char ** );
112 OGRwkbGeometryType CPL_DLL OGR_G_GetGeometryType( OGRGeometryH );
113 const char CPL_DLL *OGR_G_GetGeometryName( OGRGeometryH );
114 void CPL_DLL OGR_G_DumpReadable( OGRGeometryH, FILE *, const char * );
115 void CPL_DLL OGR_G_FlattenTo2D( OGRGeometryH );
116 void CPL_DLL OGR_G_CloseRings( OGRGeometryH );
117 
118 OGRGeometryH CPL_DLL OGR_G_CreateFromGML( const char * );
119 char CPL_DLL *OGR_G_ExportToGML( OGRGeometryH );
120 char CPL_DLL *OGR_G_ExportToGMLEx( OGRGeometryH, char** papszOptions );
121 
122 OGRGeometryH CPL_DLL OGR_G_CreateFromGMLTree( const CPLXMLNode * );
123 CPLXMLNode CPL_DLL *OGR_G_ExportToGMLTree( OGRGeometryH );
124 CPLXMLNode CPL_DLL *OGR_G_ExportEnvelopeToGMLTree( OGRGeometryH );
125 
126 char CPL_DLL *OGR_G_ExportToKML( OGRGeometryH, const char* pszAltitudeMode );
127 
128 char CPL_DLL *OGR_G_ExportToJson( OGRGeometryH );
129 char CPL_DLL *OGR_G_ExportToJsonEx( OGRGeometryH, char** papszOptions );
130 OGRGeometryH CPL_DLL OGR_G_CreateGeometryFromJson( const char* );
131 
132 void CPL_DLL OGR_G_AssignSpatialReference( OGRGeometryH,
133  OGRSpatialReferenceH );
134 OGRSpatialReferenceH CPL_DLL OGR_G_GetSpatialReference( OGRGeometryH );
135 OGRErr CPL_DLL OGR_G_Transform( OGRGeometryH, OGRCoordinateTransformationH );
136 OGRErr CPL_DLL OGR_G_TransformTo( OGRGeometryH, OGRSpatialReferenceH );
137 
138 OGRGeometryH CPL_DLL OGR_G_Simplify( OGRGeometryH hThis, double tolerance );
139 OGRGeometryH CPL_DLL OGR_G_SimplifyPreserveTopology( OGRGeometryH hThis, double tolerance );
140 
141 void CPL_DLL OGR_G_Segmentize(OGRGeometryH hGeom, double dfMaxLength );
142 int CPL_DLL OGR_G_Intersects( OGRGeometryH, OGRGeometryH );
143 int CPL_DLL OGR_G_Equals( OGRGeometryH, OGRGeometryH );
144 /*int CPL_DLL OGR_G_EqualsExact( OGRGeometryH, OGRGeometryH, double );*/
145 int CPL_DLL OGR_G_Disjoint( OGRGeometryH, OGRGeometryH );
146 int CPL_DLL OGR_G_Touches( OGRGeometryH, OGRGeometryH );
147 int CPL_DLL OGR_G_Crosses( OGRGeometryH, OGRGeometryH );
148 int CPL_DLL OGR_G_Within( OGRGeometryH, OGRGeometryH );
149 int CPL_DLL OGR_G_Contains( OGRGeometryH, OGRGeometryH );
150 int CPL_DLL OGR_G_Overlaps( OGRGeometryH, OGRGeometryH );
151 
152 OGRGeometryH CPL_DLL OGR_G_Boundary( OGRGeometryH );
153 OGRGeometryH CPL_DLL OGR_G_ConvexHull( OGRGeometryH );
154 OGRGeometryH CPL_DLL OGR_G_Buffer( OGRGeometryH, double, int );
155 OGRGeometryH CPL_DLL OGR_G_Intersection( OGRGeometryH, OGRGeometryH );
156 OGRGeometryH CPL_DLL OGR_G_Union( OGRGeometryH, OGRGeometryH );
157 OGRGeometryH CPL_DLL OGR_G_UnionCascaded( OGRGeometryH );
158 OGRGeometryH CPL_DLL OGR_G_PointOnSurface( OGRGeometryH );
159 /*OGRGeometryH CPL_DLL OGR_G_Polygonize( OGRGeometryH *, int);*/
160 /*OGRGeometryH CPL_DLL OGR_G_Polygonizer_getCutEdges( OGRGeometryH *, int);*/
161 /*OGRGeometryH CPL_DLL OGR_G_LineMerge( OGRGeometryH );*/
162 
163 OGRGeometryH CPL_DLL OGR_G_Difference( OGRGeometryH, OGRGeometryH );
164 OGRGeometryH CPL_DLL OGR_G_SymDifference( OGRGeometryH, OGRGeometryH );
165 double CPL_DLL OGR_G_Distance( OGRGeometryH, OGRGeometryH );
166 double CPL_DLL OGR_G_Length( OGRGeometryH );
167 double CPL_DLL OGR_G_Area( OGRGeometryH );
168 int CPL_DLL OGR_G_Centroid( OGRGeometryH, OGRGeometryH );
169 OGRGeometryH CPL_DLL OGR_G_Value( OGRGeometryH, double dfDistance );
170 
171 void CPL_DLL OGR_G_Empty( OGRGeometryH );
172 int CPL_DLL OGR_G_IsEmpty( OGRGeometryH );
173 int CPL_DLL OGR_G_IsValid( OGRGeometryH );
174 /*char CPL_DLL *OGR_G_IsValidReason( OGRGeometryH );*/
175 int CPL_DLL OGR_G_IsSimple( OGRGeometryH );
176 int CPL_DLL OGR_G_IsRing( OGRGeometryH );
177 
178 OGRGeometryH CPL_DLL OGR_G_Polygonize( OGRGeometryH );
179 
180 /* backward compatibility (non-standard methods) */
181 int CPL_DLL OGR_G_Intersect( OGRGeometryH, OGRGeometryH ) CPL_WARN_DEPRECATED("Non standard method. Use OGR_G_Intersects() instead");
182 int CPL_DLL OGR_G_Equal( OGRGeometryH, OGRGeometryH ) CPL_WARN_DEPRECATED("Non standard method. Use OGR_G_Equals() instead");
183 OGRGeometryH CPL_DLL OGR_G_SymmetricDifference( OGRGeometryH, OGRGeometryH ) CPL_WARN_DEPRECATED("Non standard method. Use OGR_G_SymDifference() instead");
184 double CPL_DLL OGR_G_GetArea( OGRGeometryH ) CPL_WARN_DEPRECATED("Non standard method. Use OGR_G_Area() instead");
185 OGRGeometryH CPL_DLL OGR_G_GetBoundary( OGRGeometryH ) CPL_WARN_DEPRECATED("Non standard method. Use OGR_G_Boundary() instead");
186 
187 /* Methods for getting/setting vertices in points, line strings and rings */
188 int CPL_DLL OGR_G_GetPointCount( OGRGeometryH );
189 int CPL_DLL OGR_G_GetPoints( OGRGeometryH hGeom,
190  void* pabyX, int nXStride,
191  void* pabyY, int nYStride,
192  void* pabyZ, int nZStride);
193 double CPL_DLL OGR_G_GetX( OGRGeometryH, int );
194 double CPL_DLL OGR_G_GetY( OGRGeometryH, int );
195 double CPL_DLL OGR_G_GetZ( OGRGeometryH, int );
196 void CPL_DLL OGR_G_GetPoint( OGRGeometryH, int iPoint,
197  double *, double *, double * );
198 void CPL_DLL OGR_G_SetPointCount( OGRGeometryH hGeom, int nNewPointCount );
199 void CPL_DLL OGR_G_SetPoint( OGRGeometryH, int iPoint,
200  double, double, double );
201 void CPL_DLL OGR_G_SetPoint_2D( OGRGeometryH, int iPoint,
202  double, double );
203 void CPL_DLL OGR_G_AddPoint( OGRGeometryH, double, double, double );
204 void CPL_DLL OGR_G_AddPoint_2D( OGRGeometryH, double, double );
205 void CPL_DLL OGR_G_SetPoints( OGRGeometryH hGeom, int nPointsIn,
206  void* pabyX, int nXStride,
207  void* pabyY, int nYStride,
208  void* pabyZ, int nZStride );
209 
210 /* Methods for getting/setting rings and members collections */
211 
212 int CPL_DLL OGR_G_GetGeometryCount( OGRGeometryH );
213 OGRGeometryH CPL_DLL OGR_G_GetGeometryRef( OGRGeometryH, int );
214 OGRErr CPL_DLL OGR_G_AddGeometry( OGRGeometryH, OGRGeometryH );
215 OGRErr CPL_DLL OGR_G_AddGeometryDirectly( OGRGeometryH, OGRGeometryH );
216 OGRErr CPL_DLL OGR_G_RemoveGeometry( OGRGeometryH, int, int );
217 
218 int CPL_DLL OGR_G_HasCurveGeometry( OGRGeometryH, int bLookForNonLinear );
219 OGRGeometryH CPL_DLL OGR_G_GetLinearGeometry( OGRGeometryH hGeom,
220  double dfMaxAngleStepSizeDegrees,
221  char** papszOptions);
222 OGRGeometryH CPL_DLL OGR_G_GetCurveGeometry( OGRGeometryH hGeom,
223  char** papszOptions );
224 
225 OGRGeometryH CPL_DLL OGRBuildPolygonFromEdges( OGRGeometryH hLinesAsCollection,
226  int bBestEffort,
227  int bAutoClose,
228  double dfTolerance,
229  OGRErr * peErr );
230 
231 OGRErr CPL_DLL OGRSetGenerate_DB2_V72_BYTE_ORDER(
232  int bGenerate_DB2_V72_BYTE_ORDER );
233 
234 int CPL_DLL OGRGetGenerate_DB2_V72_BYTE_ORDER(void);
235 
236 void CPL_DLL OGRSetNonLinearGeometriesEnabledFlag(int bFlag);
237 int CPL_DLL OGRGetNonLinearGeometriesEnabledFlag(void);
238 
239 /* -------------------------------------------------------------------- */
240 /* Feature related (ogr_feature.h) */
241 /* -------------------------------------------------------------------- */
242 
243 #ifdef DEBUG
244 typedef struct OGRFieldDefnHS *OGRFieldDefnH;
245 typedef struct OGRFeatureDefnHS *OGRFeatureDefnH;
246 typedef struct OGRFeatureHS *OGRFeatureH;
247 typedef struct OGRStyleTableHS *OGRStyleTableH;
248 #else
249 typedef void *OGRFieldDefnH;
250 typedef void *OGRFeatureDefnH;
251 typedef void *OGRFeatureH;
252 typedef void *OGRStyleTableH;
253 #endif
254 typedef struct OGRGeomFieldDefnHS *OGRGeomFieldDefnH;
255 
256 /* OGRFieldDefn */
257 
258 OGRFieldDefnH CPL_DLL OGR_Fld_Create( const char *, OGRFieldType ) CPL_WARN_UNUSED_RESULT;
259 void CPL_DLL OGR_Fld_Destroy( OGRFieldDefnH );
260 
261 void CPL_DLL OGR_Fld_SetName( OGRFieldDefnH, const char * );
262 const char CPL_DLL *OGR_Fld_GetNameRef( OGRFieldDefnH );
263 OGRFieldType CPL_DLL OGR_Fld_GetType( OGRFieldDefnH );
264 void CPL_DLL OGR_Fld_SetType( OGRFieldDefnH, OGRFieldType );
265 OGRFieldSubType CPL_DLL OGR_Fld_GetSubType( OGRFieldDefnH );
266 void CPL_DLL OGR_Fld_SetSubType( OGRFieldDefnH, OGRFieldSubType );
267 OGRJustification CPL_DLL OGR_Fld_GetJustify( OGRFieldDefnH );
268 void CPL_DLL OGR_Fld_SetJustify( OGRFieldDefnH, OGRJustification );
269 int CPL_DLL OGR_Fld_GetWidth( OGRFieldDefnH );
270 void CPL_DLL OGR_Fld_SetWidth( OGRFieldDefnH, int );
271 int CPL_DLL OGR_Fld_GetPrecision( OGRFieldDefnH );
272 void CPL_DLL OGR_Fld_SetPrecision( OGRFieldDefnH, int );
273 void CPL_DLL OGR_Fld_Set( OGRFieldDefnH, const char *, OGRFieldType,
274  int, int, OGRJustification );
275 int CPL_DLL OGR_Fld_IsIgnored( OGRFieldDefnH hDefn );
276 void CPL_DLL OGR_Fld_SetIgnored( OGRFieldDefnH hDefn, int );
277 int CPL_DLL OGR_Fld_IsNullable( OGRFieldDefnH hDefn );
278 void CPL_DLL OGR_Fld_SetNullable( OGRFieldDefnH hDefn, int );
279 const char CPL_DLL *OGR_Fld_GetDefault( OGRFieldDefnH hDefn );
280 void CPL_DLL OGR_Fld_SetDefault( OGRFieldDefnH hDefn, const char* );
281 int CPL_DLL OGR_Fld_IsDefaultDriverSpecific( OGRFieldDefnH hDefn );
282 
283 const char CPL_DLL *OGR_GetFieldTypeName( OGRFieldType );
284 const char CPL_DLL *OGR_GetFieldSubTypeName( OGRFieldSubType );
285 int CPL_DLL OGR_AreTypeSubTypeCompatible( OGRFieldType eType,
286  OGRFieldSubType eSubType );
287 
288 /* OGRGeomFieldDefnH */
289 
290 OGRGeomFieldDefnH CPL_DLL OGR_GFld_Create( const char *, OGRwkbGeometryType ) CPL_WARN_UNUSED_RESULT;
291 void CPL_DLL OGR_GFld_Destroy( OGRGeomFieldDefnH );
292 
293 void CPL_DLL OGR_GFld_SetName( OGRGeomFieldDefnH, const char * );
294 const char CPL_DLL *OGR_GFld_GetNameRef( OGRGeomFieldDefnH );
295 
296 OGRwkbGeometryType CPL_DLL OGR_GFld_GetType( OGRGeomFieldDefnH );
297 void CPL_DLL OGR_GFld_SetType( OGRGeomFieldDefnH, OGRwkbGeometryType );
298 
299 OGRSpatialReferenceH CPL_DLL OGR_GFld_GetSpatialRef( OGRGeomFieldDefnH );
300 void CPL_DLL OGR_GFld_SetSpatialRef( OGRGeomFieldDefnH,
301  OGRSpatialReferenceH hSRS );
302 
303 int CPL_DLL OGR_GFld_IsNullable( OGRGeomFieldDefnH hDefn );
304 void CPL_DLL OGR_GFld_SetNullable( OGRGeomFieldDefnH hDefn, int );
305 
306 int CPL_DLL OGR_GFld_IsIgnored( OGRGeomFieldDefnH hDefn );
307 void CPL_DLL OGR_GFld_SetIgnored( OGRGeomFieldDefnH hDefn, int );
308 
309 /* OGRFeatureDefn */
310 
311 OGRFeatureDefnH CPL_DLL OGR_FD_Create( const char * ) CPL_WARN_UNUSED_RESULT;
312 void CPL_DLL OGR_FD_Destroy( OGRFeatureDefnH );
313 void CPL_DLL OGR_FD_Release( OGRFeatureDefnH );
314 const char CPL_DLL *OGR_FD_GetName( OGRFeatureDefnH );
315 int CPL_DLL OGR_FD_GetFieldCount( OGRFeatureDefnH );
316 OGRFieldDefnH CPL_DLL OGR_FD_GetFieldDefn( OGRFeatureDefnH, int );
317 int CPL_DLL OGR_FD_GetFieldIndex( OGRFeatureDefnH, const char * );
318 void CPL_DLL OGR_FD_AddFieldDefn( OGRFeatureDefnH, OGRFieldDefnH );
319 OGRErr CPL_DLL OGR_FD_DeleteFieldDefn( OGRFeatureDefnH hDefn, int iField );
320 OGRErr CPL_DLL OGR_FD_ReorderFieldDefns( OGRFeatureDefnH hDefn, int* panMap );
321 OGRwkbGeometryType CPL_DLL OGR_FD_GetGeomType( OGRFeatureDefnH );
322 void CPL_DLL OGR_FD_SetGeomType( OGRFeatureDefnH, OGRwkbGeometryType );
323 int CPL_DLL OGR_FD_IsGeometryIgnored( OGRFeatureDefnH );
324 void CPL_DLL OGR_FD_SetGeometryIgnored( OGRFeatureDefnH, int );
325 int CPL_DLL OGR_FD_IsStyleIgnored( OGRFeatureDefnH );
326 void CPL_DLL OGR_FD_SetStyleIgnored( OGRFeatureDefnH, int );
327 int CPL_DLL OGR_FD_Reference( OGRFeatureDefnH );
328 int CPL_DLL OGR_FD_Dereference( OGRFeatureDefnH );
329 int CPL_DLL OGR_FD_GetReferenceCount( OGRFeatureDefnH );
330 
331 int CPL_DLL OGR_FD_GetGeomFieldCount( OGRFeatureDefnH hFDefn );
332 OGRGeomFieldDefnH CPL_DLL OGR_FD_GetGeomFieldDefn( OGRFeatureDefnH hFDefn,
333  int i );
334 int CPL_DLL OGR_FD_GetGeomFieldIndex( OGRFeatureDefnH hFDefn,
335  const char *pszName);
336 
337 void CPL_DLL OGR_FD_AddGeomFieldDefn( OGRFeatureDefnH hFDefn,
338  OGRGeomFieldDefnH hGFldDefn);
339 OGRErr CPL_DLL OGR_FD_DeleteGeomFieldDefn( OGRFeatureDefnH hFDefn,
340  int iGeomField );
341 int CPL_DLL OGR_FD_IsSame( OGRFeatureDefnH hFDefn,
342  OGRFeatureDefnH hOtherFDefn );
343 /* OGRFeature */
344 
345 OGRFeatureH CPL_DLL OGR_F_Create( OGRFeatureDefnH ) CPL_WARN_UNUSED_RESULT;
346 void CPL_DLL OGR_F_Destroy( OGRFeatureH );
347 OGRFeatureDefnH CPL_DLL OGR_F_GetDefnRef( OGRFeatureH );
348 
349 OGRErr CPL_DLL OGR_F_SetGeometryDirectly( OGRFeatureH, OGRGeometryH );
350 OGRErr CPL_DLL OGR_F_SetGeometry( OGRFeatureH, OGRGeometryH );
351 OGRGeometryH CPL_DLL OGR_F_GetGeometryRef( OGRFeatureH );
352 OGRGeometryH CPL_DLL OGR_F_StealGeometry( OGRFeatureH );
353 OGRFeatureH CPL_DLL OGR_F_Clone( OGRFeatureH );
354 int CPL_DLL OGR_F_Equal( OGRFeatureH, OGRFeatureH );
355 
356 int CPL_DLL OGR_F_GetFieldCount( OGRFeatureH );
357 OGRFieldDefnH CPL_DLL OGR_F_GetFieldDefnRef( OGRFeatureH, int );
358 int CPL_DLL OGR_F_GetFieldIndex( OGRFeatureH, const char * );
359 
360 int CPL_DLL OGR_F_IsFieldSet( OGRFeatureH, int );
361 void CPL_DLL OGR_F_UnsetField( OGRFeatureH, int );
362 OGRField CPL_DLL *OGR_F_GetRawFieldRef( OGRFeatureH, int );
363 
364 int CPL_DLL OGR_F_GetFieldAsInteger( OGRFeatureH, int );
365 GIntBig CPL_DLL OGR_F_GetFieldAsInteger64( OGRFeatureH, int );
366 double CPL_DLL OGR_F_GetFieldAsDouble( OGRFeatureH, int );
367 const char CPL_DLL *OGR_F_GetFieldAsString( OGRFeatureH, int );
368 const int CPL_DLL *OGR_F_GetFieldAsIntegerList( OGRFeatureH, int, int * );
369 const GIntBig CPL_DLL *OGR_F_GetFieldAsInteger64List( OGRFeatureH, int, int * );
370 const double CPL_DLL *OGR_F_GetFieldAsDoubleList( OGRFeatureH, int, int * );
371 char CPL_DLL **OGR_F_GetFieldAsStringList( OGRFeatureH, int );
372 GByte CPL_DLL *OGR_F_GetFieldAsBinary( OGRFeatureH, int, int * );
373 int CPL_DLL OGR_F_GetFieldAsDateTime( OGRFeatureH, int, int *, int *, int *,
374  int *, int *, int *, int * );
375 int CPL_DLL OGR_F_GetFieldAsDateTimeEx( OGRFeatureH hFeat, int iField,
376  int *pnYear, int *pnMonth, int *pnDay,
377  int *pnHour, int *pnMinute, float *pfSecond,
378  int *pnTZFlag );
379 
380 void CPL_DLL OGR_F_SetFieldInteger( OGRFeatureH, int, int );
381 void CPL_DLL OGR_F_SetFieldInteger64( OGRFeatureH, int, GIntBig );
382 void CPL_DLL OGR_F_SetFieldDouble( OGRFeatureH, int, double );
383 void CPL_DLL OGR_F_SetFieldString( OGRFeatureH, int, const char * );
384 void CPL_DLL OGR_F_SetFieldIntegerList( OGRFeatureH, int, int, int * );
385 void CPL_DLL OGR_F_SetFieldInteger64List( OGRFeatureH, int, int, const GIntBig * );
386 void CPL_DLL OGR_F_SetFieldDoubleList( OGRFeatureH, int, int, double * );
387 void CPL_DLL OGR_F_SetFieldStringList( OGRFeatureH, int, char ** );
388 void CPL_DLL OGR_F_SetFieldRaw( OGRFeatureH, int, OGRField * );
389 void CPL_DLL OGR_F_SetFieldBinary( OGRFeatureH, int, int, GByte * );
390 void CPL_DLL OGR_F_SetFieldDateTime( OGRFeatureH, int,
391  int, int, int, int, int, int, int );
392 void CPL_DLL OGR_F_SetFieldDateTimeEx( OGRFeatureH, int,
393  int, int, int, int, int, float, int );
394 
395 int CPL_DLL OGR_F_GetGeomFieldCount( OGRFeatureH hFeat );
396 OGRGeomFieldDefnH CPL_DLL OGR_F_GetGeomFieldDefnRef( OGRFeatureH hFeat,
397  int iField );
398 int CPL_DLL OGR_F_GetGeomFieldIndex( OGRFeatureH hFeat,
399  const char *pszName);
400 
401 OGRGeometryH CPL_DLL OGR_F_GetGeomFieldRef( OGRFeatureH hFeat,
402  int iField );
403 OGRErr CPL_DLL OGR_F_SetGeomFieldDirectly( OGRFeatureH hFeat,
404  int iField,
405  OGRGeometryH hGeom );
406 OGRErr CPL_DLL OGR_F_SetGeomField( OGRFeatureH hFeat,
407  int iField, OGRGeometryH hGeom );
408 
409 GIntBig CPL_DLL OGR_F_GetFID( OGRFeatureH );
410 OGRErr CPL_DLL OGR_F_SetFID( OGRFeatureH, GIntBig );
411 void CPL_DLL OGR_F_DumpReadable( OGRFeatureH, FILE * );
412 OGRErr CPL_DLL OGR_F_SetFrom( OGRFeatureH, OGRFeatureH, int );
413 OGRErr CPL_DLL OGR_F_SetFromWithMap( OGRFeatureH, OGRFeatureH, int , int * );
414 
415 const char CPL_DLL *OGR_F_GetStyleString( OGRFeatureH );
416 void CPL_DLL OGR_F_SetStyleString( OGRFeatureH, const char * );
417 void CPL_DLL OGR_F_SetStyleStringDirectly( OGRFeatureH, char * );
418 OGRStyleTableH CPL_DLL OGR_F_GetStyleTable( OGRFeatureH );
419 void CPL_DLL OGR_F_SetStyleTableDirectly( OGRFeatureH, OGRStyleTableH );
420 void CPL_DLL OGR_F_SetStyleTable( OGRFeatureH, OGRStyleTableH );
421 
422 void CPL_DLL OGR_F_FillUnsetWithDefault( OGRFeatureH hFeat,
423  int bNotNullableOnly,
424  char** papszOptions );
425 int CPL_DLL OGR_F_Validate( OGRFeatureH, int nValidateFlags, int bEmitError );
426 
427 /* -------------------------------------------------------------------- */
428 /* ogrsf_frmts.h */
429 /* -------------------------------------------------------------------- */
430 
431 #ifdef DEBUG
432 typedef struct OGRLayerHS *OGRLayerH;
433 typedef struct OGRDataSourceHS *OGRDataSourceH;
434 typedef struct OGRDriverHS *OGRSFDriverH;
435 #else
436 typedef void *OGRLayerH;
437 typedef void *OGRDataSourceH;
438 typedef void *OGRSFDriverH;
439 #endif
440 
441 /* OGRLayer */
442 
443 const char CPL_DLL* OGR_L_GetName( OGRLayerH );
444 OGRwkbGeometryType CPL_DLL OGR_L_GetGeomType( OGRLayerH );
445 OGRGeometryH CPL_DLL OGR_L_GetSpatialFilter( OGRLayerH );
446 void CPL_DLL OGR_L_SetSpatialFilter( OGRLayerH, OGRGeometryH );
447 void CPL_DLL OGR_L_SetSpatialFilterRect( OGRLayerH,
448  double, double, double, double );
449 void CPL_DLL OGR_L_SetSpatialFilterEx( OGRLayerH, int iGeomField,
450  OGRGeometryH hGeom );
451 void CPL_DLL OGR_L_SetSpatialFilterRectEx( OGRLayerH, int iGeomField,
452  double dfMinX, double dfMinY,
453  double dfMaxX, double dfMaxY );
454 OGRErr CPL_DLL OGR_L_SetAttributeFilter( OGRLayerH, const char * );
455 void CPL_DLL OGR_L_ResetReading( OGRLayerH );
456 OGRFeatureH CPL_DLL OGR_L_GetNextFeature( OGRLayerH );
457 OGRErr CPL_DLL OGR_L_SetNextByIndex( OGRLayerH, GIntBig );
458 OGRFeatureH CPL_DLL OGR_L_GetFeature( OGRLayerH, GIntBig );
459 OGRErr CPL_DLL OGR_L_SetFeature( OGRLayerH, OGRFeatureH );
460 OGRErr CPL_DLL OGR_L_CreateFeature( OGRLayerH, OGRFeatureH );
461 OGRErr CPL_DLL OGR_L_DeleteFeature( OGRLayerH, GIntBig );
462 OGRFeatureDefnH CPL_DLL OGR_L_GetLayerDefn( OGRLayerH );
463 OGRSpatialReferenceH CPL_DLL OGR_L_GetSpatialRef( OGRLayerH );
464 int CPL_DLL OGR_L_FindFieldIndex( OGRLayerH, const char *, int bExactMatch );
465 GIntBig CPL_DLL OGR_L_GetFeatureCount( OGRLayerH, int );
466 OGRErr CPL_DLL OGR_L_GetExtent( OGRLayerH, OGREnvelope *, int );
467 OGRErr CPL_DLL OGR_L_GetExtentEx( OGRLayerH, int iGeomField,
468  OGREnvelope *psExtent, int bForce );
469 int CPL_DLL OGR_L_TestCapability( OGRLayerH, const char * );
470 OGRErr CPL_DLL OGR_L_CreateField( OGRLayerH, OGRFieldDefnH, int );
471 OGRErr CPL_DLL OGR_L_CreateGeomField( OGRLayerH hLayer,
472  OGRGeomFieldDefnH hFieldDefn, int bForce );
473 OGRErr CPL_DLL OGR_L_DeleteField( OGRLayerH, int iField );
474 OGRErr CPL_DLL OGR_L_ReorderFields( OGRLayerH, int* panMap );
475 OGRErr CPL_DLL OGR_L_ReorderField( OGRLayerH, int iOldFieldPos, int iNewFieldPos );
476 OGRErr CPL_DLL OGR_L_AlterFieldDefn( OGRLayerH, int iField, OGRFieldDefnH hNewFieldDefn, int nFlags );
477 OGRErr CPL_DLL OGR_L_StartTransaction( OGRLayerH );
478 OGRErr CPL_DLL OGR_L_CommitTransaction( OGRLayerH );
479 OGRErr CPL_DLL OGR_L_RollbackTransaction( OGRLayerH );
480 int CPL_DLL OGR_L_Reference( OGRLayerH );
481 int CPL_DLL OGR_L_Dereference( OGRLayerH );
482 int CPL_DLL OGR_L_GetRefCount( OGRLayerH );
483 OGRErr CPL_DLL OGR_L_SyncToDisk( OGRLayerH );
484 GIntBig CPL_DLL OGR_L_GetFeaturesRead( OGRLayerH );
485 const char CPL_DLL *OGR_L_GetFIDColumn( OGRLayerH );
486 const char CPL_DLL *OGR_L_GetGeometryColumn( OGRLayerH );
487 OGRStyleTableH CPL_DLL OGR_L_GetStyleTable( OGRLayerH );
488 void CPL_DLL OGR_L_SetStyleTableDirectly( OGRLayerH, OGRStyleTableH );
489 void CPL_DLL OGR_L_SetStyleTable( OGRLayerH, OGRStyleTableH );
490 OGRErr CPL_DLL OGR_L_SetIgnoredFields( OGRLayerH, const char** );
491 OGRErr CPL_DLL OGR_L_Intersection( OGRLayerH, OGRLayerH, OGRLayerH, char**, GDALProgressFunc, void * );
492 OGRErr CPL_DLL OGR_L_Union( OGRLayerH, OGRLayerH, OGRLayerH, char**, GDALProgressFunc, void * );
493 OGRErr CPL_DLL OGR_L_SymDifference( OGRLayerH, OGRLayerH, OGRLayerH, char**, GDALProgressFunc, void * );
494 OGRErr CPL_DLL OGR_L_Identity( OGRLayerH, OGRLayerH, OGRLayerH, char**, GDALProgressFunc, void * );
495 OGRErr CPL_DLL OGR_L_Update( OGRLayerH, OGRLayerH, OGRLayerH, char**, GDALProgressFunc, void * );
496 OGRErr CPL_DLL OGR_L_Clip( OGRLayerH, OGRLayerH, OGRLayerH, char**, GDALProgressFunc, void * );
497 OGRErr CPL_DLL OGR_L_Erase( OGRLayerH, OGRLayerH, OGRLayerH, char**, GDALProgressFunc, void * );
498 
499 /* OGRDataSource */
500 
501 void CPL_DLL OGR_DS_Destroy( OGRDataSourceH );
502 const char CPL_DLL *OGR_DS_GetName( OGRDataSourceH );
503 int CPL_DLL OGR_DS_GetLayerCount( OGRDataSourceH );
504 OGRLayerH CPL_DLL OGR_DS_GetLayer( OGRDataSourceH, int );
505 OGRLayerH CPL_DLL OGR_DS_GetLayerByName( OGRDataSourceH, const char * );
506 OGRErr CPL_DLL OGR_DS_DeleteLayer( OGRDataSourceH, int );
507 OGRSFDriverH CPL_DLL OGR_DS_GetDriver( OGRDataSourceH );
508 OGRLayerH CPL_DLL OGR_DS_CreateLayer( OGRDataSourceH, const char *,
509  OGRSpatialReferenceH, OGRwkbGeometryType,
510  char ** );
511 OGRLayerH CPL_DLL OGR_DS_CopyLayer( OGRDataSourceH, OGRLayerH, const char *,
512  char ** );
513 int CPL_DLL OGR_DS_TestCapability( OGRDataSourceH, const char * );
514 OGRLayerH CPL_DLL OGR_DS_ExecuteSQL( OGRDataSourceH, const char *,
515  OGRGeometryH, const char * );
516 void CPL_DLL OGR_DS_ReleaseResultSet( OGRDataSourceH, OGRLayerH );
517 int CPL_DLL OGR_DS_Reference( OGRDataSourceH );
518 int CPL_DLL OGR_DS_Dereference( OGRDataSourceH );
519 int CPL_DLL OGR_DS_GetRefCount( OGRDataSourceH );
520 int CPL_DLL OGR_DS_GetSummaryRefCount( OGRDataSourceH );
521 OGRErr CPL_DLL OGR_DS_SyncToDisk( OGRDataSourceH );
522 OGRStyleTableH CPL_DLL OGR_DS_GetStyleTable( OGRDataSourceH );
523 void CPL_DLL OGR_DS_SetStyleTableDirectly( OGRDataSourceH, OGRStyleTableH );
524 void CPL_DLL OGR_DS_SetStyleTable( OGRDataSourceH, OGRStyleTableH );
525 
526 /* OGRSFDriver */
527 
528 const char CPL_DLL *OGR_Dr_GetName( OGRSFDriverH );
529 OGRDataSourceH CPL_DLL OGR_Dr_Open( OGRSFDriverH, const char *, int ) CPL_WARN_UNUSED_RESULT;
530 int CPL_DLL OGR_Dr_TestCapability( OGRSFDriverH, const char * );
531 OGRDataSourceH CPL_DLL OGR_Dr_CreateDataSource( OGRSFDriverH, const char *,
532  char ** ) CPL_WARN_UNUSED_RESULT;
533 OGRDataSourceH CPL_DLL OGR_Dr_CopyDataSource( OGRSFDriverH, OGRDataSourceH,
534  const char *, char ** ) CPL_WARN_UNUSED_RESULT;
535 OGRErr CPL_DLL OGR_Dr_DeleteDataSource( OGRSFDriverH, const char * );
536 
537 /* OGRSFDriverRegistrar */
538 
539 OGRDataSourceH CPL_DLL OGROpen( const char *, int, OGRSFDriverH * ) CPL_WARN_UNUSED_RESULT;
540 OGRDataSourceH CPL_DLL OGROpenShared( const char *, int, OGRSFDriverH * ) CPL_WARN_UNUSED_RESULT;
541 OGRErr CPL_DLL OGRReleaseDataSource( OGRDataSourceH );
542 void CPL_DLL OGRRegisterDriver( OGRSFDriverH );
543 void CPL_DLL OGRDeregisterDriver( OGRSFDriverH );
544 int CPL_DLL OGRGetDriverCount(void);
545 OGRSFDriverH CPL_DLL OGRGetDriver( int );
546 OGRSFDriverH CPL_DLL OGRGetDriverByName( const char * );
547 int CPL_DLL OGRGetOpenDSCount(void);
548 OGRDataSourceH CPL_DLL OGRGetOpenDS( int iDS );
549 
550 
551 /* note: this is also declared in ogrsf_frmts.h */
552 void CPL_DLL OGRRegisterAll(void);
553 void CPL_DLL OGRCleanupAll(void);
554 
555 /* -------------------------------------------------------------------- */
556 /* ogrsf_featurestyle.h */
557 /* -------------------------------------------------------------------- */
558 
559 #ifdef DEBUG
560 typedef struct OGRStyleMgrHS *OGRStyleMgrH;
561 typedef struct OGRStyleToolHS *OGRStyleToolH;
562 #else
563 typedef void *OGRStyleMgrH;
564 typedef void *OGRStyleToolH;
565 #endif
566 
567 /* OGRStyleMgr */
568 
569 OGRStyleMgrH CPL_DLL OGR_SM_Create(OGRStyleTableH hStyleTable) CPL_WARN_UNUSED_RESULT;
570 void CPL_DLL OGR_SM_Destroy(OGRStyleMgrH hSM);
571 
572 const char CPL_DLL *OGR_SM_InitFromFeature(OGRStyleMgrH hSM,
573  OGRFeatureH hFeat);
574 int CPL_DLL OGR_SM_InitStyleString(OGRStyleMgrH hSM,
575  const char *pszStyleString);
576 int CPL_DLL OGR_SM_GetPartCount(OGRStyleMgrH hSM,
577  const char *pszStyleString);
578 OGRStyleToolH CPL_DLL OGR_SM_GetPart(OGRStyleMgrH hSM, int nPartId,
579  const char *pszStyleString);
580 int CPL_DLL OGR_SM_AddPart(OGRStyleMgrH hSM, OGRStyleToolH hST);
581 int CPL_DLL OGR_SM_AddStyle(OGRStyleMgrH hSM, const char *pszStyleName,
582  const char *pszStyleString);
583 
584 /* OGRStyleTool */
585 
586 OGRStyleToolH CPL_DLL OGR_ST_Create(OGRSTClassId eClassId) CPL_WARN_UNUSED_RESULT;
587 void CPL_DLL OGR_ST_Destroy(OGRStyleToolH hST);
588 
589 OGRSTClassId CPL_DLL OGR_ST_GetType(OGRStyleToolH hST);
590 
591 OGRSTUnitId CPL_DLL OGR_ST_GetUnit(OGRStyleToolH hST);
592 void CPL_DLL OGR_ST_SetUnit(OGRStyleToolH hST, OGRSTUnitId eUnit,
593  double dfGroundPaperScale);
594 
595 const char CPL_DLL *OGR_ST_GetParamStr(OGRStyleToolH hST, int eParam, int *bValueIsNull);
596 int CPL_DLL OGR_ST_GetParamNum(OGRStyleToolH hST, int eParam, int *bValueIsNull);
597 double CPL_DLL OGR_ST_GetParamDbl(OGRStyleToolH hST, int eParam, int *bValueIsNull);
598 void CPL_DLL OGR_ST_SetParamStr(OGRStyleToolH hST, int eParam, const char *pszValue);
599 void CPL_DLL OGR_ST_SetParamNum(OGRStyleToolH hST, int eParam, int nValue);
600 void CPL_DLL OGR_ST_SetParamDbl(OGRStyleToolH hST, int eParam, double dfValue);
601 const char CPL_DLL *OGR_ST_GetStyleString(OGRStyleToolH hST);
602 
603 int CPL_DLL OGR_ST_GetRGBFromString(OGRStyleToolH hST, const char *pszColor,
604  int *pnRed, int *pnGreen, int *pnBlue,
605  int *pnAlpha);
606 
607 /* OGRStyleTable */
608 
609 OGRStyleTableH CPL_DLL OGR_STBL_Create( void ) CPL_WARN_UNUSED_RESULT;
610 void CPL_DLL OGR_STBL_Destroy( OGRStyleTableH hSTBL );
611 int CPL_DLL OGR_STBL_AddStyle( OGRStyleTableH hStyleTable,
612  const char *pszName,
613  const char *pszStyleString);
614 int CPL_DLL OGR_STBL_SaveStyleTable( OGRStyleTableH hStyleTable,
615  const char *pszFilename );
616 int CPL_DLL OGR_STBL_LoadStyleTable( OGRStyleTableH hStyleTable,
617  const char *pszFilename );
618 const char CPL_DLL *OGR_STBL_Find( OGRStyleTableH hStyleTable, const char *pszName );
619 void CPL_DLL OGR_STBL_ResetStyleStringReading( OGRStyleTableH hStyleTable );
620 const char CPL_DLL *OGR_STBL_GetNextStyle( OGRStyleTableH hStyleTable);
621 const char CPL_DLL *OGR_STBL_GetLastStyleName( OGRStyleTableH hStyleTable);
622 
623 CPL_C_END
624 
625 #endif /* ndef OGR_API_H_INCLUDED */
OGRSpatialReferenceH OGR_G_GetSpatialReference(OGRGeometryH)
Returns spatial reference system for geometry.
Definition: ogrgeometry.cpp:1497
OGRFeatureH OGR_L_GetFeature(OGRLayerH, GIntBig)
Fetch a feature by its identifier.
Definition: ogrlayer.cpp:481
OGRFieldDefnH OGR_Fld_Create(const char *, OGRFieldType) CPL_WARN_UNUSED_RESULT
Create a new field definition.
Definition: ogrfielddefn.cpp:97
char * OGR_G_ExportToGMLEx(OGRGeometryH, char **papszOptions)
Convert a geometry into GML format.
Definition: ogr2gmlgeometry.cpp:1090
const char * OGR_F_GetFieldAsString(OGRFeatureH, int)
Fetch field value as a string.
Definition: ogrfeature.cpp:1957
OGRErr OGR_L_ReorderFields(OGRLayerH, int *panMap)
Reorder all the fields of a layer.
Definition: ogrlayer.cpp:740
int OGRGetNonLinearGeometriesEnabledFlag(void)
Get flag to enable/disable returning non-linear geometries in the C API.
Definition: ogr_api.cpp:1210
OGRErr OGRSetGenerate_DB2_V72_BYTE_ORDER(int bGenerate_DB2_V72_BYTE_ORDER)
Special entry point to enable the hack for generating DB2 V7.2 style WKB.
Definition: ogrgeometry.cpp:2258
void OGR_FD_Destroy(OGRFeatureDefnH)
Destroy a feature definition object and release all memory associated with it.
Definition: ogrfeaturedefn.cpp:135
OGRErr OGR_L_ReorderField(OGRLayerH, int iOldFieldPos, int iNewFieldPos)
Reorder an existing field on a layer.
Definition: ogrlayer.cpp:815
int OGR_G_GetCoordinateDimension(OGRGeometryH)
Get the dimension of the coordinates in this geometry.
Definition: ogrgeometry.cpp:741
OGRErr OGR_G_ImportFromWkb(OGRGeometryH, unsigned char *, int)
Assign geometry from well known binary data.
Definition: ogrgeometry.cpp:1013
void OGR_FD_AddFieldDefn(OGRFeatureDefnH, OGRFieldDefnH)
Add a new field definition to the passed feature definition.
Definition: ogrfeaturedefn.cpp:407
OGRErr OGR_G_ImportFromWkt(OGRGeometryH, char **)
Assign geometry from well known text data.
Definition: ogrgeometry.cpp:1162
OGRGeometryH OGR_L_GetSpatialFilter(OGRLayerH)
This function returns the current spatial filter for this layer.
Definition: ogrlayer.cpp:1086
double OGR_G_Distance(OGRGeometryH, OGRGeometryH)
Compute distance between two geometries.
Definition: ogrgeometry.cpp:2547
OGRFieldSubType
Definition: ogr_core.h:540
OGRwkbGeometryType OGR_G_GetGeometryType(OGRGeometryH)
Fetch geometry type.
Definition: ogrgeometry.cpp:1389
Definition: cpl_minixml.h:65
void OGR_G_CloseRings(OGRGeometryH)
Force rings to be closed.
Definition: ogrgeometry.cpp:3948
OGRGeometryH OGR_G_ApproximateArcAngles(double dfCenterX, double dfCenterY, double dfZ, double dfPrimaryRadius, double dfSecondaryAxis, double dfRotation, double dfStartAngle, double dfEndAngle, double dfMaxAngleStepSizeDegrees)
Definition: ogrgeometryfactory.cpp:2788
OGRFieldSubType OGR_Fld_GetSubType(OGRFieldDefnH)
Fetch subtype of this field.
Definition: ogrfielddefn.cpp:338
OGRErr OGR_L_CreateField(OGRLayerH, OGRFieldDefnH, int)
Create a new field on a layer.
Definition: ogrlayer.cpp:673
OGRErr OGR_G_ExportToWkt(OGRGeometryH, char **)
Convert a geometry into well known text format.
Definition: ogrgeometry.cpp:1321
OGRFeatureH OGR_F_Create(OGRFeatureDefnH) CPL_WARN_UNUSED_RESULT
Feature factory.
Definition: ogrfeature.cpp:103
double OGR_G_GetArea(OGRGeometryH) CPL_WARN_DEPRECATED("Non standard method. Use OGR_G_Area() instead")
Compute geometry area (deprecated)
Definition: ogr_api.cpp:995
void OGR_ST_SetParamDbl(OGRStyleToolH hST, int eParam, double dfValue)
Set Style Tool parameter value from a double.
Definition: ogrfeaturestyle.cpp:2461
void OGR_F_SetFieldStringList(OGRFeatureH, int, char **)
Set field to list of strings value.
Definition: ogrfeature.cpp:3377
OGRGeometryH OGR_G_SimplifyPreserveTopology(OGRGeometryH hThis, double tolerance)
Simplify the geometry while preserving topology.
Definition: ogrgeometry.cpp:4357
void OGR_F_SetFieldInteger(OGRFeatureH, int, int)
Set field to integer value.
Definition: ogrfeature.cpp:2611
void OGR_Fld_Destroy(OGRFieldDefnH)
Destroy a field definition.
Definition: ogrfielddefn.cpp:143
int OGR_FD_GetFieldCount(OGRFeatureDefnH)
Fetch number of fields on the passed feature definition.
Definition: ogrfeaturedefn.cpp:282
OGRFieldDefnH OGR_FD_GetFieldDefn(OGRFeatureDefnH, int)
Fetch field definition of the passed feature definition.
Definition: ogrfeaturedefn.cpp:344
void OGR_DS_Destroy(OGRDataSourceH)
Closes opened datasource and releases allocated resources.
Definition: ogrdatasource.cpp:60
OGRErr OGR_F_SetGeometry(OGRFeatureH, OGRGeometryH)
Set feature geometry.
Definition: ogrfeature.cpp:395
OGRErr OGR_L_GetExtent(OGRLayerH, OGREnvelope *, int)
Fetch the extent of this layer.
Definition: ogrlayer.cpp:305
void OGR_F_SetFieldDouble(OGRFeatureH, int, double)
Set field to double value.
Definition: ogrfeature.cpp:2825
int OGR_FD_IsGeometryIgnored(OGRFeatureDefnH)
Determine whether the geometry can be omitted when fetching features.
Definition: ogrfeaturedefn.cpp:1198
int OGR_FD_GetFieldIndex(OGRFeatureDefnH, const char *)
Find field by name.
Definition: ogrfeaturedefn.cpp:1147
int OGR_STBL_SaveStyleTable(OGRStyleTableH hStyleTable, const char *pszFilename)
Save a style table to a file.
Definition: ogrfeaturestyle.cpp:1049
void OGR_Fld_SetNullable(OGRFieldDefnH hDefn, int)
Set whether this field can receive null values.
Definition: ogrfielddefn.cpp:1213
OGRErr OGR_G_AddGeometry(OGRGeometryH, OGRGeometryH)
Add a geometry to a geometry container.
Definition: ogr_api.cpp:757
OGRDataSourceH OGR_Dr_Open(OGRSFDriverH, const char *, int) CPL_WARN_UNUSED_RESULT
Attempt to open file with this driver.
Definition: ogrsfdriver.cpp:134
OGRErr OGR_G_TransformTo(OGRGeometryH, OGRSpatialReferenceH)
Transform geometry to new spatial reference system.
Definition: ogrgeometry.cpp:527
OGRErr OGR_F_SetGeometryDirectly(OGRFeatureH, OGRGeometryH)
Set feature geometry.
Definition: ogrfeature.cpp:335
OGRErr OGR_L_AlterFieldDefn(OGRLayerH, int iField, OGRFieldDefnH hNewFieldDefn, int nFlags)
Alter the definition of an existing field on a layer.
Definition: ogrlayer.cpp:850
void OGR_F_DumpReadable(OGRFeatureH, FILE *)
Dump this feature in a human readable form.
Definition: ogrfeature.cpp:3894
int OGR_G_Centroid(OGRGeometryH, OGRGeometryH)
Compute the geometry centroid.
Definition: ogrgeometry.cpp:4088
void OGR_Fld_SetJustify(OGRFieldDefnH, OGRJustification)
Set the justification for this field.
Definition: ogrfielddefn.cpp:837
void OGR_G_AddPoint_2D(OGRGeometryH, double, double)
Add a point to a geometry (line string or point).
Definition: ogr_api.cpp:608
OGRGeometryH OGR_G_ForceTo(OGRGeometryH hGeom, OGRwkbGeometryType eTargetType, char **papszOptions)
Convert to another geometry type.
Definition: ogrgeometryfactory.cpp:3209
OGRErr OGR_L_StartTransaction(OGRLayerH)
For datasources which support transactions, StartTransaction creates a transaction.
Definition: ogrlayer.cpp:915
OGRErr OGR_F_SetGeomField(OGRFeatureH hFeat, int iField, OGRGeometryH hGeom)
Set feature geometry of a specified geometry field.
Definition: ogrfeature.cpp:764
OGRGeometryH OGR_G_UnionCascaded(OGRGeometryH)
Compute union using cascading.
Definition: ogrgeometry.cpp:3174
OGRErr OGR_L_SetFeature(OGRLayerH, OGRFeatureH)
Rewrite an existing feature.
Definition: ogrlayer.cpp:600
OGRGeometryH OGR_F_GetGeomFieldRef(OGRFeatureH hFeat, int iField)
Fetch an handle to feature geometry.
Definition: ogrfeature.cpp:597
void OGR_G_GetEnvelope3D(OGRGeometryH, OGREnvelope3D *)
Computes and returns the bounding envelope (3D) for this geometry in the passed psEnvelope structure...
Definition: ogrgeometry.cpp:960
void OGR_Fld_SetIgnored(OGRFieldDefnH hDefn, int)
Set whether this field should be omitted when fetching features.
Definition: ogrfielddefn.cpp:1098
OGRGeometryH OGR_G_Boundary(OGRGeometryH)
Compute boundary.
Definition: ogrgeometry.cpp:2760
int OGRGetDriverCount(void)
Fetch the number of registered drivers.
Definition: ogrsfdriverregistrar.cpp:347
int OGR_SM_InitStyleString(OGRStyleMgrH hSM, const char *pszStyleString)
Initialize style manager from the style string.
Definition: ogrfeaturestyle.cpp:333
GIntBig OGR_F_GetFieldAsInteger64(OGRFeatureH, int)
Fetch field value as integer 64 bit.
Definition: ogrfeature.cpp:1497
int OGR_ST_GetRGBFromString(OGRStyleToolH hST, const char *pszColor, int *pnRed, int *pnGreen, int *pnBlue, int *pnAlpha)
Return the r,g,b,a components of a color encoded in #RRGGBB[AA] format.
Definition: ogrfeaturestyle.cpp:2549
int OGR_G_Overlaps(OGRGeometryH, OGRGeometryH)
Test for overlap.
Definition: ogrgeometry.cpp:3909
int OGR_F_Equal(OGRFeatureH, OGRFeatureH)
Test if two features are the same.
Definition: ogrfeature.cpp:4212
int OGR_SM_AddPart(OGRStyleMgrH hSM, OGRStyleToolH hST)
Add a part (style tool) to the current style.
Definition: ogrfeaturestyle.cpp:579
OGRErr OGR_G_CreateFromWkb(unsigned char *, OGRSpatialReferenceH, OGRGeometryH *, int)
Create a geometry object of the appropriate type from it's well known binary representation.
Definition: ogrgeometryfactory.cpp:195
void OGR_F_SetFieldString(OGRFeatureH, int, const char *)
Set field to string value.
Definition: ogrfeature.cpp:3022
OGRErr OGR_L_SymDifference(OGRLayerH, OGRLayerH, OGRLayerH, char **, GDALProgressFunc, void *)
Symmetrical difference of two layers.
Definition: ogrlayer.cpp:2867
const char * OGR_FD_GetName(OGRFeatureDefnH)
Get name of the OGRFeatureDefn passed as an argument.
Definition: ogrfeaturedefn.cpp:245
int OGR_F_GetGeomFieldIndex(OGRFeatureH hFeat, const char *pszName)
Fetch the geometry field index given geometry field name.
Definition: ogrfeature.cpp:1091
int OGR_STBL_LoadStyleTable(OGRStyleTableH hStyleTable, const char *pszFilename)
Load a style table from a file.
Definition: ogrfeaturestyle.cpp:1103
void OGR_GFld_SetName(OGRGeomFieldDefnH, const char *)
Reset the name of this field.
Definition: ogrgeomfielddefn.cpp:182
int OGR_FD_IsSame(OGRFeatureDefnH hFDefn, OGRFeatureDefnH hOtherFDefn)
Test if the feature definition is identical to the other one.
Definition: ogrfeaturedefn.cpp:1392
OGRSpatialReferenceH OGR_L_GetSpatialRef(OGRLayerH)
Fetch the spatial reference system for this layer.
Definition: ogrlayer.cpp:1041
void OGR_G_Empty(OGRGeometryH)
Clear geometry information. This restores the geometry to it's initial state after construction...
Definition: ogrgeometry.cpp:1533
int OGR_FD_IsStyleIgnored(OGRFeatureDefnH)
Determine whether the style can be omitted when fetching features.
Definition: ogrfeaturedefn.cpp:1276
int OGR_F_GetGeomFieldCount(OGRFeatureH hFeat)
Fetch number of geometry fields on this feature This will always be the same as the geometry field co...
Definition: ogrfeature.cpp:999
OGRSTClassId OGR_ST_GetType(OGRStyleToolH hST)
Determine type of Style Tool.
Definition: ogrfeaturestyle.cpp:1626
void OGR_L_SetSpatialFilter(OGRLayerH, OGRGeometryH)
Set a new spatial filter.
Definition: ogrlayer.cpp:1139
void OGR_ST_SetUnit(OGRStyleToolH hST, OGRSTUnitId eUnit, double dfGroundPaperScale)
Set Style Tool units.
Definition: ogrfeaturestyle.cpp:1676
OGRSTUnitId OGR_ST_GetUnit(OGRStyleToolH hST)
Get Style Tool units.
Definition: ogrfeaturestyle.cpp:1645
OGRErr OGR_G_ExportToIsoWkt(OGRGeometryH, char **)
Convert a geometry into SFSQL 1.2 / ISO SQL/MM Part 3 well known text format.
Definition: ogrgeometry.cpp:1351
void OGR_F_SetFieldDateTimeEx(OGRFeatureH, int, int, int, int, int, int, float, int)
Set field to datetime.
Definition: ogrfeature.cpp:3568
OGRSFDriverH OGRGetDriverByName(const char *)
Fetch the indicated driver.
Definition: ogrsfdriverregistrar.cpp:409
const char * OGR_L_GetName(OGRLayerH)
Return the layer name.
Definition: ogrlayer.cpp:1718
void OGR_G_AddPoint(OGRGeometryH, double, double, double)
Add a point to a geometry (line string or point).
Definition: ogr_api.cpp:567
void OGR_F_SetFieldInteger64(OGRFeatureH, int, GIntBig)
Set field to 64 bit integer value.
Definition: ogrfeature.cpp:2721
OGRDataSourceH OGR_Dr_CreateDataSource(OGRSFDriverH, const char *, char **) CPL_WARN_UNUSED_RESULT
This function attempts to create a new data source based on the passed driver.
Definition: ogrsfdriver.cpp:64
int OGR_Fld_IsIgnored(OGRFieldDefnH hDefn)
Return whether this field should be omitted when fetching features.
Definition: ogrfielddefn.cpp:1066
OGRGeometryH OGR_G_ForceToMultiPolygon(OGRGeometryH)
Convert to multipolygon.
Definition: ogrgeometryfactory.cpp:771
void OGR_FD_Release(OGRFeatureDefnH)
Drop a reference, and destroy if unreferenced.
Definition: ogrfeaturedefn.cpp:172
OGRGeometryH OGR_G_GetCurveGeometry(OGRGeometryH hGeom, char **papszOptions)
Return curve version of this geometry.
Definition: ogr_api.cpp:1123
void OGR_F_UnsetField(OGRFeatureH, int)
Clear a field, marking it as unset.
Definition: ogrfeature.cpp:1244
OGRFeatureDefnH OGR_FD_Create(const char *) CPL_WARN_UNUSED_RESULT
Create a new feature definition object to hold the field definitions.
Definition: ogrfeaturedefn.cpp:85
int OGR_G_IsEmpty(OGRGeometryH)
Test if the geometry is empty.
Definition: ogrgeometry.cpp:1569
const char * OGR_L_GetFIDColumn(OGRLayerH)
This method returns the name of the underlying database column being used as the FID column...
Definition: ogrlayer.cpp:1590
OGRGeometryH OGR_F_StealGeometry(OGRFeatureH)
Take away ownership of geometry.
Definition: ogrfeature.cpp:463
const char * OGR_STBL_GetLastStyleName(OGRStyleTableH hStyleTable)
Definition: ogrfeaturestyle.cpp:1360
double OGR_G_GetZ(OGRGeometryH, int)
Fetch the z coordinate of a point from a geometry.
Definition: ogr_api.cpp:207
void OGR_G_Segmentize(OGRGeometryH hGeom, double dfMaxLength)
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrgeometry.cpp:663
const char * OGR_G_GetGeometryName(OGRGeometryH)
Fetch WKT name for geometry type.
Definition: ogrgeometry.cpp:1425
int OGR_FD_Dereference(OGRFeatureDefnH)
Decrements the reference count by one.
Definition: ogrfeaturedefn.cpp:1058
OGRErr OGR_F_SetFID(OGRFeatureH, GIntBig)
Set the feature identifier.
Definition: ogrfeature.cpp:3987
void OGR_F_SetFieldRaw(OGRFeatureH, int, OGRField *)
Set field.
Definition: ogrfeature.cpp:3773
OGRGeometryH OGR_F_GetGeometryRef(OGRFeatureH)
Fetch an handle to feature geometry.
Definition: ogrfeature.cpp:511
OGRField * OGR_F_GetRawFieldRef(OGRFeatureH, int)
Fetch an handle to the internal field value given the index.
Definition: ogrfeature.cpp:1285
int OGR_STBL_AddStyle(OGRStyleTableH hStyleTable, const char *pszName, const char *pszStyleString)
Add a new style in the table. No comparison will be done on the Style string, only on the name...
Definition: ogrfeaturestyle.cpp:945
OGRGeometryH OGR_G_SymDifference(OGRGeometryH, OGRGeometryH)
Compute symmetric difference.
Definition: ogrgeometry.cpp:3396
int OGR_F_GetFieldAsDateTimeEx(OGRFeatureH hFeat, int iField, int *pnYear, int *pnMonth, int *pnDay, int *pnHour, int *pnMinute, float *pfSecond, int *pnTZFlag)
Fetch field value as date and time.
Definition: ogrfeature.cpp:2474
OGRErr OGR_L_SyncToDisk(OGRLayerH)
Flush pending changes to disk.
Definition: ogrlayer.cpp:1515
OGRGeomFieldDefnH OGR_GFld_Create(const char *, OGRwkbGeometryType) CPL_WARN_UNUSED_RESULT
Create a new field geometry definition.
Definition: ogrgeomfielddefn.cpp:94
OGRGeometryH OGR_G_PointOnSurface(OGRGeometryH)
Returns a point guaranteed to lie on the surface.
Definition: ogrgeometry.cpp:4133
void OGR_G_GetEnvelope(OGRGeometryH, OGREnvelope *)
Computes and returns the bounding envelope for this geometry in the passed psEnvelope structure...
Definition: ogrgeometry.cpp:926
OGRErr OGR_L_SetIgnoredFields(OGRLayerH, const char **)
Set which fields can be omitted when retrieving features from the layer.
Definition: ogrlayer.cpp:1827
enum ogr_style_tool_class_id OGRSTClassId
int OGR_DS_GetLayerCount(OGRDataSourceH)
Get the number of layers in this data source.
Definition: ogrdatasource.cpp:269
void OGR_L_SetSpatialFilterRectEx(OGRLayerH, int iGeomField, double dfMinX, double dfMinY, double dfMaxX, double dfMaxY)
Set a new rectangular spatial filter.
Definition: ogrlayer.cpp:1228
void OGR_F_SetFieldDoubleList(OGRFeatureH, int, int, double *)
Set field to list of doubles value.
Definition: ogrfeature.cpp:3317
void OGR_GFld_SetNullable(OGRGeomFieldDefnH hDefn, int)
Set whether this geometry field can receive null values.
Definition: ogrgeomfielddefn.cpp:616
OGRLayerH OGR_DS_CopyLayer(OGRDataSourceH, OGRLayerH, const char *, char **)
Duplicate an existing layer.
Definition: ogrdatasource.cpp:158
void OGR_F_SetFieldInteger64List(OGRFeatureH, int, int, const GIntBig *)
Set field to list of 64 bit integers value.
Definition: ogrfeature.cpp:3228
int OGR_F_GetFieldIndex(OGRFeatureH, const char *)
Fetch the field index given field name.
Definition: ogrfeature.cpp:955
OGRGeometryH OGR_G_GetBoundary(OGRGeometryH) CPL_WARN_DEPRECATED("Non standard method. Use OGR_G_Boundary() instead")
Compute boundary (deprecated)
Definition: ogrgeometry.cpp:2775
int OGR_SM_AddStyle(OGRStyleMgrH hSM, const char *pszStyleName, const char *pszStyleString)
Add a style to the current style table.
Definition: ogrfeaturestyle.cpp:451
void OGR_G_SetCoordinateDimension(OGRGeometryH, int)
Set the coordinate dimension.
Definition: ogrgeometry.cpp:787
void OGR_G_SetPoint(OGRGeometryH, int iPoint, double, double, double)
Set the location of a vertex in a point or linestring geometry.
Definition: ogr_api.cpp:454
int OGR_SM_GetPartCount(OGRStyleMgrH hSM, const char *pszStyleString)
Get the number of parts in a style.
Definition: ogrfeaturestyle.cpp:649
OGRGeometryH OGR_G_ConvexHull(OGRGeometryH)
Compute convex hull.
Definition: ogrgeometry.cpp:2655
int OGR_ST_GetParamNum(OGRStyleToolH hST, int eParam, int *bValueIsNull)
Get Style Tool parameter value as an integer.
Definition: ogrfeaturestyle.cpp:2270
void OGR_F_SetStyleString(OGRFeatureH, const char *)
Set feature style string. This method operate exactly as OGR_F_SetStyleStringDirectly() except that i...
Definition: ogrfeature.cpp:4702
int OGR_Fld_GetPrecision(OGRFieldDefnH)
Get the formatting precision for this field. This should normally be zero for fields of types other t...
Definition: ogrfielddefn.cpp:937
OGRGeometryH OGR_G_Simplify(OGRGeometryH hThis, double tolerance)
Compute a simplified geometry.
Definition: ogrgeometry.cpp:4271
OGRErr OGR_G_ExportToWkb(OGRGeometryH, OGRwkbByteOrder, unsigned char *)
Convert a geometry well known binary format.
Definition: ogrgeometry.cpp:1075
OGRErr OGR_L_Union(OGRLayerH, OGRLayerH, OGRLayerH, char **, GDALProgressFunc, void *)
Union of two layers.
Definition: ogrlayer.cpp:2554
double OGR_ST_GetParamDbl(OGRStyleToolH hST, int eParam, int *bValueIsNull)
Get Style Tool parameter value as a double.
Definition: ogrfeaturestyle.cpp:2322
int OGR_Dr_TestCapability(OGRSFDriverH, const char *)
Test if capability is available.
Definition: ogrsfdriver.cpp:163
OGRDataSourceH OGROpen(const char *, int, OGRSFDriverH *) CPL_WARN_UNUSED_RESULT
Open a file / data source with one of the registered drivers.
Definition: ogrsfdriverregistrar.cpp:110
GIntBig OGR_F_GetFID(OGRFeatureH)
Get feature identifier.
Definition: ogrfeature.cpp:3932
int OGR_G_HasCurveGeometry(OGRGeometryH, int bLookForNonLinear)
Returns if this geometry is or has curve geometry.
Definition: ogr_api.cpp:1050
OGRErr OGR_L_Clip(OGRLayerH, OGRLayerH, OGRLayerH, char **, GDALProgressFunc, void *)
Clip off areas that are not covered by the method layer.
Definition: ogrlayer.cpp:3657
OGRErr OGR_Dr_DeleteDataSource(OGRSFDriverH, const char *)
Delete a datasource.
Definition: ogrsfdriver.cpp:104
enum ogr_style_tool_units_id OGRSTUnitId
const char * OGR_GFld_GetNameRef(OGRGeomFieldDefnH)
Fetch name of this field.
Definition: ogrgeomfielddefn.cpp:220
OGRErr OGR_G_ExportToIsoWkb(OGRGeometryH, OGRwkbByteOrder, unsigned char *)
Convert a geometry into SFSQL 1.2 / ISO SQL/MM Part 3 well known binary format.
Definition: ogrgeometry.cpp:1109
OGRwkbGeometryType
Definition: ogr_core.h:309
int OGR_G_Crosses(OGRGeometryH, OGRGeometryH)
Test for crossing.
Definition: ogrgeometry.cpp:3661
OGRGeometryH OGR_G_CreateFromGML(const char *)
Create geometry from GML.
Definition: gml2ogrgeometry.cpp:3370
void OGR_L_ResetReading(OGRLayerH)
Reset feature reading to start on the first feature.
Definition: ogrlayer.cpp:1460
OGRGeomFieldDefnH OGR_FD_GetGeomFieldDefn(OGRFeatureDefnH hFDefn, int i)
Fetch geometry field definition of the passed feature definition.
Definition: ogrfeaturedefn.cpp:653
const char * OGR_ST_GetParamStr(OGRStyleToolH hST, int eParam, int *bValueIsNull)
Get Style Tool parameter value as string.
Definition: ogrfeaturestyle.cpp:2218
int OGR_G_IsSimple(OGRGeometryH)
Returns TRUE if the geometry is simple.
Definition: ogrgeometry.cpp:1715
OGRGeometryH OGR_G_Difference(OGRGeometryH, OGRGeometryH)
Compute difference.
Definition: ogrgeometry.cpp:3275
void OGR_DS_ReleaseResultSet(OGRDataSourceH, OGRLayerH)
Release results of OGR_DS_ExecuteSQL().
Definition: ogrdatasource.cpp:239
OGRGeometryH OGR_G_ForceToMultiPoint(OGRGeometryH)
Convert to multipoint.
Definition: ogrgeometryfactory.cpp:869
void OGR_F_Destroy(OGRFeatureH)
Destroy feature.
Definition: ogrfeature.cpp:187
OGRFeatureH OGR_L_GetNextFeature(OGRLayerH)
Fetch the next available feature from this layer.
Definition: ogrlayer.cpp:540
int OGR_F_GetFieldCount(OGRFeatureH)
Fetch number of fields on this feature This will always be the same as the field count for the OGRFea...
Definition: ogrfeature.cpp:865
void OGR_G_AssignSpatialReference(OGRGeometryH, OGRSpatialReferenceH)
Assign spatial reference to this object.
Definition: ogrgeometry.cpp:318
OGRErr OGR_FD_DeleteFieldDefn(OGRFeatureDefnH hDefn, int iField)
Delete an existing field definition.
Definition: ogrfeaturedefn.cpp:475
const char * OGR_ST_GetStyleString(OGRStyleToolH hST)
Get the style string for this Style Tool.
Definition: ogrfeaturestyle.cpp:2502
OGRGeometryH OGR_G_Buffer(OGRGeometryH, double, int)
Compute buffer of geometry.
Definition: ogrgeometry.cpp:2890
int OGR_G_Touches(OGRGeometryH, OGRGeometryH)
Test for touching.
Definition: ogrgeometry.cpp:3578
int OGR_DS_TestCapability(OGRDataSourceH, const char *)
Test if capability is available.
Definition: ogrdatasource.cpp:256
int OGR_GFld_IsIgnored(OGRGeomFieldDefnH hDefn)
Return whether this field should be omitted when fetching features.
Definition: ogrgeomfielddefn.cpp:359
const char * OGR_Fld_GetDefault(OGRFieldDefnH hDefn)
Get default field value.
Definition: ogrfielddefn.cpp:540
char * OGR_G_ExportToJson(OGRGeometryH)
Convert a geometry into GeoJSON format.
Definition: ogr_api.cpp:1012
void OGR_Fld_Set(OGRFieldDefnH, const char *, OGRFieldType, int, int, OGRJustification)
Set defining parameters for a field in one call.
Definition: ogrfielddefn.cpp:1029
void OGR_GFld_Destroy(OGRGeomFieldDefnH)
Destroy a geometry field definition.
Definition: ogrgeomfielddefn.cpp:140
int OGR_F_GetFieldAsInteger(OGRFeatureH, int)
Fetch field value as integer.
Definition: ogrfeature.cpp:1398
const char * OGR_Dr_GetName(OGRSFDriverH)
Fetch name of driver (file format). This name should be relatively short (10-40 characters), and should reflect the underlying file format. For instance "ESRI Shapefile".
Definition: ogrsfdriver.cpp:122
OGRErr OGR_G_Transform(OGRGeometryH, OGRCoordinateTransformationH)
Apply arbitrary coordinate transformation to geometry.
Definition: ogrgeometry.cpp:585
void OGR_GFld_SetSpatialRef(OGRGeomFieldDefnH, OGRSpatialReferenceH hSRS)
Set the spatial reference of this field.
Definition: ogrgeomfielddefn.cpp:491
OGRErr OGR_G_AddGeometryDirectly(OGRGeometryH, OGRGeometryH)
Add a geometry directly to an existing geometry container.
Definition: ogr_api.cpp:812
void OGR_ST_SetParamNum(OGRStyleToolH hST, int eParam, int nValue)
Set Style Tool parameter value from an integer.
Definition: ogrfeaturestyle.cpp:2418
OGRwkbGeometryType OGR_L_GetGeomType(OGRLayerH)
Return the layer geometry type.
Definition: ogrlayer.cpp:1750
double OGR_G_Area(OGRGeometryH)
Compute geometry area.
Definition: ogr_api.cpp:957
int OGR_F_IsFieldSet(OGRFeatureH, int)
Test if a field has ever been assigned a value or not.
Definition: ogrfeature.cpp:1167
OGRErr OGR_L_CommitTransaction(OGRLayerH)
For datasources which support transactions, CommitTransaction commits a transaction.
Definition: ogrlayer.cpp:942
int OGR_G_Contains(OGRGeometryH, OGRGeometryH)
Test for containment.
Definition: ogrgeometry.cpp:3825
OGRErr OGR_L_Erase(OGRLayerH, OGRLayerH, OGRLayerH, char **, GDALProgressFunc, void *)
Remove areas that are covered by the method layer.
Definition: ogrlayer.cpp:3903
OGRErr OGR_G_RemoveGeometry(OGRGeometryH, int, int)
Remove a geometry from an exiting geometry container.
Definition: ogr_api.cpp:871
OGRGeomFieldDefnH OGR_F_GetGeomFieldDefnRef(OGRFeatureH hFeat, int iField)
Fetch definition for this geometry field.
Definition: ogrfeature.cpp:1044
int OGR_L_TestCapability(OGRLayerH, const char *)
Test if this layer supported the named capability.
Definition: ogrlayer.cpp:1058
OGRwkbGeometryType OGR_FD_GetGeomType(OGRFeatureDefnH)
Fetch the geometry base type of the passed feature definition.
Definition: ogrfeaturedefn.cpp:912
OGRStyleMgrH OGR_SM_Create(OGRStyleTableH hStyleTable) CPL_WARN_UNUSED_RESULT
OGRStyleMgr factory.
Definition: ogrfeaturestyle.cpp:149
OGRErr OGR_L_SetAttributeFilter(OGRLayerH, const char *)
Set a new attribute query.
Definition: ogrlayer.cpp:429
int OGR_Fld_IsDefaultDriverSpecific(OGRFieldDefnH hDefn)
Returns whether the default value is driver specific.
Definition: ogrfielddefn.cpp:602
OGRSFDriverH OGR_DS_GetDriver(OGRDataSourceH)
Returns the driver that the dataset was opened with.
Definition: ogrdatasource.cpp:333
OGRErr OGR_FD_DeleteGeomFieldDefn(OGRFeatureDefnH hFDefn, int iGeomField)
Delete an existing geometry field definition.
Definition: ogrfeaturedefn.cpp:798
OGRLayerH OGR_DS_GetLayer(OGRDataSourceH, int)
Fetch a layer by index.
Definition: ogrdatasource.cpp:286
void OGR_GFld_SetIgnored(OGRGeomFieldDefnH hDefn, int)
Set whether this field should be omitted when fetching features.
Definition: ogrgeomfielddefn.cpp:396
OGRErr OGR_L_DeleteFeature(OGRLayerH, GIntBig)
Delete feature from layer.
Definition: ogrlayer.cpp:1541
int OGR_G_GetGeometryCount(OGRGeometryH)
Fetch the number of elements in a geometry or number of geometries in container.
Definition: ogr_api.cpp:651
int OGR_G_GetPoints(OGRGeometryH hGeom, void *pabyX, int nXStride, void *pabyY, int nYStride, void *pabyZ, int nZStride)
Returns all points of line string.
Definition: ogr_api.cpp:268
OGRLayerH OGR_DS_GetLayerByName(OGRDataSourceH, const char *)
Fetch a layer by name.
Definition: ogrdatasource.cpp:195
OGRJustification OGR_Fld_GetJustify(OGRFieldDefnH)
Get the justification for this field.
Definition: ogrfielddefn.cpp:801
GIntBig OGR_L_GetFeatureCount(OGRLayerH, int)
Fetch the feature count in this layer.
Definition: ogrlayer.cpp:195
OGRErr OGR_L_Identity(OGRLayerH, OGRLayerH, OGRLayerH, char **, GDALProgressFunc, void *)
Identify the features of this layer with the ones from the identity layer.
Definition: ogrlayer.cpp:3139
char * OGR_G_ExportToGML(OGRGeometryH)
Convert a geometry into GML format.
Definition: ogr2gmlgeometry.cpp:1043
OGRErr OGR_L_Update(OGRLayerH, OGRLayerH, OGRLayerH, char **, GDALProgressFunc, void *)
Update this layer with features from the update layer.
Definition: ogrlayer.cpp:3421
OGRGeometryH OGR_G_Intersection(OGRGeometryH, OGRGeometryH)
Compute intersection.
Definition: ogrgeometry.cpp:2992
void OGR_G_SetPointCount(OGRGeometryH hGeom, int nNewPointCount)
Set number of points in a geometry.
Definition: ogr_api.cpp:82
OGRJustification
Definition: ogr_core.h:556
OGRStyleTableH OGR_STBL_Create(void) CPL_WARN_UNUSED_RESULT
OGRStyleTable factory.
Definition: ogrfeaturestyle.cpp:804
void OGR_Fld_SetName(OGRFieldDefnH, const char *)
Reset the name of this field.
Definition: ogrfielddefn.cpp:180
void OGR_Fld_SetPrecision(OGRFieldDefnH, int)
Set the formatting precision for this field in characters.
Definition: ogrfielddefn.cpp:973
void OGR_F_SetFieldIntegerList(OGRFeatureH, int, int, int *)
Set field to list of integers value.
Definition: ogrfeature.cpp:3129
OGRFeatureDefnH OGR_F_GetDefnRef(OGRFeatureH)
Fetch feature definition.
Definition: ogrfeature.cpp:271
OGRGeometryH OGR_G_Value(OGRGeometryH, double dfDistance)
Fetch point at given distance along curve.
Definition: ogr_api.cpp:1149
double OGR_F_GetFieldAsDouble(OGRFeatureH, int)
Fetch field value as a double.
Definition: ogrfeature.cpp:1590
OGRFeatureH OGR_F_Clone(OGRFeatureH)
Duplicate feature.
Definition: ogrfeature.cpp:826
int OGR_FD_Reference(OGRFeatureDefnH)
Increments the reference count by one.
Definition: ogrfeaturedefn.cpp:1024
const double * OGR_F_GetFieldAsDoubleList(OGRFeatureH, int, int *)
Fetch field value as a list of doubles.
Definition: ogrfeature.cpp:2171
OGRGeometryH OGR_G_GetLinearGeometry(OGRGeometryH hGeom, double dfMaxAngleStepSizeDegrees, char **papszOptions)
Return, possibly approximate, linear version of this geometry.
Definition: ogr_api.cpp:1086
OGRSpatialReferenceH OGR_GFld_GetSpatialRef(OGRGeomFieldDefnH)
Fetch spatial reference system of this field.
Definition: ogrgeomfielddefn.cpp:436
char * OGR_G_ExportToKML(OGRGeometryH, const char *pszAltitudeMode)
Convert a geometry into KML format.
Definition: ogr_api.cpp:1007
OGRGeometryH OGR_G_CreateGeometry(OGRwkbGeometryType)
Create an empty geometry of desired type.
Definition: ogrgeometryfactory.cpp:482
OGRFieldType
Definition: ogr_core.h:512
char ** OGR_F_GetFieldAsStringList(OGRFeatureH, int)
Fetch field value as a list of strings.
Definition: ogrfeature.cpp:2243
Definition: ogr_core.h:162
const char * OGR_DS_GetName(OGRDataSourceH)
Returns the name of the data source.
Definition: ogrdatasource.cpp:305
GByte * OGR_F_GetFieldAsBinary(OGRFeatureH, int, int *)
Fetch field value as binary.
Definition: ogrfeature.cpp:2318
int OGR_FD_GetReferenceCount(OGRFeatureDefnH)
Fetch current reference count.
Definition: ogrfeaturedefn.cpp:1093
void OGRRegisterAll(void)
Register all drivers.
Definition: ogrregisterall.cpp:39
OGRErr OGR_L_Intersection(OGRLayerH, OGRLayerH, OGRLayerH, char **, GDALProgressFunc, void *)
Intersection of two layers.
Definition: ogrlayer.cpp:2210
OGRGeometryH OGR_G_Polygonize(OGRGeometryH)
Polygonizes a set of sparse edges.
Definition: ogrgeometry.cpp:4490
void OGR_STBL_ResetStyleStringReading(OGRStyleTableH hStyleTable)
Reset the next style pointer to 0.
Definition: ogrfeaturestyle.cpp:1277
void OGR_F_SetFieldBinary(OGRFeatureH, int, int, GByte *)
Set field to binary data.
Definition: ogrfeature.cpp:3447
void OGR_G_SetPoints(OGRGeometryH hGeom, int nPointsIn, void *pabyX, int nXStride, void *pabyY, int nYStride, void *pabyZ, int nZStride)
Assign all points in a point or a line string geometry.
Definition: ogr_api.cpp:387
const int * OGR_F_GetFieldAsIntegerList(OGRFeatureH, int, int *)
Fetch field value as a list of integers.
Definition: ogrfeature.cpp:2027
void OGR_G_GetPoint(OGRGeometryH, int iPoint, double *, double *, double *)
Fetch a point in line string or a point geometry.
Definition: ogr_api.cpp:317
void OGR_ST_Destroy(OGRStyleToolH hST)
Destroy Style Tool.
Definition: ogrfeaturestyle.cpp:1433
const char * OGR_GetFieldTypeName(OGRFieldType)
Fetch human readable name for a field type.
Definition: ogrfielddefn.cpp:681
int OGR_F_Validate(OGRFeatureH, int nValidateFlags, int bEmitError)
Validate that a feature meets constraints of its schema.
Definition: ogrfeature.cpp:5152
OGRGeometryH OGR_G_Union(OGRGeometryH, OGRGeometryH)
Compute union.
Definition: ogrgeometry.cpp:3091
OGRGeometryH OGR_G_ForceToMultiLineString(OGRGeometryH)
Convert to multilinestring.
Definition: ogrgeometryfactory.cpp:1113
double OGR_G_Length(OGRGeometryH)
Compute length of a geometry.
Definition: ogr_api.cpp:911
OGRSFDriverH OGRGetDriver(int)
Fetch the indicated driver.
Definition: ogrsfdriverregistrar.cpp:381
OGRGeometryH OGR_G_ForceToLineString(OGRGeometryH)
Convert to line string.
Definition: ogrgeometryfactory.cpp:2987
void OGR_STBL_Destroy(OGRStyleTableH hSTBL)
Destroy Style Table.
Definition: ogrfeaturestyle.cpp:846
OGRErr OGR_F_SetFrom(OGRFeatureH, OGRFeatureH, int)
Set one feature from another.
Definition: ogrfeature.cpp:4307
void OGRCleanupAll(void)
Cleanup all OGR related resources.
Definition: ogrsfdriverregistrar.cpp:90
OGRLayerH OGR_DS_ExecuteSQL(OGRDataSourceH, const char *, OGRGeometryH, const char *)
Execute an SQL statement against the data store.
Definition: ogrdatasource.cpp:214
void OGR_L_SetSpatialFilterRect(OGRLayerH, double, double, double, double)
Set a new rectangular spatial filter.
Definition: ogrlayer.cpp:1208
void OGR_FD_AddGeomFieldDefn(OGRFeatureDefnH hFDefn, OGRGeomFieldDefnH hGFldDefn)
Add a new field definition to the passed feature definition.
Definition: ogrfeaturedefn.cpp:728
int OGR_L_FindFieldIndex(OGRLayerH, const char *, int bExactMatch)
Find the index of field in a layer.
Definition: ogrlayer.cpp:1003
Definition: ogr_core.h:48
int OGR_AreTypeSubTypeCompatible(OGRFieldType eType, OGRFieldSubType eSubType)
Return if type and subtype are compatible.
Definition: ogrfielddefn.cpp:760
Definition: ogr_core.h:574
OGRGeometryH OGR_G_ForceToPolygon(OGRGeometryH)
Convert to polygon.
Definition: ogrgeometryfactory.cpp:643
const char * OGR_GetFieldSubTypeName(OGRFieldSubType)
Fetch human readable name for a field subtype.
Definition: ogrfielddefn.cpp:741
int OGR_G_WkbSize(OGRGeometryH hGeom)
Returns size of related binary representation.
Definition: ogrgeometry.cpp:896
OGRErr OGR_G_CreateFromWkt(char **, OGRSpatialReferenceH, OGRGeometryH *)
Create a geometry object of the appropriate type from it's well known text representation.
Definition: ogrgeometryfactory.cpp:384
OGRErr OGR_F_SetGeomFieldDirectly(OGRFeatureH hFeat, int iField, OGRGeometryH hGeom)
Set feature geometry of a specified geometry field.
Definition: ogrfeature.cpp:686
int OGR_G_Within(OGRGeometryH, OGRGeometryH)
Test for containment.
Definition: ogrgeometry.cpp:3743
char * OGR_G_ExportToJsonEx(OGRGeometryH, char **papszOptions)
Convert a geometry into GeoJSON format.
Definition: ogr_api.cpp:1016
OGRStyleToolH OGR_SM_GetPart(OGRStyleMgrH hSM, int nPartId, const char *pszStyleString)
Fetch a part (style tool) from the current style.
Definition: ogrfeaturestyle.cpp:733
const char * OGR_F_GetStyleString(OGRFeatureH)
Fetch style string for this feature.
Definition: ogrfeature.cpp:4652
OGRGeometryH OGRBuildPolygonFromEdges(OGRGeometryH hLinesAsCollection, int bBestEffort, int bAutoClose, double dfTolerance, OGRErr *peErr)
Definition: ograssemblepolygon.cpp:134
OGRFeatureDefnH OGR_L_GetLayerDefn(OGRLayerH)
Fetch the schema information for this layer.
Definition: ogrlayer.cpp:986
OGRErr OGRReleaseDataSource(OGRDataSourceH)
Drop a reference to this datasource, and if the reference count drops to zero close (destroy) the dat...
Definition: ogrsfdriverregistrar.cpp:153
int OGR_GFld_IsNullable(OGRGeomFieldDefnH hDefn)
Return whether this geometry field can receive null values.
Definition: ogrgeomfielddefn.cpp:570
void OGR_FD_SetGeometryIgnored(OGRFeatureDefnH, int)
Set whether the geometry can be omitted when fetching features.
Definition: ogrfeaturedefn.cpp:1242
int OGR_Fld_IsNullable(OGRFieldDefnH hDefn)
Return whether this field can receive null values.
Definition: ogrfielddefn.cpp:1167
void OGR_F_SetFieldDateTime(OGRFeatureH, int, int, int, int, int, int, int, int)
Set field to datetime.
Definition: ogrfeature.cpp:3532
OGRLayerH OGR_DS_CreateLayer(OGRDataSourceH, const char *, OGRSpatialReferenceH, OGRwkbGeometryType, char **)
This function attempts to create a new layer on the data source with the indicated name...
Definition: ogrdatasource.cpp:129
const char * OGR_L_GetGeometryColumn(OGRLayerH)
This method returns the name of the underlying database column being used as the geometry column...
Definition: ogrlayer.cpp:1620
OGRErr OGR_L_RollbackTransaction(OGRLayerH)
For datasources which support transactions, RollbackTransaction will roll back a datasource to its st...
Definition: ogrlayer.cpp:969
void OGR_L_SetSpatialFilterEx(OGRLayerH, int iGeomField, OGRGeometryH hGeom)
Set a new spatial filter.
Definition: ogrlayer.cpp:1156
void OGR_ST_SetParamStr(OGRStyleToolH hST, int eParam, const char *pszValue)
Set Style Tool parameter value from a string.
Definition: ogrfeaturestyle.cpp:2373
void OGR_SM_Destroy(OGRStyleMgrH hSM)
Destroy Style Manager.
Definition: ogrfeaturestyle.cpp:182
OGRErr OGR_L_CreateFeature(OGRLayerH, OGRFeatureH)
Create and write a new feature within a layer.
Definition: ogrlayer.cpp:639
OGRErr OGR_F_SetFromWithMap(OGRFeatureH, OGRFeatureH, int, int *)
Set one feature from another.
Definition: ogrfeature.cpp:4441
double OGR_G_GetY(OGRGeometryH, int)
Fetch the x coordinate of a point from a geometry.
Definition: ogr_api.cpp:160
OGRStyleToolH OGR_ST_Create(OGRSTClassId eClassId) CPL_WARN_UNUSED_RESULT
OGRStyleTool factory.
Definition: ogrfeaturestyle.cpp:1397
int OGR_Fld_GetWidth(OGRFieldDefnH)
Get the formatting width for this field.
Definition: ogrfielddefn.cpp:869
void OGR_G_SetPoint_2D(OGRGeometryH, int iPoint, double, double)
Set the location of a vertex in a point or linestring geometry.
Definition: ogr_api.cpp:512
int OGR_G_Equals(OGRGeometryH, OGRGeometryH)
Returns TRUE if two geometries are equivalent.
Definition: ogrgeometry.cpp:827
OGRGeometryH OGR_G_SymmetricDifference(OGRGeometryH, OGRGeometryH) CPL_WARN_DEPRECATED("Non standard method. Use OGR_G_SymDifference() instead")
Compute symmetric difference (deprecated)
Definition: ogrgeometry.cpp:3412
OGRwkbGeometryType OGR_GFld_GetType(OGRGeomFieldDefnH)
Fetch geometry type of this field.
Definition: ogrgeomfielddefn.cpp:263
int OGR_FD_GetGeomFieldCount(OGRFeatureDefnH hFDefn)
Fetch number of geometry fields on the passed feature definition.
Definition: ogrfeaturedefn.cpp:593
void OGR_Fld_SetType(OGRFieldDefnH, OGRFieldType)
Set the type of this field. This should never be done to an OGRFieldDefn that is already part of an O...
Definition: ogrfielddefn.cpp:304
const char * OGR_SM_InitFromFeature(OGRStyleMgrH hSM, OGRFeatureH hFeat)
Initialize style manager from the style string of a feature.
Definition: ogrfeaturestyle.cpp:276
void OGR_Fld_SetDefault(OGRFieldDefnH hDefn, const char *)
Set default field value.
Definition: ogrfielddefn.cpp:502
void OGR_Fld_SetSubType(OGRFieldDefnH, OGRFieldSubType)
Set the subtype of this field. This should never be done to an OGRFieldDefn that is already part of a...
Definition: ogrfielddefn.cpp:393
void OGR_FD_SetStyleIgnored(OGRFeatureDefnH, int)
Set whether the style can be omitted when fetching features.
Definition: ogrfeaturedefn.cpp:1310
int OGR_G_IsRing(OGRGeometryH)
Test if the geometry is a ring.
Definition: ogrgeometry.cpp:1788
void OGR_G_DumpReadable(OGRGeometryH, FILE *, const char *)
Dump geometry in well known text format to indicated output file.
Definition: ogrgeometry.cpp:255
void OGR_G_DestroyGeometry(OGRGeometryH)
Destroy geometry object.
Definition: ogrgeometryfactory.cpp:526
int OGR_G_Disjoint(OGRGeometryH, OGRGeometryH)
Test for disjointness.
Definition: ogrgeometry.cpp:3495
OGRErr OGR_L_DeleteField(OGRLayerH, int iField)
Create a new field on a layer.
Definition: ogrlayer.cpp:708
void OGR_FD_SetGeomType(OGRFeatureDefnH, OGRwkbGeometryType)
Assign the base geometry type for the passed layer (the same as the feature definition).
Definition: ogrfeaturedefn.cpp:985
const char * OGR_STBL_Find(OGRStyleTableH hStyleTable, const char *pszName)
Get a style string by name.
Definition: ogrfeaturestyle.cpp:1161
const char * OGR_STBL_GetNextStyle(OGRStyleTableH hStyleTable)
Get the next style string from the table.
Definition: ogrfeaturestyle.cpp:1329
void OGR_Fld_SetWidth(OGRFieldDefnH, int)
Set the formatting width for this field in characters.
Definition: ogrfielddefn.cpp:901
OGRErr OGR_L_SetNextByIndex(OGRLayerH, GIntBig)
Move read cursor to the nIndex'th feature in the current resultset.
Definition: ogrlayer.cpp:523
const GIntBig * OGR_F_GetFieldAsInteger64List(OGRFeatureH, int, int *)
Fetch field value as a list of 64 bit integers.
Definition: ogrfeature.cpp:2100
void OGR_F_FillUnsetWithDefault(OGRFeatureH hFeat, int bNotNullableOnly, char **papszOptions)
Fill unset fields with default values that might be defined.
Definition: ogrfeature.cpp:5008
OGRFieldType OGR_Fld_GetType(OGRFieldDefnH)
Fetch type of this field.
Definition: ogrfielddefn.cpp:252
OGRErr OGR_L_CreateGeomField(OGRLayerH hLayer, OGRGeomFieldDefnH hFieldDefn, int bForce)
Create a new geometry field on a layer.
Definition: ogrlayer.cpp:885
OGRGeometryH OGR_G_Clone(OGRGeometryH)
Make a copy of this object.
Definition: ogrgeometry.cpp:1461
void OGR_GFld_SetType(OGRGeomFieldDefnH, OGRwkbGeometryType)
Set the geometry type of this field. This should never be done to an OGRGeomFieldDefn that is already...
Definition: ogrgeomfielddefn.cpp:321
void OGRSetNonLinearGeometriesEnabledFlag(int bFlag)
Set flag to enable/disable returning non-linear geometries in the C API.
Definition: ogr_api.cpp:1193
int OGR_F_GetFieldAsDateTime(OGRFeatureH, int, int *, int *, int *, int *, int *, int *, int *)
Fetch field value as date and time.
Definition: ogrfeature.cpp:2431
int OGR_FD_GetGeomFieldIndex(OGRFeatureDefnH hFDefn, const char *pszName)
Find geometry field by name.
Definition: ogrfeaturedefn.cpp:853
const char * OGR_Fld_GetNameRef(OGRFieldDefnH)
Fetch name of this field.
Definition: ogrfielddefn.cpp:214
OGRDataSourceH OGR_Dr_CopyDataSource(OGRSFDriverH, OGRDataSourceH, const char *, char **) CPL_WARN_UNUSED_RESULT
This function creates a new datasource by copying all the layers from the source datasource.
Definition: ogrsfdriver.cpp:188
OGRGeometryH OGR_G_GetGeometryRef(OGRGeometryH, int)
Fetch geometry from a geometry container.
Definition: ogr_api.cpp:704
OGRErr OGR_L_GetExtentEx(OGRLayerH, int iGeomField, OGREnvelope *psExtent, int bForce)
Fetch the extent of this layer, on the specified geometry field.
Definition: ogrlayer.cpp:322
int OGR_G_Intersects(OGRGeometryH, OGRGeometryH)
Do these features intersect?
Definition: ogrgeometry.cpp:425
int OGR_G_GetDimension(OGRGeometryH)
Get the dimension of this geometry.
Definition: ogrgeometry.cpp:694
int OGR_G_IsValid(OGRGeometryH)
Test if the geometry is valid.
Definition: ogrgeometry.cpp:1642
void OGR_F_SetStyleStringDirectly(OGRFeatureH, char *)
Set feature style string. This method operate exactly as OGR_F_SetStyleString() except that it assume...
Definition: ogrfeature.cpp:4749
OGRFieldDefnH OGR_F_GetFieldDefnRef(OGRFeatureH, int)
Fetch definition for this field.
Definition: ogrfeature.cpp:906
double OGR_G_GetX(OGRGeometryH, int)
Fetch the x coordinate of a point from a geometry.
Definition: ogr_api.cpp:113
OGRErr OGR_DS_DeleteLayer(OGRDataSourceH, int)
Delete the indicated layer from the datasource.
Definition: ogrdatasource.cpp:176
int OGR_G_GetPointCount(OGRGeometryH)
Fetch number of points from a geometry.
Definition: ogr_api.cpp:51
void OGR_G_FlattenTo2D(OGRGeometryH)
Convert geometry to strictly 2D. In a sense this converts all Z coordinates to 0.0.
Definition: ogrgeometry.cpp:2138

Generated for GDAL by doxygen 1.8.10.