org.locationtech.jts.geom.Geometry.isWithinDistance()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(239)

本文整理了Java中org.locationtech.jts.geom.Geometry.isWithinDistance()方法的一些代码示例,展示了Geometry.isWithinDistance()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Geometry.isWithinDistance()方法的具体详情如下:
包路径:org.locationtech.jts.geom.Geometry
类名称:Geometry
方法名:isWithinDistance

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

  1. public static boolean isWithinDistance(Geometry arg0, Geometry arg1, Double arg2) {
  2. if (arg0 == null || arg1 == null || arg2 == null) return false;
  3. Geometry _this = arg0;
  4. return _this.isWithinDistance(arg1, arg2);
  5. }

代码示例来源:origin: geotools/geotools

  1. public boolean isWithinDistance(Geometry geom, double distance) {
  2. return geometry.isWithinDistance(geom, distance);
  3. }

代码示例来源:origin: geotools/geotools

  1. @Override
  2. public boolean evaluateInternal(Geometry left, Geometry right) {
  3. if (left == null || right == null) {
  4. return false;
  5. }
  6. return !left.isWithinDistance(right, getDistance());
  7. }

代码示例来源:origin: geotools/geotools

  1. @Override
  2. public boolean evaluateInternal(Geometry left, Geometry right) {
  3. return left.isWithinDistance(right, getDistance());
  4. }

代码示例来源:origin: geotools/geotools

  1. @DescribeProcess(
  2. title = "Within Distance Test",
  3. description =
  4. "Tests if the minimum distance between two geometries is less than a tolerance value."
  5. )
  6. @DescribeResult(description = "True if the inputs are within the specified distance")
  7. public static boolean isWithinDistance(
  8. @DescribeParameter(name = "a", description = "First input geometry") Geometry a,
  9. @DescribeParameter(name = "b", description = "Second input geometry") Geometry b,
  10. @DescribeParameter(
  11. name = "distance",
  12. description = "Distance tolerance, in units of the input geometry"
  13. )
  14. double distance) {
  15. return a.isWithinDistance(b, distance);
  16. }

代码示例来源:origin: locationtech/jts

  1. public static boolean isWithinDistance(Geometry a, Geometry b, double dist) {
  2. return a.isWithinDistance(b, dist);
  3. }

代码示例来源:origin: orbisgis/h2gis

  1. /**
  2. * Returns true if the geometries are within the specified distance of one another.
  3. *
  4. * @param geomA Geometry A
  5. * @param geomB Geometry B
  6. * @param distance Distance
  7. * @return True if if the geometries are within the specified distance of one another
  8. */
  9. public static Boolean isWithinDistance(Geometry geomA, Geometry geomB, Double distance) {
  10. if(geomA == null||geomB == null){
  11. return null;
  12. }
  13. return geomA.isWithinDistance(geomB, distance);
  14. }
  15. }

代码示例来源:origin: com.orientechnologies/orientdb-lucene

  1. @Override
  2. public boolean isWithInDistance(Shape s1, Shape s2, Double dist) {
  3. Geometry geometry = factory.toGeometry(s1);
  4. Geometry geometry1 = factory.toGeometry(s2);
  5. return geometry.isWithinDistance(geometry1, dist);
  6. }

相关文章