Object cloneFilter( BinarySpatialOperator bso, Object extraData, Expression ex1, Expression ex2) { return ff.disjoint(ex1, ex2); } }.transform(filter, extraData);
/** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { Expression[] operands = OGCUtils.spatial(node, filterFactory, geometryFactory); return filterFactory.disjoint(operands[0], operands[1]); } }
public Object visit(Disjoint filter, Object arg1) { Expression[][] exps = visitBinarySpatialOp(filter); List combinedFilters = new ArrayList(exps.length); for (int i = 0; i < exps.length; i++) { Expression left = exps[i][0]; Expression right = exps[i][1]; Filter unrolled = ff.disjoint(left, right, filter.getMatchAction()); combinedFilters.add(unrolled); } Filter unrolled = combineOred(combinedFilters); return unrolled; }
/** * @return new instance of {@link Disjoint} operation * @throws CQLException */ public Disjoint buildDisjoint() throws CQLException { Expression[] params = buildParameters(); return getFilterFactory().disjoint(params[0], params[1]); }
public BinarySpatialOperator buildSpatialDisjointFilter() throws CQLException { Literal geom = this.resultStack.popLiteral(); Expression property = this.resultStack.popExpression(); FilterFactory2 ff = (FilterFactory2) filterFactory; // TODO this cast must be removed. It depends of Geometry // implementation return ff.disjoint(property, geom); }
public void testGeometryFilter() throws IllegalFilterException { Disjoint geomFilter1 = ff.disjoint(testExp1, testExp4); Disjoint geomFilter2 = ff.disjoint(testExp2, testExp4); assertTrue(geomFilter1.equals(geomFilter2)); geomFilter2 = ff.disjoint(testExp2, new LiteralExpressionImpl(new Double(45))); assertTrue(!geomFilter1.equals(geomFilter2)); tFilter1 = ff.between(ff.literal(1), ff.literal(-1), ff.literal(3)); assertTrue(!geomFilter1.equals(tFilter1)); } }
public Object visit(Disjoint filter, Object extraData) { Expression geometry1 = visit(filter.getExpression1(), extraData); Expression geometry2 = visit(filter.getExpression2(), extraData); return getFactory(extraData).disjoint(geometry1, geometry2, filter.getMatchAction()); }
/** Try and Filter by the provided bbox, will default to Filter.EXCLUDE if null */ public static Filter filterBBox(Envelope bBox, SimpleFeatureType ft) throws FactoryRegistryException, IllegalFilterException { if (bBox == null) { return Filter.INCLUDE; } FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null); PropertyName geomExpr = ff.property(ft.getGeometryDescriptor().getLocalName()); Literal bboxExpr = ff.literal(JTS.toGeometry(bBox)); Disjoint disjointFilter = ff.disjoint(geomExpr, bboxExpr); return ff.not(disjointFilter); } }
static Disjoint disjoint() { return f.disjoint(f.property("the_geom"), f.literal(geometry())); }
public static Disjoint disjoint() { return f.disjoint(f.property("the_geom"), f.literal(geometry())); }
Disjoint disjoint = factory.disjoint(geometry1, geometry2); return factory.not(disjoint);
return factory.disjoint(geometry1, geometry2);
LineString geom = gf.createLineString(coords); LiteralExpressionImpl expr2 = new LiteralExpressionImpl(geom); Disjoint disjoint = fac.disjoint(expr1, expr2); disjoint = fac.disjoint(expr1, function); LOGGER.finer(disjoint.toString()); LOGGER.finer("contains feature: " + disjoint.evaluate(testFeature)); assertTrue(disjoint.evaluate(testFeature)); disjoint = fac.disjoint(expr2, expr1); geom = gf.createLineString(coords); expr2 = new LiteralExpressionImpl(geom); disjoint = fac.disjoint(expr1, expr2); disjoint = fac.disjoint(expr1, expr2);
@Test public void testDisjoint() { Coordinate[] coords = new Coordinate[] {new Coordinate(0, 0), new Coordinate(10, 10)}; LineString lineString = new GeometryFactory().createLineString(coords); Filter filter = ff.disjoint(ff.property("name"), ff.literal(lineString)); Envelope env = (Envelope) filter.accept(visitor, null); assertEquals(infinity, env); }
@Test public void testAndDisjoint() { Coordinate[] coords = new Coordinate[] {new Coordinate(0, 0), new Coordinate(10, 10)}; LineString lineString = new GeometryFactory().createLineString(coords); Filter filter = ff.disjoint(ff.property("name"), ff.literal(lineString)); filter = ff.and(filter, ff.bbox(ff.property("geom"), 50, 50, 150, 150, null)); Envelope env = (Envelope) filter.accept(visitor, null); assertEquals(new Envelope(50, 150, 50, 150), env); }
public void testDisjointFilter() throws Exception { FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null); // should match only "r2" GeometryFactory gf = new GeometryFactory(); PackedCoordinateSequenceFactory sf = new PackedCoordinateSequenceFactory(); LinearRing shell = gf.createLinearRing(sf.create(new double[] {4, -1, 4, 5, 6, 5, 6, -1, 4, -1}, 2)); Polygon polygon = gf.createPolygon(shell, null); Disjoint dj = ff.disjoint(ff.property(aname("geom")), ff.literal(polygon)); FeatureCollection features = dataStore.getFeatureSource(tname("road")).getFeatures(dj); checkSingleResult(features, "r2"); }
filter = fac.overlaps(new LiteralExpressionImpl(geom1), new LiteralExpressionImpl(list)); assertFalse(filter.evaluate(null)); filter = fac.disjoint(new LiteralExpressionImpl(geom1), new LiteralExpressionImpl(list)); assertTrue(filter.evaluate(null));
assertFalse(filter.evaluate(null)); filter = fac.disjoint( new LiteralExpressionImpl(geom1), new LiteralExpressionImpl(list),
assertFalse(filter.evaluate(null)); filter = fac.disjoint( new LiteralExpressionImpl(geom1), new LiteralExpressionImpl(list),
filter = fac.crosses(expr1, expr2); assertEquals(filter.getMatchAction(), MatchAction.ANY); filter = fac.disjoint(expr1, expr2); assertEquals(filter.getMatchAction(), MatchAction.ANY); filter = fac.dwithin(expr1, expr2, 0.1, ""); filter = fac.crosses(expr1, expr2, MatchAction.ONE); assertEquals(filter.getMatchAction(), MatchAction.ONE); filter = fac.disjoint(expr1, expr2, MatchAction.ALL); assertEquals(filter.getMatchAction(), MatchAction.ALL); filter = fac.dwithin(expr1, expr2, 0.1, "", MatchAction.ONE);