Upgrade to Pro — share decks privately, control downloads, hide ads and more …

From Boring XML to 3D Tiles: Building a Geologi...

Avatar for sasaki MIERUNE sasaki MIERUNE
September 02, 2026
43

From Boring XML to 3D Tiles: Building a Geological Borehole Viewer with CesiumJS

Avatar for sasaki MIERUNE

sasaki MIERUNE

September 02, 2026

Transcript

  1. Haruto Sasaki — MIERUNE Inc. From Boring XML to 3D

    Tiles Building a Geological Borehole Viewer with CesiumJS
  2. About me Who am I • Software engineer at MIERUNE,

    building WebGIS apps with TypeScript • Creator of boring-rs — open-source Rust toolkit for BED XML • GitHub: groovyjovy / X: @fhchchgc
  3. TL;DR 190,000+ boreholes in your browser No database. No API

    server. Just static 3D Tiles + CesiumJS — this is the ground near this very hall.
  4. Background What is a borehole survey? • Drill a narrow

    hole to the planned depth • Collect soil and rock samples at different depths • Record each layer, SPT N-values, and groundwater • One hole = one record — a “borehole log” Photos (both in Japan) — rig: Norisa1, CC BY 2.0, Flickr / cores: 橄欖岩, CC BY-SA 3.0, Wikimedia Commons
  5. Background Japan's national borehole database • 190,000+ public-works borehole logs

    • Nationwide coverage — roads, rivers, ports • Free to access; essential for disaster prevention and planning • Format: BED XML — an MLIT standard KuniJiban — nationwide map coverage Source: KuniJiban (PWRI / MLIT Japan)
  6. Motivation The data was already 3D. The view was not.

    KuniJiban: location on a map, depth in a 2D chart GSJ: inferred regional 3D geological models Source: KuniJiban (PWRI / MLIT Japan) Source: Urban Geological Map (GSJ, AIST) The goal: put the original observations back into 3D Nationwide and interactive, with no inference between boreholes
  7. First attempt PoC #1: A query on every move •

    Rails + PostGIS + bounding-box API • Every camera move triggered a query and data transfer • Nationwide browsing became slow; servers stayed online • Lesson: pre-compute and serve static tiles BED XML → Rails parser → PostGIS → Web API (bbox query) → CesiumJS
  8. The approach Build on open standards, step by step BED

    XML KuniJiban data 1.10–4.00 → Step 1 boring-rs (open-source, Rust) → Step 2 3D Tiles generator OGC 3D Tiles 1.1 Static files only — on object storage, no server to run → Step 3 WebGIS viewer CesiumJS + Resium
  9. Step 1 — Parsing BED XML is open, but hard

    to reuse • KuniJiban data: six versions (1.10 – 4.00) • DTD defines structure, but not scalar types • Types, units, and code meanings live in PDF specifications • Japan's national datums across eras: Tokyo / JGD2000 / JGD2011 • Shift-JIS in legacy files • Ver 2.10 alone is 55% of all files — legacy support is mandatory Dataset: 1.10–4.00 | Latest specification: 5.00 (not in KuniJiban yet) | JGD = Japanese Geodetic Datum
  10. Step 1 — Parsing boring-rs: one toolkit for KuniJiban •

    Handles all six versions in current KuniJiban (1.10–4.00) • Version-specific structures; source values remain strings • Shift-JIS decoding and coordinate conversion to WGS84 use boring_parser::{coordinate::GeoCoordinate, parser::Parse}; use boring_parser::boring_structs_400::Boring400; let boring = Boring400::parse_from_str(&xml)?; let (lon, lat) = boring.geo_location().to_wgs84(&transformer)?;
  11. Step 1 — Parsing In Japan, the ground itself moves

    • Earthquakes permanently shift coordinates — several meters in Tohoku 2011 • GSI publishes PatchJGD correction grids for each major earthquake • boring-rs applies them based on the survey date: • surveyed before the quake → apply correction / after → already shifted • Covers 7 earthquakes: Tokachi 2003 → Kumamoto 2016
  12. Step 2 — Tiling Why 3D Tiles? • OGC community

    standard for streaming massive 3D geodata • LOD is built into the spec — no custom protocol needed • Static files only → object storage + CDN, no database, no API server • Native support in CesiumJS
  13. Step 2 — Tiling Implicit Tiling: a tiny tileset.json •

    Explicit tiling would enumerate thousands of tiles in one JSON • Implicit: tile URLs derived from (level, x, y) — tileset.json stays a few KB • 11-level quadtree (Levels 0–10); renderable content starts at Level 4 "implicitTiling": { "subdivisionScheme": "QUADTREE", "availableLevels": 11, "subtrees": { "uri": "subtrees/{level}.{x}.{y}.subtree" } }
  14. Step 2 — Tiling Three-tier LOD for 190K boreholes Levels

    4–6 — clustered counts Levels 7–9 — individual markers Level 10 — colored cylinders Clustering: R-tree spatial index groups nearby boreholes per tile
  15. Step 2 — Tiling Geology embedded in glTF • EXT_mesh_features:

    feature ID per geological layer • EXT_structural_metadata: PropertyTable with name, depth, soil type… • Click a layer → properties, entirely client-side PropertyTable lookup in the browser — no server round-trip
  16. Step 3 — Viewer CesiumJS + Resium viewer • React

    19 + CesiumJS + Resium • Terrain from GSI elevation tiles (PNG-encoded) • Cross-sections from multiple boreholes • DXF export — straight into CAD workflows Cross-section with soil layers, N-values and water level
  17. Beyond this project Japan is preparing for GeoAI • AI-ready

    geospatial data is one of five strategic pillars • The first step is structured, machine-readable data • AI needs CRS, time, source, quality, update history, and terms of use • Data infrastructure determines what GeoAI can do Source: GeoAI Study Group interim report, Cabinet Secretariat and MLIT Japan, May 2026
  18. Standards can evolve BED XML is already moving forward 2016

    BED XML 4.00 JGD2011 → 2026 BED XML 5.00 JGD2024 = code 03 Current KuniJiban files stop at 4.00; 5.00 is the latest specification JGD2024 is Japan's current national datum; five required fields became optional Backward compatibility should guide progress. It should not prevent progress. Source: MLIT, Geological and Soil Survey Deliverables Specification R8.2
  19. Proposal The next step: machine-readable semantics • Publish XSD alongside

    the existing DTD • Define scalar types, units, and code lists • Provide open converters and conformance tests • DTD 5.00 <!ELEMENT 測地系 (#PCDATA)> R8.2 specification 03 = JGD2024 Keep every legacy DTD valid A human can connect these. A machine sees only text.
  20. Available today Open data you can host anywhere • About

    197,000 boreholes as downloadable 3D Tiles • Host on object storage, an intranet, or fully offline • boring-rs is open source; the tiles use open standards • soil-stack.groovyjovy.dev/download
  21. A parser is a bridge. It is not a substitute

    for a machine-readable specification.