Thanks Jody. Now I have a follow up question.

How can I follow changes in a FeatureCollection.

I can’t add a listener, also not if I wrap it in a DefaultFeatureCollection.
I can put it in a CollectionFeatureSource and add a FeatureListener but 
CollectionFeatureSource does not fire any event.
 
I searched the documentation and the source code repository but haven’t found a 
solution for it.
But I’m sure it is somewhere. At least, I want to believe…
 
Marco

 

 

Von: Jody Garnett [mailto:jody.garn...@gmail.com] 
Gesendet: Freitag, 20. Januar 2017 23:55
An: Marco Peters <marco.pet...@brockmann-consult.de>
Cc: GeoTools Users <geotools-gt2-users@lists.sourceforge.net>
Betreff: Re: [Geotools-gt2-users] Lost functionality in FeatureEvent?

 

Excellent Marco; and that filter should be an Id filter with a list of modified 
feature ids.

 

One reason for this change (which is quite annoying / subtle) is that some 
datastores (like WFS) do not assign a final FeatureID until after commit is 
called. In the WFS client case it needs to send the Transaction request to the 
WFS, get the result back, parse the feature ids out of the result, and let you 
know about them in an event.




--

Jody Garnett

 

On 20 January 2017 at 03:58, Marco Peters <marco.pet...@brockmann-consult.de 
<mailto:marco.pet...@brockmann-consult.de> > wrote:

Seems I found the answer myself.

FeatureEvent.getFilter() returns a filter to get the changed features from the 
source.

 

 

Von: Marco Peters [mailto:marco.pet...@brockmann-consult.de 
<mailto:marco.pet...@brockmann-consult.de> ] 
Gesendet: Donnerstag, 19. Januar 2017 17:18
An: geotools-gt2-users@lists.sourceforge.net 
<mailto:geotools-gt2-users@lists.sourceforge.net> 
Betreff: [Geotools-gt2-users] Lost functionality in FeatureEvent?

 

Currently I try to update my GeoTools dependencies from 2.7.4 to 16.1. Yes, I 
know I’m late.

However, I noticed a possible loss of functionality. As CollectionEvent is 
replaced FeatureEvent I have no chance anymore to find out which features have 
been removed or added. In CollectionEvent they were available by getFeatures(). 
My question, is there another way of obtaining these features?

 

By the way, is there may be a changelog which summarises the API changes from 
version to version? This would be helpful now.

 

Ciao

  Marco 

 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net 
<mailto:GeoTools-GT2-Users@lists.sourceforge.net> 
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to