Please try to keep replies on the user list where others can chime in or learn from your experience.
On Thu, 4 Feb 2021 at 15:44, Joud Kassem <joud.kasse...@gmail.com> wrote: > I just noticed that when I get the featureCollection size > (featureCollection.size()), a getFeature request is sent! It looks like the > size method is calling somehow the getCountInternal method in the > WfsFeatureSource which sends a getFeature request on its own.. the question > is why size() is calling the getCountInternal? Another question is why > isEmpty() is not working on the featureCollection? it returns true even > though the collection is not empty.. third question, is there a way to know > how many features there are without using size()? > > In general to save on memory featureCollections are more streams than collections so you need to go back to the source to find out how many of them there are in the collection, as to isEmpty() - that might be a bug or the collection may include data, we need to see your minimum viable code example before we can comment. Ian
_______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users