Function S2Polygon.approxIntersectWithPolyline
Similar to IntersectWithPolyline(), except that vertices will be dropped as necessary to ensure that all adjacent vertices in the sequence obtained by concatenating the output polylines will be farther than "snap_radius" apart. Note that this can change the number of output polylines and/or yield single-vertex polylines.
s2 .s2polyline .S2Polyline[] approxIntersectWithPolyline
(
in const(s2 .s2polyline .S2Polyline) a,
S1Angle snap_radius
);