org.opengis.filter.spatial.Equals Java Examples
The following examples show how to use
org.opengis.filter.spatial.Equals.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StyleConverterServiceTest.java From geomajas-project-server with GNU Affero General Public License v3.0 | 6 votes |
@Test public void testFilters() throws LayerException { Style style = styleConverterService.convert(layerBeansMixedGeometryStyleInfoSld.getUserStyle()); List<Rule> rules = style.featureTypeStyles().get(0).rules(); assertThat(rules.get(0).getFilter()).isInstanceOf(BBOX.class); assertThat(rules.get(1).getFilter()).isInstanceOf(Contains.class); assertThat(rules.get(2).getFilter()).isInstanceOf(Crosses.class); assertThat(rules.get(3).getFilter()).isInstanceOf(Disjoint.class); assertThat(rules.get(4).getFilter()).isInstanceOf(Equals.class); assertThat(rules.get(5).getFilter()).isInstanceOf(Intersects.class); assertThat(rules.get(6).getFilter()).isInstanceOf(Overlaps.class); assertThat(rules.get(7).getFilter()).isInstanceOf(Touches.class); assertThat(rules.get(8).getFilter()).isInstanceOf(Within.class); NamedStyleInfo namedStyleInfo = styleConverterService.convert( layerBeansMixedGeometryStyleInfoSld.getUserStyle(), featureInfo); Assert.assertEquals(9, namedStyleInfo.getFeatureStyles().size()); }
Example #2
Source File: ElasticGeometryFilterIT.java From elasticgeo with GNU General Public License v3.0 | 5 votes |
@Test public void testEqualFilter() throws Exception { init("not-active","geo3"); FilterFactory2 ff = (FilterFactory2) dataStore.getFilterFactory(); GeometryFactory gf = new GeometryFactory(); PackedCoordinateSequenceFactory sf = new PackedCoordinateSequenceFactory(); Polygon ls = gf.createPolygon(sf.create(new double[] { 3, 2, 6, 2, 6, 7, 3, 7, 3, 2 }, 2)); Equals f = ff.equal(ff.property("geo3"), ff.literal(ls)); SimpleFeatureCollection features = featureSource.getFeatures(f); assertEquals(1, features.size()); SimpleFeatureIterator fsi = features.features(); assertTrue(fsi.hasNext()); assertEquals(fsi.next().getID(), "active.13"); }
Example #3
Source File: PropertyIgnoringFilterVisitor.java From geowave with Apache License 2.0 | 5 votes |
@Override public Object visit(final Equals filter, final Object extraData) { if (!usesProperty(filter)) { return Filter.INCLUDE; } return super.visit(filter, extraData); }
Example #4
Source File: PropertyIgnoringFilterVisitor.java From geowave with Apache License 2.0 | 5 votes |
@Override public Object visit(final Equals filter, final Object extraData) { if (!usesProperty(filter)) { return Filter.INCLUDE; } return super.visit(filter, extraData); }
Example #5
Source File: ExtractGeometryFilterVisitor.java From geowave with Apache License 2.0 | 5 votes |
@Override public Object visit(final Equals filter, Object data) { if (!attributeOfInterest.equals(filter.getExpression1().toString())) { return new ExtractGeometryFilterVisitorResult(infinity(), null); } data = filter.getExpression2().accept(this, data); return new ExtractGeometryFilterVisitorResult((Geometry) data, CompareOperation.EQUALS); }
Example #6
Source File: FilterToElastic.java From elasticgeo with GNU General Public License v3.0 | 4 votes |
public Object visit(Equals filter, Object extraData) { return visitBinarySpatialOperator(filter, extraData); }
Example #7
Source File: ExtractTimeFilterVisitor.java From geowave with Apache License 2.0 | 4 votes |
@Override public Object visit(final Equals filter, final Object data) { return new TemporalConstraints(); }
Example #8
Source File: CriteriaVisitor.java From geomajas-project-server with GNU Affero General Public License v3.0 | 4 votes |
/** {@inheritDoc} */ @Override public Object visit(Equals filter, Object userData) { throw new UnsupportedOperationException("visit(Equals filter, Object userData)"); }