Skip to content

p7-s5: world georeference settings + reprojection frame #324

Closed

Description

@JArmandoAnaya

Part of the Road to Parity roadmap · 2026-07 realignment.

Scope

World/geodetic settings as the foundation of GIS support (executes
before p7-s2; the epic states execution order):

  • A world projection defined by standard CRS descriptions (WKT or
    proj-string), a world origin (latitude/longitude), and workspace
    extents
    ; center / fit-to-selection actions operating in that frame.
  • Imports (p7-s2/s3/s4) reproject into the world frame; exports record
    the georeference via <header><geoReference> (+ <offset>) per
    OpenDRIVE 1.9.0 §8.5 — read AND write (neither exists today).
  • PROJ enters as the reprojection dependency here (permissive license;
    pinned tag + URL_HASH + THIRD_PARTY_LICENSES row in the same commit).
  • Settings persist per ADR-0008: <geoReference> is Layer 0; workspace
    extents/UI framing are Layer 2.

Acceptance

  • Set a CRS + origin, save, reload: settings survive; exported .xodr
    carries a valid <geoReference>; importing a file with a <geoReference>
    adopts/reprojects per the world frame with structured diagnostics on
    mismatch.
  • Hand check: fit-to-selection centers the workspace on the selection in
    the projected frame.

Out of scope

Actual GIS layer import (p7-s2), lidar (p7-s3), OSM (p7-s4); datum
transformations beyond what PROJ provides out of the box.

Supersedes

(none)

Activity

  1. added
    pillar:P7
    on Jul 20, 2026
  2. JArmandoAnaya commented on Jul 27, 2026

    @JArmandoAnaya
    ContributorAuthor

    2026-07-27 roadmap review — corrections and cross-references (issue written before recent landings; body stands, read with these):

  3. moved this from Todo to In Progress in RoadMaker Roadmapon Jul 28, 2026
  4. moved this from In Progress to Done in RoadMaker Roadmapon Jul 28, 2026
  5. JArmandoAnaya commented on Jul 28, 2026

    @JArmandoAnaya
    ContributorAuthor

    Closed by #483 → ad542de (15/15 CI)

    The decision worth recording: PROJ was deferred to #242

    This issue's scope said "PROJ enters as the reprojection dependency here." It did not, by maintainer decision at planning, and this is a deferral rather than an omission:

    PROJ needs SQLite3 plus a ~9 MB proj.db found at runtime, in a kernel that builds from CMake alone and ships zero runtime data — and nothing in the acceptance above needs a datum transform. What shipped instead is the construction §8.5 itself recommends ("alternatively define a custom projection using Transverse Mercator"): a TM centred on the scene's own origin with +k=1 +x_0=0 +y_0=0, in which the local OpenDRIVE coordinates ARE the projected coordinates — so a scene is georeferenced and nothing is ever transformed. #242 now owns PROJ, with the first consumer that genuinely needs CRS↔CRS, and it inherits a modelled world frame (commented there).

    Acceptance

    • Set a CRS + origin, save, reload: settings survive — ✅ and exactly: the origin round-trips bit-for-bit, because the angles are written with the shortest decimal that reloads the identical double. A fixed precision would have drifted (the fmt-s1 trap).
    • Exported .xodr carries a valid <geoReference> — ✅ as CDATA per §8.5, the only CDATA node RoadMaker writes anywhere. Plus <offset> (omitted when it is the identity) and the derived north/south/east/west box.
    • Importing a file with a <geoReference> adopts, with structured diagnostics on mismatch — ✅ adopt-on-load; a second <geoReference> is refused citing header.proj.max_one_proj; a partial <offset> is reported and dropped. Loading never transforms geometry — reprojecting clothoids between datums is not a thing a correct implementation does silently; the mismatch case that is real (a Layer-2 workspace framed under a georeference the scene no longer carries) is discarded with robomous.ai:rm:1.0.0:header.georeference_mismatch.
    • Fit-to-selection centres the workspace in the projected frame — ✅ Fit workspace to selection + View ▸ Centre on World Origin (a pivot move; the zoom survives). GW-2 steps 25–27 cover the hand-check.
    • Layering per ADR-0008 — ✅ <geoReference>/<offset> Layer 0; workspace extents Layer 2 in .rmscene.json, with the CRS they were framed in.

    Two findings the issue did not name

    1. The <header> was losing data in both directions, silently. parse_header walked no children and warn_unsupported_root_children excludes header, so a georeferenced foreign file lost its projection string with no diagnostic anywhere. Fixed, and it discharges fmt-f1: remaining non-preserving parse scopes — header (geoReference), roadMark, laneSection, junction children, unknown attributes #453's <header> row (commented there).
    2. esmini v3.5.0 rejects +no_defs — the token §8.5's own example carries, which is where I took it from. The esmini smoke gate caught it on the committed sample. Dropped from the generator: it is a PROJ.4-era flag pointing at proj_def.dat, a file removed in PROJ 6. A default this project generates must not carry a token a shipping consumer refuses.

    Known limits, stated

    No CRS↔CRS transform (#242). The workspace box is not undoable and does not dirty the document — framing is not an edit, the same rule the camera pose follows. Epic #256 and the P7 milestone stay open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pillar:P7

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions