return serialize(outputs.get(0)); return serialize(new OGCConcreteGeometryCollection(outputs, null).flattenAndRemoveOverlaps().reduceFromMulti());
public OGCGeometry union(OGCGeometry another) { String thisType = geometryType(); String anotherType = another.geometryType(); if (thisType != anotherType || thisType == OGCConcreteGeometryCollection.TYPE) { //heterogeneous union. //We make a geometry collection, then process to union parts and remove overlaps. ArrayList<OGCGeometry> geoms = new ArrayList<OGCGeometry>(); geoms.add(this); geoms.add(another); OGCConcreteGeometryCollection geomCol = new OGCConcreteGeometryCollection(geoms, esriSR); return geomCol.flattenAndRemoveOverlaps().reduceFromMulti(); } OperatorUnion op = (OperatorUnion) OperatorFactoryLocal.getInstance() .getOperator(Operator.Type.Union); GeometryCursorAppend ap = new GeometryCursorAppend( getEsriGeometryCursor(), another.getEsriGeometryCursor()); com.esri.core.geometry.GeometryCursor cursor = op.execute(ap, getEsriSpatialReference(), null); return OGCGeometry.createFromEsriCursor(cursor, esriSR); }
public OGCGeometry union(OGCGeometry another) { String thisType = geometryType(); String anotherType = another.geometryType(); if (thisType != anotherType || thisType == OGCConcreteGeometryCollection.TYPE) { //heterogeneous union. //We make a geometry collection, then process to union parts and remove overlaps. ArrayList<OGCGeometry> geoms = new ArrayList<OGCGeometry>(); geoms.add(this); geoms.add(another); OGCConcreteGeometryCollection geomCol = new OGCConcreteGeometryCollection(geoms, esriSR); return geomCol.flattenAndRemoveOverlaps().reduceFromMulti(); } OperatorUnion op = (OperatorUnion) OperatorFactoryLocal.getInstance() .getOperator(Operator.Type.Union); GeometryCursorAppend ap = new GeometryCursorAppend( getEsriGeometryCursor(), another.getEsriGeometryCursor()); com.esri.core.geometry.GeometryCursor cursor = op.execute(ap, getEsriSpatialReference(), null); return OGCGeometry.createFromEsriCursor(cursor, esriSR); }
return serialize(outputs.get(0)); return serialize(new OGCConcreteGeometryCollection(outputs, null).flattenAndRemoveOverlaps().reduceFromMulti());
return serialize(outputs.get(0)); return serialize(new OGCConcreteGeometryCollection(outputs, null).flattenAndRemoveOverlaps().reduceFromMulti());
OGCGeometry g1 = reduceFromMulti(); String t1 = g1.geometryType(); OGCGeometry g2 = reduceFromMulti(); if (t1 != g2.geometryType()) { return false;
OGCGeometry g1 = reduceFromMulti(); String t1 = g1.geometryType(); OGCGeometry g2 = reduceFromMulti(); if (t1 != g2.geometryType()) { return false;