Examples of touches()


Examples of com.vividsolutions.jts.geom.Geometry.touches()

    Coordinate[] boundaryCoordinates = boundary.getCoordinates();

    // for each neighbor
    for (Geometry neighbor : geomNeighborList) {

      if (boundary.touches(neighbor)) {
        // store the modified boundaryCoordinates for add more vertex if
        // there are.
        shellCoordinates = addIntersection(boundaryCoordinates, line, fc, neighbor);
        boundaryCoordinates = shellCoordinates.toArray(new Coordinate[shellCoordinates.size()]);
        shellClosed = boundaryCoordinates;
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry.touches()

      Coordinate[] holeClosed = null;

      for (Geometry neighbor : geomNeighborList) {

        // if it touch, add the intersection vertex.
        if (eachHole.touches(neighbor)) {

          // store the modified boundaryCoordinates for add more
          // vertex if there are.
          holeCoordinates = addIntersection(boundaryCoordinates, line, fc, neighbor);
          boundaryCoordinates = holeCoordinates.toArray(new Coordinate[holeCoordinates.size()]);
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry.touches()

                                    break;
                                case SpatialOperator.INTERSECTS:
                                    geometryMatches = geometry.intersects(EPSG4326_geometry);
                                    break;
                                case SpatialOperator.TOUCHES:
                                    geometryMatches = geometry.touches(EPSG4326_geometry);
                                    break;
                                case SpatialOperator.CROSSES:
                                    geometryMatches = geometry.crosses(EPSG4326_geometry);
                                    break;
                                case SpatialOperator.WITHIN:
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry.touches()

            @Override
            public boolean isSatisfied(Object object) {
                if (object instanceof Geometry) {
                    Geometry geom = (Geometry) object;
                    if (swapped) {
                        return geom.touches(value);
                    }
                    return value.touches(geom);
                }
                return false;
            }
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry.touches()

    }

    static public boolean touches(Geometry arg0, Geometry arg1) {
        Geometry _this = arg0;

        return _this.touches(arg1);
    }

    static public boolean crosses(Geometry arg0, Geometry arg1) {
        Geometry _this = arg0;
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry.touches()

            for (int j = 0; j < poly2.length; j++) {
                SimpleFeature tmp2 = (SimpleFeature) poly2[j];
                Geometry gt2 = (Geometry) tmp2.getDefaultGeometry();

                if (gt2.touches(gt)) {
                    return false;
                }
            }
        }
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry.touches()

     static public boolean touches(Geometry arg0,Geometry arg1)
     {
           if (arg0 == null || arg1 == null) return false;
           Geometry _this = arg0;

           return _this.touches(arg1);
     }

     static public boolean crosses(Geometry arg0,Geometry arg1)
     {
           if (arg0 == null || arg1 == null) return false;
View Full Code Here

Examples of com.vividsolutions.jts.geom.Point.touches()

    assertEquals(false, p1.overlaps(p2));

    assertEquals(false, p2.equals(p1));
    assertEquals(true, p2.disjoint(p1));
    assertEquals(false, p2.intersects(p1));
    assertEquals(false, p2.touches(p1));
    assertEquals(false, p2.crosses(p1));
    assertEquals(false, p2.within(p1));
    assertEquals(false, p2.contains(p1));
    assertEquals(false, p2.overlaps(p1));
  }
View Full Code Here

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

  private FeatureIterator<SimpleFeature> getAffectedFeatures(SimpleFeature feature) throws IOException {
    FilterFactory2 filterFactory = CommonFactoryFinder.getFilterFactory2(GeoTools.getDefaultHints());
    String geomAttName = feature.getFeatureType().getGeometryDescriptor().getLocalName();
    PropertyName geomPropertyExpression = filterFactory.property(geomAttName);
    Literal literalGeomExpression = filterFactory.literal(feature.getDefaultGeometry());
    Touches filter = filterFactory.touches(geomPropertyExpression, literalGeomExpression);
   
    IProgressMonitor monitor =
      getContext().getActionBars().getStatusLineManager().getProgressMonitor();
    FeatureSource<SimpleFeatureType,SimpleFeature> resource =
      getContext().getSelectedLayer().getResource(FeatureSource.class, monitor);
View Full Code Here

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

            geometryPropertyName);
      } else if (spatialFilterType.equals(SpatialFilterType.OVERLAPS)) {
        geometryFilter = ff.overlaps(ff.literal(geometry),
            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);
      }
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.