In utilizing map data, 3D representation and statistical analysis, which go beyond simple two-dimensional displays, are crucial techniques for maximizing the value of the data.
This time, we used our company's precise road elevation data to implement both 3D map display and statistical analysis. We will introduce our technical capabilities, which allow us to handle everything from data preparation to front-end implementation, and provide examples of how to utilize our database of highly accurate map data.
1. Let's try displaying roads in 3D using road elevation data.
1-1. Selection of display location
For this 3D map display, we selected Ohashi Junction (JCT) in Meguro Ward, Tokyo. The reason for choosing this location is its distinctive three-dimensional structure.
Features of Ohashi Junction:
-A complex overpass where the Shuto Expressway Route 3 Shibuya Line and the Central Circular Route intersect.
-A unique shape that spirals from the surface to deep underground.
Technical skills in data preparation:
Of particular note is that our road elevation data is precisely maintained even in underground areas where GPS signals cannot reach. Generally, surveying underground structures where GPS cannot be used is difficult, but our company uses high-precision surveying technology to accurately digitize even such complex three-dimensional structures.
1-2. Create GeoJSON data from road elevation data
Our road elevation data is currently organized in point format, but since the purpose this time is 3D rendering, we will convert it to line data.
Points to note during conversion:
-Store the elevation value in the Z coordinate.
-To enable color coding and width adjustment, the road display type (expressway, national highway, etc.) is obtained from road network data.
Data structure optimization:
Our road elevation data consists of a very large number of points and is collected using high-precision surveying. While typical map data often manages elevation information separately as an attribute, in this case, we store it directly in the Z coordinate system for the following reasons:
- Improved drawing performance: Attribute reference processing is omitted, and coordinates are used directly.
• Memory efficiency: Processing speed is improved by simplifying data structures.
• Utilization of high-precision data: Maximizing the use of data with high point density to represent even detailed elevation differences.
This design makes it possible to accurately represent detailed elevation changes from above ground to deep underground, even in complex three-dimensional structures like the Ohashi Junction.
Example of completed GeoJSON data:
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"id": "road_001",
"roadclass": 11
},
"geometry": {
"type": "LineString",
"coordinates": [
[139.68720, 35.65056, 45.2],
[139.68725, 35.65060, 45.8],
[139.68730, 35.65065, 46.1]
]
}
}
]
}
Supplementary information on the distribution method: In this case, because the 3D rendering is limited to a small area, we are placing the GeoJSON data locally. However, for larger rendering areas, it is more efficient to convert it to vector tiles and distribute it to the server.
1-3. Display road elevation data in 3D using deck.gl
Base map selection:
We use our vector maps as the base map.
・ MapFan API Service Overview
・ Vector Map IF Specification
Implementation points:
This component-based development environment, using React and TypeScript, efficiently processes large amounts of high-precision road elevation data using deck.gl's PathLayer and high-performance WebGL-based 3D rendering. By directly representing elevation as the Z-coordinate, 3D rendering performance is optimized, enabling real-time 3D map display.
Implementation method:
3D road data created in GeoJSON format is overlaid as a layer on top of the base map. By overlaying the deck.gl 3D layer on top of a 2D vector map created with MapLibre GL, it is possible to display both planar map information and three-dimensional road elevation information simultaneously. This makes it possible to intuitively understand the topography and elevation differences of the roads.
Completed code example:
import React, { useEffect, useState } from "react";
import { DeckGL } from '@deck.gl/react';
import { PathLayer } from "@deck.gl/layers";
import Map from 'react-map-gl/maplibre';
import 'maplibre-gl/dist/maplibre-gl.css';
// 初期表示設定
const INITIAL_VIEW_STATE = {
latitude: 35.65056,
longitude: 139.68720,
zoom: 16,
minZoom: 5,
pitch: 60,
bearing: 0,
dragRotate: false,
minPitch: 0,
maxPitch: 90
};
// 道路クラスごとの色設定
const getRoadColor = (roadClass: number) => {
if ([1, 2, 3, 4, 5].includes(roadClass)) return [30, 144, 255]; // 国道、県道、市道
if ([5, 6, 7].includes(roadClass)) return [0, 191, 255]; // その他道路
if ([8, 9].includes(roadClass)) return [135, 206, 235]; // 細街路
if ([11, 101, 102, 103, 104, 105, 106, 107, 108].includes(roadClass)) return [50, 200, 50]; // 高速道路、有料道路
return [0, 0, 0];
};
// 道路クラスごとの幅設定
const getRoadWidth = (roadClass: number) => {
if ([1, 2, 3, 4, 5].includes(roadClass)) return 7; // 国道、県道、市道
if ([5, 6, 7].includes(roadClass)) return 5; // その他道路
if ([8, 9].includes(roadClass)) return 2; // 細街路
if ([11, 101, 102, 103, 104, 105, 106, 107, 108].includes(roadClass)) return 11; // 高速道路、有料道路
return 2;
};
// GeoJSON読み込み関数
const fetchGeoJSON = async (url: string) => {
const response = await fetch(url);
return response.json();
};
// パスデータの型定義
interface PathData {
id: any;
path: number[][];
properties: any;
}
function App() {
const [viewState, setViewState] = useState(INITIAL_VIEW_STATE);
const [paths, setPaths] = useState<PathData[]>([]);
// GeoJSONデータの読み込み
useEffect(() => {
fetchGeoJSON('/ohashi_lines3d.geojson')
.then((geojson) => {
const convertedPaths = geojson.features.map((feature: any) => ({
id: feature.properties.id,
path: feature.geometry.coordinates,
properties: feature.properties,
}));
setPaths(convertedPaths);
})
.catch((error) => {
console.error('GeoJSONの読み込みに失敗しました:', error);
});
}, []);
// レイヤー設定
const layers = [
new PathLayer({
id: 'path-layer',
data: paths,
getPath: (d) => d.path,
getColor: (d) => getRoadColor(d.properties?.roadclass),
getWidth: (d) => getRoadWidth(d.properties?.roadclass),
widthMinPixels: 1,
widthMaxPixels: 10,
getElevation: (d) => d.path.map((p) => p[2] || 0),
elevationScale: 10,
pickable: true,
rounded: true,
coordinateSystem: 1,
visible: viewState.zoom >= 12,
}),
];
return (
<div style={{ position: "relative", width: "100vw", height: "100vh" }}>
<DeckGL
initialViewState={INITIAL_VIEW_STATE}
controller={true}
viewState={viewState}
layers={layers}
onViewStateChange={({ viewState }) => setViewState(viewState)}
>
<Map
reuseMaps
mapStyle="https://api-vectormap.mapfan.com/v2/styles/mapfan_light_nologo?api_key=API_KEY"
styleDiffing={false}
{...viewState}
onMove={(evt) => setViewState(evt.viewState)}
/>
</DeckGL>
{/* 座標・ズーム情報表示 */}
<div
style={{
position: "absolute",
top: 10,
left: 10,
padding: "8px 12px",
background: "rgba(255, 255, 255, 0.85)",
fontSize: "14px",
borderRadius: "8px",
zIndex: 100,
}}
>
<div><strong>Zoom:</strong> {viewState.zoom.toFixed(2)}</div>
<div><strong>Lat:</strong> {viewState.latitude.toFixed(5)}</div>
<div><strong>Lng:</strong> {viewState.longitude.toFixed(5)}</div>
</div>
</div>
);
}
export default App;
1-4. Referencing the completed road elevation data:
We were able to create a 3D representation of the Ohashi Junction's spiral tunnel structure, which descends from above ground to underground, and its complex, multi-layered overpasses. This allows for an intuitive understanding of the vertical relationships and spiral connection structures of the roads, which are difficult to grasp from a 2D map. Furthermore, the road network hidden underground within the tunnels is also visualized, allowing for a three-dimensional understanding of the overall structure.

2. Let's perform a statistical analysis using road elevation data.
2-1. Utilization of statistical processing through database creation
Our road elevation data is stored in a database, allowing for statistical analysis using SQL. This time, we investigated "the highest elevation point in Japan on roads accessible by car."
* Our road elevation data only covers roads that are passable by vehicles.
Investigation SQL:
SELECT *
FROM map.road_elevation
WHERE altitude = (SELECT MAX(altitude) FROM map.road_elevation);
2-2. Survey Results
The highest-altitude road in Japan was at the summit of Nagano Prefectural Road 84, the Norikura-dake Line.
This location is also known as the highest-altitude bus stop in Japan.

* As of September 1, 2025, traffic restrictions are in place, and general vehicles other than route buses are not permitted to pass (Nagano Prefecture official information).
Comparison with predictions:
Personally, I had predicted that the highest elevation would be at the 5th station of Mount Fuji, but the result was surprising! We were able to obtain accurate analysis results thanks to the database data.
summary
Through this implementation, we were able to demonstrate the following technical strengths:
1. Full-stack support: Consistent development from data preparation to front-end implementation.
2. High-precision data: Utilization of precisely compiled road elevation data
3. Diverse Applications: Supports a wide range of uses, from 3D visualization to statistical analysis.
4. Surveying techniques in challenging environments: Accurate data can be collected even from underground structures where GPS signals cannot reach.
By visualizing complex three-dimensional structures like the Ohashi Junction in 3D, I was reminded that database-generated map data is a valuable asset that goes beyond mere display purposes, providing various analyses and insights.
If you are interested in the map databases used in this project, such as the "road elevation data," please refer to MapFan DB map database.
For inquiries about the map database (MapFan DB), please click here.
Postscript:
While I'm familiar with data analysis and summarizing results in my daily work, writing a technical blog post was a first for me. This article's structure was created with the help of a generative AI!
kayo_chan
Inquiries regarding services for corporate clients
For inquiries, please click here.


