city4cfd

Reconstruction of LoD2 3D city models for urban flow simulations

https://github.com/tudelft3d/city4cfd

Science Score: 57.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
    2 of 4 committers (50.0%) from academic institutions
  • Institutional organization owner
    Organization tudelft3d has institutional domain (3d.bk.tudelft.nl)
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.4%) to scientific vocabulary

Keywords

3d-city-models 3d-modelling cfd computational-fluid-dynamics geometry gis spatial urban-reconstruction
Last synced: 6 months ago · JSON representation

Repository

Reconstruction of LoD2 3D city models for urban flow simulations

Basic Info
  • Host: GitHub
  • Owner: tudelft3d
  • License: agpl-3.0
  • Language: C++
  • Default Branch: main
  • Homepage:
  • Size: 177 MB
Statistics
  • Stars: 140
  • Watchers: 12
  • Forks: 23
  • Open Issues: 4
  • Releases: 17
Topics
3d-city-models 3d-modelling cfd computational-fluid-dynamics geometry gis spatial urban-reconstruction
Created over 4 years ago · Last pushed 7 months ago
Metadata Files
Readme Changelog License Citation

README.md

City4CFD

build docs GitHub license

welcome_figure

City4CFD--City for CFD--is a tool that aims to automatically reconstruct high-detailed 3D city geometries tailored for microscale urban flow simulations.

It can automatically create a terrain from a point cloud and imprint different surfaces (e.g. green areas, water, roads).

It enables us to reconstruct buildings from different sources and their combination, such as: - Reconstruction with the combination of 2D polygons and a point cloud, - Extrusion of footprints containing height or floor number attributes, - The import of existing building models.

The reconstruction using the combination of point clouds and 2D polygons can be done in LoD2.2, LoD1.3, and LoD1.2. You can use the complexity factor to tune the overall complexity of the reconstructed geometry.

The resulting geometry is watertight -- buildings and surfaces are seamlessly integrated into a terrain.

It can automatically or manually define the zone of influence and domain boundaries.

If you happen to use it, feedback is very much appreciated.

The LoD2.2 and LoD1.3 reconstructions are based on roofer. If you are interested in applications other than urban flow simulations, or you want to create your own 3D city modelling pipeline, we suggest checking out that project.

City4CFD is developed by the 3D Geoinformation Research Group at the Delft University of Technology.

Data formats

Point clouds can be imported in LAS/LAZ, TXT/XYZ, or PLY format. We ask separately for ground and building points. While some datasets contain building-ground classification, some do not. Our point cloud preparation tool can extract ground and building points from user-defined classes, or use the Cloth Simulation Filter to separate the ground and non-ground points. If you would like to check your points, see if they are classified, or even conduct the filtering and classification yourself, we suggest you use CloudCompare.

2D data (polygons) are imported in GDAL-supported formats. For all pre-processing related to polygons you can use QGIS.

Geometry import supports the following formats: OBJ, STL, PLY, OFF, VTP, and CityJSON.

Output is in the following formats: OBJ, STL, and CityJSON. The ID of each polygon is preserved, and there is a 1-to-1 mapping between the input and the output.

Installation

You can directly compile City4CFD on your system using cmake, run it through a Docker container, or install using Homebrew in the case of macOS.

Build from source

The following libraries are required to build the project: - CGAL >= 6.0.1 - Boost >= 1.66 - Eigen >= 3.3.4 - GMP >= 4.2 - MPFR >= 2.2.1 - GDAL >= 3.0

OpenMP is an optional dependency.

GMP, MFPR, and Eigen are necessary dependencies for CGAL.

Dependencies are generally available in Linux distributions, e.g. in Debian/Ubuntu/Mint: sudo apt-get install libmpfr-dev libgmp-dev libboost-all-dev libeigen3-dev libomp-dev libgdal-dev

CGAL can be directly downloaded from the release page (-library). No install is necessary, only the path to the unzipped folder is required (see below).

In macOS you can install all dependencies with Homebrew:

brew install cmake boost cgal eigen libomp gdal

The project uses CMake to generate makefiles, so make sure it is also installed.

To build City4CFD, do the following: mkdir build && cd build cmake .. -DCGAL_DIR=/path/to/cgal/dir make ./city4cfd In case of Homebrew, you do not have to use the -DCGAL_DIR parameter. You can speed up compilation by typing make -j $numcores where $numcores is the number of threads you can spare for compilation.

Docker

We offer built Docker images for every release, available at the Docker Hub. Running the docker script for the first time will pull the docker image from the Docker Hub repository.

macOS

Mac users can install City4CFD through Homebrew:

brew install tudelft3d/software/city4cfd

Getting started

The folder examples contains example datasets you can run for your first reconstruction. You can run your first reconstruction from the /examples/TUD_Campus folder by typing: mkdir results ../../build/city4cfd config_bpg.json --output_dir results in case of building from a source.

To run through a Docker container, you can use one of the scripts in docker/run/. The script with the extension .sh can be used in Linux and macOS, the one with the extension .ps1 in Windows Powershell, and the last one with .bat in Windows Command Prompt. You have to run a script (you can copy it beforehand) from the root directory of the project (e.g. examples/TUD_Campus), and the arguments are the same as for the compiled executable, e.g.:

../../docker/run/city4cfd_run.sh city4cfd config_bpg.json --output_dir results

The script pulls the latest release from the Docker Hub. For a specific release, replace latest in the script with the released version tag, e.g. 0.1.0. In Linux systems, you will probably have to run the command as a sudo unless you create a 'docker' group and add users to it.

More information on the project can be found in the documentation.

Documentation

The wiki section of this project has details on reconstruction setup and also contains information and suggestions on data preparation.

Citation

If you use City4CFD in a scientific context, please cite the following papers:

Ivan Paen, Clara Garca-Snchez, and Hugo Ledoux (2022). Towards Automatic Reconstruction of 3D City Models Tailored for Urban Flow Simulations. Frontiers in Built Environment, 8, 2022 [DOI][BibTeX]

Ivan Paen, Ravi Peters, Clara Garca-Snchez, and Hugo Ledoux (2024). Automatic high-detailed building reconstruction workflow for urban microscale simulations. Building and Environment, 265, 2024 [DOI][BibTeX]

Acknowledgements

We would like to acknowledge the authors of the supporting libraries we use in this project: CGAL, CSF, GDAL, LAStools, nlohmann/json, valijson

Owner

  • Name: 3D geoinformation research group at TU Delft
  • Login: tudelft3d
  • Kind: organization
  • Location: Delft, the Netherlands

GitHub Events

Total
  • Create event: 20
  • Release event: 4
  • Issues event: 23
  • Watch event: 44
  • Delete event: 16
  • Issue comment event: 29
  • Push event: 52
  • Pull request review event: 2
  • Gollum event: 10
  • Pull request event: 21
  • Fork event: 6
Last Year
  • Create event: 20
  • Release event: 4
  • Issues event: 23
  • Watch event: 44
  • Delete event: 16
  • Issue comment event: 29
  • Push event: 52
  • Pull request review event: 2
  • Gollum event: 10
  • Pull request event: 21
  • Fork event: 6

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 287
  • Total Committers: 4
  • Avg Commits per committer: 71.75
  • Development Distribution Score (DDS): 0.199
Past Year
  • Commits: 65
  • Committers: 3
  • Avg Commits per committer: 21.667
  • Development Distribution Score (DDS): 0.462
Top Committers
Name Email Commits
Ivan Paden i****n@t****l 230
Ivan Pađen 4****n 54
Hugo Ledoux h****x@t****l 2
gsclara g****a@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 21
  • Total pull requests: 17
  • Average time to close issues: 27 days
  • Average time to close pull requests: 7 days
  • Total issue authors: 14
  • Total pull request authors: 2
  • Average comments per issue: 2.57
  • Average comments per pull request: 0.18
  • Merged pull requests: 11
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 11
  • Pull requests: 11
  • Average time to close issues: 7 days
  • Average time to close pull requests: 2 days
  • Issue authors: 6
  • Pull request authors: 2
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.27
  • Merged pull requests: 6
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • wangsen992 (3)
  • monicacc01 (2)
  • RobWilso123 (2)
  • jflsousa (2)
  • LaiaWilson (2)
  • AlvaroManzano (2)
  • ewesterling (2)
  • AkshayPatil1994 (2)
  • dyu62 (1)
  • greole (1)
  • BW-Sampath (1)
  • gsclara (1)
  • catherinegorle (1)
  • ipadjen (1)
  • Xtian-hub (1)
Pull Request Authors
  • ipadjen (18)
  • AkshayPatil1994 (4)
Top Labels
Issue Labels
bug (3)
Pull Request Labels

Dependencies

.github/workflows/build.yml actions
  • actions/checkout v3 composite
.github/workflows/bump-homebrew-formula.yml actions
  • mislav/bump-homebrew-formula-action v2.1 composite
.github/workflows/docker-publish.yml actions
  • actions/checkout v2 composite
  • docker/build-push-action v2 composite
  • docker/login-action v1 composite
  • docker/metadata-action v3 composite
docker/docker-compose.yml docker
  • tudelft3d/city4cfd test-container
.github/workflows/build-docker.yml actions
  • actions/checkout v3 composite
.github/workflows/release-win64-exe.yml actions
  • actions/checkout v3 composite
  • actions/upload-artifact master composite
  • johnwason/vcpkg-action v5 composite
  • softprops/action-gh-release v1 composite
thirdparty/val3dity/Dockerfile docker
  • alpine 3.10 build
tools/polyprep/requirements.txt pypi
  • Rtree ==1.0.1
  • fiona >=1.10b2
  • shapely ==2.0.1