Hi all,
While testing out GeoMesa with GeoServer 2.13.x, we ran into some issues
with the FeatureSizeFeatureCollection. I think there are two issues:
First, for a layers backed by a large volume of data, getCount returning
-1 is partially a way of saying that you don't want to count all the
features;). Given this pattern, I'd suggest that the
FeatureSizeFeatureCollection might be taken off the usual path
completely. It looks like it might be an optimization when working with
a bunch of little shapefiles.
Second, WPSes can be implemented with a visitor pattern. For instance,
the gs:Unique process leverages the GeoTools UniqueVisitor(1) which is
recognized by the JDBC DataStores. (In GeoMesa, we do a bunch of
similar things.)
The fact that the current FeatureSizeFeatureCollection doesn't delegate
prevents the UniqueProcess (and the GeoMesa ones) from working properly...
In the short term, any objection to a PR which enables delegation for
that FeatureCollection?
Cheers,
Jim
1. UniqueVisitor:
https://github.com/geotools/geotools/blob/master/modules/library/main/src/main/java/org/geotools/feature/visitor/UniqueVisitor.java
https://github.com/geotools/geotools/blob/master/modules/library/jdbc/src/main/java/org/geotools/jdbc/SQLDialect.java#L375
p.s. I debugged this using PostGIS and the gs:Unique process. When the
FeatureSizeFC was 'on', the queries did not have the 'distinct'
keyword. When the FC was off, GeoServer did make a 'distinct' query.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel