Illustrative of the writes made on 2026-09-07: one new Pen entity generated from the boars' own positions, all three boars re-homed to it, and the record later filled out against the Smart Data Models Pen schema. Nothing physical moved — only the records changed.
A 32-vertex polygon approximating a circle of radius 20 m, centred on the mean of the three boar fixes ([13.34713, 52.51973]). Each boar sits 12–16 m from the centre, so the circle encloses all three with margin. Click a marker for its before/after.
The broker stores no fences, so there was no boundary to check against — this polygon is the first geometry the pen has ever had. Collars keep reporting live positions; if a boar walks out, locatedAt will not update itself.
One attribute written per animal: locatedAt. None of the three carried a parcel or pen link before.
| Boar | Entity | Last fix | locatedAt before | locatedAt after | Fix → centre | Inside 20 m? |
|---|---|---|---|---|---|---|
| Mammoth | urn:ngsi-ld:Animal:pig031 |
13.34730, 52.51970 | — none — | urn:ngsi-ld:Pen:BoarPen |
11.9 m | yes |
| Giant | urn:ngsi-ld:Animal:pig035 |
13.34695, 52.51965 | — none — | urn:ngsi-ld:Pen:BoarPen |
15.5 m | yes |
| Colossus | urn:ngsi-ld:Animal:pig037 |
13.34715, 52.51985 | — none — | urn:ngsi-ld:Pen:BoarPen |
13.0 m | yes |
Built on the Smart Data Models Pen schema, served by the MCP at ontology://agrifood/Pen (required: id, type, lastUpdate). Created first as a Building, corrected to Pen, then filled out against the model.
| Model fields (Smart Data Models Pen) | |
|---|---|
id / type | urn:ngsi-ld:Pen:BoarPen / |
lastUpdate required | 2026-09-07T12:30:00Z |
name · description | "Boar Pen" · "20 m radius circular pen enclosing the boars" |
location | GeoProperty · Polygon · 33 points (32-gon + close) · radius 20 m · centre [13.34713, 52.51973] |
farmId | → urn:ngsi-ld:AgriFarm:farm002 (Animal Farm) |
numAnimals | 3 |
sex | VocabProperty Male (boars) — the model's enum is M/F, but the farm's Animal records use Male/Female, so this matches them |
arrivalTimestamp | 2026-09-07T11:46:00Z |
avgWeight · weightStDev | 302 · 44 kg (KGM) — from Mammoth 325, Giant 340, Colossus 241 |
| Extension fields (no equivalent in the model) | |
species | pig — the model has no species field, useful on a mixed cattle/pig farm |
area | 1249 m² (MTK) — the 32-gon's true area, ~416 m²/boar |
status | occupied |
hasAnimal | → Animal:pig031, pig035, pig037 — the inverse of each boar's locatedAt |
Revision trail: Building:BoarPen created → boars pointed at it → type wrong → Pen:BoarPen re-created with the same polygon → boars re-pointed → Building:BoarPen deleted → occupancy fields added → re-aligned to the Pen schema (containedInPlace→farmId, dropped category, added numAnimals / sex / arrivalTimestamp / avgWeight / weightStDev).