本文整理了Java中org.locationtech.jts.geom.Geometry.disjoint()
方法的一些代码示例,展示了Geometry.disjoint()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Geometry.disjoint()
方法的具体详情如下:
包路径:org.locationtech.jts.geom.Geometry
类名称:Geometry
方法名:disjoint
[英]Tests whether this geometry is disjoint from the argument geometry.
The disjoint
predicate has the following equivalent definitions:
[FF*FF****]
! g.intersects(this) = true
disjoint
is the inverse of intersects
)disjoint
谓词具有以下等效定义:[FF*FF****]
! g.intersects(this) = true
disjoint
是intersects
的倒数)代码示例来源:origin: geotools/geotools
public static boolean disjoint(Geometry arg0, Geometry arg1) {
if (arg0 == null || arg1 == null) return false;
Geometry _this = arg0;
return _this.disjoint(arg1);
}
代码示例来源:origin: geotools/geotools
public boolean disjoint(Geometry g) {
return geometry.disjoint(g);
}
代码示例来源:origin: geotools/geotools
@Override
protected boolean basicEvaluate(Geometry left, Geometry right) {
Envelope envLeft = left.getEnvelopeInternal();
Envelope envRight = right.getEnvelopeInternal();
if (envRight.intersects(envLeft)) return left.disjoint(right);
return true;
}
代码示例来源:origin: geotools/geotools
@DescribeProcess(
title = "Disjoint Test",
description = "Tests if two geometries do not have any points in common."
)
@DescribeResult(description = "True if the inputs are disjoint")
public static boolean disjoint(
@DescribeParameter(name = "a", description = "First input geometry") Geometry a,
@DescribeParameter(name = "b", description = "Second input geometry") Geometry b) {
return a.disjoint(b);
}
代码示例来源:origin: locationtech/spatial4j
protected SpatialRelation relate(Geometry oGeom) {
//see http://docs.geotools.org/latest/userguide/library/jts/dim9.html#preparedgeometry
if (oGeom instanceof org.locationtech.jts.geom.Point) {
if (preparedGeometry != null)
return preparedGeometry.disjoint(oGeom) ? SpatialRelation.DISJOINT : SpatialRelation.CONTAINS;
return geom.disjoint(oGeom) ? SpatialRelation.DISJOINT : SpatialRelation.CONTAINS;
}
if (preparedGeometry == null)
return intersectionMatrixToSpatialRelation(geom.relate(oGeom));
else if (preparedGeometry.covers(oGeom))
return SpatialRelation.CONTAINS;
else if (preparedGeometry.coveredBy(oGeom))
return SpatialRelation.WITHIN;
else if (preparedGeometry.intersects(oGeom))
return SpatialRelation.INTERSECTS;
return SpatialRelation.DISJOINT;
}
代码示例来源:origin: locationtech/geowave
@Override
public boolean apply(Geometry geom1, Geometry geom2) {
return geom1.disjoint(geom2);
}
}
代码示例来源:origin: locationtech/jts
public static boolean disjoint(Geometry a, Geometry b) { return a.disjoint(b); }
public static boolean equals(Geometry a, Geometry b) { return a.equals(b); }
代码示例来源:origin: orbisgis/h2gis
/**
* Return true if the two Geometries are disjoint
*
* @param a Geometry Geometry.
* @param b Geometry instance
* @return true if the two Geometries are disjoint
*/
public static Boolean geomDisjoint(Geometry a, Geometry b) {
if(a==null || b==null) {
return null;
}
return a.disjoint(b);
}
}
代码示例来源:origin: geotools/geotools
if (g1.disjoint(g2) != expected) {
results.error(
f1,
代码示例来源:origin: org.opengeo/geodb
/**
* Returns TRUE if the Geometries do not "spatially intersect" - if they do not share any space together.
*/
public static boolean ST_Disjoint( byte[] wkb1, byte[] wkb2 ) {
if ( wkb1 == null || wkb2 == null ) {
return false;
}
Geometry g1 = gFromWKB(wkb1);
Geometry g2 = gFromWKB(wkb2);
return g1.disjoint( g2 );
}
代码示例来源:origin: jdeolive/geodb
/**
* Returns TRUE if the Geometries do not "spatially intersect" - if they do not share any space together.
*/
public static boolean ST_Disjoint( byte[] wkb1, byte[] wkb2 ) {
if ( wkb1 == null || wkb2 == null ) {
return false;
}
Geometry g1 = gFromWKB(wkb1);
Geometry g2 = gFromWKB(wkb2);
return g1.disjoint( g2 );
}
代码示例来源:origin: geotools/geotools
SimpleFeature f2 = fr2.next();
Geometry g2 = (Geometry) f2.getDefaultGeometry();
if (g1.disjoint(g2) != expected) {
results.error(
f1,
代码示例来源:origin: locationtech/jts
public static Geometry disjoint(Geometry a, Geometry mask)
{
List selected = new ArrayList();
for (int i = 0; i < a.getNumGeometries(); i++ ) {
Geometry g = a.getGeometryN(i);
if (mask.disjoint(g)) {
selected.add(g);
}
}
return a.getFactory().buildGeometry(selected);
}
public static Geometry valid(Geometry a)
代码示例来源: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() );
}
内容来源于网络,如有侵权,请联系作者删除!