- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

# ogr_api.h

Go to the documentation of this file.

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

Generated for GDAL by 1.7.1.