From Boring XML to 3D Tiles: Building a Geological Borehole Viewer with CesiumJS
2026-09-02 , Ran2

We present a pipeline transforming 190,000+ Japanese geological borehole records into interactive CesiumJS 3D Tiles. From open-sourcing a custom XML parser (boring-parser), through Implicit Tiling with glTF metadata extensions, to a browser-based WebGIS viewer — we share the journey of making subsurface data accessible to everyone.


~Background~
Japan's National Ground Information Database holds over 190,000 borehole columnar logs in BED XML format spanning six schema versions (1.10–4.00). This geological data is critical for disaster prevention, construction, and urban planning, yet has traditionally been accessible only as 2D columnar charts (PDF/images) — making it difficult to grasp spatial relationships between boreholes, continuity of geological layers, or to get an overview of 190K records at once.

Our initial proof-of-concept used PostGIS and Ruby on Rails to dynamically serve borehole data via bounding-box queries. At the scale of 190K records, the per-camera-move database queries proved too slow for practical use, and the always-on server cost was prohibitive. This motivated a pivot to pre-tiled static file delivery using 3D Tiles.

~Building on Open Standards, Step by Step~

Step 1: Custom XML Parser (boring-parser, open-source) — BED XML has six incompatible schema versions, DTD-based definitions with no type information, and mixed geodetic datums (Tokyo, JGD2000, JGD2011). No existing tool could handle all versions, so we built boring-parser and published it on crates.io as open-source. It unifies parsing across all versions with automatic datum-to-WGS84 conversion.

Step 2: 3D Tile Generator based on OGC 3D Tiles 1.1 — Using boring-parser as the foundation, we built a tile generator compliant with the OGC 3D Tiles 1.1 specification using Implicit Tiling (quadtree, region). We designed a three-tier LOD strategy for 190K boreholes: spatially clustered count markers at wide zoom (Levels 4–6), individual circle markers at mid zoom (Levels 7–9), and detailed cylindrical meshes with per-layer rock-type coloring at close zoom (Level 10). Each GLB embeds geological metadata via glTF extensions EXT_structural_metadata and EXT_mesh_features, enabling interactive property queries in the browser.

Step 3: WebGIS Viewer (CesiumJS + Resium) — The frontend renders the generated 3D Tiles using CesiumJS and Resium, providing 3D borehole visualization with rock-type coloring, multi-borehole cross-section generation with DXF export for CAD workflows, and terrain rendering via Japan's GSI elevation tiles.

~Key Technical Challenges~
- Unifying six XML schema versions into a common data model
- Multi-step geodetic datum conversion (Tokyo → JGD2000 → JGD2011 → WGS84 → ECEF)
- Designing Implicit Tiling levels and clustering strategies for smooth browsing of 190K records
- Embedding rich geological metadata into glTF via EXT_structural_metadata PropertyTable schema design

~Takeaway~
By publishing the foundational parser (boring-parser) as open-source and building the visualization pipeline on open standards (3D Tiles, glTF), we show how domain-specific geospatial data can be made accessible through the browser. Improving accessibility to geological data supports better decision-making in disaster prevention and urban planning. We hope this "build the parser, open-source it, then visualize with open standards" approach inspires others facing similar challenges.


Level of technical complexity: 2 - intermediate Give indication of resources (video, web pages, papers, etc.) to read in advance, that will help get up to speed on advanced topics.:

https://qiita.com/groovyjovy/items/5a3c2bce778514a2ef2a
https://zenn.dev/groovyjovy/articles/7abc8fdcebc7c6

Indicate what is (are) the open source project(s) essential in your talk:

CesiumJS, Resium, boring-parser, 3D Tiles (OGC), glTF

I make my conference contribution available under the CC BY 4.0 license. The conference contribution comprises the abstract, the text contribution for the conference proceedings, the presentation materials as well as the video recording and live transmission of the presentation:

A software engineer building WebGIS applications with TypeScript. Creator of boring-parser, an open-source library for parsing Japanese geological borehole data.

https://x.com/fhchchgc
https://github.com/groovyjovy