private static IGeometry[] SnapClean( IGeometry geomA, IGeometry geomB, double scaleFactor) { IGeometry snapped = SnapRoundFunctions.SnapRound(geomA, geomB, scaleFactor); // TODO: don't need to clean once GeometrySnapRounder ensures all components are valid IGeometry aSnap = Clean(snapped.GetGeometryN(0)); IGeometry bSnap = Clean(snapped.GetGeometryN(1)); return(new IGeometry[] { aSnap, bSnap }); }
private static Geometry[] SnapClean( Geometry geomA, Geometry geomB, double scaleFactor) { var snapped = SnapRoundFunctions.SnapRound(geomA, geomB, scaleFactor); //// TODO: don't need to clean once GeometrySnapRounder ensures all components are valid //var aSnap = Clean(snapped.GetGeometryN(0)); //var bSnap = Clean(snapped.GetGeometryN(1)); if (geomB == null) { return new [] { snapped, null } } ; return(new [] { snapped.GetGeometryN(0), snapped.GetGeometryN(1) }); } //private static Geometry Clean(Geometry geom) //{ // // TODO: only buffer if it is a polygonal Geometry // if (!(geom is IPolygonal) ) return geom; // return geom.Buffer(0); //} }