本文整理了Java中org.locationtech.jts.geom.Geometry.isWithinDistance()
方法的一些代码示例,展示了Geometry.isWithinDistance()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Geometry.isWithinDistance()
方法的具体详情如下:
包路径:org.locationtech.jts.geom.Geometry
类名称:Geometry
方法名:isWithinDistance
[英]Tests whether the distance from this Geometry
to another is less than or equal to a specified value.
[中]测试此Geometry
到另一个Geometry
的距离是否小于或等于指定值。
代码示例来源:origin: geotools/geotools
public static 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);
}
代码示例来源:origin: geotools/geotools
public boolean isWithinDistance(Geometry geom, double distance) {
return geometry.isWithinDistance(geom, distance);
}
代码示例来源:origin: geotools/geotools
@Override
public boolean evaluateInternal(Geometry left, Geometry right) {
if (left == null || right == null) {
return false;
}
return !left.isWithinDistance(right, getDistance());
}
代码示例来源:origin: geotools/geotools
@Override
public boolean evaluateInternal(Geometry left, Geometry right) {
return left.isWithinDistance(right, getDistance());
}
代码示例来源:origin: geotools/geotools
@DescribeProcess(
title = "Within Distance Test",
description =
"Tests if the minimum distance between two geometries is less than a tolerance value."
)
@DescribeResult(description = "True if the inputs are within the specified distance")
public static boolean isWithinDistance(
@DescribeParameter(name = "a", description = "First input geometry") Geometry a,
@DescribeParameter(name = "b", description = "Second input geometry") Geometry b,
@DescribeParameter(
name = "distance",
description = "Distance tolerance, in units of the input geometry"
)
double distance) {
return a.isWithinDistance(b, distance);
}
代码示例来源:origin: locationtech/jts
public static boolean isWithinDistance(Geometry a, Geometry b, double dist) {
return a.isWithinDistance(b, dist);
}
代码示例来源:origin: orbisgis/h2gis
/**
* 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);
}
}
代码示例来源:origin: com.orientechnologies/orientdb-lucene
@Override
public boolean isWithInDistance(Shape s1, Shape s2, Double dist) {
Geometry geometry = factory.toGeometry(s1);
Geometry geometry1 = factory.toGeometry(s2);
return geometry.isWithinDistance(geometry1, dist);
}
内容来源于网络,如有侵权,请联系作者删除!