Connect a Tour to a Model

Save checked local camera placements for transitions between panoramas and independently captured models.

A tour and a point cloud may use different local frames and capture dates. Neither needs GPS. A registration records a checked relationship between two exact model bundles at the same location; it does not move either model or change its capture date. Without a registration, keep both viewers usable and offer a normal model switch. Do not claim that an unaligned switch retains the camera position.

Read the current pair

GET /v1/spatial/bundles/{tourId}/tour-registrations/{modelId}?tourArtifactId={tourFileId}&modelArtifactId={modelFileId}
Authorization: Bearer <token>

Both bundles and exact files must be readable. The tour file is tour.json; the target is the viewer entry artifact, for example Potree metadata.json, tileset.json, a splat, mesh, LAS or LAZ. The response contains tourArtifact and modelArtifact (artifact ID, version and opaque fingerprint), registration (initially null), and canEdit. Fingerprints are server-generated identities, not coordinate transforms or downloadable storage addresses.

GET /v1/spatial/bundles/{bundleId}/tour-registrations lists at most 100 recent relations involving that exact bundle. Unreadable counterparts are omitted. An existing relation with isCurrent: false needs review against the current files before use; never apply its camera transform automatically.

Save a checked placement

The authenticated human needs write access to the tour and read access to the target. Copy the IDs and fingerprints from the current pair response. Use baseRevision: 0 for creation and the returned revision for subsequent saves.

PUT /v1/spatial/bundles/{tourId}/tour-registrations/{modelId}
Authorization: Bearer <token>
Content-Type: application/json

{
  "tourArtifactId": "<tour entry artifact UUID>",
  "modelArtifactId": "<model entry artifact UUID>",
  "tourFingerprint": "<64-character fingerprint from GET>",
  "modelFingerprint": "<64-character fingerprint from GET>",
  "baseRevision": 0,
  "data": {
    "version": 1,
    "anchors": [{
      "sceneId": "scene-1",
      "position": [12.5, 4.2, 1.6],
      "rotation": [0, 0, 0, 1],
      "returnRadius": 0
    }],
    "alignments": []
  }
}

An anchor works even when the tour has no camera poses. position is the camera centre in the target's authored coordinates, before viewer centering and display transforms. rotation is a normalized [x,y,z,w] quaternion mapping the panorama's canonical camera axes (+Y image up, -Z forward at yaw/pitch zero) into that target frame. Remove the panorama's current look rotation when recording the anchor. These are camera placements, not points clicked on a visible wall.

returnRadius is a checked tolerance in target coordinate units. Zero permits only a numerically identical position. Do not infer metres for arbitrary-scale models, or choose a radius that includes another floor or room.

For a checked reconstructed component, an alignment contains frameId, explicit sceneIds (at least three), localToModel, residual and units (m or model). The matrix is column-major with translation at indices 12–14. It must be a positive uniform-scale similarity, without reflection, shear or perspective. The residual is in target units and describes the fitted correspondences, not independent survey accuracy. A shared frame name alone never grants coverage to unlisted scenes. Direct anchors take precedence over a component alignment.

Revisions, limits and recovery

The response records the revision, authenticated updater and UTC update time. Saving rechecks permissions and both artifact identities within a transaction. Empty anchor/alignment arrays clear a relation and still advance its revision. The model files and their metadata are not overwritten.

  • 400: invalid vectors, quaternion, transform, coverage, revision or payload.
  • 401/403/404: authentication, authorization or unavailable pair.
  • 409 with tour_registration_changed: another edit or source change won. Reload and review before saving again; do not blindly retry with a new revision.

Limits are 500 anchors, 16 alignments, 500 scene IDs per alignment and 128 KiB of serialized registration data. A lost save response is reconciled by reading the pair and comparing its saved data before attempting another edit.

Read-only shared viewing

An unlocked share response may include tourRegistrations. Every returned relation is current and both exact entry files belong to that share's authorized bundle inventory. Password-required responses contain no registrations. Removed files, changed versions, unrelated locations and counterparts outside the share are omitted. updatedByUserId is null in this public projection.

Use this response metadata for viewing only. Do not call the authenticated registration endpoints as a fallback from a public viewer. Refresh registrations with the existing share resolve/unlock lifecycle; a failed or revoked refresh must not reuse stale metadata. Public viewers cannot save a registration.

Optional metadata is bounded to 100 relations, 1 MiB of registration data and 64 shared model inventories. Larger shares continue to open normally without this optional metadata. Neither the files nor the share scope are expanded.

If the registration service is unavailable, ordinary tour/model navigation remains available; retain the original view for a recoverable return.

On this page