Re: [JPP-Devel] Adding an attribute to all Feature objects in a FeatureCollection.

2009-01-12 Thread Martin Davis
> > Maybe a better solution would be to create a new layer with that > contains clones of the Feature objects with the modifications. That > seems like the best way to go... > Yup, I think that's the best pattern to use. -- Martin Davis Senior Technical Architect Refractions Research, Inc. (2

Re: [JPP-Devel] Adding an attribute to all Feature objects in a FeatureCollection.

2009-01-12 Thread Sunburned Surveyor
Thanks for the suggestions Stefan and Martin. I totally understand the logic of making Feature objects immutable. I'll mine the wiki for existing code that can do what I am looking for. Maybe a better solution would be to create a new layer with that contains clones of the Feature objects with the

Re: [JPP-Devel] Adding an attribute to all Feature objects in a FeatureCollection.

2009-01-12 Thread Martin Davis
Sunburned Surveyor wrote: > > So do I have to create a copy of each Feature object in the > FeatureCollection using the new schema and over write the existing Yup > On a related note, would it be handy to have a Feature implementation > that changed its internal state when its FeatureSchema refer

Re: [JPP-Devel] Adding an attribute to all Feature objects in a FeatureCollection.

2009-01-12 Thread Stefan Steiniger
yes... you have to copy every feature to the new schema. There is an class and method in the api package (taken from pirol) that does copy from an old to a new schema. (It could be that the examples on the wiki provide code for that too. But I think I also answered an email on that issues just

Re: [JPP-Devel] Adding an attribute to all Feature objects in a FeatureCollection.

2009-01-12 Thread Larry Becker
Sounds like normal behavior to me. Larry On Mon, Jan 12, 2009 at 3:13 PM, Sunburned Surveyor < sunburned.surve...@gmail.com> wrote: > I'm in the midst of writing the unit tests for my plugin that adds > attributes to all the Feature objects in a layer using information > stored in a CSV file. >

[JPP-Devel] Adding an attribute to all Feature objects in a FeatureCollection.

2009-01-12 Thread Sunburned Surveyor
I'm in the midst of writing the unit tests for my plugin that adds attributes to all the Feature objects in a layer using information stored in a CSV file. I'm having some trouble adding an attribute to all of the Feature objects in a Feature Collection. I can sucessfully modify the FeatureSchema