private Geometry SelfSnap(Geometry geom) { var snapper0 = new GeometrySnapper(geom); var snapGeom = snapper0.SnapTo(geom, _snapTolerance); //System.out.println("Self-snapped: " + snapGeom); //System.out.println(); return(snapGeom); }
/// <summary> /// Snaps two geometries together with a given tolerance. /// </summary> /// <param name="g0"></param> /// <param name="g1"></param> /// <param name="snapTolerance"></param> /// <returns></returns> public static IGeometry[] Snap(IGeometry g0, IGeometry g1, double snapTolerance) { var snapGeom = new IGeometry[2]; var snapper0 = new GeometrySnapper(g0); snapGeom[0] = snapper0.SnapTo(g1, snapTolerance); /* * Snap the second geometry to the snapped first geometry * (this strategy minimizes the number of possible different points in the result) */ var snapper1 = new GeometrySnapper(g1); snapGeom[1] = snapper1.SnapTo(snapGeom[0], snapTolerance); return(snapGeom); }
/// <summary> /// Snaps two geometries together with a given tolerance. /// </summary> /// <param name="g0"></param> /// <param name="g1"></param> /// <param name="snapTolerance"></param> /// <returns></returns> public static IGeometry[] Snap(IGeometry g0, IGeometry g1, double snapTolerance) { var snapGeom = new IGeometry[2]; var snapper0 = new GeometrySnapper(g0); snapGeom[0] = snapper0.SnapTo(g1, snapTolerance); /* * Snap the second geometry to the snapped first geometry * (this strategy minimizes the number of possible different points in the result) */ var snapper1 = new GeometrySnapper(g1); snapGeom[1] = snapper1.SnapTo(snapGeom[0], snapTolerance); return snapGeom; }
private IGeometry SelfSnap(IGeometry geom) { var snapper0 = new GeometrySnapper(geom); var snapGeom = snapper0.SnapTo(geom, _snapTolerance); //System.out.println("Self-snapped: " + snapGeom); //System.out.println(); return snapGeom; }