Skip to main content

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​

PortTypeTakes
intableone edge

Parameters​

ParameterKindDefaultChoices
positionexpr"P"
pathIdcolumn"row"
ringIdcolumn""
ordercolumn"index"
colorexpr""
lineColorChannelexpr""
lineWidthexpr""
elevationexpr""
rampmenu"viridis"37 choices
filledtoggletrue
fillColorcolor[80,160,220]
strokedtogglefalse
lineColorcolor[255,255,255]
lineWidthScalefloat1
lineWidthUnitsmenu"pixels"pixels, meters
lineWidthMinPixelsfloat1
lineWidthMaxPixelsfloat0
lineJointRoundedtogglefalse
lineMiterLimitfloat4
extrudedtogglefalse
wireframetogglefalse
elevationScalefloat1
opacityfloat1
blendmenu"normal"normal, additive, subtractive
depthTesttoggletrue
depthWritetoggletrue
extensionsfield[]

Outputs​

PortType
outlayer

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.