Appending Attributes to Existing Features

1 message Options
Embed this post
Permalink
CASTRONOVA, ANTHONY

Appending Attributes to Existing Features

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

I am currently learning how to use the geotools library and am having trouble appending new attributes to an existing file that I read in.  I am reading in GML and storing it as a FeatureCollection.  Now I want to append/add a new attribute to each of the featues within the FeatureCollection.  Is this possible?  I've spend all day searching for an answer, and haven't found anything about adding attributes to existing FeatureCollections.  Any help would be greatly appreciated.
 
Just to clarify: 
Suppose I have a feature collection composed of 2 features.
 
Each feature has two attributes:  The location of a point, feature.getAttribute(0) ==> (0,1)
                                                The name of a point, feature.getAttribute(1) ==> point1
 
Now I want to add a new attribute (some integer value) such that feature.getAttribute(2) ==> 5

Thanks,
Tony

 

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
[hidden email]
For list administration needs (esp. [un]subscribing), please use the
following page:
https://lists.sourceforge.net/lists/listinfo/geotools-discussion
Archive available at: http://sourceforge.net/mail/?group_id=4091