[geos-devel] C API Union Looks Wrong - Ignores Geometry::Union Shortcuts

Charlie Savage cfis at savagexi.com
Fri Sep 7 13:42:44 EDT 2007

I think the CAPI is incorrectly performing the union operation.

Here is Geometry::Union:

Geometry::Union(const Geometry *other) const
	//throw(TopologyException *, IllegalArgumentException *)

	Geometry *out = NULL;

         <bunch of shortcircuit stuff>

	return OverlayOp::overlayOp(this, other, OverlayOp::opUNION);

And here is the CAPI call:

GEOSUnion(const Geometry *g1, const Geometry *g2)
   GeomAutoPtr g3 = BinaryOp(g1, g2, overlayOp(OverlayOp::opUNION));

Notice the CAPI entirely skips Geometry::Union and therefore doesn't use 
any of the shortcuts.  Why is this?  Shouldn't just be:


Note that all the same issue occurs in various other CAPI exposed calls.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.osgeo.org/pipermail/geos-devel/attachments/20070907/c4c766ce/smime.bin

More information about the geos-devel mailing list