The Cesium Point Cloud Generator (CPCG) is a small Java-based tool for the generation of point cloud visualization datasets according to Cesium 3D Tiles. By utilizing a local portable SQLite database, it takes 3D point cloud datasets given as XYZ text files (possibly including RGB color information for each point) and generates a 3DTiles point cloud to be used for interactive 3D viewing using the Cesium WebGL Digital Globe. The tool is capable of generating multiple levels of detail to increase viewing performance. The generated point cloud datasets can be visualized in a Cesium-based web client, such as the 3DCityDB Web Map Client.
The tool was developed by our former staff Dr. Zhihang Yao and currently maintained by Son H. Nguyen at the Chair of Geoinformatics, Department of Aerospace and Geodesy, Technical University of Munich.
The project consists of several packages and folders, which are described as follows:
Folder | Description |
---|---|
src | Contains all source codes in Java |
data | Contains sample data used for testing |
lib | Contains Java libraries (*.jar ) required for the project |
viewer | Contains a Cesium instance used for visualizing the generated point clouds stored in viewer/output_data |
-
Download or clone this repository on your local machine:
git clone https://github.com/tum-gis/cesium-point-cloud-generator
-
You can either import the cloned repository in a Java IDE (e.g. Eclipse, NetBeans, etc.) and execute the Main.java class, or you can run the stand-alone CesiumPointCloudGenerator.jar file by double-clicking or using the following command:
java -jar CesiumPointCloudGenerator.jar
-
A window appears, where all the program configurations are shown:
These settings can be configured as follows:
Argument Description Default value Input path Input folder that contains all the source data. The sample data included in this project were converted from LAS/LAZ format, which can be found [here].(https://github.com/mattshax/cesium_pnt_generator) data/sample_xyzRGB_data/small Spatial Reference Identifier (SRID) Defines the SRID of the source data. 2994
Separator character Defines the delimiter character used to separate point coordinates and RGB
color values in each text line.Whitespace (" Color depth Determines the color depth ( 8
or16
bit) per channel in the source data. Color information, if not provided in the source point data, can be retrieved by combining the input point data with available corresponding aerial images using a GIS software (e.g. ArcGIS, FME, etc.). The Cesium Point Cloud Generator tool will then convert the point data source enriched with color information to Cesium 3D Tiles ready to be visualized.16
Height offset Adjusts the height of generated point cloud (blank will be interpreted as 0); the length unit is the same as in the given SRID. -400
Length unit scale factor ( 0.0
-1.0
) for heightsScales the height of generated point cloud between metric unit (meter - 1.0
) and other units (such as imperial units like inch -0.0254
, foot -0.3048
or yard -0.9144
).0.3048
Tile side length Defines the side length (both height and width) of each tile on the highest Level of Details (LoD). The length unit is the same as in the given SRID. 100
Maximum number of points in each tile Determines the maximum allowed number of points in each tile on lower LoDs. If a tile contains more points than this number, its points will be selected randomly until the maximum threshold is achieved. 10000
Output path Output folder that contains the generated point cloud tilesets. viewer/ouput_data -
Click
Export
to start the process. Logs will be shown in the debug area on the right-hand side of the GUI. -
After the export is successfully finish, you can find the generated point cloud tilesets in the output folder previously entered in the GUI. To visualize these in Cesium, start the web client in viewer folder:
cd viewer node server
By default, the web client should be accessible using port number
8080
inlocalhost
, i.e. under the following URL:http://localhost:8080/index.html
Now, the generated point cloud should be visualized in the browser.
The tool has been used to generate point cloud tilesets for many projects, two of which are in Duesseldorf, NRW, Germany and New York City, USA. Layers such as point cloud, 3D building models in KML/COLLADA/glTF converted from CityGML and terrain imagery can be visualized together using the 3DCityDB Web Map Client. The demo URLs and pictures are listed as follows: