Use the example creates a new shapefile from CSV; this time rather than use CSV use your original shapefile as the source of data. To add an extra column you can call SimpleFeatureTypeBuilder.init( schema ) to "load" the feature type into the builder; from there you can hack it at will (including adding an extra column).
For a more crazy example you can consider this ... - http://svn.geotools.org/udig/trunk/plugins/net.refractions.udig.catalog.shp/src/net/refractions/udig/catalog/shp/internal/ReshapeOperation.java > Is there a way to add attributes to a feature? In particular I have a > shapefile and I'd like to add > a new attribute to each feature in it (the result of some calculations), so > that I can then save that information as well as map it. > Thanx > gaby > > > *************************************************************** > ** Gabriella Turek [EMAIL PROTECTED] ** > ** National Institute of Water & Atmospheric Research (NIWA) ** > ** PO Box 8602 Christchurch New Zealand +64-3-343-8067 ** > *************************************************************** > > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: The Future of Linux Business White Paper > from Novell. From the desktop to the data center, Linux is going > mainstream. Let it simplify your IT future. > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 > _______________________________________________ > Geotools-gt2-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
