GEOS Support

Steve Lime Steve.Lime at DNR.STATE.MN.US
Tue Jun 27 11:57:19 EDT 2006


Hi all: I did commit the port of the C++ support for GEOS to the new C-API. Seems to work well in testing. I wrapped all the meaningful GEOS methods:

  - buffer, intersection, union, difference, symDifference, boundary, getCentroid, convexHull

  - contains, within, overlaps, intersects, disjoint, equals, touches, crosses

  - area, length, distance

and have included those in the SWIG binding for shapeObj's.

To do's or gotchas:

  - configure needs to detect a minimum version of GEOS (2.2.2 or higher - that's when length and area were exposed to C API)

  - need to handle z coordinates if enabled in MapServer

  - error handling ain't great, it's not as easy to get at GEOS errors as before. We could define a GEOS error handler and register it when initializing
    the library but I worry about conflicts with PostGIS or OGR that also use it.

  - there's one MapScript issue. There already is a contains method that takes a pointObj. I created an overloaded method for contains that takes
    a shapeObj. In perl that's ok, but I'm not sure about other languages.

  - PHP/MapScript needs to be updated.

I'll update all necessary bugs in Bugzilla with details. Let me know if you run into issues beside the one already fixed...

Steve



More information about the mapserver-dev mailing list