[Gdal-dev] GEOS Integration

Frank Warmerdam warmerdam at pobox.com
Sun Jul 11 15:16:24 EDT 2004


Folks,

I have completed a preliminary integration of the GEOS simple features
geometry operations library with the OGRGeometry class.  The OGRGeometry
now has a variety of operators including:

     // ISpatialRelation
     virtual OGRBoolean  Intersect( OGRGeometry * ) const;
     virtual OGRBoolean  Equal( OGRGeometry * ) const = 0;
     virtual OGRBoolean  Disjoint( const OGRGeometry * ) const;
     virtual OGRBoolean  Touches( const OGRGeometry * ) const;
     virtual OGRBoolean  Crosses( const OGRGeometry * ) const;
     virtual OGRBoolean  Within( const OGRGeometry * ) const;
     virtual OGRBoolean  Contains( const OGRGeometry * ) const;
     virtual OGRBoolean  Overlaps( const OGRGeometry * ) const;
//    virtual OGRBoolean  Relate( const OGRGeometry *, const char * ) const;

     virtual OGRGeometry *getBoundary() const;
     virtual double  Distance( const OGRGeometry * ) const;
     virtual OGRGeometry *ConvexHull() const;
     virtual OGRGeometry *Buffer( double dfDist, int nQuadSegs = 30 ) const;
     virtual OGRGeometry *Intersection( const OGRGeometry *) const;
     virtual OGRGeometry *Union( const OGRGeometry * ) const;
     virtual OGRGeometry *Difference( const OGRGeometry * ) const;
     virtual OGRGeometry *SymmetricDifference( const OGRGeometry * ) const;

There are also methods to convert OGRGeometries to geos::geometry and back
again.   Python bindings and documentation have been added for the new methods.

There is currently no way to use the new operations from the commandline
of any of the programs, but it is available to scripters and programmers.
I have only used it on Linux.  No effort has been made to update the windows
builds to support GEOS yet.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list