private GeometryCursor prepare_for_ops_(OGCConcreteGeometryCollection collection) { assert(collection != null && !collection.isEmpty()); GeometryCursor prepared = OGCStructureInternal.prepare_for_ops_(collection.flatten().getEsriGeometryCursor(), esriSR); return removeOverlapsHelper_(toList(prepared)); } }
private GeometryCursor prepare_for_ops_(OGCConcreteGeometryCollection collection) { assert(collection != null && !collection.isEmpty()); GeometryCursor prepared = OGCStructureInternal.prepare_for_ops_(collection.flatten().getEsriGeometryCursor(), esriSR); return removeOverlapsHelper_(toList(prepared)); } }
/** * Fixes topological overlaps in the GeometryCollecion. * This is equivalent to union of the geometry collection elements. * * TODO "flattened" collection is supposed to contain only mutli-geometries, but this method may return single geometries * e.g. for GEOMETRYCOLLECTION (LINESTRING (...)) it returns GEOMETRYCOLLECTION (LINESTRING (...)) * and not GEOMETRYCOLLECTION (MULTILINESTRING (...)) * @return A geometry collection that is flattened and has no overlapping elements. */ public OGCConcreteGeometryCollection flattenAndRemoveOverlaps() { //flatten and crack/cluster GeometryCursor cursor = OGCStructureInternal.prepare_for_ops_(flatten().getEsriGeometryCursor(), esriSR); //make sure geometries don't overlap return new OGCConcreteGeometryCollection(removeOverlapsHelper_(toList(cursor)), esriSR); }
/** * Fixes topological overlaps in the GeometryCollecion. * This is equivalent to union of the geometry collection elements. * * TODO "flattened" collection is supposed to contain only mutli-geometries, but this method may return single geometries * e.g. for GEOMETRYCOLLECTION (LINESTRING (...)) it returns GEOMETRYCOLLECTION (LINESTRING (...)) * and not GEOMETRYCOLLECTION (MULTILINESTRING (...)) * @return A geometry collection that is flattened and has no overlapping elements. */ public OGCConcreteGeometryCollection flattenAndRemoveOverlaps() { //flatten and crack/cluster GeometryCursor cursor = OGCStructureInternal.prepare_for_ops_(flatten().getEsriGeometryCursor(), esriSR); //make sure geometries don't overlap return new OGCConcreteGeometryCollection(removeOverlapsHelper_(toList(cursor)), esriSR); }