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

typeInput geometryOutputMapLibre render
gg_inverse-fillpolygoninverted polygon maskfill
gg_ngon-fillpointregular n-gon polygonfill
gg_ngon-fill-extrusionpointextruded n-gonfill-extrusion
gg_line-interpolatelinepoints along linecircle
gg_point-vectorpointline segments (vectors)line
gg_3dsymbolpoint3D symbol placementcustom
gg_fill-extrusion-floorspolygonstacked floor slabsfill-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 fillfill-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
}
ParamDescription
sidesNumber of sides (≥ 3)
dimensionSize in metres (radius or width depending on mode)
dimensionModevertex (default) or midpoint
rotationDegRotation 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"
}
ParamDescription
distanceMetersSpacing between points (metres)
leftoverModeeven — 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
}
ParamDescription
xField, yField, zFieldComponent field names
magnitudeFieldOptional scalar multiplier field
vectorScaleMetersBase vector length in metres
heightOffsetVertical 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
}
ParamDescription
floorModesimple, floorconfig-static, floorconfig-field, etc.
floorsFloor count (simple mode)
totalHeightTotal building height (m)
baseHeightBase elevation (m)
spaceTypeSymbologyColor per spacetype
floorConfigStatic stack: { floors, height, spacetype } per band
floorConfigFieldAttribute holding per-feature floor JSON
floorConfigCategoryField / floorConfigCategoriesCategory-driven floor rules
wireframeEnabledWebGL 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