<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=big5">
<META content="MSHTML 6.00.2800.1170" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Courier New" size=2>Hi all,</FONT></DIV>
<DIV><FONT face="Courier New" size=2>&nbsp; i have a WKT file with 4M in 
size,&nbsp;it took GEOS&nbsp;10 minutes to read the geometries in, by the other 
way, it took JTS less than 20 seconds, the following is my program, what 
is&nbsp;wrong?</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>#include&lt;fstream&gt;</FONT></DIV>
<DIV><FONT face="Courier New" size=2>#include&lt;io.h&gt;</FONT></DIV>
<DIV><FONT face="Courier New" size=2>#inlcude&lt;geom.h&gt;</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>using namespace std;</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>const int MAX_WKT_SIZE = 
5000000;</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>int main(int argc, char** 
argv)</FONT></DIV>
<DIV><FONT face="Courier New" size=2>{</FONT></DIV>
<DIV><FONT face="Courier New" size=2>&nbsp; char 
cWKT[MAX_WKT_SIZE];</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>&nbsp; ifstream 
inFile("test.txt");</FONT></DIV>
<DIV><FONT face="Courier New" size=2>&nbsp; WKTReader WKTRdr;</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>&nbsp; while(inFile.getline(cWKT, 
MAX_WKT_SIZE) != NULL)</FONT></DIV>
<DIV><FONT face="Courier New" size=2>&nbsp; {</FONT></DIV>
<DIV><FONT face="Courier New" size=2>&nbsp;&nbsp;&nbsp; string 
sWKT(cWKT);</FONT></DIV>
<DIV><FONT face="Courier New" size=2>&nbsp;&nbsp;&nbsp; Polygon* p = (Polygon*) 
WKTRdr.read(sWKT);</FONT></DIV>
<DIV><FONT face="Courier New" size=2>&nbsp;&nbsp;&nbsp; cout &lt;&lt; 
p-&gt;getArea() &lt;&lt; endl;</FONT></DIV>
<DIV><FONT face="Courier New" size=2>&nbsp;&nbsp;&nbsp; delete p;</FONT></DIV>
<DIV><FONT face="Courier New" size=2>&nbsp; }</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>&nbsp; return 0;</FONT></DIV>
<DIV><FONT face="Courier New" size=2>}</FONT></DIV></BODY></HTML>