- Main Page
- Related Pages
- Classes
- Files
- Directories

- File List
- File Members

# ogr_api.h

Go to the documentation of this file.

    00001 /******************************************************************************
    00002  * $Id: ogr_api.h 25545 2013-01-25 17:55:47Z warmerdam $
    00003  *
    00004  * Project:  OpenGIS Simple Features Reference Implementation
    00005  * Purpose:  C API for OGR Geometry, Feature, Layers, DataSource and drivers.
    00006  * Author:   Frank Warmerdam, warmerdam@pobox.com
    00007  *
    00008  ******************************************************************************
    00009  * Copyright (c) 2002, Frank Warmerdam
    00010  *
    00011  * Permission is hereby granted, free of charge, to any person obtaining a
    00012  * copy of this software and associated documentation files (the "Software"),
    00013  * to deal in the Software without restriction, including without limitation
    00014  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
    00015  * and/or sell copies of the Software, and to permit persons to whom the
    00016  * Software is furnished to do so, subject to the following conditions:
    00017  *
    00018  * The above copyright notice and this permission notice shall be included
    00019  * in all copies or substantial portions of the Software.
    00020  *
    00021  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
    00022  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    00023  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
    00024  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    00025  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    00026  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    00027  * DEALINGS IN THE SOFTWARE.
    00028  ****************************************************************************/
    00029
    00030 #ifndef OGR_API_H_INCLUDED
    00031 #define OGR_API_H_INCLUDED
    00032
    00042 #include "cpl_progress.h"
    00043 #include "ogr_core.h"
    00044
    00045 CPL_C_START
    00046
    00047 /* -------------------------------------------------------------------- */
    00048 /*      Geometry related functions (ogr_geometry.h)                     */
    00049 /* -------------------------------------------------------------------- */
    00050 #ifdef DEBUG
    00051 typedef struct OGRGeometryHS *OGRGeometryH;
    00052 #else
    00053 typedef void *OGRGeometryH;
    00054 #endif
    00055
    00056 #ifndef _DEFINED_OGRSpatialReferenceH
    00057 #define _DEFINED_OGRSpatialReferenceH
    00058
    00059 #ifdef DEBUG
    00060 typedef struct OGRSpatialReferenceHS *OGRSpatialReferenceH;
    00061 typedef struct OGRCoordinateTransformationHS *OGRCoordinateTransformationH;
    00062 #else
    00063 typedef void *OGRSpatialReferenceH;
    00064 typedef void *OGRCoordinateTransformationH;
    00065 #endif
    00066
    00067 #endif
    00068
    00069 struct _CPLXMLNode;
    00070
    00071 /* From base OGRGeometry class */
    00072
    00073 OGRErr CPL_DLL OGR_G_CreateFromWkb( unsigned char *, OGRSpatialReferenceH,
    00074                                     OGRGeometryH *, int );
    00075 OGRErr CPL_DLL OGR_G_CreateFromWkt( char **, OGRSpatialReferenceH,
    00076                                     OGRGeometryH * );
    00077 OGRErr CPL_DLL OGR_G_CreateFromFgf( unsigned char *, OGRSpatialReferenceH,
    00078                                     OGRGeometryH *, int, int * );
    00079 void   CPL_DLL OGR_G_DestroyGeometry( OGRGeometryH );
    00080 OGRGeometryH CPL_DLL OGR_G_CreateGeometry( OGRwkbGeometryType );
    00081 OGRGeometryH CPL_DLL
    00082 OGR_G_ApproximateArcAngles(
    00083     double dfCenterX, double dfCenterY, double dfZ,
    00084     double dfPrimaryRadius, double dfSecondaryAxis, double dfRotation,
    00085     double dfStartAngle, double dfEndAngle,
    00086     double dfMaxAngleStepSizeDegrees );
    00087
    00088 OGRGeometryH CPL_DLL OGR_G_ForceToPolygon( OGRGeometryH );
    00089 OGRGeometryH CPL_DLL OGR_G_ForceToLineString( OGRGeometryH );
    00090 OGRGeometryH CPL_DLL OGR_G_ForceToMultiPolygon( OGRGeometryH );
    00091 OGRGeometryH CPL_DLL OGR_G_ForceToMultiPoint( OGRGeometryH );
    00092 OGRGeometryH CPL_DLL OGR_G_ForceToMultiLineString( OGRGeometryH );
    00093
    00094 int    CPL_DLL OGR_G_GetDimension( OGRGeometryH );
    00095 int    CPL_DLL OGR_G_GetCoordinateDimension( OGRGeometryH );
    00096 void   CPL_DLL OGR_G_SetCoordinateDimension( OGRGeometryH, int );
    00097 OGRGeometryH CPL_DLL OGR_G_Clone( OGRGeometryH );
    00098 void   CPL_DLL OGR_G_GetEnvelope( OGRGeometryH, OGREnvelope * );
    00099 void   CPL_DLL OGR_G_GetEnvelope3D( OGRGeometryH, OGREnvelope3D * );
    00100 OGRErr CPL_DLL OGR_G_ImportFromWkb( OGRGeometryH, unsigned char *, int );
    00101 OGRErr CPL_DLL OGR_G_ExportToWkb( OGRGeometryH, OGRwkbByteOrder, unsigned char*);
    00102 int    CPL_DLL OGR_G_WkbSize( OGRGeometryH hGeom );
    00103 OGRErr CPL_DLL OGR_G_ImportFromWkt( OGRGeometryH, char ** );
    00104 OGRErr CPL_DLL OGR_G_ExportToWkt( OGRGeometryH, char ** );
    00105 OGRwkbGeometryType CPL_DLL OGR_G_GetGeometryType( OGRGeometryH );
    00106 const char CPL_DLL *OGR_G_GetGeometryName( OGRGeometryH );
    00107 void   CPL_DLL OGR_G_DumpReadable( OGRGeometryH, FILE *, const char * );
    00108 void   CPL_DLL OGR_G_FlattenTo2D( OGRGeometryH );
    00109 void   CPL_DLL OGR_G_CloseRings( OGRGeometryH );
    00110
    00111 OGRGeometryH CPL_DLL OGR_G_CreateFromGML( const char * );
    00112 char   CPL_DLL *OGR_G_ExportToGML( OGRGeometryH );
    00113 char   CPL_DLL *OGR_G_ExportToGMLEx( OGRGeometryH, char** papszOptions );
    00114
    00115 #if defined(_CPL_MINIXML_H_INCLUDED)
    00116 OGRGeometryH CPL_DLL OGR_G_CreateFromGMLTree( const CPLXMLNode * );
    00117 CPLXMLNode CPL_DLL *OGR_G_ExportToGMLTree( OGRGeometryH );
    00118 CPLXMLNode CPL_DLL *OGR_G_ExportEnvelopeToGMLTree( OGRGeometryH );
    00119 #endif
    00120
    00121 char   CPL_DLL *OGR_G_ExportToKML( OGRGeometryH, const char* pszAltitudeMode );
    00122
    00123 char   CPL_DLL *OGR_G_ExportToJson( OGRGeometryH );
    00124 char   CPL_DLL *OGR_G_ExportToJsonEx( OGRGeometryH, char** papszOptions );
    00125 OGRGeometryH CPL_DLL OGR_G_CreateGeometryFromJson( const char* );
    00126
    00127 void   CPL_DLL OGR_G_AssignSpatialReference( OGRGeometryH,
    00128                                              OGRSpatialReferenceH );
    00129 OGRSpatialReferenceH CPL_DLL OGR_G_GetSpatialReference( OGRGeometryH );
    00130 OGRErr CPL_DLL OGR_G_Transform( OGRGeometryH, OGRCoordinateTransformationH );
    00131 OGRErr CPL_DLL OGR_G_TransformTo( OGRGeometryH, OGRSpatialReferenceH );
    00132
    00133 OGRGeometryH CPL_DLL OGR_G_Simplify( OGRGeometryH hThis, double tolerance );
    00134 OGRGeometryH CPL_DLL OGR_G_SimplifyPreserveTopology( OGRGeometryH hThis, double tolerance );
    00135
    00136 void   CPL_DLL OGR_G_Segmentize(OGRGeometryH hGeom, double dfMaxLength );
    00137 int    CPL_DLL OGR_G_Intersects( OGRGeometryH, OGRGeometryH );
    00138 int    CPL_DLL OGR_G_Equals( OGRGeometryH, OGRGeometryH );
    00139 /*int    CPL_DLL OGR_G_EqualsExact( OGRGeometryH, OGRGeometryH, double );*/
    00140 int    CPL_DLL OGR_G_Disjoint( OGRGeometryH, OGRGeometryH );
    00141 int    CPL_DLL OGR_G_Touches( OGRGeometryH, OGRGeometryH );
    00142 int    CPL_DLL OGR_G_Crosses( OGRGeometryH, OGRGeometryH );
    00143 int    CPL_DLL OGR_G_Within( OGRGeometryH, OGRGeometryH );
    00144 int    CPL_DLL OGR_G_Contains( OGRGeometryH, OGRGeometryH );
    00145 int    CPL_DLL OGR_G_Overlaps( OGRGeometryH, OGRGeometryH );
    00146
    00147 OGRGeometryH CPL_DLL OGR_G_Boundary( OGRGeometryH );
    00148 OGRGeometryH CPL_DLL OGR_G_ConvexHull( OGRGeometryH );
    00149 OGRGeometryH CPL_DLL OGR_G_Buffer( OGRGeometryH, double, int );
    00150 OGRGeometryH CPL_DLL OGR_G_Intersection( OGRGeometryH, OGRGeometryH );
    00151 OGRGeometryH CPL_DLL OGR_G_Union( OGRGeometryH, OGRGeometryH );
    00152 OGRGeometryH CPL_DLL OGR_G_UnionCascaded( OGRGeometryH );
    00153 OGRGeometryH CPL_DLL OGR_G_PointOnSurface( OGRGeometryH );
    00154 /*OGRGeometryH CPL_DLL OGR_G_Polygonize( OGRGeometryH *, int);*/
    00155 /*OGRGeometryH CPL_DLL OGR_G_Polygonizer_getCutEdges( OGRGeometryH *, int);*/
    00156 /*OGRGeometryH CPL_DLL OGR_G_LineMerge( OGRGeometryH );*/
    00157
    00158 OGRGeometryH CPL_DLL OGR_G_Difference( OGRGeometryH, OGRGeometryH );
    00159 OGRGeometryH CPL_DLL OGR_G_SymDifference( OGRGeometryH, OGRGeometryH );
    00160 double CPL_DLL OGR_G_Distance( OGRGeometryH, OGRGeometryH );
    00161 double CPL_DLL OGR_G_Length( OGRGeometryH );
    00162 double CPL_DLL OGR_G_Area( OGRGeometryH );
    00163 int    CPL_DLL OGR_G_Centroid( OGRGeometryH, OGRGeometryH );
    00164
    00165 void   CPL_DLL OGR_G_Empty( OGRGeometryH );
    00166 int    CPL_DLL OGR_G_IsEmpty( OGRGeometryH );
    00167 int    CPL_DLL OGR_G_IsValid( OGRGeometryH );
    00168 /*char    CPL_DLL *OGR_G_IsValidReason( OGRGeometryH );*/
    00169 int    CPL_DLL OGR_G_IsSimple( OGRGeometryH );
    00170 int    CPL_DLL OGR_G_IsRing( OGRGeometryH );
    00171
    00172 OGRGeometryH CPL_DLL OGR_G_Polygonize( OGRGeometryH );
    00173
    00174 /* backward compatibility (non-standard methods) */
    00175 int    CPL_DLL OGR_G_Intersect( OGRGeometryH, OGRGeometryH ) CPL_WARN_DEPRECATED("Non standard method. Use OGR_G_Intersects() instead");
    00176 int    CPL_DLL OGR_G_Equal( OGRGeometryH, OGRGeometryH ) CPL_WARN_DEPRECATED("Non standard method. Use OGR_G_Equals() instead");
    00177 OGRGeometryH CPL_DLL OGR_G_SymmetricDifference( OGRGeometryH, OGRGeometryH ) CPL_WARN_DEPRECATED("Non standard method. Use OGR_G_SymDifference() instead");
    00178 double CPL_DLL OGR_G_GetArea( OGRGeometryH ) CPL_WARN_DEPRECATED("Non standard method. Use OGR_G_Area() instead");
    00179 OGRGeometryH CPL_DLL OGR_G_GetBoundary( OGRGeometryH ) CPL_WARN_DEPRECATED("Non standard method. Use OGR_G_Boundary() instead");
    00180
    00181 /* Methods for getting/setting vertices in points, line strings and rings */
    00182 int    CPL_DLL OGR_G_GetPointCount( OGRGeometryH );
    00183 int    CPL_DLL OGR_G_GetPoints( OGRGeometryH hGeom,
    00184                                 void* pabyX, int nXStride,
    00185                                 void* pabyY, int nYStride,
    00186                                 void* pabyZ, int nZStride);
    00187 double CPL_DLL OGR_G_GetX( OGRGeometryH, int );
    00188 double CPL_DLL OGR_G_GetY( OGRGeometryH, int );
    00189 double CPL_DLL OGR_G_GetZ( OGRGeometryH, int );
    00190 void   CPL_DLL OGR_G_GetPoint( OGRGeometryH, int iPoint,
    00191                                double *, double *, double * );
    00192 void   CPL_DLL OGR_G_SetPoint( OGRGeometryH, int iPoint,
    00193                                double, double, double );
    00194 void   CPL_DLL OGR_G_SetPoint_2D( OGRGeometryH, int iPoint,
    00195                                   double, double );
    00196 void   CPL_DLL OGR_G_AddPoint( OGRGeometryH, double, double, double );
    00197 void   CPL_DLL OGR_G_AddPoint_2D( OGRGeometryH, double, double );
    00198
    00199 /* Methods for getting/setting rings and members collections */
    00200
    00201 int    CPL_DLL OGR_G_GetGeometryCount( OGRGeometryH );
    00202 OGRGeometryH CPL_DLL OGR_G_GetGeometryRef( OGRGeometryH, int );
    00203 OGRErr CPL_DLL OGR_G_AddGeometry( OGRGeometryH, OGRGeometryH );
    00204 OGRErr CPL_DLL OGR_G_AddGeometryDirectly( OGRGeometryH, OGRGeometryH );
    00205 OGRErr CPL_DLL OGR_G_RemoveGeometry( OGRGeometryH, int, int );
    00206
    00207 OGRGeometryH CPL_DLL OGRBuildPolygonFromEdges( OGRGeometryH hLinesAsCollection,
    00208                                        int bBestEffort,
    00209                                        int bAutoClose,
    00210                                        double dfTolerance,
    00211                                        OGRErr * peErr );
    00212
    00213 OGRErr CPL_DLL OGRSetGenerate_DB2_V72_BYTE_ORDER(
    00214     int bGenerate_DB2_V72_BYTE_ORDER );
    00215
    00216 int CPL_DLL OGRGetGenerate_DB2_V72_BYTE_ORDER(void);
    00217
    00218 /* -------------------------------------------------------------------- */
    00219 /*      Feature related (ogr_feature.h)                                 */
    00220 /* -------------------------------------------------------------------- */
    00221
    00222 #ifdef DEBUG
    00223 typedef struct OGRFieldDefnHS   *OGRFieldDefnH;
    00224 typedef struct OGRFeatureDefnHS *OGRFeatureDefnH;
    00225 typedef struct OGRFeatureHS     *OGRFeatureH;
    00226 typedef struct OGRStyleTableHS *OGRStyleTableH;
    00227 #else
    00228 typedef void *OGRFieldDefnH;
    00229 typedef void *OGRFeatureDefnH;
    00230 typedef void *OGRFeatureH;
    00231 typedef void *OGRStyleTableH;
    00232 #endif
    00233
    00234 /* OGRFieldDefn */
    00235
    00236 OGRFieldDefnH CPL_DLL OGR_Fld_Create( const char *, OGRFieldType ) CPL_WARN_UNUSED_RESULT;
    00237 void   CPL_DLL OGR_Fld_Destroy( OGRFieldDefnH );
    00238
    00239 void   CPL_DLL OGR_Fld_SetName( OGRFieldDefnH, const char * );
    00240 const char CPL_DLL *OGR_Fld_GetNameRef( OGRFieldDefnH );
    00241 OGRFieldType CPL_DLL OGR_Fld_GetType( OGRFieldDefnH );
    00242 void   CPL_DLL OGR_Fld_SetType( OGRFieldDefnH, OGRFieldType );
    00243 OGRJustification CPL_DLL OGR_Fld_GetJustify( OGRFieldDefnH );
    00244 void   CPL_DLL OGR_Fld_SetJustify( OGRFieldDefnH, OGRJustification );
    00245 int    CPL_DLL OGR_Fld_GetWidth( OGRFieldDefnH );
    00246 void   CPL_DLL OGR_Fld_SetWidth( OGRFieldDefnH, int );
    00247 int    CPL_DLL OGR_Fld_GetPrecision( OGRFieldDefnH );
    00248 void   CPL_DLL OGR_Fld_SetPrecision( OGRFieldDefnH, int );
    00249 void   CPL_DLL OGR_Fld_Set( OGRFieldDefnH, const char *, OGRFieldType,
    00250                             int, int, OGRJustification );
    00251 int    CPL_DLL OGR_Fld_IsIgnored( OGRFieldDefnH hDefn );
    00252 void   CPL_DLL OGR_Fld_SetIgnored( OGRFieldDefnH hDefn, int );
    00253
    00254 const char CPL_DLL *OGR_GetFieldTypeName( OGRFieldType );
    00255
    00256 /* OGRFeatureDefn */
    00257
    00258 OGRFeatureDefnH CPL_DLL OGR_FD_Create( const char * ) CPL_WARN_UNUSED_RESULT;
    00259 void   CPL_DLL OGR_FD_Destroy( OGRFeatureDefnH );
    00260 void   CPL_DLL OGR_FD_Release( OGRFeatureDefnH );
    00261 const char CPL_DLL *OGR_FD_GetName( OGRFeatureDefnH );
    00262 int    CPL_DLL OGR_FD_GetFieldCount( OGRFeatureDefnH );
    00263 OGRFieldDefnH CPL_DLL OGR_FD_GetFieldDefn( OGRFeatureDefnH, int );
    00264 int    CPL_DLL OGR_FD_GetFieldIndex( OGRFeatureDefnH, const char * );
    00265 void   CPL_DLL OGR_FD_AddFieldDefn( OGRFeatureDefnH, OGRFieldDefnH );
    00266 OGRErr CPL_DLL OGR_FD_DeleteFieldDefn( OGRFeatureDefnH hDefn, int iField );
    00267 OGRErr CPL_DLL OGR_FD_ReorderFieldDefns( OGRFeatureDefnH hDefn, int* panMap );
    00268 OGRwkbGeometryType CPL_DLL OGR_FD_GetGeomType( OGRFeatureDefnH );
    00269 void   CPL_DLL OGR_FD_SetGeomType( OGRFeatureDefnH, OGRwkbGeometryType );
    00270 int    CPL_DLL OGR_FD_IsGeometryIgnored( OGRFeatureDefnH );
    00271 void   CPL_DLL OGR_FD_SetGeometryIgnored( OGRFeatureDefnH, int );
    00272 int    CPL_DLL OGR_FD_IsStyleIgnored( OGRFeatureDefnH );
    00273 void   CPL_DLL OGR_FD_SetStyleIgnored( OGRFeatureDefnH, int );
    00274 int    CPL_DLL OGR_FD_Reference( OGRFeatureDefnH );
    00275 int    CPL_DLL OGR_FD_Dereference( OGRFeatureDefnH );
    00276 int    CPL_DLL OGR_FD_GetReferenceCount( OGRFeatureDefnH );
    00277
    00278 /* OGRFeature */
    00279
    00280 OGRFeatureH CPL_DLL OGR_F_Create( OGRFeatureDefnH ) CPL_WARN_UNUSED_RESULT;
    00281 void   CPL_DLL OGR_F_Destroy( OGRFeatureH );
    00282 OGRFeatureDefnH CPL_DLL OGR_F_GetDefnRef( OGRFeatureH );
    00283
    00284 OGRErr CPL_DLL OGR_F_SetGeometryDirectly( OGRFeatureH, OGRGeometryH );
    00285 OGRErr CPL_DLL OGR_F_SetGeometry( OGRFeatureH, OGRGeometryH );
    00286 OGRGeometryH CPL_DLL OGR_F_GetGeometryRef( OGRFeatureH );
    00287 OGRGeometryH CPL_DLL OGR_F_StealGeometry( OGRFeatureH );
    00288 OGRFeatureH CPL_DLL OGR_F_Clone( OGRFeatureH );
    00289 int    CPL_DLL OGR_F_Equal( OGRFeatureH, OGRFeatureH );
    00290
    00291 int    CPL_DLL OGR_F_GetFieldCount( OGRFeatureH );
    00292 OGRFieldDefnH CPL_DLL OGR_F_GetFieldDefnRef( OGRFeatureH, int );
    00293 int    CPL_DLL OGR_F_GetFieldIndex( OGRFeatureH, const char * );
    00294
    00295 int    CPL_DLL OGR_F_IsFieldSet( OGRFeatureH, int );
    00296 void   CPL_DLL OGR_F_UnsetField( OGRFeatureH, int );
    00297 OGRField CPL_DLL *OGR_F_GetRawFieldRef( OGRFeatureH, int );
    00298
    00299 int    CPL_DLL OGR_F_GetFieldAsInteger( OGRFeatureH, int );
    00300 double CPL_DLL OGR_F_GetFieldAsDouble( OGRFeatureH, int );
    00301 const char CPL_DLL *OGR_F_GetFieldAsString( OGRFeatureH, int );
    00302 const int CPL_DLL *OGR_F_GetFieldAsIntegerList( OGRFeatureH, int, int * );
    00303 const double CPL_DLL *OGR_F_GetFieldAsDoubleList( OGRFeatureH, int, int * );
    00304 char  CPL_DLL **OGR_F_GetFieldAsStringList( OGRFeatureH, int );
    00305 GByte CPL_DLL *OGR_F_GetFieldAsBinary( OGRFeatureH, int, int * );
    00306 int   CPL_DLL  OGR_F_GetFieldAsDateTime( OGRFeatureH, int, int *, int *, int *,
    00307                                          int *, int *, int *, int * );
    00308
    00309 void   CPL_DLL OGR_F_SetFieldInteger( OGRFeatureH, int, int );
    00310 void   CPL_DLL OGR_F_SetFieldDouble( OGRFeatureH, int, double );
    00311 void   CPL_DLL OGR_F_SetFieldString( OGRFeatureH, int, const char * );
    00312 void   CPL_DLL OGR_F_SetFieldIntegerList( OGRFeatureH, int, int, int * );
    00313 void   CPL_DLL OGR_F_SetFieldDoubleList( OGRFeatureH, int, int, double * );
    00314 void   CPL_DLL OGR_F_SetFieldStringList( OGRFeatureH, int, char ** );
    00315 void   CPL_DLL OGR_F_SetFieldRaw( OGRFeatureH, int, OGRField * );
    00316 void   CPL_DLL OGR_F_SetFieldBinary( OGRFeatureH, int, int, GByte * );
    00317 void   CPL_DLL OGR_F_SetFieldDateTime( OGRFeatureH, int,
    00318                                        int, int, int, int, int, int, int );
    00319
    00320 long   CPL_DLL OGR_F_GetFID( OGRFeatureH );
    00321 OGRErr CPL_DLL OGR_F_SetFID( OGRFeatureH, long );
    00322 void   CPL_DLL OGR_F_DumpReadable( OGRFeatureH, FILE * );
    00323 OGRErr CPL_DLL OGR_F_SetFrom( OGRFeatureH, OGRFeatureH, int );
    00324 OGRErr CPL_DLL OGR_F_SetFromWithMap( OGRFeatureH, OGRFeatureH, int , int * );
    00325
    00326 const char CPL_DLL *OGR_F_GetStyleString( OGRFeatureH );
    00327 void   CPL_DLL OGR_F_SetStyleString( OGRFeatureH, const char * );
    00328 void   CPL_DLL OGR_F_SetStyleStringDirectly( OGRFeatureH, char * );
    00329 OGRStyleTableH CPL_DLL OGR_F_GetStyleTable( OGRFeatureH );
    00330 void   CPL_DLL OGR_F_SetStyleTableDirectly( OGRFeatureH, OGRStyleTableH );
    00331 void   CPL_DLL OGR_F_SetStyleTable( OGRFeatureH, OGRStyleTableH );
    00332
    00333 /* -------------------------------------------------------------------- */
    00334 /*      ogrsf_frmts.h                                                   */
    00335 /* -------------------------------------------------------------------- */
    00336
    00337 #ifdef DEBUG
    00338 typedef struct OGRLayerHS      *OGRLayerH;
    00339 typedef struct OGRDataSourceHS *OGRDataSourceH;
    00340 typedef struct OGRDriverHS     *OGRSFDriverH;
    00341 #else
    00342 typedef void *OGRLayerH;
    00343 typedef void *OGRDataSourceH;
    00344 typedef void *OGRSFDriverH;
    00345 #endif
    00346
    00347 /* OGRLayer */
    00348
    00349 const char CPL_DLL* OGR_L_GetName( OGRLayerH );
    00350 OGRwkbGeometryType CPL_DLL OGR_L_GetGeomType( OGRLayerH );
    00351 OGRGeometryH CPL_DLL OGR_L_GetSpatialFilter( OGRLayerH );
    00352 void   CPL_DLL OGR_L_SetSpatialFilter( OGRLayerH, OGRGeometryH );
    00353 void   CPL_DLL OGR_L_SetSpatialFilterRect( OGRLayerH,
    00354                                            double, double, double, double );
    00355 OGRErr CPL_DLL OGR_L_SetAttributeFilter( OGRLayerH, const char * );
    00356 void   CPL_DLL OGR_L_ResetReading( OGRLayerH );
    00357 OGRFeatureH CPL_DLL OGR_L_GetNextFeature( OGRLayerH );
    00358 OGRErr CPL_DLL OGR_L_SetNextByIndex( OGRLayerH, long );
    00359 OGRFeatureH CPL_DLL OGR_L_GetFeature( OGRLayerH, long );
    00360 OGRErr CPL_DLL OGR_L_SetFeature( OGRLayerH, OGRFeatureH );
    00361 OGRErr CPL_DLL OGR_L_CreateFeature( OGRLayerH, OGRFeatureH );
    00362 OGRErr CPL_DLL OGR_L_DeleteFeature( OGRLayerH, long );
    00363 OGRFeatureDefnH CPL_DLL OGR_L_GetLayerDefn( OGRLayerH );
    00364 OGRSpatialReferenceH CPL_DLL OGR_L_GetSpatialRef( OGRLayerH );
    00365 int    CPL_DLL OGR_L_GetFeatureCount( OGRLayerH, int );
    00366 OGRErr CPL_DLL OGR_L_GetExtent( OGRLayerH, OGREnvelope *, int );
    00367 int    CPL_DLL OGR_L_TestCapability( OGRLayerH, const char * );
    00368 OGRErr CPL_DLL OGR_L_CreateField( OGRLayerH, OGRFieldDefnH, int );
    00369 OGRErr CPL_DLL OGR_L_DeleteField( OGRLayerH, int iField );
    00370 OGRErr CPL_DLL OGR_L_ReorderFields( OGRLayerH, int* panMap );
    00371 OGRErr CPL_DLL OGR_L_ReorderField( OGRLayerH, int iOldFieldPos, int iNewFieldPos );
    00372 OGRErr CPL_DLL OGR_L_AlterFieldDefn( OGRLayerH, int iField, OGRFieldDefnH hNewFieldDefn, int nFlags );
    00373 OGRErr CPL_DLL OGR_L_StartTransaction( OGRLayerH );
    00374 OGRErr CPL_DLL OGR_L_CommitTransaction( OGRLayerH );
    00375 OGRErr CPL_DLL OGR_L_RollbackTransaction( OGRLayerH );
    00376 int    CPL_DLL OGR_L_Reference( OGRLayerH );
    00377 int    CPL_DLL OGR_L_Dereference( OGRLayerH );
    00378 int    CPL_DLL OGR_L_GetRefCount( OGRLayerH );
    00379 OGRErr CPL_DLL OGR_L_SyncToDisk( OGRLayerH );
    00380 GIntBig CPL_DLL OGR_L_GetFeaturesRead( OGRLayerH );
    00381 const char CPL_DLL *OGR_L_GetFIDColumn( OGRLayerH );
    00382 const char CPL_DLL *OGR_L_GetGeometryColumn( OGRLayerH );
    00383 OGRStyleTableH CPL_DLL OGR_L_GetStyleTable( OGRLayerH );
    00384 void   CPL_DLL OGR_L_SetStyleTableDirectly( OGRLayerH, OGRStyleTableH );
    00385 void   CPL_DLL OGR_L_SetStyleTable( OGRLayerH, OGRStyleTableH );
    00386 OGRErr CPL_DLL OGR_L_SetIgnoredFields( OGRLayerH, const char** );
    00387 OGRErr CPL_DLL OGR_L_Intersection( OGRLayerH, OGRLayerH, OGRLayerH, char**, GDALProgressFunc, void * );
    00388 OGRErr CPL_DLL OGR_L_Union( OGRLayerH, OGRLayerH, OGRLayerH, char**, GDALProgressFunc, void * );
    00389 OGRErr CPL_DLL OGR_L_SymDifference( OGRLayerH, OGRLayerH, OGRLayerH, char**, GDALProgressFunc, void * );
    00390 OGRErr CPL_DLL OGR_L_Identity( OGRLayerH, OGRLayerH, OGRLayerH, char**, GDALProgressFunc, void * );
    00391 OGRErr CPL_DLL OGR_L_Update( OGRLayerH, OGRLayerH, OGRLayerH, char**, GDALProgressFunc, void * );
    00392 OGRErr CPL_DLL OGR_L_Clip( OGRLayerH, OGRLayerH, OGRLayerH, char**, GDALProgressFunc, void * );
    00393 OGRErr CPL_DLL OGR_L_Erase( OGRLayerH, OGRLayerH, OGRLayerH, char**, GDALProgressFunc, void * );
    00394
    00395 /* OGRDataSource */
    00396
    00397 void   CPL_DLL OGR_DS_Destroy( OGRDataSourceH );
    00398 const char CPL_DLL *OGR_DS_GetName( OGRDataSourceH );
    00399 int    CPL_DLL OGR_DS_GetLayerCount( OGRDataSourceH );
    00400 OGRLayerH CPL_DLL OGR_DS_GetLayer( OGRDataSourceH, int );
    00401 OGRLayerH CPL_DLL OGR_DS_GetLayerByName( OGRDataSourceH, const char * );
    00402 OGRErr    CPL_DLL OGR_DS_DeleteLayer( OGRDataSourceH, int );
    00403 OGRSFDriverH CPL_DLL OGR_DS_GetDriver( OGRDataSourceH );
    00404 OGRLayerH CPL_DLL OGR_DS_CreateLayer( OGRDataSourceH, const char *,
    00405                                       OGRSpatialReferenceH, OGRwkbGeometryType,
    00406                                       char ** );
    00407 OGRLayerH CPL_DLL OGR_DS_CopyLayer( OGRDataSourceH, OGRLayerH, const char *,
    00408                                     char ** );
    00409 int    CPL_DLL OGR_DS_TestCapability( OGRDataSourceH, const char * );
    00410 OGRLayerH CPL_DLL OGR_DS_ExecuteSQL( OGRDataSourceH, const char *,
    00411                                      OGRGeometryH, const char * );
    00412 void   CPL_DLL OGR_DS_ReleaseResultSet( OGRDataSourceH, OGRLayerH );
    00413 int    CPL_DLL OGR_DS_Reference( OGRDataSourceH );
    00414 int    CPL_DLL OGR_DS_Dereference( OGRDataSourceH );
    00415 int    CPL_DLL OGR_DS_GetRefCount( OGRDataSourceH );
    00416 int    CPL_DLL OGR_DS_GetSummaryRefCount( OGRDataSourceH );
    00417 OGRErr CPL_DLL OGR_DS_SyncToDisk( OGRDataSourceH );
    00418 OGRStyleTableH CPL_DLL OGR_DS_GetStyleTable( OGRDataSourceH );
    00419 void   CPL_DLL OGR_DS_SetStyleTableDirectly( OGRDataSourceH, OGRStyleTableH );
    00420 void   CPL_DLL OGR_DS_SetStyleTable( OGRDataSourceH, OGRStyleTableH );
    00421
    00422 /* OGRSFDriver */
    00423
    00424 const char CPL_DLL *OGR_Dr_GetName( OGRSFDriverH );
    00425 OGRDataSourceH CPL_DLL OGR_Dr_Open( OGRSFDriverH, const char *, int ) CPL_WARN_UNUSED_RESULT;
    00426 int CPL_DLL OGR_Dr_TestCapability( OGRSFDriverH, const char * );
    00427 OGRDataSourceH CPL_DLL OGR_Dr_CreateDataSource( OGRSFDriverH, const char *,
    00428                                                 char ** ) CPL_WARN_UNUSED_RESULT;
    00429 OGRDataSourceH CPL_DLL OGR_Dr_CopyDataSource( OGRSFDriverH,  OGRDataSourceH,
    00430                                               const char *, char ** ) CPL_WARN_UNUSED_RESULT;
    00431 OGRErr CPL_DLL OGR_Dr_DeleteDataSource( OGRSFDriverH, const char * );
    00432
    00433 /* OGRSFDriverRegistrar */
    00434
    00435 OGRDataSourceH CPL_DLL OGROpen( const char *, int, OGRSFDriverH * ) CPL_WARN_UNUSED_RESULT;
    00436 OGRDataSourceH CPL_DLL OGROpenShared( const char *, int, OGRSFDriverH * ) CPL_WARN_UNUSED_RESULT;
    00437 OGRErr  CPL_DLL OGRReleaseDataSource( OGRDataSourceH );
    00438 void    CPL_DLL OGRRegisterDriver( OGRSFDriverH );
    00439 void    CPL_DLL OGRDeregisterDriver( OGRSFDriverH );
    00440 int     CPL_DLL OGRGetDriverCount(void);
    00441 OGRSFDriverH CPL_DLL OGRGetDriver( int );
    00442 OGRSFDriverH CPL_DLL OGRGetDriverByName( const char * );
    00443 int     CPL_DLL OGRGetOpenDSCount(void);
    00444 OGRDataSourceH CPL_DLL OGRGetOpenDS( int iDS );
    00445
    00446
    00447 /* note: this is also declared in ogrsf_frmts.h */
    00448 void CPL_DLL OGRRegisterAll(void);
    00449 void CPL_DLL OGRCleanupAll(void);
    00450
    00451 /* -------------------------------------------------------------------- */
    00452 /*      ogrsf_featurestyle.h                                            */
    00453 /* -------------------------------------------------------------------- */
    00454
    00455 #ifdef DEBUG
    00456 typedef struct OGRStyleMgrHS *OGRStyleMgrH;
    00457 typedef struct OGRStyleToolHS *OGRStyleToolH;
    00458 #else
    00459 typedef void *OGRStyleMgrH;
    00460 typedef void *OGRStyleToolH;
    00461 #endif
    00462
    00463 /* OGRStyleMgr */
    00464
    00465 OGRStyleMgrH CPL_DLL OGR_SM_Create(OGRStyleTableH hStyleTable) CPL_WARN_UNUSED_RESULT;
    00466 void    CPL_DLL OGR_SM_Destroy(OGRStyleMgrH hSM);
    00467
    00468 const char CPL_DLL *OGR_SM_InitFromFeature(OGRStyleMgrH hSM,
    00469                                            OGRFeatureH hFeat);
    00470 int     CPL_DLL OGR_SM_InitStyleString(OGRStyleMgrH hSM,
    00471                                        const char *pszStyleString);
    00472 int     CPL_DLL OGR_SM_GetPartCount(OGRStyleMgrH hSM,
    00473                                     const char *pszStyleString);
    00474 OGRStyleToolH CPL_DLL OGR_SM_GetPart(OGRStyleMgrH hSM, int nPartId,
    00475                                      const char *pszStyleString);
    00476 int     CPL_DLL OGR_SM_AddPart(OGRStyleMgrH hSM, OGRStyleToolH hST);
    00477 int     CPL_DLL OGR_SM_AddStyle(OGRStyleMgrH hSM, const char *pszStyleName,
    00478                                const char *pszStyleString);
    00479
    00480 /* OGRStyleTool */
    00481
    00482 OGRStyleToolH CPL_DLL OGR_ST_Create(OGRSTClassId eClassId) CPL_WARN_UNUSED_RESULT;
    00483 void    CPL_DLL OGR_ST_Destroy(OGRStyleToolH hST);
    00484
    00485 OGRSTClassId CPL_DLL OGR_ST_GetType(OGRStyleToolH hST);
    00486
    00487 OGRSTUnitId CPL_DLL OGR_ST_GetUnit(OGRStyleToolH hST);
    00488 void    CPL_DLL OGR_ST_SetUnit(OGRStyleToolH hST, OGRSTUnitId eUnit,
    00489                                double dfGroundPaperScale);
    00490
    00491 const char CPL_DLL *OGR_ST_GetParamStr(OGRStyleToolH hST, int eParam, int *bValueIsNull);
    00492 int     CPL_DLL OGR_ST_GetParamNum(OGRStyleToolH hST, int eParam, int *bValueIsNull);
    00493 double  CPL_DLL OGR_ST_GetParamDbl(OGRStyleToolH hST, int eParam, int *bValueIsNull);
    00494 void    CPL_DLL OGR_ST_SetParamStr(OGRStyleToolH hST, int eParam, const char *pszValue);
    00495 void    CPL_DLL OGR_ST_SetParamNum(OGRStyleToolH hST, int eParam, int nValue);
    00496 void    CPL_DLL OGR_ST_SetParamDbl(OGRStyleToolH hST, int eParam, double dfValue);
    00497 const char CPL_DLL *OGR_ST_GetStyleString(OGRStyleToolH hST);
    00498
    00499 int CPL_DLL OGR_ST_GetRGBFromString(OGRStyleToolH hST, const char *pszColor,
    00500                                     int *pnRed, int *pnGreen, int *pnBlue,
    00501                                     int *pnAlpha);
    00502
    00503 /* OGRStyleTable */
    00504
    00505 OGRStyleTableH  CPL_DLL OGR_STBL_Create( void ) CPL_WARN_UNUSED_RESULT;
    00506 void    CPL_DLL OGR_STBL_Destroy( OGRStyleTableH hSTBL );
    00507 int     CPL_DLL OGR_STBL_SaveStyleTable( OGRStyleTableH hStyleTable,
    00508                                          const char *pszFilename );
    00509 int     CPL_DLL OGR_STBL_LoadStyleTable( OGRStyleTableH hStyleTable,
    00510                                          const char *pszFilename );
    00511 const char CPL_DLL *OGR_STBL_Find( OGRStyleTableH hStyleTable, const char *pszName );
    00512 void    CPL_DLL OGR_STBL_ResetStyleStringReading( OGRStyleTableH hStyleTable );
    00513 const char CPL_DLL *OGR_STBL_GetNextStyle( OGRStyleTableH hStyleTable);
    00514 const char CPL_DLL *OGR_STBL_GetLastStyleName( OGRStyleTableH hStyleTable);
    00515
    00516 CPL_C_END
    00517
    00518 #endif /* ndef OGR_API_H_INCLUDED */

Generated for GDAL by 1.7.1.