Package com.vividsolutions.jts.geom

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


                                    break;
                                case SpatialOperator.CROSSES:
                                    geometryMatches = geometry.crosses(EPSG4326_geometry);
                                    break;
                                case SpatialOperator.WITHIN:
                                    geometryMatches = geometry.within(EPSG4326_geometry);
                                    break;
                                case SpatialOperator.CONTAINS:
                                    geometryMatches = geometry.contains(EPSG4326_geometry);
                                    break;
                                case SpatialOperator.OVERLAPS:
View Full Code Here


                break;
            default:
                return;
            }
            if (geom != null) {
                System.err.printf("%s within %s? %s\n", geom, bbox, geom.within(bbox));
                if (changeAction.equals(ChangeAction.Create) && geom.within(bbox)
                        || changeAction.equals(ChangeAction.Modify)) {
                    Feature feature = converter.toFeature(entity, geom);
                    target.put(feature);
                }
View Full Code Here

            default:
                return;
            }
            if (geom != null) {
                System.err.printf("%s within %s? %s\n", geom, bbox, geom.within(bbox));
                if (changeAction.equals(ChangeAction.Create) && geom.within(bbox)
                        || changeAction.equals(ChangeAction.Modify)) {
                    Feature feature = converter.toFeature(entity, geom);
                    target.put(feature);
                }
            }
View Full Code Here

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

    }

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

        return _this.within(arg1);
    }

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

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

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

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

                if (gt2.within(gt)) {
                    return true;
                }
            }
        }
View Full Code Here

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

           return _this.within(arg1);
     }

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

      e.printStackTrace();
    }

    Geometry gc = new GeometryFactory().createPoint(new Coordinate(point.getX(), point.getY()));

    if (gc.within(g))
      return true;
    else
      return false;

  }
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.