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

# ogr_geometry.h

Go to the documentation of this file.

    00001 /******************************************************************************
    00002  * $Id: ogr_geometry.h 23638 2011-12-22 21:02:56Z rouault $
    00003  *
    00004  * Project:  OpenGIS Simple Features Reference Implementation
    00005  * Purpose:  Classes for manipulating simple features that is not specific
    00006  *           to a particular interface technology.
    00007  * Author:   Frank Warmerdam, warmerdam@pobox.com
    00008  *
    00009  ******************************************************************************
    00010  * Copyright (c) 1999, Frank Warmerdam
    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_GEOMETRY_H_INCLUDED
    00032 #define _OGR_GEOMETRY_H_INCLUDED
    00033
    00034 #include "ogr_core.h"
    00035 #include "ogr_spatialref.h"
    00036
    00046 class OGRRawPoint
    00047 {
    00048   public:
    00049           OGRRawPoint()
    00050           {
    00051                   x = y = 0.0;
    00052           }
    00053     double      x;
    00054     double      y;
    00055 };
    00056
    00057 typedef struct GEOSGeom_t *GEOSGeom;
    00058
    00059 /************************************************************************/
    00060 /*                             OGRGeometry                              */
    00061 /************************************************************************/
    00062
    00063 class OGRPoint;
    00064
    00077 class CPL_DLL OGRGeometry
    00078 {
    00079   private:
    00080     OGRSpatialReference * poSRS;                // may be NULL
    00081
    00082   protected:
    00083     int                   nCoordDimension;
    00084
    00085   public:
    00086                 OGRGeometry();
    00087     virtual     ~OGRGeometry();
    00088
    00089     // standard IGeometry
    00090     virtual int getDimension() const = 0;
    00091     virtual int getCoordinateDimension() const;
    00092     virtual OGRBoolean  IsEmpty() const = 0;
    00093     virtual OGRBoolean  IsValid() const;
    00094     virtual OGRBoolean  IsSimple() const;
    00095     virtual OGRBoolean  IsRing() const;
    00096     virtual void        empty() = 0;
    00097     virtual OGRGeometry *clone() const = 0;
    00098     virtual void getEnvelope( OGREnvelope * psEnvelope ) const = 0;
    00099     virtual void getEnvelope( OGREnvelope3D * psEnvelope ) const = 0;
    00100
    00101     // IWks Interface
    00102     virtual int WkbSize() const = 0;
    00103     virtual OGRErr importFromWkb( unsigned char *, int=-1 )=0;
    00104     virtual OGRErr exportToWkb( OGRwkbByteOrder, unsigned char * ) const = 0;
    00105     virtual OGRErr importFromWkt( char ** ppszInput ) = 0;
    00106     virtual OGRErr exportToWkt( char ** ppszDstText ) const = 0;
    00107
    00108     // non-standard
    00109     virtual OGRwkbGeometryType getGeometryType() const = 0;
    00110     virtual const char *getGeometryName() const = 0;
    00111     virtual void   dumpReadable( FILE *, const char * = NULL, char** papszOptions = NULL ) const;
    00112     virtual void   flattenTo2D() = 0;
    00113     virtual char * exportToGML( const char* const * papszOptions = NULL ) const;
    00114         virtual char * exportToKML() const;
    00115     virtual char * exportToJson() const;
    00116     virtual GEOSGeom exportToGEOS() const;
    00117     virtual void closeRings();
    00118
    00119     virtual void setCoordinateDimension( int nDimension );
    00120
    00121     void    assignSpatialReference( OGRSpatialReference * poSR );
    00122     OGRSpatialReference *getSpatialReference( void ) const { return poSRS; }
    00123
    00124     virtual OGRErr  transform( OGRCoordinateTransformation *poCT ) = 0;
    00125     OGRErr  transformTo( OGRSpatialReference *poSR );
    00126
    00127     virtual void segmentize(double dfMaxLength);
    00128
    00129     // ISpatialRelation
    00130     virtual OGRBoolean  Intersects( OGRGeometry * ) const;
    00131     virtual OGRBoolean  Equals( OGRGeometry * ) const = 0;
    00132     virtual OGRBoolean  Disjoint( const OGRGeometry * ) const;
    00133     virtual OGRBoolean  Touches( const OGRGeometry * ) const;
    00134     virtual OGRBoolean  Crosses( const OGRGeometry * ) const;
    00135     virtual OGRBoolean  Within( const OGRGeometry * ) const;
    00136     virtual OGRBoolean  Contains( const OGRGeometry * ) const;
    00137     virtual OGRBoolean  Overlaps( const OGRGeometry * ) const;
    00138 //    virtual OGRBoolean  Relate( const OGRGeometry *, const char * ) const;
    00139
    00140     virtual OGRGeometry *Boundary() const;
    00141     virtual double  Distance( const OGRGeometry * ) const;
    00142     virtual OGRGeometry *ConvexHull() const;
    00143     virtual OGRGeometry *Buffer( double dfDist, int nQuadSegs = 30 ) const;
    00144     virtual OGRGeometry *Intersection( const OGRGeometry *) const;
    00145     virtual OGRGeometry *Union( const OGRGeometry * ) const;
    00146     virtual OGRGeometry *UnionCascaded() const;
    00147     virtual OGRGeometry *Difference( const OGRGeometry * ) const;
    00148     virtual OGRGeometry *SymDifference( const OGRGeometry * ) const;
    00149     virtual OGRErr       Centroid( OGRPoint * poPoint ) const;
    00150     virtual OGRGeometry *Simplify(double dTolerance) const;
    00151     OGRGeometry *SimplifyPreserveTopology(double dTolerance) const;
    00152
    00153     virtual OGRGeometry *Polygonize() const;
    00154
    00155     // backward compatibility to non-standard method names.
    00156     OGRBoolean  Intersect( OGRGeometry * ) const;
    00157     OGRBoolean  Equal( OGRGeometry * ) const;
    00158     virtual OGRGeometry *SymmetricDifference( const OGRGeometry * ) const;
    00159     virtual OGRGeometry *getBoundary() const;
    00160
    00161     // Special HACK for DB2 7.2 support
    00162     static int bGenerate_DB2_V72_BYTE_ORDER;
    00163
    00164     virtual void        swapXY();
    00165 };
    00166
    00167 /************************************************************************/
    00168 /*                               OGRPoint                               */
    00169 /************************************************************************/
    00170
    00177 class CPL_DLL OGRPoint : public OGRGeometry
    00178 {
    00179     double      x;
    00180     double      y;
    00181     double      z;
    00182
    00183   public:
    00184                 OGRPoint();
    00185                 OGRPoint( double x, double y );
    00186                 OGRPoint( double x, double y, double z );
    00187     virtual     ~OGRPoint();
    00188
    00189     // IWks Interface
    00190     virtual int WkbSize() const;
    00191     virtual OGRErr importFromWkb( unsigned char *, int=-1 );
    00192     virtual OGRErr exportToWkb( OGRwkbByteOrder, unsigned char * ) const;
    00193     virtual OGRErr importFromWkt( char ** );
    00194     virtual OGRErr exportToWkt( char ** ppszDstText ) const;
    00195
    00196     // IGeometry
    00197     virtual int getDimension() const;
    00198     virtual OGRGeometry *clone() const;
    00199     virtual void empty();
    00200     virtual void getEnvelope( OGREnvelope * psEnvelope ) const;
    00201     virtual void getEnvelope( OGREnvelope3D * psEnvelope ) const;
    00202     virtual OGRBoolean  IsEmpty() const;
    00203
    00204     // IPoint
    00205     double      getX() const { return x; }
    00206     double      getY() const { return y; }
    00207     double      getZ() const { return z; }
    00208
    00209     // Non standard
    00210     virtual void setCoordinateDimension( int nDimension );
    00211     void        setX( double xIn ) { x = xIn; if (nCoordDimension == 0) nCoordDimension = 2; }
    00212     void        setY( double yIn ) { y = yIn; if (nCoordDimension == 0) nCoordDimension = 2; }
    00213     void        setZ( double zIn ) { z = zIn; nCoordDimension=3; }
    00214
    00215     // ISpatialRelation
    00216     virtual OGRBoolean  Equals( OGRGeometry * ) const;
    00217
    00218     // Non standard from OGRGeometry
    00219     virtual const char *getGeometryName() const;
    00220     virtual OGRwkbGeometryType getGeometryType() const;
    00221     virtual OGRErr  transform( OGRCoordinateTransformation *poCT );
    00222     virtual void flattenTo2D();
    00223
    00224     virtual void        swapXY();
    00225 };
    00226
    00227 /************************************************************************/
    00228 /*                               OGRCurve                               */
    00229 /************************************************************************/
    00230
    00235 class CPL_DLL OGRCurve : public OGRGeometry
    00236 {
    00237   public:
    00238             OGRCurve();
    00239     virtual ~OGRCurve();
    00240     // ICurve methods
    00241     virtual double get_Length() const = 0;
    00242     virtual void StartPoint(OGRPoint *) const = 0;
    00243     virtual void EndPoint(OGRPoint *) const = 0;
    00244     virtual int  get_IsClosed() const;
    00245     virtual void Value( double, OGRPoint * ) const = 0;
    00246
    00247 };
    00248
    00249 /************************************************************************/
    00250 /*                            OGRLineString                             */
    00251 /************************************************************************/
    00252
    00257 class CPL_DLL OGRLineString : public OGRCurve
    00258 {
    00259   protected:
    00260     int         nPointCount;
    00261     OGRRawPoint *paoPoints;
    00262     double      *padfZ;
    00263
    00264     void        Make3D();
    00265     void        Make2D();
    00266
    00267   public:
    00268                 OGRLineString();
    00269     virtual     ~OGRLineString();
    00270
    00271     // IWks Interface
    00272     virtual int WkbSize() const;
    00273     virtual OGRErr importFromWkb( unsigned char *, int = -1 );
    00274     virtual OGRErr exportToWkb( OGRwkbByteOrder, unsigned char * ) const;
    00275     virtual OGRErr importFromWkt( char ** );
    00276     virtual OGRErr exportToWkt( char ** ppszDstText ) const;
    00277
    00278     // IGeometry interface
    00279     virtual int getDimension() const;
    00280     virtual OGRGeometry *clone() const;
    00281     virtual void empty();
    00282     virtual void getEnvelope( OGREnvelope * psEnvelope ) const;
    00283     virtual void getEnvelope( OGREnvelope3D * psEnvelope ) const;
    00284     virtual OGRBoolean  IsEmpty() const;
    00285
    00286     // ICurve methods
    00287     virtual double get_Length() const;
    00288     virtual void StartPoint(OGRPoint *) const;
    00289     virtual void EndPoint(OGRPoint *) const;
    00290     virtual void Value( double, OGRPoint * ) const;
    00291
    00292     // ILineString methods
    00293     int         getNumPoints() const { return nPointCount; }
    00294     void        getPoint( int, OGRPoint * ) const;
    00295     double      getX( int i ) const { return paoPoints[i].x; }
    00296     double      getY( int i ) const { return paoPoints[i].y; }
    00297     double      getZ( int i ) const;
    00298
    00299     // ISpatialRelation
    00300     virtual OGRBoolean  Equals( OGRGeometry * ) const;
    00301
    00302     // non standard.
    00303     virtual void setCoordinateDimension( int nDimension );
    00304     void        setNumPoints( int );
    00305     void        setPoint( int, OGRPoint * );
    00306     void        setPoint( int, double, double );
    00307     void        setPoint( int, double, double, double );
    00308     void        setPoints( int, OGRRawPoint *, double * = NULL );
    00309     void        setPoints( int, double * padfX, double * padfY,
    00310                            double *padfZ = NULL );
    00311     void        addPoint( OGRPoint * );
    00312     void        addPoint( double, double );
    00313     void        addPoint( double, double, double );
    00314
    00315     void        getPoints( OGRRawPoint *, double * = NULL ) const;
    00316     void        getPoints( void* pabyX, int nXStride,
    00317                            void* pabyY, int nYStride,
    00318                            void* pabyZ = NULL, int nZStride = 0 ) const;
    00319
    00320     void        addSubLineString( const OGRLineString *,
    00321                                   int nStartVertex = 0, int nEndVertex = -1 );
    00322
    00323     // non-standard from OGRGeometry
    00324     virtual OGRwkbGeometryType getGeometryType() const;
    00325     virtual const char *getGeometryName() const;
    00326     virtual OGRErr  transform( OGRCoordinateTransformation *poCT );
    00327     virtual void flattenTo2D();
    00328     virtual void segmentize(double dfMaxLength);
    00329
    00330     virtual void        swapXY();
    00331 };
    00332
    00333 /************************************************************************/
    00334 /*                            OGRLinearRing                             */
    00335 /************************************************************************/
    00336
    00355 class CPL_DLL OGRLinearRing : public OGRLineString
    00356 {
    00357   private:
    00358     friend class OGRPolygon;
    00359
    00360     // These are not IWks compatible ... just a convenience for OGRPolygon.
    00361     virtual int _WkbSize( int b3D ) const;
    00362     virtual OGRErr _importFromWkb( OGRwkbByteOrder, int b3D,
    00363                                    unsigned char *, int=-1 );
    00364     virtual OGRErr _exportToWkb( OGRwkbByteOrder, int b3D,
    00365                                  unsigned char * ) const;
    00366
    00367   public:
    00368                         OGRLinearRing();
    00369                         OGRLinearRing( OGRLinearRing * );
    00370                         ~OGRLinearRing();
    00371
    00372     // Non standard.
    00373     virtual const char *getGeometryName() const;
    00374     virtual OGRGeometry *clone() const;
    00375     virtual int isClockwise() const;
    00376     virtual void reverseWindingOrder();
    00377     virtual void closeRings();
    00378     virtual double get_Area() const;
    00379     OGRBoolean isPointInRing(const OGRPoint* pt, int bTestEnvelope = TRUE) const;
    00380     OGRBoolean isPointOnRingBoundary(const OGRPoint* pt, int bTestEnvelope = TRUE) const;
    00381
    00382     // IWks Interface - Note this isnt really a first class object
    00383     // for the purposes of WKB form.  These methods always fail since this
    00384     // object cant be serialized on its own.
    00385     virtual int WkbSize() const;
    00386     virtual OGRErr importFromWkb( unsigned char *, int=-1 );
    00387     virtual OGRErr exportToWkb( OGRwkbByteOrder, unsigned char * ) const;
    00388 };
    00389
    00390 /************************************************************************/
    00391 /*                              OGRSurface                              */
    00392 /************************************************************************/
    00393
    00398 class CPL_DLL OGRSurface : public OGRGeometry
    00399 {
    00400   public:
    00401     virtual double      get_Area() const = 0;
    00402     virtual OGRErr      PointOnSurface( OGRPoint * poPoint ) const = 0;
    00403 };
    00404
    00405 /************************************************************************/
    00406 /*                              OGRPolygon                              */
    00407 /************************************************************************/
    00408
    00418 class CPL_DLL OGRPolygon : public OGRSurface
    00419 {
    00420     int         nRingCount;
    00421     OGRLinearRing **papoRings;
    00422
    00423   public:
    00424                 OGRPolygon();
    00425     virtual     ~OGRPolygon();
    00426
    00427     // Non standard (OGRGeometry).
    00428     virtual const char *getGeometryName() const;
    00429     virtual OGRwkbGeometryType getGeometryType() const;
    00430     virtual OGRGeometry *clone() const;
    00431     virtual void empty();
    00432     virtual OGRErr  transform( OGRCoordinateTransformation *poCT );
    00433     virtual void flattenTo2D();
    00434     virtual OGRBoolean  IsEmpty() const;
    00435     virtual void segmentize(double dfMaxLength);
    00436
    00437     // ISurface Interface
    00438     virtual double      get_Area() const;
    00439     virtual int         PointOnSurface( OGRPoint * poPoint ) const;
    00440
    00441     // IWks Interface
    00442     virtual int WkbSize() const;
    00443     virtual OGRErr importFromWkb( unsigned char *, int = -1 );
    00444     virtual OGRErr exportToWkb( OGRwkbByteOrder, unsigned char * ) const;
    00445     virtual OGRErr importFromWkt( char ** );
    00446     virtual OGRErr exportToWkt( char ** ppszDstText ) const;
    00447
    00448     // IGeometry
    00449     virtual int getDimension() const;
    00450     virtual void getEnvelope( OGREnvelope * psEnvelope ) const;
    00451     virtual void getEnvelope( OGREnvelope3D * psEnvelope ) const;
    00452
    00453     // ISpatialRelation
    00454     virtual OGRBoolean  Equals( OGRGeometry * ) const;
    00455
    00456     // Non standard
    00457     virtual void setCoordinateDimension( int nDimension );
    00458
    00459     void        addRing( OGRLinearRing * );
    00460     void        addRingDirectly( OGRLinearRing * );
    00461
    00462     OGRLinearRing *getExteriorRing();
    00463     const OGRLinearRing *getExteriorRing() const;
    00464     int         getNumInteriorRings() const;
    00465     OGRLinearRing *getInteriorRing( int );
    00466     const OGRLinearRing *getInteriorRing( int ) const;
    00467
    00468     OGRBoolean IsPointOnSurface( const OGRPoint * ) const;
    00469
    00470     virtual void closeRings();
    00471
    00472     virtual void        swapXY();
    00473 };
    00474
    00475 /************************************************************************/
    00476 /*                        OGRGeometryCollection                         */
    00477 /************************************************************************/
    00478
    00486 class CPL_DLL OGRGeometryCollection : public OGRGeometry
    00487 {
    00488     int         nGeomCount;
    00489     OGRGeometry **papoGeoms;
    00490
    00491     OGRErr      importFromWkbInternal( unsigned char * pabyData, int nSize, int nRecLevel );
    00492     OGRErr      importFromWktInternal( char **ppszInput, int nRecLevel );
    00493
    00494   public:
    00495                 OGRGeometryCollection();
    00496     virtual     ~OGRGeometryCollection();
    00497
    00498     // Non standard (OGRGeometry).
    00499     virtual const char *getGeometryName() const;
    00500     virtual OGRwkbGeometryType getGeometryType() const;
    00501     virtual OGRGeometry *clone() const;
    00502     virtual void empty();
    00503     virtual OGRErr  transform( OGRCoordinateTransformation *poCT );
    00504     virtual void flattenTo2D();
    00505     virtual OGRBoolean  IsEmpty() const;
    00506     virtual void segmentize(double dfMaxLength);
    00507
    00508     // IWks Interface
    00509     virtual int WkbSize() const;
    00510     virtual OGRErr importFromWkb( unsigned char *, int = -1 );
    00511     virtual OGRErr exportToWkb( OGRwkbByteOrder, unsigned char * ) const;
    00512     virtual OGRErr importFromWkt( char ** );
    00513     virtual OGRErr exportToWkt( char ** ppszDstText ) const;
    00514
    00515     virtual double get_Length() const;
    00516     virtual double get_Area() const;
    00517
    00518     // IGeometry methods
    00519     virtual int getDimension() const;
    00520     virtual void getEnvelope( OGREnvelope * psEnvelope ) const;
    00521     virtual void getEnvelope( OGREnvelope3D * psEnvelope ) const;
    00522
    00523     // IGeometryCollection
    00524     int         getNumGeometries() const;
    00525     OGRGeometry *getGeometryRef( int );
    00526     const OGRGeometry *getGeometryRef( int ) const;
    00527
    00528     // ISpatialRelation
    00529     virtual OGRBoolean  Equals( OGRGeometry * ) const;
    00530
    00531     // Non standard
    00532     virtual void setCoordinateDimension( int nDimension );
    00533     virtual OGRErr addGeometry( const OGRGeometry * );
    00534     virtual OGRErr addGeometryDirectly( OGRGeometry * );
    00535     virtual OGRErr removeGeometry( int iIndex, int bDelete = TRUE );
    00536
    00537     void closeRings();
    00538
    00539     virtual void        swapXY();
    00540 };
    00541
    00542 /************************************************************************/
    00543 /*                           OGRMultiPolygon                            */
    00544 /************************************************************************/
    00545
    00553 class CPL_DLL OGRMultiPolygon : public OGRGeometryCollection
    00554 {
    00555   public:
    00556             OGRMultiPolygon();
    00557     // Non standard (OGRGeometry).
    00558     virtual const char *getGeometryName() const;
    00559     virtual OGRwkbGeometryType getGeometryType() const;
    00560     virtual OGRGeometry *clone() const;
    00561     virtual OGRErr importFromWkt( char ** );
    00562     virtual OGRErr exportToWkt( char ** ) const;
    00563
    00564     // Non standard
    00565     virtual OGRErr addGeometryDirectly( OGRGeometry * );
    00566
    00567     virtual double  get_Area() const;
    00568 };
    00569
    00570 /************************************************************************/
    00571 /*                            OGRMultiPoint                             */
    00572 /************************************************************************/
    00573
    00578 class CPL_DLL OGRMultiPoint : public OGRGeometryCollection
    00579 {
    00580   private:
    00581     OGRErr  importFromWkt_Bracketed( char **, int bHasM, int bHasZ );
    00582
    00583   public:
    00584             OGRMultiPoint();
    00585     // Non standard (OGRGeometry).
    00586     virtual const char *getGeometryName() const;
    00587     virtual OGRwkbGeometryType getGeometryType() const;
    00588     virtual OGRGeometry *clone() const;
    00589     virtual OGRErr importFromWkt( char ** );
    00590     virtual OGRErr exportToWkt( char ** ) const;
    00591
    00592     // Non standard
    00593     virtual OGRErr addGeometryDirectly( OGRGeometry * );
    00594 };
    00595
    00596 /************************************************************************/
    00597 /*                          OGRMultiLineString                          */
    00598 /************************************************************************/
    00599
    00604 class CPL_DLL OGRMultiLineString : public OGRGeometryCollection
    00605 {
    00606   public:
    00607             OGRMultiLineString();
    00608             ~OGRMultiLineString();
    00609     // Non standard (OGRGeometry).
    00610     virtual const char *getGeometryName() const;
    00611     virtual OGRwkbGeometryType getGeometryType() const;
    00612     virtual OGRGeometry *clone() const;
    00613     virtual OGRErr importFromWkt( char ** );
    00614     virtual OGRErr exportToWkt( char ** ) const;
    00615
    00616     // Non standard
    00617     virtual OGRErr addGeometryDirectly( OGRGeometry * );
    00618 };
    00619
    00620
    00621 /************************************************************************/
    00622 /*                          OGRGeometryFactory                          */
    00623 /************************************************************************/
    00624
    00629 class CPL_DLL OGRGeometryFactory
    00630 {
    00631     static OGRErr createFromFgfInternal( unsigned char *pabyData,
    00632                                          OGRSpatialReference * poSR,
    00633                                          OGRGeometry **ppoReturn,
    00634                                          int nBytes,
    00635                                          int *pnBytesConsumed,
    00636                                          int nRecLevel );
    00637   public:
    00638     static OGRErr createFromWkb( unsigned char *, OGRSpatialReference *,
    00639                                  OGRGeometry **, int = -1 );
    00640     static OGRErr createFromWkt( char **, OGRSpatialReference *,
    00641                                  OGRGeometry ** );
    00642     static OGRErr createFromFgf( unsigned char *, OGRSpatialReference *,
    00643                                  OGRGeometry **, int = -1, int * = NULL );
    00644     static OGRGeometry *createFromGML( const char * );
    00645     static OGRGeometry *createFromGEOS( GEOSGeom );
    00646
    00647     static void   destroyGeometry( OGRGeometry * );
    00648     static OGRGeometry *createGeometry( OGRwkbGeometryType );
    00649
    00650     static OGRGeometry * forceToPolygon( OGRGeometry * );
    00651     static OGRGeometry * forceToMultiPolygon( OGRGeometry * );
    00652     static OGRGeometry * forceToMultiPoint( OGRGeometry * );
    00653     static OGRGeometry * forceToMultiLineString( OGRGeometry * );
    00654
    00655     static OGRGeometry * organizePolygons( OGRGeometry **papoPolygons,
    00656                                            int nPolygonCount,
    00657                                            int *pbResultValidGeometry,
    00658                                            const char **papszOptions = NULL);
    00659
    00660     static void *getGEOSGeometryFactory();
    00661
    00662     static int haveGEOS();
    00663
    00664     static OGRGeometry* transformWithOptions( const OGRGeometry* poSrcGeom,
    00665                                               OGRCoordinateTransformation *poCT,
    00666                                               char** papszOptions );
    00667
    00668     static OGRGeometry*
    00669         approximateArcAngles( double dfX, double dfY, double dfZ,
    00670                               double dfPrimaryRadius, double dfSecondaryAxis,
    00671                               double dfRotation,
    00672                               double dfStartAngle, double dfEndAngle,
    00673                               double dfMaxAngleStepSizeDegrees );
    00674 };
    00675
    00676 OGRwkbGeometryType CPL_DLL OGRFromOGCGeomType( const char *pszGeomType );
    00677 const char CPL_DLL * OGRToOGCGeomType( OGRwkbGeometryType eGeomType );
    00678
    00679 #endif /* ndef _OGR_GEOMETRY_H_INCLUDED */

Generated for GDAL by 1.5.6.