Re: [Geotools-gt2-users] Fwd: Adding geometry to layer

2016-01-28 Thread Andrea Aime
On Thu, Jan 28, 2016 at 10:15 AM, Piero Campalani wrote: > ​Hi Andrea, > > thank you for the info, I know it is an obsolete version but apparently > they are using it here because ​of the discontinued support to SWT. > > Now I see [1] that at least a part of the GT funcionalities have been > port

Re: [Geotools-gt2-users] Fwd: Adding geometry to layer

2016-01-28 Thread Piero Campalani
​Hi Andrea, thank you for the info, I know it is an obsolete version but apparently they are using it here because ​of the discontinued support to SWT. Now I see [1] that at least a part of the GT funcionalities have been ported back to SWT, though still being SWT in the unsupported space.. Woul

Re: [Geotools-gt2-users] Fwd: Adding geometry to layer

2016-01-27 Thread Andrea Aime
Hi Piero, your version of GeoTools is pretty old, it has been out of support for years now. Current versions of GeoTools have removed both the add and remove methods, along with other List like methods, because as you noticed they were poorly implemented. ListFeatureCollection retains those method

Re: [Geotools-gt2-users] Fwd: Adding geometry to layer

2016-01-27 Thread Piero Campa
Hi ! ..That does not work too well here (GeoTools 2.8, Linux): the pane is refreshed only once in a while. Moreover, if I'm not wrong, the API is not extremely consistent: /SimpleFeatureCollections#contains()/ and /SimpleFeatureCollections#add()/ are based on the feature ID, while /SimpleFeatureC

Re: [Geotools-gt2-users] Fwd: Adding geometry to layer

2009-01-16 Thread Greg Ederer
That's great. I'll give it a try. Thanks! Greg On Jan 16, 2009, at 12:39 AM, Michael Bedward wrote: > 2009/1/16 Greg Ederer : >> Is it possible to add polygons to a FeatureCollection after the the >> MapLayer >> has been created? I want to be able to generate polygons >> dynamically, and

Re: [Geotools-gt2-users] Fwd: Adding geometry to layer

2009-01-16 Thread Michael Bedward
2009/1/16 Greg Ederer : > Is it possible to add polygons to a FeatureCollection after the the MapLayer > has been created? I want to be able to generate polygons dynamically, and > display them in an exosting JMapPane. > The map pane should repaint automagically when you add features to the colle

Re: [Geotools-gt2-users] Fwd: Adding geometry to layer

2009-01-15 Thread Greg Ederer
Is it possible to add polygons to a FeatureCollection after the the MapLayer has been created? I want to be able to generate polygons dynamically, and display them in an exosting JMapPane. Thanks! Greg On Jan 15, 2009, at 2:06 PM, Michael Bedward wrote: > You could create a feature collect

[Geotools-gt2-users] Fwd: Adding geometry to layer

2009-01-15 Thread Michael Bedward
You could create a feature collection for your polygons then create a map layer containing the collection... SimpleFeatureTypeBuilder typeBuilder = new SimpleFeatureTypeBuilder(); typeBuilder.setName("a-type-name"); typeBuilder.setCRS(aCRS); typeBuilder.add("geom-attr-n