本文整理了Java中org.locationtech.jts.geom.Geometry.overlaps()
方法的一些代码示例,展示了Geometry.overlaps()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Geometry.overlaps()
方法的具体详情如下:
包路径:org.locationtech.jts.geom.Geometry
类名称:Geometry
方法名:overlaps
[英]Tests whether this geometry overlaps the specified geometry.
The overlaps
predicate has the following equivalent definitions:
[T*T***T**]
(for two points or two surfaces) or [1*T***T**]
(for two curves)false
. This predicate is symmetric.overlaps
谓词具有以下等效定义:[T*T***T**]
(对于两点或两个曲面)或[1*T***T**]
(对于两条曲线)false
。这个谓词是对称的。代码示例来源:origin: geotools/geotools
public static boolean overlaps(Geometry arg0, Geometry arg1) {
if (arg0 == null || arg1 == null) return false;
Geometry _this = arg0;
return _this.overlaps(arg1);
}
代码示例来源:origin: geotools/geotools
public boolean overlaps(Geometry g) {
return geometry.overlaps(g);
}
代码示例来源:origin: geotools/geotools
@Override
public boolean evaluateInternal(Geometry left, Geometry right) {
Envelope envLeft = left.getEnvelopeInternal();
Envelope envRight = right.getEnvelopeInternal();
if (envLeft.intersects(envRight)) return left.overlaps(right);
else return false;
}
代码示例来源:origin: geotools/geotools
@DescribeProcess(
title = "Overlaps Test",
description =
"Tests if two geometries share some but not all interior points. Points or lines will always return False."
)
@DescribeResult(description = "True if the inputs overlap")
public static boolean overlaps(
@DescribeParameter(name = "a", description = "First input geometry") Geometry a,
@DescribeParameter(name = "b", description = "Second input geometry") Geometry b) {
return a.overlaps(b);
}
代码示例来源:origin: geotools/geotools
Geometry gt2 = (Geometry) tmp2.getDefaultGeometry();
if (gt2.overlaps(gt) != expected) {
results.error(
tmp,
代码示例来源:origin: locationtech/jts
/**
* Default implementation.
*/
public boolean overlaps(Geometry g)
{
return baseGeom.overlaps(g);
}
代码示例来源:origin: orbisgis/h2gis
/**
* @param a Surface Geometry.
* @param b Geometry instance
* @return true if the geometry A overlaps the geometry B
*/
public static Boolean isOverlaps(Geometry a,Geometry b) {
if(a==null || b==null) {
return null;
}
return a.overlaps(b);
}
}
代码示例来源:origin: locationtech/geowave
@Override
public boolean apply(Geometry geom1, Geometry geom2) {
return geom1.overlaps(geom2);
}
}
代码示例来源:origin: locationtech/jts
public static boolean overlaps(Geometry a, Geometry b) { return a.overlaps(b); }
public static boolean touches(Geometry a, Geometry b) { return a.touches(b); }
代码示例来源:origin: geotools/geotools
Geometry gt2 = (Geometry) tmp2.getDefaultGeometry();
if (gt.overlaps(gt2)) {
results.error(tmp, "Overlaps with another line specified. Id=" + tmp2.getID());
r = false;
代码示例来源:origin: geotools/geotools
if (g1.overlaps(g2) != expected || g1.contains(g2) != expected) {
代码示例来源:origin: geotools/geotools
if (g1.overlaps(g2) != expected || g1.contains(g2) != expected) {
results.error(
f1,
代码示例来源:origin: jdeolive/geodb
/**
* Returns TRUE if the Geometries share space, are of the same dimension, but are not completely
* contained by each other.
*/
public static boolean ST_Overlaps( byte[] wkb1, byte[] wkb2) {
if ( wkb1 == null || wkb2 == null ) {
return false;
}
Geometry g1 = gFromWKB(wkb1);
Geometry g2 = gFromWKB(wkb2);
return g1.overlaps( g2 );
}
代码示例来源:origin: org.opengeo/geodb
/**
* Returns TRUE if the Geometries share space, are of the same dimension, but are not completely
* contained by each other.
*/
public static boolean ST_Overlaps( byte[] wkb1, byte[] wkb2) {
if ( wkb1 == null || wkb2 == null ) {
return false;
}
Geometry g1 = gFromWKB(wkb1);
Geometry g2 = gFromWKB(wkb2);
return g1.overlaps( g2 );
}
代码示例来源:origin: geotools/geotools
if (g1.overlaps(g2) != expected || g1.contains(g2) != expected) {
results.error(
f1,
代码示例来源:origin: locationtech/jts
public void doPredicates(Geometry a, Geometry b) throws Exception
{
assertTrue( a.contains(b) == a.relate(b).isContains() );
assertTrue( a.crosses(b) == a.relate(b).isCrosses(a.getDimension(), b.getDimension()) );
assertTrue( a.disjoint(b) == a.relate(b).isDisjoint() );
assertTrue( a.equals(b) == a.relate(b).isEquals(a.getDimension(), b.getDimension()) );
assertTrue( a.intersects(b) == a.relate(b).isIntersects() );
assertTrue( a.overlaps(b) == a.relate(b).isOverlaps(a.getDimension(), b.getDimension()) );
assertTrue( a.touches(b) == a.relate(b).isTouches(a.getDimension(), b.getDimension()) );
assertTrue( a.within(b) == a.relate(b).isWithin() );
}
内容来源于网络,如有侵权,请联系作者删除!