Can anyone tell me if I can make any performance improvements to this code? 
Am I doing it in the most efficient manner?  It takes about 50seconds to
parse 50,000 features.  Thanks!

FileInputStream reader = new
FileInputStream("C:\\Users\\1036476\\Desktop\\geoFiles\\50000.kml");
StreamingParser parser = new StreamingParser(new KMLConfiguration(),reader,
SimpleFeature.class);

FeatureJSON fjson = new FeatureJSON();
FileWriter tmp = new FileWriter("temp.txt");
BufferedWriter writer = new BufferedWriter(tmp);

SimpleFeature simpleFeature=(SimpleFeature) parser.parse();
          
while (simpleFeature != null) {
 fjson.writeFeature(simpleFeature, writer);
 simpleFeature=(SimpleFeature) parser.parse();
}

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Large-KML-file-to-GeoJSON-performance-question-tp6306341p6306341.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to