This project is a first try at generating 3D semantized building with geoflow-bundle at scale using IGNF datasets and services.
The working area is an IGNF LIDAR HD block (50kmx50km).
The workflow is inspired by geoflow-bundle approach for generating at scale, also implemented in Optim3D.
The main idea is to build a quadtree based on building footprints, tile the point cloud data accordingly and generate 3D buildings using the generated vector and point cloud tiles.
To speedup the quadtree calculation, the process was implemented here in C++ using GDAL and CGAL.
The building footprints used are those from IGNF BDTOPO reference vector database.
A pre-processing task will be added at some point to make sure the footprints perfectly overlay the point cloud data.
The point cloud date are the newly acquired IGNF LIDAR HD datasets.
The data are tiled and preprocessed to merge the two building classes (class 6 and class 67).
Two options are possible:
- Using IGNF Geoplateforme WFS 2.0.0 limited to 5000 features per query (but offering paging)
- Downloading dataset archives per french department or french region as GPKG files compressed with 7z
In 01_vector_data.sh
the two options are available. WFS is used by default for this example.
Classified LIDAR HD datasets are available in COPC format in an OVH S3 bucket.
Two command line tools can be used to query these COPC files and extract the tiles :
- PDAL by defining a pipeline for each tile
- PDAL wrench an upgraded version of PDAL supporting multi-threading and the use of VPC files.
The two approaches are available in 02_pc_data.sh
. PDAL
is used by default in this example as it seems to be the fastest solution in the first tests.
- As explained here knowing the COPC files to extract from, it is possible to write a pipeline for each tile
- This solution offers the possibility to define all pre-processing tasks in a single pipeline JSON file
- These pipelines can be launched in parallel using
GNU parallel
- PDAL wrench uses a VPC file that indexes all COPC files. This global COPC is not provided by IGNF as of now. A script is provided in this example to create this full VPC
- PDAL wrench
clip
operation is multi-threaded but not themerge
operation. As a result, the optimal way to use this tool would be to launch some operations sequentially and others in parallel.
3D building reconstruction is done with geoflow-bundle.
IGNfab provides additional images Docker to test the different workflows available in geoflow (single, batch, stream). These are the images used in this example.
Building reconstruction tasks are launched in parallel using GNU parallel
This project has been tested with Ubuntu 22.04 running on a CCX53 Hetzner instance with 32 cores.
It requires Docker to run geoflow and Anaconda to get the most out of PDAL.
It requires 700GB of free space to create the necessary point cloud tiles.
First create the conda environment bat3
using conda env create -f environment.yml
then activate it with conda activate bat3
Then three main steps of the workflow can be launched using bash script
01_vector_data.sh
to download vector data, create quadtree and vector tiles (1 to 2 minutes)02_pc_data.sh
to create point cloud tiles based on COPC files in OVH S3 (~2.5 hours)03_reconstruct.sh
to reconstruct 3D buildings with geoflow (~1.5 hours)
The CityJSON results from geoflow can be merged and filtered using cjio if necessary.