Hi,
I have a model with 120000+ points. It slows at load time to 15-40 seconds per
1000. I think that the issue is that I'm using the default FeatureCollection.
Should I use a DataFeatureCollection? If so does anyone have an example of
implementation for DataFeatureCollection?
What FeatureCollection is best to use when loading large sets of data?
I'm using the below basic approach(extract from other simpler program) but
adding a lot of points:
FeatureCollection collection = FeatureCollections.newCollection();
GeometryFactory factory = JTSFactoryFinder.getGeometryFactory(null);
ArrayList coordList = new ArrayList();
Collection cl = allPoints.values();
Iterator it = cl.iterator();
while (it.hasNext()){
XyzPoint xyz = (XyzPoint)it.next();
coordList.add(new Coordinate(xyz.getX(),xyz.getY()));
//featureBuilder.set("name",xyz.getName());
}
Coordinate[] coords = CoordinateArrays.toCoordinateArray(coordList);
LineString lineString = factory.createLineString(coords);
//featureBuilder.set("name", "testing123");
featureBuilder.add(lineString);
collection.add(featureBuilder.buildFeature(null));
Oliver
-----Original Message-----
From: "Richard Marshall" <[email protected]>
Sent: Monday, April 19, 2010 3:17pm
To: [email protected]
Subject: Re: [Geotools-gt2-users] Shapefile pregeneralization
Hi Christian
I finally managed to get something working. I had not added the new feature
type name ('GenRoads') to the FeatureTypeStyle for the pregeneralized shape
file. The following two lines (added to the code that creates the line
style for the shape file) fixed the problem:
featureTypeStyle.featureTypeNames().clear();
featureTypeStyle.featureTypeNames().add(new NameImpl("GenRoads"));
Thanks,
Richard
--
View this message in context:
http://n2.nabble.com/Shapefile-pregeneralization-tp4867089p4927363.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Download IntelĀ® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users