com.vividsolutions.jts.geom.Geometry.checkNotGeometryCollection()方法的使用及代码示例

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

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

Geometry.checkNotGeometryCollection介绍

[英]Throws an exception if g's class is GeometryCollection . (Its subclasses do not trigger an exception).
[中]如果g的类为GeometryCollection,则引发异常。(其子类不会触发异常)。

代码示例

代码示例来源:origin: com.vividsolutions/jts

/**
 *  Returns the DE-9IM {@link IntersectionMatrix} for the two <code>Geometry</code>s.
 *
 *@param  g  the <code>Geometry</code> with which to compare this <code>Geometry</code>
 *@return        an {@link IntersectionMatrix} describing the intersections of the interiors,
 *      boundaries and exteriors of the two <code>Geometry</code>s
 */
public IntersectionMatrix relate(Geometry g) {
 checkNotGeometryCollection(this);
 checkNotGeometryCollection(g);
 return RelateOp.relate(this, g);
}

代码示例来源:origin: com.vividsolutions/jts

/**
 * Computes a <code>Geometry</code> representing the closure of the point-set
 * of the points contained in this <code>Geometry</code> that are not contained in 
 * the <code>other</code> Geometry. 
 * <p>
 * If the result is empty, it is an atomic geometry
 * with the dimension of the left-hand input.
 * <p>
 * Non-empty {@link GeometryCollection} arguments are not supported.
 *
 *@param  other  the <code>Geometry</code> with which to compute the
 *      difference
 *@return a Geometry representing the point-set difference of this <code>Geometry</code> with
 *      <code>other</code>
 * @throws TopologyException if a robustness error occurs
 * @throws IllegalArgumentException if either input is a non-empty GeometryCollection
 */
public Geometry difference(Geometry other)
{
 // special case: if A.isEmpty ==> empty; if B.isEmpty ==> A
 if (this.isEmpty()) return OverlayOp.createEmptyResult(OverlayOp.DIFFERENCE, this, other, factory);
 if (other.isEmpty()) return (Geometry) clone();
 checkNotGeometryCollection(this);
 checkNotGeometryCollection(other);
 return SnapIfNeededOverlayOp.overlayOp(this, other, OverlayOp.DIFFERENCE);
}

代码示例来源:origin: com.vividsolutions/jts

checkNotGeometryCollection(this);
checkNotGeometryCollection(other);
return SnapIfNeededOverlayOp.overlayOp(this, other, OverlayOp.INTERSECTION);

代码示例来源:origin: com.vividsolutions/jts

checkNotGeometryCollection(this);
checkNotGeometryCollection(other);
return SnapIfNeededOverlayOp.overlayOp(this, other, OverlayOp.SYMDIFFERENCE);

代码示例来源:origin: com.vividsolutions/jts

checkNotGeometryCollection(this);
checkNotGeometryCollection(other);
return SnapIfNeededOverlayOp.overlayOp(this, other, OverlayOp.UNION);

代码示例来源:origin: com.vividsolutions/jts-core

/**
 *  Returns the DE-9IM {@link IntersectionMatrix} for the two <code>Geometry</code>s.
 *
 *@param  g  the <code>Geometry</code> with which to compare this <code>Geometry</code>
 *@return        an {@link IntersectionMatrix} describing the intersections of the interiors,
 *      boundaries and exteriors of the two <code>Geometry</code>s
 */
public IntersectionMatrix relate(Geometry g) {
 checkNotGeometryCollection(this);
 checkNotGeometryCollection(g);
 return RelateOp.relate(this, g);
}

代码示例来源:origin: com.vividsolutions/jts-core

/**
 * Computes a <code>Geometry</code> representing the closure of the point-set
 * of the points contained in this <code>Geometry</code> that are not contained in 
 * the <code>other</code> Geometry. 
 * <p>
 * If the result is empty, it is an atomic geometry
 * with the dimension of the left-hand input.
 * <p>
 * Non-empty {@link GeometryCollection} arguments are not supported.
 *
 *@param  other  the <code>Geometry</code> with which to compute the
 *      difference
 *@return a Geometry representing the point-set difference of this <code>Geometry</code> with
 *      <code>other</code>
 * @throws TopologyException if a robustness error occurs
 * @throws IllegalArgumentException if either input is a non-empty GeometryCollection
 */
public Geometry difference(Geometry other)
{
 // special case: if A.isEmpty ==> empty; if B.isEmpty ==> A
 if (this.isEmpty()) return OverlayOp.createEmptyResult(OverlayOp.DIFFERENCE, this, other, factory);
 if (other.isEmpty()) return (Geometry) clone();
 checkNotGeometryCollection(this);
 checkNotGeometryCollection(other);
 return SnapIfNeededOverlayOp.overlayOp(this, other, OverlayOp.DIFFERENCE);
}

代码示例来源:origin: com.vividsolutions/jts-core

checkNotGeometryCollection(this);
checkNotGeometryCollection(other);
return SnapIfNeededOverlayOp.overlayOp(this, other, OverlayOp.INTERSECTION);

代码示例来源:origin: com.vividsolutions/jts-core

checkNotGeometryCollection(this);
checkNotGeometryCollection(other);
return SnapIfNeededOverlayOp.overlayOp(this, other, OverlayOp.SYMDIFFERENCE);

代码示例来源:origin: com.vividsolutions/jts-core

checkNotGeometryCollection(this);
checkNotGeometryCollection(other);
return SnapIfNeededOverlayOp.overlayOp(this, other, OverlayOp.UNION);

相关文章