to create a featureCollection, i need to create a FeatureType,

SimpleFeatureTypeBuilder typeBuilder = new SimpleFeatureTypeBuilder();
typeBuilder.add("location", Polygon.class);

FeatureType mytype = typeBuilder.buildFeatureType();

SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder();



then after I created a feature,
featureBuilder.add(mynewpolygon);
Feature f = featureBuilder.buildFeature(null);

featureCollection.add(f);



but if in the same featureCollection, I also want to insert some
MultiPolygon, how can I do it?
the problem is when I store the featureCollection, the ShapeFileDataStore
requires a **single** feature type
ShapefileDataStore.createSchema()


so do I have to insert each standalone polygon into a multipolygon ?

Thanks
Yang
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to