Hello, I am wondering if there is a simple way of saving a FeatureSource to a
shapefile. The FeatureSource is backed by an MStore. I can't quite see
how to do this. I've gotten as far as this:
FeatureSource fs = mapLayer.getFeatureSource(); //pre-existing featursource
FileDataStoreFactorySpi factory = new IndexedShapefileDataStoreFactory();
Map map = Collections.singletonMap( "url", file.toURL()); //file from chooser
DataStore myData = factory.createNewDataStore( map );
myData.createSchema(fs.getSchema());
Thanx
gaby
--
************************************************************************
http://www.chimere.org/ http://walbatross.blogspot.com
************************************************************************
** Throw the radio up high / Watch us drown out half the sky **
** Synaesthesia coloured blue / Aquaman knows what to do **
************************************************************************
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users