Hi Nano,
Forgive me for answering your question with a question but faster for what ?
If you can provide some information about your application, ie. the
types of operations that you are doing with the data, it would help
folk here suggest approaches that are relevant to your case.
Meanwhile, here is the Quickstart main method, modified to load all
features into memory before displaying them. You might like to try
this with your data.
public static void main(String[] args) throws Exception {
// display a data store file chooser dialog for shapefiles
File file = JFileDataStoreChooser.showOpenFile("shp", null);
if (file == null) {
return;
}
FileDataStore store = FileDataStoreFinder.getDataStore(file);
FeatureSource featureSource = store.getFeatureSource();
FeatureCollection<SimpleFeatureType, SimpleFeature> memColl =
FeatureCollections.newCollection();
memColl.addAll(featureSource.getFeatures());
// Create a map context and add our shapefile to it
MapContext map = new DefaultMapContext();
map.setTitle("Quickstart");
map.addLayer(memColl, null);
// Now display the map
JMapFrame.showMap(map);
}
Hope this helps,
Michael
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users