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

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

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

Geometry.coveredBy介绍

[英]Tests whether this geometry is covered by the argument geometry.

The coveredBy predicate has the following equivalent definitions:

  • Every point of this geometry is a point of the other geometry.

  • The DE-9IM Intersection Matrix for the two geometries matches at least one of the following patterns:

  • [T*F**F***]

    • [*TF**F***]
    • [**FT*F***]
    • [**F*TF***]
  • g.covers(this) = true
    (coveredBy is the converse of #covers)
    If either geometry is empty, the value of this predicate is false.

This predicate is similar to #within, but is more inclusive (i.e. returns true for more cases).
[中]测试此几何图形是否包含在参数几何图形中。
coveredBy谓词具有以下等效定义:
*此几何体的每个点都是其他几何体的点。
*两种几何图形的DE-9IM相交矩阵至少匹配以下模式之一:

  • [T*F**F***]
  • [*TF**F***]
  • [**FT*F***]
  • [**F*TF***]
  • g.covers(this) = true
    coveredBy与#封面相反)
    如果任一几何体为空,则此谓词的值为false
    该谓词类似于#in,但更具包容性(即对于更多情况返回true)。

代码示例

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

public boolean coveredBy(Geometry g) {
  return geometry.coveredBy(g);
}

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

/**
 * Default implementation.
 */
public boolean coveredBy(Geometry g)
{
 return baseGeom.coveredBy(g);
}

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

public boolean isTrue(Geometry g) {
  return g.coveredBy(mask);
 }
});

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

public static boolean coveredBy(Geometry a, Geometry b) {    return a.coveredBy(b);    }
public static boolean within(Geometry a, Geometry b) {    return a.within(b);    }

相关文章