Hello Erik, I'm having trouble understanding what you are trying to do. I've read your question a couple of times, and looked at your source code, but am still a bit confused.
For example, you say: > I want to read the text file as a layer, change the layer value in the > memory(set value of id 2 to 44) But I don't see how that follows from your input csv file. More generally, I don't understand whether the overall aim is to allow for interactive styling and/or whether you are trying to generate new data. For styling, you might want to look at the EnvFunction class which allows for parameter substitution in SLD files (ie. name the parameter in the file and then associate a value with it programmatically): http://docs.geotools.org/latest/javadocs/org/geotools/filter/function/EnvFunction.html Michael On 22 February 2012 23:40, Erik BEck <erik-b...@hotmail.com> wrote: > hello list > I'm new to the "geotools-world" and i work with geotools 8.3. > > I have the following problem and would be very pleased about each stimulus, > and ideas for solution of this problems. > > I have a shapefile with id > Attributtes of test.shp > ----------------------- > FID Shape id value > 0 Polygon 1 11 > 1 Polygon 2 22 > 2 Polygon 3 33 > > > I have a text file with id and value > file input.csv > -------- > id, value > 1, 11 > 2, 22 > 3, 33 > > > I have a sld-file with a fix wired color to the field value > ----------- > value color > 11 white > 22 red > 33 blue > 44 yellow > > I want to read the text file as a layer, change the layer value in the > memory(set value of id 2 to 44) > and then save layer as a text file (output.csv). > > desired result would be a new file > output.txt > ----------------- > id, value > 1, 11 > 2, 44 < -- new value > 3, 33 > > Steps to-do: > 1. combine the values from the text file with the geometry from the > shapefile using the id field > 2. draw the values on a map, use sld style-file to colorize > 3. on click on the button "change value, color and save as txt" : (For > simplicity, the values and the filepaths are in the source code hard-wired.) > A. change value (set value of id 2 from 22 to 44). > B. change color on the map from red to yellow (use sld style-file). > C. save the layer as a text file (output.csv). > > > I did the steps 1 and 2 resolved > and at step 3, I am come to a standstill:-( > > Any tests or example code that someone could point me to, please? > > Here's my code and used files: > - MainGUI.java > - test.shp > - styles.sld > - input.txt > > Thanks > Erik > > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > GeoTools-GT2-Users mailing list > GeoTools-GT2-Users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users