Clip (possibly composite) polylines with polygon(s) using one of boolean methods.
inpol = Nx2 matrix of (X, Y) coordinates constituting the polylines(s) to be clipped. Polyline sections are separated by [NaN NaN] rows. clippol = another Nx2 matrix of (X, Y) coordinates representing the clip polygon(s). clippol may comprise separate and/or concentric polygons (the latter with holes).
Optional argument op, the boolean operation, can be:
Output array oline will be an Nx2 array of polyline sections resulting from the requested boolean operation.
Package: geometry