Examples of within()


Examples of org.geotools.geometry.iso.primitive.PointImpl.within()

    // Return false, if the point doesn´t lie in the envelope of this object
    if (!((EnvelopeImpl)this.getEnvelope()).intersects(position))
      return false;
   
    GeometryImpl point = new PointImpl( position );
    return point.within(this);
  }

  /*
   * (non-Javadoc)
   *
 
View Full Code Here

Examples of org.grouplens.lenskit.core.LenskitConfiguration.within()

        EventDAO dao = new EventCollectionDAO(rs);
        LenskitConfiguration config = new LenskitConfiguration();
        config.bind(EventDAO.class).to(dao);
        config.bind(ItemScorer.class).to(UserUserItemScorer.class);
        config.bind(NeighborFinder.class).to(LiveNeighborFinder.class);
        config.within(UserSimilarity.class)
              .bind(VectorSimilarity.class)
              .to(PearsonCorrelation.class);
        // this is the default
/*        factory.setComponent(UserVectorNormalizer.class,
                             VectorNormalizer.class,
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.within()

                        continue;
                    }
                    String targetGeomName = targetType.getGeometryDescriptor().getLocalName();
   
                    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2( GeoTools.getDefaultHints() );
                    Filter cut= ff.not( ff.within( ff.property( targetGeomName ), ff.literal(hole) ) );
                   
                    //put it on style blackboard
                    //Key:  ProjectBlackboardConstants    String LAYER__DATA_QUERY = "org.locationtech.udig.project.view"; //$NON-NLS-1$
                    IStyleBlackboard styleBlackboard = layer.getStyleBlackboard();
                    styleBlackboard.put(ProjectBlackboardConstants.LAYER__DATA_QUERY, cut);
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.within()

            geometryPropertyName);
      } else if (spatialFilterType.equals(SpatialFilterType.TOUCHES)) {
        geometryFilter = ff.touches(ff.literal(geometry),
            geometryPropertyName);
      } else if (spatialFilterType.equals(SpatialFilterType.WITHIN)) {
        geometryFilter = ff.within(ff.literal(geometry),
            geometryPropertyName);
      }
    }

    return geometryFilter;
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.within()

              geometryPropertyName);
        } else if (spatialFilterType.equals(SpatialFilterType.TOUCHES)) {
          geometryFilter = ff.touches(ff.literal(geometry),
              geometryPropertyName);
        } else if (spatialFilterType.equals(SpatialFilterType.WITHIN)) {
          geometryFilter = ff.within(ff.literal(geometry),
              geometryPropertyName);
        }
      }

      Filter attributesFilter = null;
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.within()

                case FilterType.GEOMETRY_CROSSES:
                    return factory.crosses(geometry1, geometry2);

                case FilterType.GEOMETRY_WITHIN:
                    return factory.within(geometry1, geometry2);

                case FilterType.GEOMETRY_CONTAINS:
                    return factory.contains(geometry1, geometry2);

                case FilterType.GEOMETRY_OVERLAPS:
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.within()

        Expression property = this.resultStack.popExpression();

        FilterFactory2 ff = (FilterFactory2) filterFactory; // TODO this cast must be removed. It depends of Geometry implementation

        return ff.within(property, geom);
    }

    public BinarySpatialOperator buildSpatialContainsFilter() throws CQLException {

        Literal geom = this.resultStack.popLiteral();
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.within()

        init();
        FilterFactory2 ff = (FilterFactory2) dataStore.getFilterFactory();
        GeometryFactory gf = new GeometryFactory();
        PackedCoordinateSequenceFactory sf = new PackedCoordinateSequenceFactory();
        Polygon ls = gf.createPolygon(sf.create(new double[] { -185, -98, 185, -98, 185, 98, -185, 98, -185, -98 }, 2));
        Within f = ff.within(ff.property("geo"), ff.literal(ls));
        SimpleFeatureCollection features = featureSource.getFeatures(f);
        assertEquals(11, features.size());
    }
    public void testClipToWorldFilter() throws Exception {
        init();
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.within()

        init("not-active");
        FilterFactory2 ff = (FilterFactory2) dataStore.getFilterFactory();
        GeometryFactory gf = new GeometryFactory();
        PackedCoordinateSequenceFactory sf = new PackedCoordinateSequenceFactory();
        Polygon ls = gf.createPolygon(sf.create(new double[] { 0, 0, 0, 6, 6, 6, 6, 0, 0, 0 }, 2));
        Within f = ff.within(ff.property("geo"), ff.literal(ls));
        SimpleFeatureCollection features = featureSource.getFeatures(f);
        assertEquals(1, features.size());
        SimpleFeatureIterator fsi = features.features();
        assertTrue(fsi.hasNext());
        assertEquals(fsi.next().getID(), "not-active.12");
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.within()

        GeometryFactory gf = new GeometryFactory();
        PackedCoordinateSequenceFactory sf = new PackedCoordinateSequenceFactory();
        LinearRing shell = gf.createLinearRing(sf.create(new double[] { 2, -1, 2, 5, 4, 5, 4, -1,
                2, -1 }, 2));
        Polygon polygon = gf.createPolygon(shell, null);
        Within wt = ff.within(ff.property(aname("geom")), ff.literal(polygon));
        FeatureCollection features = dataStore.getFeatureSource(tname("road")).getFeatures(wt);
        checkSingleResult(features, "r2");
    }

    public void testDisjointFilter() throws Exception {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.