[geos-devel] Encounter Segmentation Fault with GEOS 2.2.2

Sheng Liang (SH/CBC) sheng.liang at ericsson.com
Sun Jun 25 22:12:59 EDT 2006


Hi:
  I encountered an error of "Segmentation Fault" with GEOS 2.2.2. What I
am doing is to
get intersection of two polygons. The error happens to the specific
polygong:
POLYGON ((125.331 0,3.35823e-06 125.331,-125.331
6.71646e-06,-1.00747e-05 -125.331,125.331 0))
and 
POLYGON ((245.331 120,120 245.331,-5.331 120,120 -5.331,245.331 120))
There is no error to others polygons.
So I think it must be an error of GEOS 2.2.2 code.

My code is :
        GEOSGeom aPolygon1,aPolygon2;
        string aString1("POLYGON ((125.331 0,3.35823e-06
125.331,-125.331 6.71646e-06,-1.00747e-05 -125.331,125.331 0))");

        string aString2("POLYGON ((245.331 120,120 245.331,-5.331
120,120 -5.331,245.331 120))");
       
        aPolygon1 = GEOSGeomFromWKT(aString1.data());
        aPolygon2 = GEOSGeomFromWKT(aString2.data());
        
        GEOSGeom anIntersection = GEOSIntersection(aPolygon1,aPolygon2);

My environment:
#Uname -a
SunOS xxxx 5.8 Generic_108528-29 sun4u sparc SUNW,Sun-Blade-1500

  Could anybody of the development team have a look of it?

  Regards

  Liang Sheng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geos-devel/attachments/20060626/66d94324/attachment.html


More information about the geos-devel mailing list