static public boolean isWithinDistance(Geometry arg0,Geometry arg1,double arg2) { Geometry _this = arg0; return _this.isWithinDistance(arg1,arg2); }
static public boolean isWithinDistance(Geometry arg0,Geometry arg1, Double arg2) { if (arg0 == null || arg1 == null || arg2 == null) return false; Geometry _this = arg0; return _this.isWithinDistance(arg1,arg2); }
/** * @param geom first geometry * @param g second geometry * @param distance the distance * @return <code>true</code> if the first geometry is beyond a given distance to the second (!withinDistance) */ public static boolean beyond(Geometry geom, Geometry g, double distance) { if (geom == null || g == null) return false; return !geom.isWithinDistance(g, distance); }
/** * @param geom first geometry * @param g second geometry * @param distance distance * @return <code>true</code> if the first geometry is within a given distance of the second */ public static boolean distanceWithin(Geometry geom, Geometry g, double distance) { if (geom == null || g == null) return false; return geom.isWithinDistance(g, distance); }
public boolean isWithinDistance(Geometry geom, double distance) { return geometry.isWithinDistance(geom, distance); }
/** * Returns true if the geometries are within the specified distance of one another. * * @param geomA Geometry A * @param geomB Geometry B * @param distance Distance * @return True if if the geometries are within the specified distance of one another */ public static Boolean isWithinDistance(Geometry geomA, Geometry geomB, Double distance) { if(geomA == null||geomB == null){ return null; } return geomA.isWithinDistance(geomB, distance); } }
/** * Returns true if the geometries are within the specified distance of one another. * * @param geomA Geometry A * @param geomB Geometry B * @param distance Distance * @return True if if the geometries are within the specified distance of one another */ public static Boolean isWithinDistance(Geometry geomA, Geometry geomB, Double distance) { if(geomA == null||geomB == null){ return null; } return geomA.isWithinDistance(geomB, distance); } }
@Override public boolean evaluateInternal(Geometry left, Geometry right) { if( left==null || right == null ){ return false; } return !left.isWithinDistance(right, getDistance()); }
@Override public boolean evaluateInternal(Geometry left, Geometry right) { return left.isWithinDistance(right, getDistance()); }
@Override public boolean isWithinDistance( Geometry geometry, Measure distance ) { LOG.warn( "TODO: Respect UOM in evaluation of topological predicate." ); JTSGeometryPair jtsGeoms = JTSGeometryPair.createCompatiblePair( this, geometry ); return jtsGeoms.first.isWithinDistance( jtsGeoms.second, distance.getValueAsDouble() ); }
public boolean evaluate(Object feature) { Geometry left = getLeftGeometry(feature); Geometry right = getRightGeometry(feature); return !left.isWithinDistance(right, getDistance()); }
public boolean pointIsClose( File file, Point targetPoint,double distance) { boolean ret = false; Map connect = new HashMap(); connect.put("url", file.toURL()); DataStore dataStore = DataStoreFinder.getDataStore(connect); FeatureSource featureSource = dataStore.getFeatureSource(typeName); FeatureCollection collection = featureSource.getFeatures(); FeatureIterator iterator = collection.features(); try { while (iterator.hasNext()) { Feature feature = iterator.next(); Geometry sourceGeometry = feature.getDefaultGeometry(); ret= sourceGeometry.isWithinDistance(targetPoint, distance ); } } finally { iterator.close(); } return ret; }
public boolean evaluate(Object feature) { if (feature instanceof Feature && !validate((Feature)feature)) return false; Geometry left = getLeftGeometry(feature); Geometry right = getRightGeometry(feature); return left.isWithinDistance(right, getDistance()); }