I wound up using Spatialite (SQLite + WKB/GEOS support) instead of writing my 
own code.  It was very fast and easy to setup.  It would make a perfect 
teaching/learning tool for anyone who wants to learn about SQL and spatial 
operators.

Craig


-----Original Message-----
From: Mateusz Loskot [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 29, 2008 10:22 AM
To: Craig Miller; Craig Miller
Cc: 'Brent Fraser'; [email protected]; 'Brent Fraser'; 
[email protected]
Subject: Re: [gdal-dev] Topological Union?

Craig Miller wrote:
> Thanks Brent.  I'm looking for a C/C++ solution.  I'll take a look at 
> the other polygon processing libraries as well as the level of effort 
> in porting JTS Cascaded Unions to Geos... that's a conversation for a 
> different mailing list though.

Craig,

I agree with Brent that performance is/may not be very impressive.
In OGR, this is mostly caused by a need to convert OGRGeometry type to GEOS 
geometry type [1] - allocating & copying coordinates data is expansive.

However, if you are developing your own solution in C++, you can avoid this by 
defining your geometry in terms of interface of geos::geom::Geometry or - 
following design pattern called adapter, you can provide a thin wrapper on your 
geometry type that will make it accessible to GEOS engine. This way you should 
get rid of major bottleneck of OGR<->GEOS interoperability.

[1] http://trac.osgeo.org/gdal/browser/trunk/gdal/ogr/ogrgeometry.cpp#L2105

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net Charter Member of OSGeo, 
http://osgeo.org

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to