Looks like you are almost done.

SimpleFeatureBuilder.buil( schema, attributes, fid ) should do the trick.

Have a look at that first page I sent you that has the examples of how to use 
stuff :-)
Jody


-- 
Jody Garnett

On Thursday, 12 May 2011 at 11:58 PM, mil84 wrote: 
> some of your advices helped me, also I repaired many errors by myself, but
> still i have few errors: 
> 
> 
> DefaultFeatureType type = (DefaultFeatureType) feature.getFeatureType();
> DefaultFeature newFeature = (DefaultFeature)
> type.create(feature.getAttributes(null), feature.getID());
> 
> 
> Even when i replaced DefaultFeature and DefaultFeatureType with
> SimpleFeature and SimpleFeatureType, it says no method create (and also
> nothing similar to create)...So probably i must create new feature different
> way..
> 
> List<AttributeDescriptor> types =
> featureSource.getSchema().getAttributeDescriptors();
> 
> Did u mean this (below)?:
> 
> Collection<PropertyDescriptor> types =
> featureSource.getSchema().getDescriptors();
> 
> Because your code throws compilation errors (no method
> getAttributeDescriptors ())
> 
> Well, sorry about questions like this, usually I can use docs, but now its
> was pretty hard to find specific method if name of so many classes changed
> or they were replaced by another...it looks so easy when u know every detail
> about changes between versions ;)
> 
> --
> View this message in context: 
> http://osgeo-org.1803224.n2.nabble.com/GeoTools-upgrade-problem-2-4-2-2-5-6-7-tp6355239p6355888.html
> Sent from the geotools-gt2-users mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> Achieve unprecedented app performance and reliability
> What every C/C++ and Fortran developer should know.
> Learn how Intel has extended the reach of its next-generation tools
> to help boost performance applications - inlcuding clusters.
> http://p.sf.net/sfu/intel-dev2devmay
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
> 
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to