Measurement Annotation Persistence
Stable measurement identities, conflict handling, and personal trade profiles.
Ordinary length, area and count measurements use the annotation endpoints. Trade
classification, material, presentation, quantity and source-frame metadata belong
to the measurement payload. They are independent of the annotation's
measurement_note category. Volume calculations retain their dedicated
definition and calculation workflow.
Capability and Identity
GET /v1/spatial/locations/{locationId}/annotations returns items,
hasNextPage and annotationPersistenceVersion: 2. Clients must check this
capability before making annotations authoritative for legacy measurements.
Pages exclude deleted annotations. They are not an incremental deletion feed;
updatedSince alone cannot establish the complete current inventory.
Create a measurement with POST /v1/spatial/locations/{locationId}/annotations
and a stable clientKey of 1–256 characters. The location/key combination is
unique, including deleted records. Retrying identical content returns the same
annotation. Reusing a key for different content or a deleted record returns
HTTP 409 (annotation_identity_conflict). Concurrent creates can also produce
409; reload and compare the saved record before retrying. Never invent a new key
merely to bypass a conflict. Unkeyed legacy creates are also rejected when the
envelope identifies a measurement already reserved by the canonical
pixmeas-v1: SHA-256 key, including tombstones.
Responses include clientKey and a decimal string revision. Existing
unkeyed records may acquire a key through a conditional PATCH. Once assigned,
a key cannot be changed or cleared. Volume annotations do not accept these keys.
Conditional Changes and Deletion
Send the last observed string baseRevision and matching clientKey with PATCH.
A missing or mismatching key on a keyed row returns 409 (annotation_identity_required),
preventing older config-shadow clients from overwriting migrated data even after
fetching a fresh revision. Keyed measurements
require the exact record revision, including when changes touch different fields:
the payload and coordinate frame form one measurement. Ordinary unkeyed notes
retain the existing field-level conflict behavior. A stale measurement write
returns HTTP 409 and must not overwrite the remote record automatically.
Delete keyed measurements with:
DELETE /v1/spatial/annotations/{annotationId}?baseRevision=7The revision must match. Missing or stale preconditions return 409; malformed revisions return 400. The server retains a tombstone and the identity reservation so a delayed create cannot resurrect deleted work. Deleted rows are excluded from ordinary reads, lists, counts and shared-model annotation delivery. A missing/deleted annotation does not invalidate surviving captured model content.
Location and document authorization applies before identity lookup and mutation. The API never takes the measurement author from a caller-supplied user ID.
Payload and Migration
Ordinary note bodies remain limited to 4,000 characters. Measurement-note bodies
may contain a validated __pixmeas: 1 JSON envelope up to 262,144 characters,
including the measurement ID/type, coordinate-space marker, checksum and data.
The client is responsible for verifying the complete payload, source/frame and
checksum before rendering or declaring a legacy migration verified. A local
payload's placeholder WGS84 coordinates are not replacement measurement points.
Keep a recoverable legacy snapshot and pending edits until every migrated row has been reloaded and verified. Partial inventory, failed writes, malformed payloads and revision conflicts must block authoritative completion. Never interpret an incomplete or failed load as an empty dataset to save over.
The additive schema migration preserves existing annotation revisions and content. Downgrade refuses to discard keys, tombstones, larger bodies or saved user preferences; reconciliation/export is required before removing that schema.
Personal Picker Default
Read and save defaultMeasurementProfileId through GET/PATCH /v1/users/me.
Profiles are roofing, roadworks, utilities and earthworks; unset accounts
use roofing. This is a personal preference across devices. Several users may
work on the same model with different defaults. Switching a picker profile
never changes saved classifications or filters persistence and reports.
Section and Surface Assistant
The assistant produces reviewable proposals for the currently selected personal measurement profile. It supports the four profiles above. It does not identify roof parts, materials, road markings or pipe axes from a plane automatically.
- Read
GET /v1/spatial/bundles/{bundleId}/plan-automation. The response containssourceandavailable. It requires model write access and a retained original OBJ/PLY with matching pipeline georeferencing metadata. - Send
POST /v1/spatial/bundles/{bundleId}/plan-automation/jobswith anIdempotency-Key. The body containsframeId, numericreferenceRevision, andrequestwithschemaVersion: 2,profileId, optionalsimplifyToleranceM(0–0.1 m) and 1–32sectionsand/orsurfaces. Coordinates and normals are in the model's ENU metre frame. Each section hasid,origin,normalandroi: [minimum, maximum]. Each surface hasid,seed,normal,categoryId,roiand optionaldistanceToleranceM,normalToleranceDeg,seedRadiusM. Aroiis at most 500 m per axis and contains its origin or seed. Ids and category ids have no whitespace or control characters. Unknown properties, includingsource, are rejected: the server supplies artifact identity and model binding. AnotherschemaVersionasks the user to reload the app. The frontend validatescategoryIdagainst the live measurement catalog. - Poll
POST /v1/spatial/bundles/{bundleId}/plan-automation/jobs/{jobId}/reviewwith{ "assetId": "bundle-<bundleId>" }. This read-only call returnsjob,result(null untilSucceeded) andknownMeasurementIds. Polls only check the bundle and job; once the job succeeded it authorizes the output and checks the current source again. Known identities include deleted annotations and must never be recreated. The result hasschemaVersion: 2,engineVersion(info only),runId,profileId,source,candidates,diagnosticsandmetrics. Each candidate warning (touches-work-area,has-holes,open-boundary, …) makes it non-importable. A diagnostic per operation explains empty or truncated results (no-mesh-in-roi,region-too-large,proposal-limit, …) without failing the job. The output is an Analysis bundle, never a model version. - Show a separate preview. Immediately before adoption, call review again and verify the active account, asset, measurement profile, category and frame. Only explicitly selected, importable proposals become ordinary area/polyline measurements through the existing annotation persistence flow. Await the save acknowledgement before reporting success. Do not write proposals directly to annotation endpoints or interpret visible geometry as a confirmed save.
HTTP 409 means the source, reference or result cannot safely be used; reopen or recompute. Job creation retains normal permissions, quotas and idempotency. The job itself does not create annotations. Original ENU metadata determines the axis conversion automatically. Research UVZ crops and unknown legacy frames are not accepted as live model coordinates. Custom viewer placement must match the saved measurement frame. WGS84 conversion remains the existing coordinate export operation; local proposal numbers are never geographic coordinates.
The viewer currently accepts up to 200 selected proposals per action and 1,000 points per proposal. Surface boundaries may follow the chosen region rather than a physical component edge. Holes and ambiguous contours remain blocked.