<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7650.28">
<TITLE>Encounter Segmentation Fault with GEOS 2.2.2</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hi:</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; I encountered an error of &quot;Segmentation Fault&quot; with GEOS 2.2.2. What I am doing is to</FONT>

<BR><FONT SIZE=2 FACE="Arial">get intersection of two polygons. The error happens to the specific polygong:</FONT>

<BR><FONT SIZE=2 FACE="Arial">POLYGON ((125.331 0,3.35823e-06 125.331,-125.331 6.71646e-06,-1.00747e-05 -125.331,125.331 0))</FONT>

<BR><FONT SIZE=2 FACE="Arial">and </FONT>

<BR><FONT SIZE=2 FACE="Arial">POLYGON ((245.331 120,120 245.331,-5.331 120,120 -5.331,245.331 120))</FONT>

<BR><FONT SIZE=2 FACE="Arial">There is no error to others polygons.</FONT>

<BR><FONT SIZE=2 FACE="Arial">So I think it must be an error of GEOS 2.2.2 code.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">My code is :</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GEOSGeom aPolygon1,aPolygon2;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string aString1(&quot;POLYGON ((125.331 0,3.35823e-06 125.331,-125.331 6.71646e-06,-1.00747e-05 -125.331,125.331 0))&quot;);</FONT></P>

<P><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string aString2(&quot;POLYGON ((245.331 120,120 245.331,-5.331 120,120 -5.331,245.331 120))&quot;);</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; aPolygon1 = GEOSGeomFromWKT(aString1.data());</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; aPolygon2 = GEOSGeomFromWKT(aString2.data());</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GEOSGeom anIntersection = GEOSIntersection(aPolygon1,aPolygon2);</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">My environment:</FONT>

<BR><FONT SIZE=2 FACE="Arial">#Uname -a</FONT>

<BR><FONT SIZE=2 FACE="Arial">SunOS xxxx 5.8 Generic_108528-29 sun4u sparc SUNW,Sun-Blade-1500</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">&nbsp; Could anybody of the development team have a look of it?</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">&nbsp; Regards</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">&nbsp; Liang Sheng</FONT>
</P>

</BODY>
</HTML>