[gdal-dev] Topological Union?

Mateusz Loskot mateusz at loskot.net
Fri Aug 29 13:21:45 EDT 2008


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


More information about the gdal-dev mailing list