Is there an example of converting Features from one type to another.

I have a gml file on disk.  I'd like to create a Shapefile from the 
features.

I'm using the GML parser described at 
http://docs.codehaus.org/display/GEOTDOC/GML+XML+Support

I get back a FeatureCollection but when I go to write the collection to 
the ShapefileDataStore I receive
"java.io.IOException: Unable to write : java.lang.Object"

If I look at the schema in the FeatureCollection I see that there is a 
property called "metaDataProperty" with type java.lang.Object.

"metaDataProperty:java.lang.Object,description:String,name:String,boundedBy:com.vividsolutions.jts.geom.Envelope,location:Geometry,OBJECTID:Integer,STNID:String,COOPID:String,NAME:String,COUNTRY:String,STATE:String,COUNTY:String,LATITUDE:Double,LONGITUDE:Double,ELEVATION:Integer,SE_ANNO_CAD_DATA:[B,SHAPE:Point"

I don't know where this property comes from and I don't think I need it.

Is there an easy way to transform Features from one schema to another?  
I suppose I could iterate the feature collection and create a new 
feature for each FeatureCollection entry, but that doesn't feel right.

------------------------------------------------------------------------------
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

Reply via email to