Fix issue causing always full layer export of abstract geometry types by nprigour · Pull Request #258 · locationtech/udig-platform
Hi @fgdrf
Is it not obvious from reviewing code that the problem is that selection filter (set in data.getQuery()) is actually ignored resulting always to a full layer export?
In line 173 FeatureCollection is created using the following fragment of code
SimpleFeatureCollection fc = fs.getFeatures(data.getQuery());
Then in line 212,213 a new collection is created ignoring the previous one (why?)
SimpleFeatureCollection featureCollection = fs.getFeatures();
FeatureIterator<SimpleFeature> featureIterator = featureCollection.features();
this causes all layer features to be always exported agnostic of whether a selection query exists or not for the given layer. This applies to any geometry type polygon, point, line etc.