|
From: Gabriella T. <ga...@dv...> - 2008-01-15 03:04:18
|
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 **
************************************************************************
|