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

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

本文整理了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

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);
}

相关文章