Clip
Each feature cut by a mask (the union of its features): the part inside, as turf.intersect and a clip do, or the part outside, as turf.difference does. Features left with nothing are dropped. turf takes the first feature of each side; this cuts every feature by the whole mask.
Syntax
{ "id": "n1", "op": "clip", "name": "clip", "x": 0, "y": 0, "params": {} }
An edge into it ends at "targetPort": "in"; one out of it starts at "sourcePort": "out".
Inputs
| Port | Type | Takes |
|---|---|---|
in | table | one edge |
mask | table | one edge |
Parameters
| Parameter | Kind | Default | Choices |
|---|---|---|---|
keep | menu | "inside" | inside, outside |
Outputs
| Port | Type |
|---|---|
out | table |
Details
- Category: Geometry
- Operator:
clip
Older projects
Projects saved before documents used operator classes. These convert to clip when they open: ClipOp, DifferenceOp, IntersectOp.