Ejemplo n.º 1
0
  public Geometry combine(Geometry orig, Geometry geom) {
    List origList = extractElements(orig, true);
    List geomList = extractElements(geom, true);
    origList.addAll(geomList);

    if (origList.size() == 0) {
      // return a clone of the orig geometry
      return (Geometry) orig.clone();
    }
    // return the "simplest possible" geometry
    return geomFactory.buildGeometry(origList);
  }
Ejemplo n.º 2
0
 public static Geometry normalize(Geometry g) {
   Geometry g2 = (Geometry) g.clone();
   g2.normalize();
   return g2;
 }