🐖 Boar Pen — a 20 m enclosure around the three boars

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.

boar — last collar fix pen centre (boar centroid) generated pen boundary — 20 m radius

1. The enclosure on the map

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.

2. What changed on each boar

One attribute written per animal: locatedAt. None of the three carried a parcel or pen link before.

BoarEntityLast fixlocatedAt beforelocatedAt afterFix → centreInside 20 m?
Mammothurn:ngsi-ld:Animal:pig031 13.34730, 52.51970 — none — urn:ngsi-ld:Pen:BoarPen 11.9 myes
Gianturn:ngsi-ld:Animal:pig035 13.34695, 52.51965 — none — urn:ngsi-ld:Pen:BoarPen 15.5 myes
Colossusurn:ngsi-ld:Animal:pig037 13.34715, 52.51985 — none — urn:ngsi-ld:Pen:BoarPen 13.0 myes

3. The pen entity

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 / typeurn:ngsi-ld:Pen:BoarPen / Building Pen
lastUpdate required2026-09-07T12:30:00Z
name · description"Boar Pen" · "20 m radius circular pen enclosing the boars"
locationGeoProperty · Polygon · 33 points (32-gon + close) · radius 20 m · centre [13.34713, 52.51973]
farmId→ urn:ngsi-ld:AgriFarm:farm002 (Animal Farm)
numAnimals3
sexVocabProperty Male (boars) — the model's enum is M/F, but the farm's Animal records use Male/Female, so this matches them
arrivalTimestamp2026-09-07T11:46:00Z
avgWeight · weightStDev302 · 44 kg (KGM) — from Mammoth 325, Giant 340, Colossus 241
Extension fields (no equivalent in the model)
speciespig — the model has no species field, useful on a mixed cattle/pig farm
area1249 m² (MTK) — the 32-gon's true area, ~416 m²/boar
statusoccupied
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).