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

Generated for GDAL by 1.7.1.