Examples of crosses()


Examples of opennlp.tools.util.Span.crosses()

        }
        else {
          Parse[] kids = commonParent.getChildren();
          boolean crossingKids = false;
          for (int ki=0,kn=kids.length;ki<kn;ki++) {
            if (nameSpan.crosses(kids[ki].getSpan())){
              crossingKids = true;
            }
          }
          if (!crossingKids) {
            commonParent.insert(new Parse(commonParent.getText(),nameSpan,tag,1.0));
View Full Code Here

Examples of opennlp.tools.util.Span.crosses()

        }
        else {
          Parse[] kids = commonParent.getChildren();
          boolean crossingKids = false;
          for (int ki=0,kn=kids.length;ki<kn;ki++) {
            if (nameSpan.crosses(kids[ki].getSpan())){
              crossingKids = true;
            }
          }
          if (!crossingKids) {
            commonParent.insert(new Parse(commonParent.getText(),nameSpan,tag,1.0,endToken.getHeadIndex()));
View Full Code Here

Examples of opennlp.tools.util.Span.crosses()

        }
        else {
          Parse[] kids = commonParent.getChildren();
          boolean crossingKids = false;
          for (int ki=0,kn=kids.length;ki<kn;ki++) {
            if (nameSpan.crosses(kids[ki].getSpan())){
              crossingKids = true;
            }
          }
          if (!crossingKids) {
            commonParent.insert(new Parse(commonParent.getText(),nameSpan,tag,1.0,endToken.getHeadIndex()));
View Full Code Here

Examples of opennlp.tools.util.Span.crosses()

        }
        else {
          Parse[] kids = commonParent.getChildren();
          boolean crossingKids = false;
          for (int ki=0,kn=kids.length;ki<kn;ki++) {
            if (nameSpan.crosses(kids[ki].getSpan())){
              crossingKids = true;
            }
          }
          if (!crossingKids) {
            commonParent.insert(new Parse(commonParent.getText(),nameSpan,tag,1.0,endToken.getHeadIndex()));
View Full Code Here

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

            geometryPropertyName);
      } else if (spatialFilterType.equals(SpatialFilterType.CONTAINS)) {
        geometryFilter = ff.contains(ff.literal(geometry),
            geometryPropertyName);
      } else if (spatialFilterType.equals(SpatialFilterType.CROSSES)) {
        geometryFilter = ff.crosses(ff.literal(geometry),
            geometryPropertyName);
      } else if (spatialFilterType
          .equals(SpatialFilterType.ENVELOPE_INTERSECTS)) {
        geometryFilter = ff.intersects(ff.literal(geometry
            .getEnvelope()), geometryPropertyName);
View Full Code Here

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

              geometryPropertyName);
        } else if (spatialFilterType.equals(SpatialFilterType.CONTAINS)) {
          geometryFilter = ff.contains(ff.literal(geometry),
              geometryPropertyName);
        } else if (spatialFilterType.equals(SpatialFilterType.CROSSES)) {
          geometryFilter = ff.crosses(ff.literal(geometry),
              geometryPropertyName);
        } else if (spatialFilterType
            .equals(SpatialFilterType.ENVELOPE_INTERSECTS)) {
          geometryFilter = ff.intersects(ff.literal(geometry
              .getEnvelope()), geometryPropertyName);
View Full Code Here

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

                case FilterType.GEOMETRY_INTERSECTS:
                    return factory.intersects(geometry1, geometry2);

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

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

                case FilterType.GEOMETRY_CONTAINS:
View Full Code Here

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

        Expression property = this.resultStack.popExpression();

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

        return  ff.crosses(property, geom);
    }

    public BinarySpatialOperator buildSpatialWithinFilter() throws CQLException {

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

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

        init("not-active");
        FilterFactory2 ff = (FilterFactory2) dataStore.getFilterFactory();
        GeometryFactory gf = new GeometryFactory();
        PackedCoordinateSequenceFactory sf = new PackedCoordinateSequenceFactory();
        LineString ls = gf.createLineString(sf.create(new double[] { 0, 0, 2, 2 }, 2));
        Crosses f = ff.crosses(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.crosses()

        init("not-active");
        FilterFactory2 ff = (FilterFactory2) dataStore.getFilterFactory();
        GeometryFactory gf = new GeometryFactory();
        PackedCoordinateSequenceFactory sf = new PackedCoordinateSequenceFactory();
        LineString ls = gf.createLineString(sf.create(new double[] { 0, 0, 1, 1 }, 2));
        Crosses f = ff.crosses(ff.property("geo"), ff.literal(ls));
        SimpleFeatureCollection features = featureSource.getFeatures(f);
        assertEquals(0, features.size());
    }

    public void testEqualFilter() 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.