Polygon Layer
A polygon per row when Position reads a geometry (holes and multi-polygons included); otherwise rows are vertices, grouped into polygons by an id, into rings by another (the first ring is the outline, the rest are holes), ordered by a third.
Syntax
{ "id": "n1", "op": "polygon", "name": "polygon", "x": 0, "y": 0, "params": {} }
An edge into it ends at "targetPort": "in"; one out of it starts at "sourcePort": "out"; a parameter is set in params (leave out the ones at their default), driven by an edge to par:lineWidthScale, or read elsewhere as ch('polygon/lineWidthScale').
Inputs
| Port | Type | Takes |
|---|---|---|
in | table | one edge |
Parameters
| Parameter | Kind | Default | Choices |
|---|---|---|---|
position | expr | "P" | |
pathId | column | "row" | |
ringId | column | "" | |
order | column | "index" | |
color | expr | "" | |
lineColorChannel | expr | "" | |
lineWidth | expr | "" | |
elevation | expr | "" | |
ramp | menu | "viridis" | 37 choices |
filled | toggle | true | |
fillColor | color | [80,160,220] | |
stroked | toggle | false | |
lineColor | color | [255,255,255] | |
lineWidthScale | float | 1 | |
lineWidthUnits | menu | "pixels" | pixels, meters |
lineWidthMinPixels | float | 1 | |
lineWidthMaxPixels | float | 0 | |
lineJointRounded | toggle | false | |
lineMiterLimit | float | 4 | |
extruded | toggle | false | |
wireframe | toggle | false | |
elevationScale | float | 1 | |
opacity | float | 1 | |
blend | menu | "normal" | normal, additive, subtractive |
depthTest | toggle | true | |
depthWrite | toggle | true | |
extensions | field | [] |
Outputs
| Port | Type |
|---|---|
out | layer |
Details
- Category: Layers
- Operator:
polygon
Older projects
Projects saved before documents used operator classes. These convert to polygon when they open: A5LayerOp, GeoJsonLayerOp, GeohashLayerOp, H3ClusterLayerOp, H3HexagonLayerOp, PolygonLayerOp, QuadkeyLayerOp, S2LayerOp, SolidPolygonLayerOp.