Skip to content

Epic P7: Import & Export #256

Open
Open

Description

@JArmandoAnaya

Pillar P7 of the Road to Parity roadmap · Milestone P7 — Import & Export.

Status (2026-07-20): scope updated by the 2026-07 realignment: georeferencing is now an explicit sprint (#324). Execution order: p7-s1 → p7-s5 → p7-s2 → p7-s3 → p7-s4 — the world georeference frame (#324) must exist before the GIS/lidar/OSM imports that reproject into it (sprint IDs keep creation order; this line is the execution order). The fmt container (#325) ideally precedes #324 (workspace extents are Layer-2 data).

Update (2026-07-27, roadmap review): the fmt precondition is satisfied — fmt-s1 #325 (per-scene sidecar + project.json v2) and fmt-s2 #326 (foreign-userData preservation + rm: registry) are merged, so #324 now extends the shipped sidecar schema rather than waiting on it. Header coordination: #453 (fmt-f1) covers verbatim preservation of unmodeled <header> children incl. <geoReference>, while #324 models §8.5 — whichever lands second inherits the other's header-child dispatch. #364 and #390 were milestoned P7 but missing from this epic; added below. Per-issue correction notes from the review are posted on every sprint issue.

Update (2026-07-27, p7-s1 landed): the pillar's discovery report is written (#472) and #241 is merged (#473, 15/15 CI on the first push). Three things it settled that later sprints inherit:

  • Document::refresh_diagnostics() exists now. validate_network had been called in exactly one place in the whole editor — inside save() — so the Diagnostics dock described the file you opened rather than the network you were authoring. Anything that wants the checker's current view now asks for it.
  • Export manifests are kernel API (preview_mesh_export / preview_xodr_export, both Python-bound). The OpenDRIVE half counts the writer's own emitted bytes, so it cannot drift; the mesh half re-states the exporters' policy and is held to it by a four-tier gate (reconciliation, comment-stripped source scan, NetworkMesh totality, refusal parity), plus a USD reconciliation in the Usd suite where the usd-export job can see it.
  • GW-2 steps 21–22 are now headlessly replayable — scripts/gw2_replay.py covers them and no longer claims the export-preview tools cannot be automated.

Release-gate note — RESOLVED 2026-07-28 (#390, PR #475, main cfb0ec9, 15/15 CI on the first push). The discovery report asked for #390 to be sequenced BEFORE the GW-2 hand-run, because an honest step-21 preview was ground-less until it landed. Both exporters now write mesh.surfaces and mesh.terrain, and the empty-mesh guard became one shared predicate over every channel, so a terrain-only or props-only scene exports instead of being refused. GW-2 step 21 and its pass criteria were amended in the same PR — the ground rows must read Exported — so the GW-2 hand-run is no longer blocked by this. The only omission the preview still declares is the USD sign face (#364).

Update (2026-07-28, p7-s5 landed). #324 is merged (#483 → ad542de, 15/15 CI on the second push). Two things later sprints inherit:

Ecosystem finding worth carrying: esmini v3.5.0 rejects +no_defs in a geoReference string — the token §8.5's own example carries. The esmini smoke gate caught it on the committed sample. A default this project generates must not carry a token a shipping consumer refuses, whatever the spec's illustration does.

Scope

Scene Export Preview and OpenDRIVE Export Preview tools; world georeference settings (CRS by WKT / proj-string, world origin, workspace extents, center/fit-to-selection; imports reproject into the world frame; exports record <header><geoReference> per OpenDRIVE §8.5); GIS vector/raster (bounded CRS family, ADR-0010); lidar (in-house ASPRS LAS/LAZ + laz-perf, ADR-0011); OSM extraction with diagnostics-first fitting and scale targets.

Feeds

GW-2 (previews).

Update (2026-07-28, p7-s2 landed). #242 is merged in three PRs — #487 (the decision), #488 (the kernel), #489 (the editor).

★ THE DEFERRED PROJ DECISION IS ANSWERED, AND THE ANSWER IS NO. #324 deferred PROJ to "the first consumer that genuinely has to transform coordinates between two different reference systems". #242 is that consumer, and ADR-0010 rules that RoadMaker computes a bounded family of projections in closed form — WGS 84 geographic, UTM, Transverse Mercator, Web Mercator, via a Krüger series — and refuses everything else by name. PROJ would have cost SQLite3 plus a ~9 MB proj.db reaching three editor bundles and the Python wheels, through delivery mechanisms that exist for neither. libtiff is the only new dependency (BSD-style, near-list, maintainer-approved; its LZW code carries a UC Berkeley attribution obligation discharged in THIRD_PARTY_LICENSES.md).

What later sprints inherit:

  • roadmaker::gis reads GeoJSON, ESRI Shapefile, GeoTIFF and world-filed PNG/JPEG, and reprojects into the world frame p7-s5: world georeference settings + reprojection frame #324 built. p7-s3: lidar import (PDAL) #243 (lidar) and p7-s4: OSM road-network extraction + scale targets #244 (OSM) reproject through the same CrsTransform.
  • placement is public: a raster whose transform is affine is placed (source pixels intact), anything else is resampled and says so. A consumer that ignores it silently degrades imagery.
  • An elevation GeoTIFF becomes terrain through the existing edit::set_terrain_field, which discharges p5_discovery's decision D1 ("GDAL rasters joining in P7") — by a different vehicle than D1 named.
  • Reference layers are Layer-2 and re-derive on a georeference change, where the workspace box is discarded. Both store framed_crs; the difference is that a layer has a source file to re-derive from. Do not collapse the two rules.
  • GDAL/PROJ wording is retired everywhere it appeared: the roadmap P7 row, the realignment doc, GW-2 step 27, and ADR-0006's "M3b already pays the GDAL licensing pass" premise.

GW-2 gained steps 28–33 and four pass criteria for import. The hand-run is still outstanding and remains this epic's release-gate item.

Update (2026-07-28, p7-s3 landed). #243 is merged in two PRs — #491 (the decision) and #492 (the kernel) — plus #493 (the editor).

★ THE PILLAR REFUSED ITS SECOND NAMED DEPENDENCY, FOR THE SAME REASON AS THE FIRST. This issue's own scope line said "lidar (PDAL)". PDAL's build files find_package PROJ 9.0 REQUIRED, GDAL 3.8 REQUIRED and libgeotiff REQUIRED — so adopting it would have re-imported, as a rider on a feature sprint, precisely the dependency ADR-0010 declined two days earlier. ADR-0011 records the refusal and the reversal cost. laz-perf 3.4.0 (Apache-2.0) is the only new dependency, decoding the LAZ chunk stream and nothing else; upstream's CMakeLists is unusable embedded (an explicit SHARED target, unguarded benchmarks/tools/install, and a configure-time file(DOWNLOAD) in its tests), so it is taken source-only through the repo's existing SOURCE_SUBDIR cmake-disabled idiom.

What later sprints inherit:

  • roadmaker::lidar reads ASPRS LAS 1.0–1.4 and LAZ and reprojects through the same CrsTransform p7-s2: GIS vector/raster import (GDAL/PROJ) #242 built, which is why a tile and an orthophoto of one place land on each other. The GeoTIFF GeoKey reader moved out of geotiff.cpp into gis_common so a raster and a tile describing one CRS cannot disagree.
  • Coordinates are floats relative to a double origin, and that survives to the GPU — the editor carries PointCloud::origin as an instance matrix rather than baking it in. At a UTM northing near 5.8e6 a float's quantum is half a metre; p7-s4: OSM road-network extraction + scale targets #244 should assume nothing smaller.
  • A ground fit is a binning fit, not a classifier. It takes the mean of ASPRS class-2 returns and falls back to the lowest return only when the file classified none, and always names which ran. Terrain arrives through the existing edit::set_terrain_field.
  • ReferenceLayerKind is now three-state and the sidecar's kind stopped being a bool. Older sidecars load unchanged; an unknown spelling still reads as a raster with a warning.
  • Document::refit_reference_layers() is wired up. It shipped with p7-s2: GIS vector/raster import (GDAL/PROJ) #242 and was called from nowhere, so a live georeference change left imported layers over the wrong ground — which GW-2 step 31's pass criterion had already declared a failing run.

Two test-design lessons from the sabotage runs, worth carrying into #244:

  • A fixture whose values are exactly representable in the type under test proves nothing about that type. Forcing the cloud origin to zero left the entire suite green, because the tile's 5 m lattice survives an absolute float at UTM magnitude (the quantum there is exactly 0.5 m). A dedicated precision_probe.las with centimetre offsets was needed.
  • Loosening a tolerance to accommodate real noise can silently retire the gate that caught the bug. The mean-vs-min ground estimator was found by a failing test, then un-pinned when its tolerance was widened to cover legitimate binning noise. The replacement gate is exact rather than tolerant.

GW-2 gained steps 34–37 and three pass criteria. The hand-run is still outstanding and remains this epic's release-gate item.

Sprints

Follow-ups

Supersedes

#54 via p7-s4

Activity

  1. added
    epic
    pillar:P7
    on Jul 15, 2026
  2. JArmandoAnaya commented on Jul 29, 2026

    @JArmandoAnaya
    ContributorAuthor

    p7-s4 (#244) is merged — P7's sprints are 6/6

    Five PRs: #499 (0bb0c48, ADR-0012 + the mapping doc), #500 (2feb75a, road <type>/<speed>), #501 (ffe8d79, reader + tags + simplifier), #503 (e480b4e, plan + import + scale harness), #504 (editor + Python + GW-2). Full record on #244.

    ADR-0012 completes the dependency posture this pillar has held three times over. .osm XML is read with the pugixml already linked, so cmake/deps.cmake did not change at all — the first of the three import sprints for which that is true. .osm.pbf is refused on zlib, not Protocol Buffers: the PBF decoder is varints, exactly what ADR-0011 chose to write for LAS, but every real one deflates its blobs and zlib belongs to #484.

    GW-2 gained ### Importing OSM, steps 38–45, and four pass criteria. One hand-run now exercises the georeference (25–27), all four importers (28–33 GIS, 34–37 lidar, 38–45 OSM) and both export previews (21–22).

    The scale gate (#54) is discharged, with one number reported honestly rather than flattered: the district build step is super-linear (84 segments → 92 ms, 420 → 19 200 ms), filed as #502. The CI job runs a smaller district and its ceiling sits deliberately far above where it belongs, both stated in the code — shrinking the district permanently would have dodged the only question #54 asked.

    This epic and milestone 14 STAY OPEN

    Sprints are complete; these are not:

    (#498, the decimate_ring unification, is filed under P2 — it is a mesh-output change.)

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

    epicpillar:P7

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions