// within the filter. The BBOX element is ambiguous, since
// features may contain multiple geometries. For now, we will
// parse it and keep a record of a 'primary geometry' in the
// server.
try {
GeometryFilter finalFilter = factory.createGeometryFilter(AbstractFilter.GEOMETRY_INTERSECTS);
//leave as null and postgisDatSource will use default geom.
//AttributeExpression leftExpression =
// factory.createAttributeExpression(null);
//leftExpression.setAttributePath("@");
// Creates coordinates for the linear ring
Coordinate[] coords = new Coordinate[5];
coords[0] = new Coordinate(rawCoords[0], rawCoords[1]);
coords[1] = new Coordinate(rawCoords[0], rawCoords[3]);
coords[2] = new Coordinate(rawCoords[2], rawCoords[3]);
coords[3] = new Coordinate(rawCoords[2], rawCoords[1]);
coords[4] = new Coordinate(rawCoords[0], rawCoords[1]);
LinearRing outerShell = new LinearRing(coords,
new PrecisionModel(), 0);
Geometry polygon = new Polygon(outerShell,
new PrecisionModel(), 0);
LiteralExpression rightExpression = factory
.createLiteralExpression(polygon);
//finalFilter.addLeftGeometry(leftExpression);
finalFilter.addRightGeometry(rightExpression);
filters.add(finalFilter);
return filters;
} catch (IllegalFilterException e) {
throw new WfsException("Filter creation problem: "