Geometry[] geomArray = new Geometry[ops.size()];
for (int i = 0; i < geomArray.length; i++) {
geomArray[i] = ops.get(i).geometry;
}
GeometryCollection collection = geomArray[0].getFactory().createGeometryCollection(geomArray);
Geometry united = collection.union();
Literal geometry = FF.literal(united);
// rebuild the filter
Class<?> operation = ops.get(0).operation;
if(BBOX.class.isAssignableFrom(operation) || Intersects.class.isAssignableFrom(operation)) {