The documentation has some examples on how to create and use a feature
collection.
http://docs.geotools.org/latest/userguide/tutorial/feature/csv2shp.html
The above page has:
SimpleFeatureCollection collection = FeatureCollections.newCollection();
...
collection.add(feature);
There are a number of alternate implementations that allow you to make a normal
Java collection (such as a list) into a feature collection listed here
http://docs.geotools.org/latest/userguide/library/main/collection.html#performance-options
Finally the DataUtilities class can wrap up a FeatureCollection into a
FeatureSource if needed:
http://docs.geotools.org/latest/userguide/library/main/data.html#featuresource
--
Jody Garnett
On Thursday, 10 May 2012 at 6:43 PM, [email protected] wrote:
> Hi!
> I have a table that contains various fields,between fields there is a
> geometry field!and I must assign this at --->
> FeatureSource<SimpleFeatureType, SimpleFeature> fs!How can I do?We assume
> that in the table there is only a feature(a line)!
> Thank you!!
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>
> _______________________________________________
> GeoTools-GT2-Users mailing list
> [email protected]
> (mailto:[email protected])
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users