Custom LIDAR data and Cesium
Cesium is a platform for 3D Geospatial data and software applications designed to unleash the power of 3D data. It is mainly the (open source) JavaScript library, 3D data publishing portal, and a private company, which is developing the whole platform.
The platform allows to display and interaction with 3D geospatial data, which can be buildings, terrain data, or point clouds (e.g. created with lidar).
MapTiler is providing global terrain 3D data tiles, which can be used along with the CesiumJS library to present the maps in the 3D context.
Custom LIDAR data data
They are usually stored in LAZ or LAS data formats in form of so-called point clouds. For your approach, we need the LAS format as input. The LAS file will later be converted to Cesium 3D tiles file structure.
LAZ to LAS
The LAS (LASer) format is a file format designed for the interchange and archiving of lidar point cloud data. It is an open, binary format specified by the American Society for Photogrammetry and Remote Sensing (ASPRS). The format is widely used and regarded as an industry standard for lidar data.
LAZ is just compressed (zipped) LAS file without information loss.
To convert between LAZ and LAS formats, we can you the PDAL library and tools. PDAL project is very similar to GDAL so the command used for data transformation should seem known.
$> pdal translate file.laz file.las
LAS can be rendered in QGIS using the Point Cloud data input.
And after setting it up, it can be also displayed in the 3D view.
LAS to Cesium 3D tiles format
Cesium 3D tiles is open specification, which can be used for storing 3D data of buildings, trees, point clouds, and vectors.
For converting the data into Cesium 3D tiles, there are various tools around. We made good experience with the gocesiumtiler project. The runtime requires Go language. To covert the LAS file to 3D tiles structure, you should run
$> mkdir 3dtiles
$> gocesiumtiler -srid 3045 -input file.las -output 3dtiles
Adding 3D data to Cesium web application
If you have already Cesium web application running, you can easy add 3DTileset:
// javascript
import {Cesium3DTileset} from 'cesium';
var lidar = new Cesium3DTileset({
url: "http://server/3dtiles3/tileset.json"
});
...
viewer.scene.primitives.add(lidar);
...
Example running at https://labs.maptiler.com/samples/cesium/custom-lidar
Conclusion
As result, we are now able to display a custom lidar dataset on the MapTiler quantized-mesh surface. The main task is, to convert the input LAS dataset into 3D tiled format specification. For this, an external tool gocesiumtlier can be used.
Useful links
Cesium Webpack example
Cesium 3D tiles generator
PDAL project
Quantized mesh specification
3D tiles specification
Related guides
- Custom LIDAR data and Cesium
- Global RGB bathymetry tileset
- How to build an ocean vector bathymetry map with MapTiler
- How to edit your vector data in MapTiler Cloud
- How to host your own geodata
- How to publish your geodata
- How to upload MBTiles or GeoPackage into MapTiler Cloud using API
- Japan maps in MapTiler Cloud
- Maps, Tiles, Data: What are they and how do they differ?
- MapTiler Cadastre dataset