coords[3] = new Coordinate(20, 10);
coords[4] = new Coordinate(10, 10);
LinearRing outerShell = new LinearRing(coords, new PrecisionModel(), 0);
Polygon polygon = new Polygon(outerShell, new PrecisionModel(), 0);
LiteralExpression rightExpression = factory.createLiteralExpression(polygon);
filter.addLeftGeometry(leftExpression);
filter.addRightGeometry(rightExpression);
baseRequest.addLock("rail", filter);
baseRequest.addLock("roads", filter);