Skip to content
EN

Layer Attributes — Values, Colors & Filters

An uploaded vector layer keeps every column of your file, and the map puts them to work: clicking a feature lists its values, and can also read the room’s raster layers under the feature; a layer can be colored by one of its attributes with matching rows in the legend; and anyone looking at the map can filter the layer from the legend — without changing anything for anyone else.

Clicking a feature of an uploaded layer opens a popup with that feature’s attributes: the first eight, and Show all for up to 50. Technical columns such as fid are left out. Numbers follow your language (0.452 in English, 0,452 in German) without digit grouping, so IDs and years read as written.

A feature popup listing labelled values: health class, NDVI values with four decimals, detector score and crown area in square metres.

This works for every uploaded layer. A layer can also be set up to show only chosen values, with labels, decimals and units — see Set it up. Shapes you draw in the room have no attributes.

A layer can also be set up so that its popup reads the room’s raster layers under the clicked feature, in a part of its own, Values from raster layers: the mean NDVI of a tree crown from an NDVI raster, the mean canopy height of a forest stand, the drought index under a field. This works for any vector layer and any raster layer of the same room, including hidden ones.

Each row reads one band of one raster, in one of two ways:

  • The cell under the click, for any feature.
  • A statistic over the clicked shape, for polygons: the mean, median, 10th or 90th percentile, minimum, maximum or standard deviation of its cells, or how many of them hold data. A cell counts when its centre lies inside the shape, holes excluded. A shape too small to hold a cell’s centre reads the cell under it.

Lines and points show only rows of the cell under the click. The statistics use the feature’s complete shape, not the part drawn on the screen.

The numbers are the raster’s stored values, not the colors on the map. Cells without data are left out, and a shape over no data at all reads No data, never 0. A row without a label of its own is named after the raster and what it reads, for example Crown NDVI: mean over the shape.

Unlike the feature’s own values, raster rows are read from the server at each click:

The row says What it means
Reading… the value is on its way
Preparing the data… the raster hasn’t been read for a while, so the server fetches it first; the row asks again by itself
No data the raster holds no value there
Outside the raster the feature lies beyond the raster’s edge
Raster layer not found · Several raster layers have this name the row names a raster the room doesn’t have, or a name two rasters share
The raster has no band N the row asks for a band the raster doesn’t have
Shape too large to read the shape has more than 5,000 vertices, or covers more cells than one read may hold
The shape could not be loaded · Not ready yet; open the popup again later · Could not be read the read didn’t work this time; try again later

Everyone who can view the room sees these rows, including visitors of a public room. Presentations don’t show them.

Instead of one color, a layer can take its colors from one attribute:

Type For Example
Graduated numbers, in classes between breaks NDVI below 0.20, 0.20–0.25, 0.25–0.30 … — a value equal to a break belongs to the class above it
Categorical named values land-use codes, each with its own color, and one color for anything else
Continuous numbers, on a smooth color ramp elevation from blue to brown

Features without a value — missing, empty, or not a number — get their own “no value” color. The legend lists the layer’s classes under its row, or the ramp with its end values.

In the legend, the class rows of a colored layer are switches: click one to hide or show its features. A layer can also offer range filters — two sliders for the lowest and highest value shown, applied when you let go.

The legend with a layer’s health classes, one switched off, and a detector score slider narrowed to 0.50–1.00.

Filters belong to you alone:

  • They change only your own map. Nothing is saved to the room, there is no timeline entry, and everyone else — including whoever is presenting — still sees every feature.
  • Viewers can filter too.
  • A reload, or the next presentation slide, shows everything again.
  • A narrowed range also hides features without a value; the full range hides nothing.
  • A feature you filtered out is not drawn and can’t be clicked.

There is no editor for this in the room yet. A layer gets these settings — its attribute display — in one of three ways:

  • At upload, over the API: add attributeDisplay to the style of POST /api/layers/upload or POST /api/layers/process-chunked, or as a field of POST /api/rooms/:roomId/layers for inline GeoJSON.
  • On a layer already in the room: send PATCH /api/layers/:layerId with {"attributeDisplay": …}, using a room token with write. The map updates at once and the timeline records the change; null removes the setting. A PATCH replaces the whole setting, so send every part you want to keep. It works for layers of more than 100 features; a smaller one is kept in the room like a drawn shape and takes its setting at upload or import.
  • With a room GeoPackage: export and import keep each layer’s attribute display, and so does a room clone.

An example for tree crowns that carry an NDVI value and a detector score:

{
"version": 1,
"popup": {
"mode": "fields",
"fields": [
{ "key": "health_class", "label": "Health class" },
{ "key": "ndvi_mean", "label": "NDVI mean", "decimals": 4 },
{ "key": "detector_score", "label": "Detector score", "decimals": 3 },
{ "key": "area_m2", "label": "Crown area", "decimals": 1, "unit": "m²" }
]
},
"classification": {
"type": "graduated",
"field": "ndvi_mean",
"breaks": [0.2, 0.25, 0.3, 0.4],
"colors": ["#a50026", "#f46d43", "#fee08b", "#66bd63", "#006837"],
"labels": ["Dead", "Severely stressed", "Stressed", "Healthy", "Very healthy"],
"nullColor": "#9aa0a6",
"nullLabel": "No NDVI"
},
"filters": [
{ "type": "range", "field": "detector_score", "label": "Detector score",
"min": 0.2, "max": 1, "step": 0.01, "decimals": 2 }
],
"rasters": [
{ "layer": { "name": "Crown NDVI (2 m raster)" }, "stat": "mean",
"label": "NDVI, 2 m raster: crown mean", "decimals": 4 },
{ "layer": { "name": "Crown NDVI (2 m raster)" }, "stat": "value",
"label": "NDVI, 2 m raster: under the click", "decimals": 4 }
]
}

The two rasters rows read the room’s raster layer named “Crown NDVI (2 m raster)”: the mean over the clicked crown, and the cell under the click.

Saved as crowns-display.json, it goes onto a layer with:

Terminal window
curl -X PATCH "$API/api/layers/$LAYER_ID" -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" -d "{\"attributeDisplay\": $(cat crowns-display.json)}"
Part What it does Limits
popup.mode auto: the listed fields first, then all others · fields: only the listed ones · none: no values (raster rows still show) —
popup.fields key, and optional label, decimals (0–10) and unit up to 40
classification graduated: breaks, one more colors than breaks, optional labels · categorical: categories of value, color and label, plus otherColor · continuous: stops of value and color · all three: nullColor and nullLabel for features without a value 19 breaks, 64 categories, 2–16 stops
filters range filters on number fields: min and max, optional step, decimals, unit, and initial (the range shown first) up to 4
rasters rows read from a raster layer of the room: layer (its exact name, its id, or both), band (default 1), stat (value for the cell under the click; mean, median, p10, p90, min, max, std or count over the shape), and optional label, decimals (0–10) and unit up to 8, no two alike

A raster row finds its raster by id first, then by its exact name. Prefer the name: a room clone or import gives rasters new IDs, and the name still finds them.

Colors are #rgb or #rrggbb. Labels can be 64 characters long and units 16; the whole setting is at most 24 KiB. A setting the app can’t use is refused with 400 invalid_attribute_display and a list of error codes in details, and nothing is stored — fix it and send it again.