3.5 Geometry Generated (GG)
Geometry-generated (GG) sub-layers derive display geometry from source features at render time. Set sub-layer type to a gg_* value (see 3.1 Layer Style Types) and configure gg_params on that style row.
Vertical zoning and GFA metrics: Vertical Zoning & Extrusion. Expression access to gg_gfa: 3.3 Expression Syntax, 3.4 Expression Examples.
Overview
type | Input geometry | Output | MapLibre render |
|---|---|---|---|
gg_inverse-fill | polygon | inverted polygon mask | fill |
gg_ngon-fill | point | regular n-gon polygon | fill |
gg_ngon-fill-extrusion | point | extruded n-gon | fill-extrusion |
gg_line-interpolate | line | points along line | circle |
gg_point-vector | point | line segments (vectors) | line |
gg_3dsymbol | point | 3D symbol placement | custom |
gg_fill-extrusion-floors | polygon | stacked floor slabs | fill-extrusion |
GG features are written to a derived source id (getGgSourceId) so paint and queries stay separate from raw geodata.
gg_inverse-fill
Fills the map extent outside source polygons (mask / cutout).
gg_params: none required — uses map bounds from context.
Paint: same as fill — fill-color, fill-opacity, fill-outline-color.
gg_ngon-fill / gg_ngon-fill-extrusion
Regular polygon (hexagon by default) at each point.
Default gg_params:
{
"sides": 6,
"dimension": 10,
"dimensionMode": "vertex",
"rotationDeg": 0
}
| Param | Description |
|---|---|
sides | Number of sides (≥ 3) |
dimension | Size in metres (radius or width depending on mode) |
dimensionMode | vertex (default) or midpoint |
rotationDeg | Rotation in degrees |
Expression-capable params (literal, "FieldName", or arithmetic): sides, dimension, rotationDeg.
Extrusion adds MapLibre fill-extrusion-* paint; height comes from paint properties, not gg_params.
gg_line-interpolate
Places circle markers at fixed spacing along lines.
Default gg_params:
{
"distanceMeters": 25,
"leftoverMode": "even"
}
| Param | Description |
|---|---|
distanceMeters | Spacing between points (metres) |
leftoverMode | even — distribute remainder; tail — shorter tail segment |
Expression-capable: distanceMeters.
Paint: circle-color, circle-radius, circle-opacity, stroke props.
gg_point-vector
Draws direction vectors from point attributes.
Default gg_params:
{
"xField": "x",
"yField": "y",
"zField": "z",
"magnitudeField": "",
"vectorScaleMeters": 20,
"heightOffset": 0
}
| Param | Description |
|---|---|
xField, yField, zField | Component field names |
magnitudeField | Optional scalar multiplier field |
vectorScaleMeters | Base vector length in metres |
heightOffset | Vertical offset |
Expression-capable: heightOffset, vectorScaleMeters.
gg_3dsymbol
3D symbol at each point with optional vertical drop line.
Default gg_params:
{
"dropLineEnabled": false,
"dropLineEndpoint": "none",
"dropLineEndpointSize": 2,
"dropLineColor": "#000000",
"dropLineWidthPx": 2
}
Uses custom rendering; paint includes symbol-height, icon/text colors and halos (see 3.2 Paint Properties).
gg_fill-extrusion-floors
Extrudes polygons into stacked floors by space type — primary type for Vertical Zoning & Extrusion.
Default gg_params:
{
"floorMode": "simple",
"floors": 1,
"totalHeight": 12,
"baseHeight": 0,
"spaceTypeSymbology": [
{ "spacetype": "resi", "color": "#FFD900" },
{ "spacetype": "comm", "color": "#FF2F00" },
{ "spacetype": "utility", "color": "#6B6B6B" }
],
"floorConfig": [{ "floors": 0, "height": 4, "spacetype": "comm" }],
"floorConfigCategoryField": "",
"floorConfigCategories": [],
"floorConfigField": "",
"wireframeEnabled": false
}
| Param | Description |
|---|---|
floorMode | simple, floorconfig-static, floorconfig-field, etc. |
floors | Floor count (simple mode) |
totalHeight | Total building height (m) |
baseHeight | Base elevation (m) |
spaceTypeSymbology | Color per spacetype |
floorConfig | Static stack: { floors, height, spacetype } per band |
floorConfigField | Attribute holding per-feature floor JSON |
floorConfigCategoryField / floorConfigCategories | Category-driven floor rules |
wireframeEnabled | WebGL wireframe overlay (when supported) |
Expression-capable: floors, totalHeight, baseHeight.
Derived property gg_gfa
Each extruded feature stores JSON on property gg_gfa: keys are space types, values are [floorCount, areaM2] tuples. Use in Markdown as "gg_gfa|Layer Display Name" with .getitem() / .getindex() — see 3.4 Expression Examples.
Example sub-layer row (floors)
{
"id": "buildings-floors",
"type": "gg_fill-extrusion-floors",
"source": "parcels-source-id",
"gg_params": {
"floorMode": "simple",
"floors": 8,
"totalHeight": 32,
"baseHeight": 0,
"spaceTypeSymbology": [
{ "spacetype": "resi", "color": "#FFD900" },
{ "spacetype": "comm", "color": "#FF2F00" }
]
},
"paint": {
"fill-extrusion-opacity": 0.9
}
}
Keywords
geometry, generated, gg, ngon, inverse, fill, extrusion, floors, line, interpolate, point, vector, 3dsymbol, gg_params, gg_gfa, spacetype, wireframe, vertical, zoning