[Qgis-developer] GEOS functions

Carson Farmer carson.farmer at gmail.com
Sat Jan 31 10:53:28 EST 2009

Hello devs,

Recently, I have noticed problems with several of the geoprocessing 
functions that use GEOS. It appears as though GEOS frequently returns 
geometry collections when performing overlay functions such as 

What ends up happening is that if two *polygons* intersect, and this 
intersection includes a single point, or a single line (in addition to 
say overlapping portions of the polygons), then the geometry returned is 
a geometry collection with (possibly) a point, line, and polygon. If 
this is the case, when attempting to write the resultant feature to 
file, it is skipped because it does not match the geometry specified in 

Martin and I have tried to look at some solutions, and he has 
implemented asGeometryCollection() for QgsGeometry(). However, this 
solution is currently not optimal, and appears to have some memory 
leaks. Do any other devs know if GEOS has changed the way overlay 
functions are implemented (I'm using GEOS-3.0.3), and how we can 
overcome this problem?



Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation (NCG),
John Hume Building,
National University of Ireland, Maynooth,
Co. Kildare,
Phone: +353 (0) 1 708 6726
Fax:   +353 (0) 1 708 6456
Email: Carson.Farmer at gmail.com
Web:   http://www.carsonfarmer.com/

More information about the Qgis-developer mailing list