OGR
ogr_api.h
Go to the documentation of this file.
1 /******************************************************************************
2  * $Id: ogr_api.h 23638 2011-12-22 21:02:56Z 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  *
11  * Permission is hereby granted, free of charge, to any person obtaining a
12  * copy of this software and associated documentation files (the "Software"),
13  * to deal in the Software without restriction, including without limitation
14  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
15  * and/or sell copies of the Software, and to permit persons to whom the
16  * Software is furnished to do so, subject to the following conditions:
17  *
18  * The above copyright notice and this permission notice shall be included
19  * in all copies or substantial portions of the Software.
20  *
21  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27  * DEALINGS IN THE SOFTWARE.
28  ****************************************************************************/
29 
30 #ifndef OGR_API_H_INCLUDED
31 #define OGR_API_H_INCLUDED
32 
42 #include "ogr_core.h"
43 
44 CPL_C_START
45 
46 /* -------------------------------------------------------------------- */
47 /* Geometry related functions (ogr_geometry.h) */
48 /* -------------------------------------------------------------------- */
49 #ifdef DEBUG
50 typedef struct OGRGeometryHS *OGRGeometryH;
51 #else
52 typedef void *OGRGeometryH;
53 #endif
54 
55 #ifndef _DEFINED_OGRSpatialReferenceH
56 #define _DEFINED_OGRSpatialReferenceH
57 
58 #ifdef DEBUG
59 typedef struct OGRSpatialReferenceHS *OGRSpatialReferenceH;
60 typedef struct OGRCoordinateTransformationHS *OGRCoordinateTransformationH;
61 #else
62 typedef void *OGRSpatialReferenceH;
63 typedef void *OGRCoordinateTransformationH;
64 #endif
65 
66 #endif
67 
68 struct _CPLXMLNode;
69 
70 /* From base OGRGeometry class */
71 
72 OGRErr CPL_DLL OGR_G_CreateFromWkb( unsigned char *, OGRSpatialReferenceH,
73  OGRGeometryH *, int );
74 OGRErr CPL_DLL OGR_G_CreateFromWkt( char **, OGRSpatialReferenceH,
75  OGRGeometryH * );
76 OGRErr CPL_DLL OGR_G_CreateFromFgf( unsigned char *, OGRSpatialReferenceH,
77  OGRGeometryH *, int, int * );
78 void CPL_DLL OGR_G_DestroyGeometry( OGRGeometryH );
79 OGRGeometryH CPL_DLL OGR_G_CreateGeometry( OGRwkbGeometryType );
80 OGRGeometryH CPL_DLL
82  double dfCenterX, double dfCenterY, double dfZ,
83  double dfPrimaryRadius, double dfSecondaryAxis, double dfRotation,
84  double dfStartAngle, double dfEndAngle,
85  double dfMaxAngleStepSizeDegrees );
86 
87 OGRGeometryH CPL_DLL OGR_G_ForceToPolygon( OGRGeometryH );
88 OGRGeometryH CPL_DLL OGR_G_ForceToMultiPolygon( OGRGeometryH );
89 OGRGeometryH CPL_DLL OGR_G_ForceToMultiPoint( OGRGeometryH );
90 OGRGeometryH CPL_DLL OGR_G_ForceToMultiLineString( OGRGeometryH );
91 
92 int CPL_DLL OGR_G_GetDimension( OGRGeometryH );
93 int CPL_DLL OGR_G_GetCoordinateDimension( OGRGeometryH );
94 void CPL_DLL OGR_G_SetCoordinateDimension( OGRGeometryH, int );
95 OGRGeometryH CPL_DLL OGR_G_Clone( OGRGeometryH );
96 void CPL_DLL OGR_G_GetEnvelope( OGRGeometryH, OGREnvelope * );
97 void CPL_DLL OGR_G_GetEnvelope3D( OGRGeometryH, OGREnvelope3D * );
98 OGRErr CPL_DLL OGR_G_ImportFromWkb( OGRGeometryH, unsigned char *, int );
99 OGRErr CPL_DLL OGR_G_ExportToWkb( OGRGeometryH, OGRwkbByteOrder, unsigned char*);
100 int CPL_DLL OGR_G_WkbSize( OGRGeometryH hGeom );
101 OGRErr CPL_DLL OGR_G_ImportFromWkt( OGRGeometryH, char ** );
102 OGRErr CPL_DLL OGR_G_ExportToWkt( OGRGeometryH, char ** );
103 OGRwkbGeometryType CPL_DLL OGR_G_GetGeometryType( OGRGeometryH );
104 const char CPL_DLL *OGR_G_GetGeometryName( OGRGeometryH );
105 void CPL_DLL OGR_G_DumpReadable( OGRGeometryH, FILE *, const char * );
106 void CPL_DLL OGR_G_FlattenTo2D( OGRGeometryH );
107 void CPL_DLL OGR_G_CloseRings( OGRGeometryH );
108 
109 OGRGeometryH CPL_DLL OGR_G_CreateFromGML( const char * );
110 char CPL_DLL *OGR_G_ExportToGML( OGRGeometryH );
111 char CPL_DLL *OGR_G_ExportToGMLEx( OGRGeometryH, char** papszOptions );
112 
113 #if defined(_CPL_MINIXML_H_INCLUDED)
114 OGRGeometryH CPL_DLL OGR_G_CreateFromGMLTree( const CPLXMLNode * );
115 CPLXMLNode CPL_DLL *OGR_G_ExportToGMLTree( OGRGeometryH );
116 CPLXMLNode CPL_DLL *OGR_G_ExportEnvelopeToGMLTree( OGRGeometryH );
117 #endif
118 
119 char CPL_DLL *OGR_G_ExportToKML( OGRGeometryH, const char* pszAltitudeMode );
120 
121 char CPL_DLL *OGR_G_ExportToJson( OGRGeometryH );
122 char CPL_DLL *OGR_G_ExportToJsonEx( OGRGeometryH, char** papszOptions );
123 OGRGeometryH CPL_DLL OGR_G_CreateGeometryFromJson( const char* );
124 
125 void CPL_DLL OGR_G_AssignSpatialReference( OGRGeometryH,
126  OGRSpatialReferenceH );
127 OGRSpatialReferenceH CPL_DLL OGR_G_GetSpatialReference( OGRGeometryH );
128 OGRErr CPL_DLL OGR_G_Transform( OGRGeometryH, OGRCoordinateTransformationH );
129 OGRErr CPL_DLL OGR_G_TransformTo( OGRGeometryH, OGRSpatialReferenceH );
130 
131 OGRGeometryH CPL_DLL OGR_G_Simplify( OGRGeometryH hThis, double tolerance );
132 OGRGeometryH CPL_DLL OGR_G_SimplifyPreserveTopology( OGRGeometryH hThis, double tolerance );
133 
134 void CPL_DLL OGR_G_Segmentize(OGRGeometryH hGeom, double dfMaxLength );
135 int CPL_DLL OGR_G_Intersects( OGRGeometryH, OGRGeometryH );
136 int CPL_DLL OGR_G_Equals( OGRGeometryH, OGRGeometryH );
137 /*int CPL_DLL OGR_G_EqualsExact( OGRGeometryH, OGRGeometryH, double );*/
138 int CPL_DLL OGR_G_Disjoint( OGRGeometryH, OGRGeometryH );
139 int CPL_DLL OGR_G_Touches( OGRGeometryH, OGRGeometryH );
140 int CPL_DLL OGR_G_Crosses( OGRGeometryH, OGRGeometryH );
141 int CPL_DLL OGR_G_Within( OGRGeometryH, OGRGeometryH );
142 int CPL_DLL OGR_G_Contains( OGRGeometryH, OGRGeometryH );
143 int CPL_DLL OGR_G_Overlaps( OGRGeometryH, OGRGeometryH );
144 
145 OGRGeometryH CPL_DLL OGR_G_Boundary( OGRGeometryH );
146 OGRGeometryH CPL_DLL OGR_G_ConvexHull( OGRGeometryH );
147 OGRGeometryH CPL_DLL OGR_G_Buffer( OGRGeometryH, double, int );
148 OGRGeometryH CPL_DLL OGR_G_Intersection( OGRGeometryH, OGRGeometryH );
149 OGRGeometryH CPL_DLL OGR_G_Union( OGRGeometryH, OGRGeometryH );
150 OGRGeometryH CPL_DLL OGR_G_UnionCascaded( OGRGeometryH );
151 /*OGRGeometryH CPL_DLL OGR_G_PointOnSurface( OGRGeometryH );*/
152 /*OGRGeometryH CPL_DLL OGR_G_Polygonize( OGRGeometryH *, int);*/
153 /*OGRGeometryH CPL_DLL OGR_G_Polygonizer_getCutEdges( OGRGeometryH *, int);*/
154 /*OGRGeometryH CPL_DLL OGR_G_LineMerge( OGRGeometryH );*/
155 
156 OGRGeometryH CPL_DLL OGR_G_Difference( OGRGeometryH, OGRGeometryH );
157 OGRGeometryH CPL_DLL OGR_G_SymDifference( OGRGeometryH, OGRGeometryH );
158 double CPL_DLL OGR_G_Distance( OGRGeometryH, OGRGeometryH );
159 double CPL_DLL OGR_G_Length( OGRGeometryH );
160 double CPL_DLL OGR_G_Area( OGRGeometryH );
161 int CPL_DLL OGR_G_Centroid( OGRGeometryH, OGRGeometryH );
162 
163 void CPL_DLL OGR_G_Empty( OGRGeometryH );
164 int CPL_DLL OGR_G_IsEmpty( OGRGeometryH );
165 int CPL_DLL OGR_G_IsValid( OGRGeometryH );
166 /*char CPL_DLL *OGR_G_IsValidReason( OGRGeometryH );*/
167 int CPL_DLL OGR_G_IsSimple( OGRGeometryH );
168 int CPL_DLL OGR_G_IsRing( OGRGeometryH );
169 
170 OGRGeometryH CPL_DLL OGR_G_Polygonize( OGRGeometryH );
171 
172 /* backward compatibility (non-standard methods) */
173 int CPL_DLL OGR_G_Intersect( OGRGeometryH, OGRGeometryH );
174 int CPL_DLL OGR_G_Equal( OGRGeometryH, OGRGeometryH );
175 OGRGeometryH CPL_DLL OGR_G_SymmetricDifference( OGRGeometryH, OGRGeometryH );
176 double CPL_DLL OGR_G_GetArea( OGRGeometryH );
177 OGRGeometryH CPL_DLL OGR_G_GetBoundary( OGRGeometryH );
178 
179 /* Methods for getting/setting vertices in points, line strings and rings */
180 int CPL_DLL OGR_G_GetPointCount( OGRGeometryH );
181 int CPL_DLL OGR_G_GetPoints( OGRGeometryH hGeom,
182  void* pabyX, int nXStride,
183  void* pabyY, int nYStride,
184  void* pabyZ, int nZStride);
185 double CPL_DLL OGR_G_GetX( OGRGeometryH, int );
186 double CPL_DLL OGR_G_GetY( OGRGeometryH, int );
187 double CPL_DLL OGR_G_GetZ( OGRGeometryH, int );
188 void CPL_DLL OGR_G_GetPoint( OGRGeometryH, int iPoint,
189  double *, double *, double * );
190 void CPL_DLL OGR_G_SetPoint( OGRGeometryH, int iPoint,
191  double, double, double );
192 void CPL_DLL OGR_G_SetPoint_2D( OGRGeometryH, int iPoint,
193  double, double );
194 void CPL_DLL OGR_G_AddPoint( OGRGeometryH, double, double, double );
195 void CPL_DLL OGR_G_AddPoint_2D( OGRGeometryH, double, double );
196 
197 /* Methods for getting/setting rings and members collections */
198 
199 int CPL_DLL OGR_G_GetGeometryCount( OGRGeometryH );
200 OGRGeometryH CPL_DLL OGR_G_GetGeometryRef( OGRGeometryH, int );
201 OGRErr CPL_DLL OGR_G_AddGeometry( OGRGeometryH, OGRGeometryH );
202 OGRErr CPL_DLL OGR_G_AddGeometryDirectly( OGRGeometryH, OGRGeometryH );
203 OGRErr CPL_DLL OGR_G_RemoveGeometry( OGRGeometryH, int, int );
204 
205 OGRGeometryH CPL_DLL OGRBuildPolygonFromEdges( OGRGeometryH hLinesAsCollection,
206  int bBestEffort,
207  int bAutoClose,
208  double dfTolerance,
209  OGRErr * peErr );
210 
211 OGRErr CPL_DLL OGRSetGenerate_DB2_V72_BYTE_ORDER(
212  int bGenerate_DB2_V72_BYTE_ORDER );
213 
214 int CPL_DLL OGRGetGenerate_DB2_V72_BYTE_ORDER(void);
215 
216 /* -------------------------------------------------------------------- */
217 /* Feature related (ogr_feature.h) */
218 /* -------------------------------------------------------------------- */
219 
220 #ifdef DEBUG
221 typedef struct OGRFieldDefnHS *OGRFieldDefnH;
222 typedef struct OGRFeatureDefnHS *OGRFeatureDefnH;
223 typedef struct OGRFeatureHS *OGRFeatureH;
224 typedef struct OGRStyleTableHS *OGRStyleTableH;
225 #else
226 typedef void *OGRFieldDefnH;
227 typedef void *OGRFeatureDefnH;
228 typedef void *OGRFeatureH;
229 typedef void *OGRStyleTableH;
230 #endif
231 
232 /* OGRFieldDefn */
233 
234 OGRFieldDefnH CPL_DLL OGR_Fld_Create( const char *, OGRFieldType ) CPL_WARN_UNUSED_RESULT;
235 void CPL_DLL OGR_Fld_Destroy( OGRFieldDefnH );
236 
237 void CPL_DLL OGR_Fld_SetName( OGRFieldDefnH, const char * );
238 const char CPL_DLL *OGR_Fld_GetNameRef( OGRFieldDefnH );
239 OGRFieldType CPL_DLL OGR_Fld_GetType( OGRFieldDefnH );
240 void CPL_DLL OGR_Fld_SetType( OGRFieldDefnH, OGRFieldType );
241 OGRJustification CPL_DLL OGR_Fld_GetJustify( OGRFieldDefnH );
242 void CPL_DLL OGR_Fld_SetJustify( OGRFieldDefnH, OGRJustification );
243 int CPL_DLL OGR_Fld_GetWidth( OGRFieldDefnH );
244 void CPL_DLL OGR_Fld_SetWidth( OGRFieldDefnH, int );
245 int CPL_DLL OGR_Fld_GetPrecision( OGRFieldDefnH );
246 void CPL_DLL OGR_Fld_SetPrecision( OGRFieldDefnH, int );
247 void CPL_DLL OGR_Fld_Set( OGRFieldDefnH, const char *, OGRFieldType,
248  int, int, OGRJustification );
249 int CPL_DLL OGR_Fld_IsIgnored( OGRFieldDefnH hDefn );
250 void CPL_DLL OGR_Fld_SetIgnored( OGRFieldDefnH hDefn, int );
251 
252 const char CPL_DLL *OGR_GetFieldTypeName( OGRFieldType );
253 
254 /* OGRFeatureDefn */
255 
256 OGRFeatureDefnH CPL_DLL OGR_FD_Create( const char * ) CPL_WARN_UNUSED_RESULT;
257 void CPL_DLL OGR_FD_Destroy( OGRFeatureDefnH );
258 void CPL_DLL OGR_FD_Release( OGRFeatureDefnH );
259 const char CPL_DLL *OGR_FD_GetName( OGRFeatureDefnH );
260 int CPL_DLL OGR_FD_GetFieldCount( OGRFeatureDefnH );
261 OGRFieldDefnH CPL_DLL OGR_FD_GetFieldDefn( OGRFeatureDefnH, int );
262 int CPL_DLL OGR_FD_GetFieldIndex( OGRFeatureDefnH, const char * );
263 void CPL_DLL OGR_FD_AddFieldDefn( OGRFeatureDefnH, OGRFieldDefnH );
264 OGRErr CPL_DLL OGR_FD_DeleteFieldDefn( OGRFeatureDefnH hDefn, int iField );
265 OGRErr CPL_DLL OGR_FD_ReorderFieldDefns( OGRFeatureDefnH hDefn, int* panMap );
266 OGRwkbGeometryType CPL_DLL OGR_FD_GetGeomType( OGRFeatureDefnH );
267 void CPL_DLL OGR_FD_SetGeomType( OGRFeatureDefnH, OGRwkbGeometryType );
268 int CPL_DLL OGR_FD_IsGeometryIgnored( OGRFeatureDefnH );
269 void CPL_DLL OGR_FD_SetGeometryIgnored( OGRFeatureDefnH, int );
270 int CPL_DLL OGR_FD_IsStyleIgnored( OGRFeatureDefnH );
271 void CPL_DLL OGR_FD_SetStyleIgnored( OGRFeatureDefnH, int );
272 int CPL_DLL OGR_FD_Reference( OGRFeatureDefnH );
273 int CPL_DLL OGR_FD_Dereference( OGRFeatureDefnH );
274 int CPL_DLL OGR_FD_GetReferenceCount( OGRFeatureDefnH );
275 
276 /* OGRFeature */
277 
278 OGRFeatureH CPL_DLL OGR_F_Create( OGRFeatureDefnH ) CPL_WARN_UNUSED_RESULT;
279 void CPL_DLL OGR_F_Destroy( OGRFeatureH );
280 OGRFeatureDefnH CPL_DLL OGR_F_GetDefnRef( OGRFeatureH );
281 
282 OGRErr CPL_DLL OGR_F_SetGeometryDirectly( OGRFeatureH, OGRGeometryH );
283 OGRErr CPL_DLL OGR_F_SetGeometry( OGRFeatureH, OGRGeometryH );
284 OGRGeometryH CPL_DLL OGR_F_GetGeometryRef( OGRFeatureH );
285 OGRGeometryH CPL_DLL OGR_F_StealGeometry( OGRFeatureH );
286 OGRFeatureH CPL_DLL OGR_F_Clone( OGRFeatureH );
287 int CPL_DLL OGR_F_Equal( OGRFeatureH, OGRFeatureH );
288 
289 int CPL_DLL OGR_F_GetFieldCount( OGRFeatureH );
290 OGRFieldDefnH CPL_DLL OGR_F_GetFieldDefnRef( OGRFeatureH, int );
291 int CPL_DLL OGR_F_GetFieldIndex( OGRFeatureH, const char * );
292 
293 int CPL_DLL OGR_F_IsFieldSet( OGRFeatureH, int );
294 void CPL_DLL OGR_F_UnsetField( OGRFeatureH, int );
295 OGRField CPL_DLL *OGR_F_GetRawFieldRef( OGRFeatureH, int );
296 
297 int CPL_DLL OGR_F_GetFieldAsInteger( OGRFeatureH, int );
298 double CPL_DLL OGR_F_GetFieldAsDouble( OGRFeatureH, int );
299 const char CPL_DLL *OGR_F_GetFieldAsString( OGRFeatureH, int );
300 const int CPL_DLL *OGR_F_GetFieldAsIntegerList( OGRFeatureH, int, int * );
301 const double CPL_DLL *OGR_F_GetFieldAsDoubleList( OGRFeatureH, int, int * );
302 char CPL_DLL **OGR_F_GetFieldAsStringList( OGRFeatureH, int );
303 GByte CPL_DLL *OGR_F_GetFieldAsBinary( OGRFeatureH, int, int * );
304 int CPL_DLL OGR_F_GetFieldAsDateTime( OGRFeatureH, int, int *, int *, int *,
305  int *, int *, int *, int * );
306 
307 void CPL_DLL OGR_F_SetFieldInteger( OGRFeatureH, int, int );
308 void CPL_DLL OGR_F_SetFieldDouble( OGRFeatureH, int, double );
309 void CPL_DLL OGR_F_SetFieldString( OGRFeatureH, int, const char * );
310 void CPL_DLL OGR_F_SetFieldIntegerList( OGRFeatureH, int, int, int * );
311 void CPL_DLL OGR_F_SetFieldDoubleList( OGRFeatureH, int, int, double * );
312 void CPL_DLL OGR_F_SetFieldStringList( OGRFeatureH, int, char ** );
313 void CPL_DLL OGR_F_SetFieldRaw( OGRFeatureH, int, OGRField * );
314 void CPL_DLL OGR_F_SetFieldBinary( OGRFeatureH, int, int, GByte * );
315 void CPL_DLL OGR_F_SetFieldDateTime( OGRFeatureH, int,
316  int, int, int, int, int, int, int );
317 
318 long CPL_DLL OGR_F_GetFID( OGRFeatureH );
319 OGRErr CPL_DLL OGR_F_SetFID( OGRFeatureH, long );
320 void CPL_DLL OGR_F_DumpReadable( OGRFeatureH, FILE * );
321 OGRErr CPL_DLL OGR_F_SetFrom( OGRFeatureH, OGRFeatureH, int );
322 OGRErr CPL_DLL OGR_F_SetFromWithMap( OGRFeatureH, OGRFeatureH, int , int * );
323 
324 const char CPL_DLL *OGR_F_GetStyleString( OGRFeatureH );
325 void CPL_DLL OGR_F_SetStyleString( OGRFeatureH, const char * );
326 void CPL_DLL OGR_F_SetStyleStringDirectly( OGRFeatureH, char * );
327 OGRStyleTableH CPL_DLL OGR_F_GetStyleTable( OGRFeatureH );
328 void CPL_DLL OGR_F_SetStyleTableDirectly( OGRFeatureH, OGRStyleTableH );
329 void CPL_DLL OGR_F_SetStyleTable( OGRFeatureH, OGRStyleTableH );
330 
331 /* -------------------------------------------------------------------- */
332 /* ogrsf_frmts.h */
333 /* -------------------------------------------------------------------- */
334 
335 #ifdef DEBUG
336 typedef struct OGRLayerHS *OGRLayerH;
337 typedef struct OGRDataSourceHS *OGRDataSourceH;
338 typedef struct OGRDriverHS *OGRSFDriverH;
339 #else
340 typedef void *OGRLayerH;
341 typedef void *OGRDataSourceH;
342 typedef void *OGRSFDriverH;
343 #endif
344 
345 /* OGRLayer */
346 
347 const char CPL_DLL* OGR_L_GetName( OGRLayerH );
348 OGRwkbGeometryType CPL_DLL OGR_L_GetGeomType( OGRLayerH );
349 OGRGeometryH CPL_DLL OGR_L_GetSpatialFilter( OGRLayerH );
350 void CPL_DLL OGR_L_SetSpatialFilter( OGRLayerH, OGRGeometryH );
351 void CPL_DLL OGR_L_SetSpatialFilterRect( OGRLayerH,
352  double, double, double, double );
353 OGRErr CPL_DLL OGR_L_SetAttributeFilter( OGRLayerH, const char * );
354 void CPL_DLL OGR_L_ResetReading( OGRLayerH );
355 OGRFeatureH CPL_DLL OGR_L_GetNextFeature( OGRLayerH );
356 OGRErr CPL_DLL OGR_L_SetNextByIndex( OGRLayerH, long );
357 OGRFeatureH CPL_DLL OGR_L_GetFeature( OGRLayerH, long );
358 OGRErr CPL_DLL OGR_L_SetFeature( OGRLayerH, OGRFeatureH );
359 OGRErr CPL_DLL OGR_L_CreateFeature( OGRLayerH, OGRFeatureH );
360 OGRErr CPL_DLL OGR_L_DeleteFeature( OGRLayerH, long );
361 OGRFeatureDefnH CPL_DLL OGR_L_GetLayerDefn( OGRLayerH );
362 OGRSpatialReferenceH CPL_DLL OGR_L_GetSpatialRef( OGRLayerH );
363 int CPL_DLL OGR_L_GetFeatureCount( OGRLayerH, int );
364 OGRErr CPL_DLL OGR_L_GetExtent( OGRLayerH, OGREnvelope *, int );
365 int CPL_DLL OGR_L_TestCapability( OGRLayerH, const char * );
366 OGRErr CPL_DLL OGR_L_CreateField( OGRLayerH, OGRFieldDefnH, int );
367 OGRErr CPL_DLL OGR_L_DeleteField( OGRLayerH, int iField );
368 OGRErr CPL_DLL OGR_L_ReorderFields( OGRLayerH, int* panMap );
369 OGRErr CPL_DLL OGR_L_ReorderField( OGRLayerH, int iOldFieldPos, int iNewFieldPos );
370 OGRErr CPL_DLL OGR_L_AlterFieldDefn( OGRLayerH, int iField, OGRFieldDefnH hNewFieldDefn, int nFlags );
371 OGRErr CPL_DLL OGR_L_StartTransaction( OGRLayerH );
372 OGRErr CPL_DLL OGR_L_CommitTransaction( OGRLayerH );
373 OGRErr CPL_DLL OGR_L_RollbackTransaction( OGRLayerH );
374 int CPL_DLL OGR_L_Reference( OGRLayerH );
375 int CPL_DLL OGR_L_Dereference( OGRLayerH );
376 int CPL_DLL OGR_L_GetRefCount( OGRLayerH );
377 OGRErr CPL_DLL OGR_L_SyncToDisk( OGRLayerH );
378 GIntBig CPL_DLL OGR_L_GetFeaturesRead( OGRLayerH );
379 const char CPL_DLL *OGR_L_GetFIDColumn( OGRLayerH );
380 const char CPL_DLL *OGR_L_GetGeometryColumn( OGRLayerH );
381 OGRStyleTableH CPL_DLL OGR_L_GetStyleTable( OGRLayerH );
382 void CPL_DLL OGR_L_SetStyleTableDirectly( OGRLayerH, OGRStyleTableH );
383 void CPL_DLL OGR_L_SetStyleTable( OGRLayerH, OGRStyleTableH );
384 OGRErr CPL_DLL OGR_L_SetIgnoredFields( OGRLayerH, const char** );
385 
386 /* OGRDataSource */
387 
388 void CPL_DLL OGR_DS_Destroy( OGRDataSourceH );
389 const char CPL_DLL *OGR_DS_GetName( OGRDataSourceH );
390 int CPL_DLL OGR_DS_GetLayerCount( OGRDataSourceH );
391 OGRLayerH CPL_DLL OGR_DS_GetLayer( OGRDataSourceH, int );
392 OGRLayerH CPL_DLL OGR_DS_GetLayerByName( OGRDataSourceH, const char * );
393 OGRErr CPL_DLL OGR_DS_DeleteLayer( OGRDataSourceH, int );
394 OGRSFDriverH CPL_DLL OGR_DS_GetDriver( OGRDataSourceH );
395 OGRLayerH CPL_DLL OGR_DS_CreateLayer( OGRDataSourceH, const char *,
396  OGRSpatialReferenceH, OGRwkbGeometryType,
397  char ** );
398 OGRLayerH CPL_DLL OGR_DS_CopyLayer( OGRDataSourceH, OGRLayerH, const char *,
399  char ** );
400 int CPL_DLL OGR_DS_TestCapability( OGRDataSourceH, const char * );
401 OGRLayerH CPL_DLL OGR_DS_ExecuteSQL( OGRDataSourceH, const char *,
402  OGRGeometryH, const char * );
403 void CPL_DLL OGR_DS_ReleaseResultSet( OGRDataSourceH, OGRLayerH );
404 int CPL_DLL OGR_DS_Reference( OGRDataSourceH );
405 int CPL_DLL OGR_DS_Dereference( OGRDataSourceH );
406 int CPL_DLL OGR_DS_GetRefCount( OGRDataSourceH );
407 int CPL_DLL OGR_DS_GetSummaryRefCount( OGRDataSourceH );
408 OGRErr CPL_DLL OGR_DS_SyncToDisk( OGRDataSourceH );
409 OGRStyleTableH CPL_DLL OGR_DS_GetStyleTable( OGRDataSourceH );
410 void CPL_DLL OGR_DS_SetStyleTableDirectly( OGRDataSourceH, OGRStyleTableH );
411 void CPL_DLL OGR_DS_SetStyleTable( OGRDataSourceH, OGRStyleTableH );
412 
413 /* OGRSFDriver */
414 
415 const char CPL_DLL *OGR_Dr_GetName( OGRSFDriverH );
416 OGRDataSourceH CPL_DLL OGR_Dr_Open( OGRSFDriverH, const char *, int ) CPL_WARN_UNUSED_RESULT;
417 int CPL_DLL OGR_Dr_TestCapability( OGRSFDriverH, const char * );
418 OGRDataSourceH CPL_DLL OGR_Dr_CreateDataSource( OGRSFDriverH, const char *,
419  char ** ) CPL_WARN_UNUSED_RESULT;
420 OGRDataSourceH CPL_DLL OGR_Dr_CopyDataSource( OGRSFDriverH, OGRDataSourceH,
421  const char *, char ** ) CPL_WARN_UNUSED_RESULT;
422 OGRErr CPL_DLL OGR_Dr_DeleteDataSource( OGRSFDriverH, const char * );
423 
424 /* OGRSFDriverRegistrar */
425 
426 OGRDataSourceH CPL_DLL OGROpen( const char *, int, OGRSFDriverH * ) CPL_WARN_UNUSED_RESULT;
427 OGRDataSourceH CPL_DLL OGROpenShared( const char *, int, OGRSFDriverH * ) CPL_WARN_UNUSED_RESULT;
428 OGRErr CPL_DLL OGRReleaseDataSource( OGRDataSourceH );
429 void CPL_DLL OGRRegisterDriver( OGRSFDriverH );
430 void CPL_DLL OGRDeregisterDriver( OGRSFDriverH );
431 int CPL_DLL OGRGetDriverCount(void);
432 OGRSFDriverH CPL_DLL OGRGetDriver( int );
433 OGRSFDriverH CPL_DLL OGRGetDriverByName( const char * );
434 int CPL_DLL OGRGetOpenDSCount(void);
435 OGRDataSourceH CPL_DLL OGRGetOpenDS( int iDS );
436 
437 
438 /* note: this is also declared in ogrsf_frmts.h */
439 void CPL_DLL OGRRegisterAll(void);
440 void CPL_DLL OGRCleanupAll(void);
441 
442 /* -------------------------------------------------------------------- */
443 /* ogrsf_featurestyle.h */
444 /* -------------------------------------------------------------------- */
445 
446 #ifdef DEBUG
447 typedef struct OGRStyleMgrHS *OGRStyleMgrH;
448 typedef struct OGRStyleToolHS *OGRStyleToolH;
449 #else
450 typedef void *OGRStyleMgrH;
451 typedef void *OGRStyleToolH;
452 #endif
453 
454 /* OGRStyleMgr */
455 
456 OGRStyleMgrH CPL_DLL OGR_SM_Create(OGRStyleTableH hStyleTable) CPL_WARN_UNUSED_RESULT;
457 void CPL_DLL OGR_SM_Destroy(OGRStyleMgrH hSM);
458 
459 const char CPL_DLL *OGR_SM_InitFromFeature(OGRStyleMgrH hSM,
460  OGRFeatureH hFeat);
461 int CPL_DLL OGR_SM_InitStyleString(OGRStyleMgrH hSM,
462  const char *pszStyleString);
463 int CPL_DLL OGR_SM_GetPartCount(OGRStyleMgrH hSM,
464  const char *pszStyleString);
465 OGRStyleToolH CPL_DLL OGR_SM_GetPart(OGRStyleMgrH hSM, int nPartId,
466  const char *pszStyleString);
467 int CPL_DLL OGR_SM_AddPart(OGRStyleMgrH hSM, OGRStyleToolH hST);
468 int CPL_DLL OGR_SM_AddStyle(OGRStyleMgrH hSM, const char *pszStyleName,
469  const char *pszStyleString);
470 
471 /* OGRStyleTool */
472 
473 OGRStyleToolH CPL_DLL OGR_ST_Create(OGRSTClassId eClassId) CPL_WARN_UNUSED_RESULT;
474 void CPL_DLL OGR_ST_Destroy(OGRStyleToolH hST);
475 
476 OGRSTClassId CPL_DLL OGR_ST_GetType(OGRStyleToolH hST);
477 
478 OGRSTUnitId CPL_DLL OGR_ST_GetUnit(OGRStyleToolH hST);
479 void CPL_DLL OGR_ST_SetUnit(OGRStyleToolH hST, OGRSTUnitId eUnit,
480  double dfGroundPaperScale);
481 
482 const char CPL_DLL *OGR_ST_GetParamStr(OGRStyleToolH hST, int eParam, int *bValueIsNull);
483 int CPL_DLL OGR_ST_GetParamNum(OGRStyleToolH hST, int eParam, int *bValueIsNull);
484 double CPL_DLL OGR_ST_GetParamDbl(OGRStyleToolH hST, int eParam, int *bValueIsNull);
485 void CPL_DLL OGR_ST_SetParamStr(OGRStyleToolH hST, int eParam, const char *pszValue);
486 void CPL_DLL OGR_ST_SetParamNum(OGRStyleToolH hST, int eParam, int nValue);
487 void CPL_DLL OGR_ST_SetParamDbl(OGRStyleToolH hST, int eParam, double dfValue);
488 const char CPL_DLL *OGR_ST_GetStyleString(OGRStyleToolH hST);
489 
490 int CPL_DLL OGR_ST_GetRGBFromString(OGRStyleToolH hST, const char *pszColor,
491  int *pnRed, int *pnGreen, int *pnBlue,
492  int *pnAlpha);
493 
494 /* OGRStyleTable */
495 
496 OGRStyleTableH CPL_DLL OGR_STBL_Create( void ) CPL_WARN_UNUSED_RESULT;
497 void CPL_DLL OGR_STBL_Destroy( OGRStyleTableH hSTBL );
498 int CPL_DLL OGR_STBL_SaveStyleTable( OGRStyleTableH hStyleTable,
499  const char *pszFilename );
500 int CPL_DLL OGR_STBL_LoadStyleTable( OGRStyleTableH hStyleTable,
501  const char *pszFilename );
502 const char CPL_DLL *OGR_STBL_Find( OGRStyleTableH hStyleTable, const char *pszName );
503 void CPL_DLL OGR_STBL_ResetStyleStringReading( OGRStyleTableH hStyleTable );
504 const char CPL_DLL *OGR_STBL_GetNextStyle( OGRStyleTableH hStyleTable);
505 const char CPL_DLL *OGR_STBL_GetLastStyleName( OGRStyleTableH hStyleTable);
506 
507 CPL_C_END
508 
509 #endif /* ndef OGR_API_H_INCLUDED */

Generated for GDAL by doxygen 1.8.1.1.