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

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

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

Geometry.symDifference介绍

[英]Computes a Geometry representing the closure of the point-set which is the union of the points in this Geometry which are not contained in the other Geometry, with the points in the other Geometry not contained in this Geometry. If the result is empty, it is an atomic geometry with the dimension of the highest input dimension.

Non-empty GeometryCollection arguments are not supported.
[中]计算表示点集闭合的几何图形,该点集是Geometry中未包含在other几何图形中的点与other几何图形中未包含在Geometry几何图形中的点的并集。如果结果为空,则它是维度为最高输入维度的原子几何体。
不支持非空GeometryCollection参数。

代码示例

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

/**
 * Computes the set-theoretic symmetric difference of two geometries,
 * using enhanced precision.
 * @param geom0 the first Geometry
 * @param geom1 the second Geometry
 * @return the Geometry representing the set-theoretic symmetric difference of the input Geometries.
 */
public Geometry symDifference(Geometry geom0, Geometry geom1)
{
 Geometry[] geom = removeCommonBits(geom0, geom1);
 return computeResultPrecision(geom[0].symDifference(geom[1]));
}

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

Geometry result = geom0.symDifference(geom1);
return result;

代码示例来源:origin: org.geotools/gt-main

static public Geometry symDifference(Geometry arg0,Geometry arg1)
{
   if (arg0 == null || arg1 == null) return null;
   Geometry _this = arg0;
   return _this.symDifference(arg1);
}

代码示例来源:origin: org.geotools/gt2-main

static public Geometry symDifference(Geometry arg0,Geometry arg1)
{
   Geometry _this = arg0;
   return _this.symDifference(arg1);
}

代码示例来源:origin: org.orbisgis/h2gis

/**
   * @param a Geometry instance.
   * @param b Geometry instance
   * @return the symmetric difference between two geometries
   */
  public static Geometry symDifference(Geometry a,Geometry b) {
    if(a==null || b==null) {
      return null;
    }
    return a.symDifference(b);
  }
}

代码示例来源:origin: org.orbisgis/h2gis-functions

/**
   * @param a Geometry instance.
   * @param b Geometry instance
   * @return the symmetric difference between two geometries
   */
  public static Geometry symDifference(Geometry a,Geometry b) {
    if(a==null || b==null) {
      return null;
    }
    return a.symDifference(b);
  }
}

代码示例来源:origin: us.ihmc/ihmc-jmonkey-engine-toolkit

public static Geometry symDifference(Geometry a, Geometry b)
{
 return a.symDifference(b);
}

代码示例来源:origin: org.orbisgis/h2spatial

/**
   * @param a Geometry instance.
   * @param b Geometry instance
   * @return the symmetric difference between two geometries
   */
  public static Geometry symDifference(Geometry a,Geometry b) {
    if(a==null || b==null) {
      return null;
    }
    return a.symDifference(b);
  }
}

代码示例来源:origin: us.ihmc/IHMCJMonkeyEngineToolkit

public static Geometry symDifference(Geometry a, Geometry b)
{
 return a.symDifference(b);
}

代码示例来源:origin: org.geotools/gt-render

public Geometry symDifference(Geometry other) {
  return geometry.symDifference(other);
}

代码示例来源:origin: osmlab/atlas

protected MultiPolygon xor(final MultiPolygon subject)
{
  return runMultiPolygonClipping(subject, (sub, clipping) -> sub.symDifference(clipping));
}

代码示例来源:origin: osmlab/atlas

protected MultiPolygon xor(final Polygon subject)
{
  return runPolygonClipping(subject, (sub, clipping) -> sub.symDifference(clipping));
}

代码示例来源:origin: osmlab/atlas

protected List<PolyLine> xor(final PolyLine subject)
{
  return runPolyLineClipping(subject, (sub, clipping) -> sub.symDifference(clipping));
}

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

/**
 * Computes the set-theoretic symmetric difference of two geometries,
 * using enhanced precision.
 * @param geom0 the first Geometry
 * @param geom1 the second Geometry
 * @return the Geometry representing the set-theoretic symmetric difference of the input Geometries.
 */
public Geometry symDifference(Geometry geom0, Geometry geom1)
{
 Geometry[] geom = removeCommonBits(geom0, geom1);
 return computeResultPrecision(geom[0].symDifference(geom[1]));
}

代码示例来源:origin: osmlab/atlas

public List<? extends PolyLine> xor(final PolyLine subject)
{
  return processResult(getJts(subject).symDifference(this.jtsClipping));
}

代码示例来源:origin: org.jboss.teiid/teiid-engine

public static GeometryType symDifference(GeometryType geom1, GeometryType geom2) throws FunctionExecutionException {
  Geometry g1 = getGeometry(geom1);
  Geometry g2 = getGeometry(geom2);
  return getGeometryType(g1.symDifference(g2));
}

代码示例来源:origin: BaseXdb/basex

@Override
 public Item item(final QueryContext qc, final InputInfo ii) throws QueryException {
  return toElement(checkGeo(0, qc).symDifference(checkGeo(1, qc)), qc);
 }
}

代码示例来源:origin: stackoverflow.com

Geometry ret = iter.next();
while(iter.hasNext()){
  ret = ret.symDifference(iter.next());

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

public static GeometryType symDifference(GeometryType geom1, GeometryType geom2) throws FunctionExecutionException {
  Geometry g1 = getGeometry(geom1);
  Geometry g2 = getGeometry(geom2);
  return getGeometryType(g1.symDifference(g2), geom1.getSrid());
}

代码示例来源:origin: org.teiid/teiid-engine

public static GeometryType symDifference(GeometryType geom1, GeometryType geom2) throws FunctionExecutionException {
  Geometry g1 = getGeometry(geom1);
  Geometry g2 = getGeometry(geom2);
  return getGeometryType(g1.symDifference(g2), geom1.getSrid());
}

相关文章