• Stars
    star
    514
  • Rank 83,534 (Top 2 %)
  • Language
    C++
  • License
    GNU General Publi...
  • Created almost 9 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The open-source tool for creating 3D models

GitHub license docs GitHub issues DOI

3dfier

Takes 2D GIS datasets (e.g. topographical datasets) and "3dfies" them (as in "making them three-dimensional") by lifting every polygon to 3D. The elevation is obtained from a point cloud (we support LAS/LAZ at this moment), and the semantics of every polygon is used to perform the lifting. That is, water polygons are extruded to horizontal polygons, buildings to LOD1 blocks, roads as smooth surfaces, etc. Every polygon is triangulated (constrained Delaunay triangulation) and the lifted polygons are "stitched" together so that one digital surface model (DSM) is constructed. Our aim is to obtain one DSM that is error-free, i.e. no intersecting triangles, no holes (the surface is watertight), where buildings are integrated in the surface, etc. This surface will then be used as input in simulation software for instance.

This video illustrates the process and what 3dfier is about.

The lifting options can be configured in the YAML file provided, an example is provided in /resources/config_files/myconfig.yml. Any 2D input (which should be a planar partition) can be used as input, and each class must be mapped to one of the following:

  1. Building
  2. Terrain
  3. Road
  4. Water
  5. Forest
  6. Bridge
  7. Separation (used for walls and fences)

It is possible to define new classes, although that would require a bit of programming.

Output is in the following formats: OBJ, CityGML, CityJSON, CSV (for buildings only, i.e. their ID and height (ground+roof) are output in a tabular format), PostGIS, and STL. The ID of each polygon is preserved, and there is a 1-to-1 mapping between the input and the output.

If you use it, feedback is very much appreciated.

Documentation

The 3dfier documentation has extensive information on the installation, usage, and how 3dfier works.

If you use 3dfier in a scientific context, please cite this article:

Ledoux H, Biljecki F, Dukai B, Kumar K, Peters R, Stoter J, and Commandeur T (2021). 3dfier: automatic reconstruction of 3D city models. Journal of Open Source Software, 6(57), 2866.

DOI

@article{3dfier,
  author = {Ledoux, Hugo and Biljecki, Filip and Dukai, Balázs and Kumar, Kavisha and Peters, Ravi and Stoter, Jantien and Commandeur, Tom},
  doi = {10.21105/joss.02866},
  journal = {Journal of Open Source Software},
  number = {57},
  pages = {2866},
  title = {3dfier: automatic reconstruction of 3D city models},
  volume = {6},
  year = {2021}
}

LAS/LAZ Pointcloud

We expect the LAS/LAZ to be classified according to the ASPRS Standard LIDAR Point Classes v1.4 (Table 4.9 of this PDF), and at a minimum these should be defined:

  • 0-1: Created, never classified and/or unclassified
  • 2: Ground
  • 3-5: Vegetation

If the vegetation is not classified or not filtered out, then buildings might be taller and there might be artefacts in the terrain.

Binary releases for Windows and Mac OS X

In order to make easy use of 3dfier we created pre-build binaries which can be downloaded from the releases page.

Download the latest release and unzip the archive in a easy to find location, not in the download folder of your browser.

To be able to quickly test 3dfier one can download the example dataset and unzip the archive in the folder of 3dfier.

Test data

In the folder example_data (download example dataset) there is a small part of the BGT datasets (2D 1:1k topographic datasets of the Netherlands), and a part of the AHN3 LIDAR dataset that can be used for testing. The resulting model (in OBJ) can be found in example_data/output/test_area.obj

Further, there is an open data website that contains 3D models of a few Dutch cities, generated with 3dfier.

Validate config file

The configuration is stored in YAML format and needs to be valid for the parser to read the file. Config files can be schema validated using YAML Lint

Run 3dfier:

Windows Open a command line (click start and type command or cmd). Using the command line browse to the folder where you extracted the example files and run: 3dfier myconfig.yml -o output.ext

Mac OS X and Linux Open a console. Using the console browse to the folder where you extracted the example files and run: $ ./3dfier myconfig.yml --OBJ output.obj

Docker

3dfier offers a alpine base image which tries to give you as much freedom for your vector data source as possible. Vector data is read by GDAL/OGR.

To run 3dfier over Docker simply execute:

$ docker run --rm --name 3dfier -v <local path where your files are>:/data tudelft3d/3dfier:<tag> 3dfier <name of config file> <... 3dfier parameters>

All your input data needs to be in <local path where your files are> and in the config file you need to reference your input data relative to <local path where your files are>. To achieve this either move your data and config into <local path where your files are> (and subdirectories), or set <local path where your files are> to the lowest common ancestor that contains all the data and config files you need.

Keep in mind that <local path where your files are> need to be writable by any user, otherwise your output won't be saved.

For instance to run it on the example data set (on Linux):

$ cd 3dfier/example_data
$ docker run --rm -it -v 3dfier/example_data:/data tudelft3d/3dfier:latest 3dfier testarea_config_unix.yml --OBJ test.obj

There is also a tutorial on how to generate a 3D model with 3dfier.

Prepare BGT data

For preparing BGT data as input for 3dfier look at resources/BGT_prepare/ReadMe.md

More Repositories

1

Random3Dcity

A basic procedural modelling engine for generating buildings and other features in CityGML
Python
204
star
2

AdTree

Accurate, detailed, and automatic modelling of laser-scanned trees
C++
157
star
3

City3D

Large-scale LoD2 Building Reconstruction from Airborne LiDAR Point Clouds
C++
126
star
4

prepair

Automatic repair of single polygons (according to the OGC Simple Features / ISO19107 rules) using a constrained triangulation.
C++
111
star
5

masbcpp

C++ implementation of the Medial Axis Shrinking Ball algorithm
C++
103
star
6

terrainbook

"Computational modelling of terrains" book: source code + PDF
TeX
95
star
7

CityGML2OBJs

An experimental utility to convert CityGML data to OBJ, featuring decoupling of objects and conversion of attributes to colours
Python
93
star
8

val3dity

Validation of 3D primitives according to the international standard ISO19107
C++
91
star
9

azul

3D city model viewer for Mac
C++
89
star
10

ifc2citygml

Automatic conversion of IFC models 2x3 to CityGML LOD 1/2/3/4
C++
70
star
11

City4CFD

Reconstruction of 3D city models for urban flow simulations
C++
64
star
12

pprepair

Validation and Automatic Repair of Planar Partitions
C++
57
star
13

3DCityDB-Tools-for-QGIS

This repository contains code of a QGIS plugin that facilitates data handling of the CityGML 3D City Database.
PLpgSQL
52
star
14

masbpy

Medial Axis Shrinking Balls - Python implementation of the Shrinking Ball algorithm to construct the Medial Axis Transform
Python
49
star
15

Solar3Dcity

An experimental utility to estimate the yearly solar irradiation of roof surfaces in CityGML
Python
48
star
16

3D_Urban_Mesh_Annotator

A tool for annotating textured urban meshes
C++
38
star
17

3d-building-metrics

Tool to compute shape metrics from 3D geometries for buildings
Jupyter Notebook
32
star
18

SUMS-Semantic-Urban-Mesh-Segmentation-public

SUMS: Semantic Urban Mesh Segmentation.
Python
25
star
19

website

Website for the group
HTML
25
star
20

3dbag-viewer

Vue
22
star
21

PSSNet

PSSNet: Planarity-sensible Semantic Segmentation of Large-scale Urban Meshes
C++
21
star
22

msc_geomatics_thesis_template

A template for the TU Delft MSc Geomatics thesis (P4+P5)
TeX
13
star
23

lod2plus

Automatic generation of simple interiors for CityGML LOD2
C++
13
star
24

indoorjson

IndoorJSON is like IndoorGML but without the GML
Python
11
star
25

geogeeks

The place where geogeeks go to know "how to do X"
HTML
11
star
26

IfcLocator

JavaScript
10
star
27

Roofline-extraction-from-orthophotos

Roofline extraction from orthophotos
C++
9
star
28

bag3d

Software for generating a 3D version of the BAG dataset and more. Python + PostgreSQL + 3dfier
Python
9
star
29

esri_geobim

C++
8
star
30

prepair-qgis

QGIS plugin for prepair
Python
8
star
31

CityGML-schema-validation

small script to validate a CityGML file against the XSD schemas of CityGML (all versions supported)
Python
7
star
32

3dbook

Book for the course GEO1004: 3D modelling of the built environment
TeX
6
star
33

CityJSON2glTF

An experimental python utility to convert CityJSON datasets to glTF 2.0 and schematically validate glTF datasets
Python
5
star
34

cityjson-versioning-prototype

A prototype implementation of interaction with versioned CityJSON files
Python
5
star
35

geo1101.2020.ahn3

An improved AHN3 gridded DTM/DSM done as university project for the MSc Geomatics @ TU Delft
Python
5
star
36

cityjsonToRevit

A plugin for importing CityJSON geometries to Autodesk Revit
C#
5
star
37

city2InfraGML

An experimental python utility to convert CityGML datasets to InfraGML and vice versa.
Python
5
star
38

carriageways-creator

Carriageways Creator
Jupyter Notebook
4
star
39

val3ditypy

Python bindings for the award-winning val3dity software
C++
4
star
40

geovalidation.server

Web server for val3dity/prepair
HTML
4
star
41

Random3DTIN

A python utility to generate terrain models at different LODs in CityGML.
Python
3
star
42

CityGML-QIE-3Dvalidation

repository for the test datasests for the OGC CityGML QIE Experiment #2: 3D geometric validation
HTML
3
star
43

ocm-downloader

A script to download the data of opencitymodel
Python
3
star
44

geo1004_handouts

Handouts for the course GEO1004: 3D modelling of the built environment
TeX
3
star
45

geo2020

Website for the MSc Geomatics graduation thesis (GEO2010+GEO2020)
CSS
3
star
46

geoflow-nodes

Various nodes for geoflow
C++
2
star
47

eNoiseModel

Data model for standardising the input/output data for noise simulations using CNOSSOS-EU
2
star
48

Testbed4UBEM

A Repository of an Urban Energy Modeling testbed based on the OGC CityGML v2.0 standard
2
star
49

valsem

Validation of the semantic of CityGML LOD2 (based on normal orientations)
C++
2
star
50

3dgeoinfo2018

Website for the 3D Geoinfo 2018 conference
HTML
2
star
51

homebrew-software

homebrew formulas for some of our software
Ruby
2
star
52

isochrones-mexico

C++
2
star
53

Symmetrization

C++
2
star
54

matahn

Download tool for AHN2 that delivers a LAZ file with the points inside a bounding box drawn by the user.
Python
2
star
55

git-course-material

TeX
2
star
56

latex-getting-started

Quick LaTeX course
TeX
1
star
57

website-3d4em

Source code for
HTML
1
star
58

InfraJSON

JSON encoding for LandInfra Conceptual Model 1.0.0
Python
1
star
59

EnergyADEv1_toCityGMLv3

This repository contains the work for mapping the Energy ADE v1.0 to the CityGML v3.0 data model
1
star
60

3D_Metadata_ADE

CityGML ADE for storing metadata about the 3D city models.
Python
1
star
61

citygml-solidifier

takes a CityGML file with Buildings stored as gml:MultiSurfaces and creates gml:Solids
Python
1
star
62

citygmlinfo

Prints out all sort of useful information about a CityGML file
C++
1
star
63

nl3d

XSLT
1
star
64

city3d_valpy

citygml valid
Python
1
star
65

abe-latex

LaTeX template for the TU Delft A+BE PhD thesis series
TeX
1
star
66

cityjson-lcc-reconstructor

A tool to topologically reconstruct a CityJSON model
C++
1
star
67

citygml2poly

Converts the solids of a CityGML file to POLY files.
Java
1
star