Skip to content

Command-Line Interface (CLI) application to automatically correct buildings ground-floor elevation in 3D city models.

License

BSD-3-Clause, Unknown licenses found

Licenses found

BSD-3-Clause
LICENSE
Unknown
COPYING
Notifications You must be signed in to change notification settings

Yarroudh/ZRect3D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

Automatic correction of buildings ground floor elevation in 3D City Models

License Geomatics Unit of ULiege - Development

Command-Line Interface (CLI) application to process and correct buildings ground floor elevation in CityJSON files using ground points from LiDAR data.

The first image shows the results of 3D reconstruction of buildings using GeoFlow, a tool for reconstructing 3D building models from point clouds, fully automated with high-detail. The software requires that the point cloud includes some ground points around the building so that it can determine the ground floor elevation. However, for aerial point clouds, buildings surrounded by others may not meet this condition which may result in inaccurate height estimation above the ground.

image

The second image shows the results of our automatic approach to correct buildings ground floor elevation using ground points from LiDAR data. The correction is based on K-nearest neighbors algorithm (KNN) to find the ground floor neighbors in the ground points of the LiDAR data. Thus, KDTree's structure is used for fast retrieval of nearest neighbors. The elevation is calculated by averaging the heights of these neighboring points. The height difference, which is the difference between the minimum Z-coordinate of the ground floor vertices and the calculated height on the ground, is finally applied to correct the Z-coordinate for all vertices of the ground surface.

image

Installation

The easiest way to install ZRect3D on Windows is to use the binary package on the Release page. In case you can not use the Windows installer, or if you are using a different operating system, you can build everything from source.

Usage of the CLI

After installation, you have a small program called zrect. Use zrect --help to see the detailed help:

Usage: zrect [OPTIONS] CITYJSON POINTCLOUD [OUTPUT]

  Correct the buildings ground floor elevation in a 3D city model [CityJSON]
  using ground points from LiDAR data [LAS/LAZ/PCD/PLY].

Options:
  -l, --lod TEXT          Specify the LoD to correct.  [default: 2.2]
  -d, --differences PATH  Export the list of height differences.  [default:
                          heights.json]

  -k, --knn INTEGER       K nearest neighbors of the lowest vertex to estimate
                          height.  [default: 2000]

  -t, --threshold FLOAT   Height difference threshold to perform the
                          correction.  [default: 0.1]

  --help                  Show this message and exit.

Basic Usage

zrect buildings.city.json pointcloud.las

This corrects the buildings ground floor elevation using the default configuration. The output consists of two files: the first one is named output.city.json which contains a copy of the input CityJSON file data with corrected ground floor elevation for LoD2.2 buildings, and the second one is heights.json which contains the height differences for all the buildings in the 3D city model.

Using Options

zrect buildings.city.json pointcloud.las corrected_buildings.city.json -l '1.3' -k 1000 -t 0.05 -d height_list.json

In this example, we correct the LoD1.3 buildings ground floor elevation using 1000 neighboring points from the LiDAR data to estimate height and a threshold of 0.05 meters to apply correction. The CityJSON file in output is named corrected_buildings.city.json and the list of height differences is height_list.json

Supported CityJSON versions

The application expects that your file is using the latest version CityJSON schema. If your file uses an earlier version, you can upgrade it with the upgrade operator of cjio, CityJSON/io: cjio old.json upgrade save newfile.city.json

Alternatively, any CityGML file can be automatically converted to CityJSON with the open-source project citygml-tools.

Requirements on the Point Cloud

  • Classified, with at least a ground class (scalar field named classification with value 2 for all ground points).
  • Well aligned with the 3D Building Model.
  • Supported formats: .LAS, .LAZ, .PCD and .PLY.

License

This software is under the BSD 3-Clause "New" or "Revised" license which is a permissive license that allows you almost unlimited freedom with the software so long as you include the BSD copyright and license notice in it. Please read the LICENSE and the COPYING files for more details.

About ZRect3D

This software was developped by Anass Yarroudh, a Research Engineer in the Geomatics Unit of the University of Liege. For more detailed information please contact us via ayarroudh@uliege.be, we are pleased to send you the necessary information.

About

Command-Line Interface (CLI) application to automatically correct buildings ground-floor elevation in 3D city models.

Resources

License

BSD-3-Clause, Unknown licenses found

Licenses found

BSD-3-Clause
LICENSE
Unknown
COPYING

Stars

Watchers

Forks

Languages