Coder Social home page Coder Social logo

tudelft3d / 3dfier Goto Github PK

View Code? Open in Web Editor NEW
526.0 42.0 106.0 56.27 MB

The open-source tool for creating 3D models

Home Page: http://tudelft3d.github.io/3dfier

License: GNU General Public License v3.0

CMake 0.58% C++ 89.17% Batchfile 1.56% Python 1.61% Shell 2.46% Dockerfile 3.69% TeX 0.93%
3dgis gis citygml lidar laz cityjson yaml-cpp 3d

3dfier's Introduction

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

3dfier's People

Contributors

arfon avatar athelena avatar balazsdukai avatar dependabot[bot] avatar evetion avatar fbiljecki avatar hugoledoux avatar ipadjen avatar kalleblomquist avatar kdeininger avatar kenohori avatar liberostelios avatar rohangautam avatar tcommandeur avatar vvmruder avatar ylannl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

3dfier's Issues

Question about building 3dfier on Windows 10 and with Visual Studio Community 2015

Hi, I am trying to build the 3dfier with CMAKE. On Windows 10 and with Visual Studio Community 2015. When building in Visual Studio I get an error message related to Boost. Boost is one of the components I don't have much experience with, so perhaps anyone can give a clue ?

Error LNK1104 cannot open file 'boost_thread-vc140-mt-1_62.lib

Greetings,

Barent Brouwers

http://www.3dgeosolutions.nl/

Hoi, ik probeer de 3dfier te bouwen met CMAKE. Op Windows 10 en met Visual Studio Community 2015. Daarbij krijg ik een foutmelding die met Boost te maken heeft. Het project 3dfier heeft voor mij sowieso een aantal nog onbekende componenten. Visual Studio geeft de volgende melding:
Error LNK1104 cannot open file 'boost_thread-vc140-mt-1_62.lib

Enable creating LOD0 models

It would be good to have an option that instead of block models, only the footprints are generated, and stitched with the terrain.

Duplicate config options to triangulate buildings

I've just compiled from master. In the config file myconfig.yml the building triangulation can be set in two places, do they set the same parameter? If yes, i assume one overwrites the other?

lifting_options: 
  Building:
    triangulate: true

buildings:
  triangulated: false

Incompatibility GDAL/OGR 2

see:

[ 25%] Building CXX object CMakeFiles/3dfier.dir/Map3d.cpp.o
/home/rypeters/git/3dfier/Map3d.cpp: In member function ‘bool Map3d::add_polygons_file(std::string, std::string, std::vector<std::pair<std::basic_string<char>, std::basic_string<char> > >&)’:
/home/rypeters/git/3dfier/Map3d.cpp:87:31: error: ‘Open’ is not a member of ‘OGRSFDriverRegistrar’
   OGRDataSource *dataSource = OGRSFDriverRegistrar::Open(ifile.c_str(), false);
                               ^
/home/rypeters/git/3dfier/Map3d.cpp:93:46: warning: ‘static void OGRDataSource::DestroyDataSource(OGRDataSource*)’ is deprecated (declared at /usr/local/include/ogrsf_frmts.h:245) [-Wdeprecated-declarations]
   OGRDataSource::DestroyDataSource(dataSource);
                                              ^
/home/rypeters/git/3dfier/Map3d.cpp: In member function ‘bool Map3d::add_polygons_file(std::string, std::string, std::string)’:
/home/rypeters/git/3dfier/Map3d.cpp:144:31: error: ‘Open’ is not a member of ‘OGRSFDriverRegistrar’
   OGRDataSource *dataSource = OGRSFDriverRegistrar::Open(ifile.c_str(), false);
                               ^
/home/rypeters/git/3dfier/Map3d.cpp:157:46: warning: ‘static void OGRDataSource::DestroyDataSource(OGRDataSource*)’ is deprecated (declared at /usr/local/include/ogrsf_frmts.h:245) [-Wdeprecated-declarations]
   OGRDataSource::DestroyDataSource(dataSource);
                                              ^
make[2]: *** [CMakeFiles/3dfier.dir/Map3d.cpp.o] Error 1
make[1]: *** [CMakeFiles/3dfier.dir/all] Error 2
make: *** [all] Error 2

ONLY BUILDING...

HELLO,
When I run 3D fier on 2 classified pointcloud + shp 3DFIER returns only building in 3D...without DTM triangulation (?)
see below my LAZ input :
capture

and see the result in meshlab :
capture1
My source shp is well extruded, but terrain is missing...

any idea why ?
thanks
antoine

OBJ export broken?

Hi, after Tom's talk at the 3D Symposium earlier this week I decided to give 3dfier a go. With the included example_data CityGML output is generated correctly, but when I change the format to OBJ in the yaml file 3dfier crashes. I did a bit of debugging and it seems that in Map3d::get_obj_per_feature(int) one of the keys in thepts is the empty string in my case. This causes std::stof to raise an exception, as it can't convert anything. I added a check to skip the empty string (see patch below), but although I now get an output OBJ file it doesn't seem to be correct (and doesn't load in e.g. MeshLab). Some faces use vertex indices that are out of range. I.e.

$ ../build/3dfier testarea_config.yml > out.obj
...
$ grep "^v " out.obj |wc -l
14608     # valid vertex indices 1..14608
$ tail out.obj 
f 9460 9459 14598
f 14598 9459 14606
f 9951 9460 14608
f 14608 9460 14598
f 14094 9952 14609 <<< out of range
f 14609 9952 9951 <<< out of range
f 14609 9951 14608 <<< out of range
f 14095 14094 14610 <<< out of range
f 14610 14094 14609 <<< out of range

This is on Arch Linux, 64-bit, GCC 6.2.1.

diff --git a/Map3d.cpp b/Map3d.cpp
index a2193e3..ec6cc72 100644
--- a/Map3d.cpp
+++ b/Map3d.cpp
@@ -198,6 +198,8 @@ std::string Map3d::get_obj_per_feature(int z_exaggeration) {
   ss << "mtllib ./3dfier.mtl" << std::endl;
   ss << std::setprecision(3) << std::fixed;
   for (auto& p : thepts) {
+    if (p.length() == 0)
+        continue;
     ss << "v ";
     ss << (std::stof(p.substr(0, p.find_first_of("/")))) / 100 << " ";
     ss << (std::stof(p.substr(p.find_first_of("/") + 1, p.find_last_of("/")))) / 100 << " ";

ERROR: Missing polygon data, cannot 3dfy the dataset, abording

Hello,
I was starting 3Dfier on a simple dataset. I only extracted buiding outlines from a photogrammetric stereoplotting and prepared a SHP (polygons).
capture

Then I changed "config.yml" to match that shp and LAZ file.
However I have an issue with the shp file, console returns the following message:
capture2

In order to make it clear I tested with 3dfier-master\example_data, namely ahn3 & BGT.
Still the same issue in the console
Do you have any idea of the cause of that issue ?

Thanks,

antoine

3dfier says "Config file is valid" but get yaml-cpp error

On v0.9.7 when running with the config below, I get the following error:

Reading config file: mytestarea_config.yml
Config file is valid.
terminate called after throwing an instance of 'YAML::TypedBadConversion<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
  what():  yaml-cpp: error at line 0, column 0: bad conversion
Aborted

I noticed that it is due to the empty input_polygons: height_field: argument. When I delete or comment out the argument, 3dfier runs without error.

mytestarea_config.yml

input_polygons:
  - datasets: 
      - /example_data/t_25gn1_c2.sqlite
    uniqueid: identificatie
    lifting: Building
    height_field: 

lifting_options: 
  Building:
    height_roof: percentile-90
    height_floor: percentile-10
    lod: 1

input_elevation:
  - datasets:
      - /example_data/c_25gn1_b.laz
    omit_LAS_classes:
      - 1 
    thinning: 0

options:
  building_radius_vertex_elevation: 3.0
  radius_vertex_elevation: 1.0
  threshold_jump_edges: 0.5

output: 
  format: OBJ
  building_floor: false
  vertical_exaggeration: 0

Installation step for step

Hi!
Thanks for this free solution!
I would appreciate a lot som help with the installation! I am trying to install 3dfiler on Windows 10, 64bit and I dont know how to continue from here:

  • Compile your own copies of Yaml-cpp and CGAL (How to compile these??
  • Set the path to the include folders in Project->C/C++->General->Additional Include Directories (Where to set the path? on Windows enviroment?)
  • Set the path to the boost binaries in Project->Linker->General->Additional Library Directories (Where to set the path? on Windows enviroment?)
  • Set the path to other libraries in Project->Linker->Input->Additional Dependencies (Where to set the path? on Windows enviroment?)
  • Build solution (with Make i guess?)
    Thank you for your time!
    Abel

3dfier has stopped working on windows 10

Hello
3dfier has stopped under windows 10.
When the application is launched, a message appears with the reading of the configuration file:
input_polygons:

  • datasets:
    • k:/3dfier-windows-x64-v0.9.7/data/brindas_3946_b.shp
      uniqueid: osm_id
      lifting: Building

input_elevation:

  • datasets:

    - /Users/elvis/data/top10nl/schie/ahn2_u.laz

    - /Users/elvis/data/top10nl/schie/ahn2_g.laz

    - k:\3dfier-windows-x64-v0.9.7\data\1832_5170.laz

    • k:/3dfier-windows-x64-v0.9.7/data/1830_5171.laz
      #- k:\3dfier-windows-x64-v0.9.7\data/1831_5169.laz
      #- k:\3dfier-windows-x64-v0.9.7\data/1831_5170.laz
      #- k:\3dfier-windows-x64-v0.9.7\data/1832_5169.laz
      #- k:\3dfier-windows-x64-v0.9.7\data/1832_5171.laz
      #- k:\3dfier-windows-x64-v0.9.7\data/1831_5171.laz

    omit_LAS_classes:

    • 1 # unclassified
      thinning: 1

lifting_options:
Building:
height_roof: percentile-95
height_floor: percentile-10
triangulate: true
building_radius_vertex_elevation: 3.0
radius_vertex_elevation: 1.0
threshold_jump_edges: 0.25

output:
format: CityGML # OBJ-NoID, OBJ-BUILDINGS, CityGML, CSV-BUILDINGS or Shapefile
building_floor: false
vertical_exaggeration: 3

buildings:
horizontal_floor: true
triangulated: false

Installation problem on Ubuntu: LibLAS library can't be found

Hi,

I follow instructions for compiling on Linux but I can't make it work on my Ubuntu 14.04 because whenever I try to execute cmake .. command it complains about LibLAS library not being found even though it is already installed on the same system (i used that library already before and it works fine). All the other dependencies were found normally, it's only liblas that makes the problem.

I even tried to install again all dependencies (including libLAS) on new fresh Ubuntu 16.04 virtual machine (with no previous installations) but still, after i install all required dependencies and then try to build 3dfier it still complains about the same library.

Do you maybe know why is that, I was following this documentation to install the libLAS, everything looked fine with that.

Missing attributes and geometry in IMGeo GML

Hi,
Looking at the first and last cityobjectmember in: https://3d.bk.tudelft.nl/download/3dfier/Delft.imgeo.zip
I noticed several attributes missing that have not been transferred from the BGT:

Note that I only looked at two objects, so more attributes from other IMGeo classes are likely to be missing too.

Error: missing height field

Dear all,
I get the following error at the beginning of the 3dfying:

ERROR: field 'hoogtenive' not found in layer 'buildings_overground', using all polygons.
Layer: buildings_overground
(6,779 features --> Building)

A result is generated but the result is missing 3D heights, obviously.

3dfier build as 0.9.7 on macOS

Thanks in advance,
Christian

TODO from Kadaster

Trekker Kadaster

  • Klassificiatie vegetatie (Trekker BertJan)
  • Vergelijking input: AHN3 versus point cloud (PC):
  • 3DBGT-AHN3
  • 3DBGT-PC interpolated
  • 3DBGT-PC non interpolated
  • FME workflow om voor conversie van 3Dfier OBJ met object id’s naar benodigde input voor Kadaster visualisatie workflow en eventueel CityGML
  • Uitzoeken uitvoer/opslag formaat
  • Opschalen naar Nederland
  • Onderzoek naar aansluiten BGT LOD0 voor combinatie met LOD2 BAG Panden
  • test p(p)repair for fixing BGT (prepair: https://github.com/tudelft3d/prepair/releases/tag/v0.7.1)
  • Controleren of aangrenzende polygonen van aanliggende tiles goed aansluiten in hoogte
  • Configuratie van LAS classes in YAML per object klasse nalopen

Trekker TUDelft

  • fix the bug with buildings not connected to ground in CityGML output -> triangulate buildings
  • Make the roads outlier detection angle configurable
  • Merge and clean current branches and make release v1.0 RC1
  • Create PostGIS-IMGeo output
  • Error handling TIN greedy insertion code
  • Testing of road outlier filtering
  • multiple outputs --> tclap
  • compile p(p)repair for Windows
  • Make the roads "flatter" and less bumpy with outlier detection
  • Verbeteren van de implementatie voor bruggen en overpassen
  • Stabiele versie waarmee Kadaster vergelijking kan uitvoeren
  • Update van Readme en input parameter beschrijving
  • Controleren welke waarde gebouwen krijgen waarvoor geen hoogte is gevonden
  • Segmentation Fault (core dumped) in CDT voor grote hoeveelheid punten
  • Uitwerken van LOD0 functie, gebouwen met alleen vloeren
  • Uitwerken van LOD1 functie, gebouwen als solids
  • 3D IMGeo specificaties verfijnen, verbeteren, aanvullen
  • Onderzoeken van belangen in verschillende attribuutdata binnen eenzelfde klasse (bijv. wegdek, parkeerplaats, parkeerdek en bijv basin in OverigeBouwwerken)
  • Testen op fouten in waterdichtheid van modellen
  • Output naar CityGML

Whishlist

  • Excluding of LAS classes in YAML besides including

Improve YAML validation

While most of the YAML file is validated before the processing is performed, if one omits the building_floor attribute in the YAML file, 3dfier will still crash before it has written the output. Potentially after hours of processing 😐.

I am guessing this line is the culprit (ie. trying to convert a non existing element to string).

OBJ output with missing walls and floor

I've just compiled 3dfier from the master branch and trying to generate an OBJ model but for a couple of buildings the walls are not created, and the floor is missing for all buildings. Although I did set building_floor: true in the config, and the point cloud contains all the point classes. I've tried several settings for these variables:

lifting_options: 
  Building:
    height_roof: percentile-50
    height_floor: percentile-10
    triangulate: true

options:
  building_radius_vertex_elevation: 1.0
  radius_vertex_elevation: 0.5
  threshold_jump_edges: 0.25

buildings:
  horizontal_floor: false
  triangulated: true

The same configuration, but with CityGML output yield correct result (walls & floors included).

See my config and input for the OBJ: https://www.dropbox.com/s/2r6xkpp9e22esaa/3dfier_obj.zip?dl=0

cloud
no-floor
no-walls

Issues with extruding land, vegetation and water

I followed along with the tutorial and created the city center of Leiden. Afterwards I wanted to try to create my own project by creating a small part of the harbor of Rotterdam.

I grabbed the BGT data and the AHN3 files from the PDOK website. Specifically I took the area with the code '37az2' at the far west of the Rotterdam harbor -- this was the AHN3/LAZ data. The problem I run into with building my model is that I'm only getting the buildings extruded.

I added a picture of my result. As you can see, there are no roads, vegetation, land or water visible. This is a problem. I added a dark grey plane underneat the city/buildings to make it more visible to show the issue.

  • Kenny

Does not compile on 10.11 with homebrew dependencies

Dear all,
I tried to compile 3dfier 0.82 without success. I did install dependencies with homebrew.
What I get is:

$ cmake ..

-- The C compiler identification is AppleClang 8.0.0.8000042
-- The CXX compiler identification is AppleClang 8.0.0.8000042
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   locale
--   chrono
--   system
--   filesystem
-- Found GDAL: /usr/local/Cellar/gdal2/2.1.2/lib/libgdal.dylib  
-- Searching for LibLAS + library
-- Searching for LASzip + library
-- Found YAMLCPP: /usr/local/include  
-- Build type: Release
-- USING CXXFLAGS = ' -DNDEBUG'
-- USING EXEFLAGS = ' '
-- Targetting Unix Makefiles
-- Using /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ compiler.
-- DARWIN_VERSION=15
-- Mac Leopard detected
-- Requested component: MPFR
-- Requested component: GMP
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/cbraun/src/3dfier-0.8.2/build
ERIN-CBA-02511:build cbraun$ make
Scanning dependencies of target 3dfier
[  7%] Building CXX object CMakeFiles/3dfier.dir/main.cpp.o
In file included from /Users/cbraun/src/3dfier-0.8.2/main.cpp:39:
/Users/cbraun/src/3dfier-0.8.2/Map3d.h:62:33: error: extra qualification on member
      'get_bounds'
  liblas::Bounds<double> Map3d::get_bounds();
                         ~~~~~~~^
1 error generated.
make[2]: *** [CMakeFiles/3dfier.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/3dfier.dir/all] Error 2
make: *** [all] Error 2

Any ideas?
Many thanks in advance
Christian

many-outputs: CSV option is ambiguous

Tried:

$ 3dfier 25gn_many-outputs.yml --CSV 25gn.csv --CityGML 25gn.gml --PostGIS 25gn.sql

Got:

Error: option '--CSV' is ambiguous and matches '--CSV-BUILDINGS', '--CSV-BUILDINGS-ALL-Z', and '--CSV-BUILDINGS-MULTIPLE'

The config contains:

lifting_options: 
  Building:
    height_roof: percentile-90
    height_floor: percentile-10
    lod: 1

output: 
  building_floor: true
  vertical_exaggeration: 0

invalid OBJ/GML output?

The OBJ/GML output might still has some issues in v0.96 (as also described in #20 ). It appears that the included example files (testarea.obj/gml) are already invalid and I cannot open them in FME or Blender due to parsing errors, also val3dity confirms the invalidity: 102, 104, 301, 302 (in case of testarea.obj). The output that I generate from the example data sets are also invalid with the same errors.

Meshlab can open the OBJ without problems.

I'm running Ubuntu 16.04, GDAL 2.1.0, liblas 1.8.1, laszip 2.2.0, yaml-cpp 0.5

Slow performance due to invalid polygons

When generating Amsterdam and a version of Zwolle the processing time increased exponentially, possibly due to invalid geometries. The invalid geometries can come from clipping/faulty conversion. In the case of the Amsterdam data ogr2ogr showed self-intersections in polygons.

Can we check and flag the polygons for validity using GDAL isValid() when reading?

build error due to missing ogrsf_frmts.h

I'm trying to build on the master, wip-tinsimp or wip-tinsimp-greedyinsertion branch but I get the following error:

/3dfier/build $ make

[  7%] Building CXX object CMakeFiles/3dfier.dir/main.cpp.o
In file included from /home/bdukai/Development/3dfier/main.cpp:36:0:
/home/bdukai/Development/3dfier/definitions.h:13:25: fatal error: ogrsf_frmts.h: No such file or directory
compilation terminated.
CMakeFiles/3dfier.dir/build.make:62: recipe for target 'CMakeFiles/3dfier.dir/main.cpp.o' failed
make[2]: *** [CMakeFiles/3dfier.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/3dfier.dir/all' failed
make[1]: *** [CMakeFiles/3dfier.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Don't know what does ogrsf_frmts.h do, but am I supposed to have it on my system?

segmentation fault on wip-tinsimp-greedyinsertion

@Ylannl I'm trying the wip-tinsimp-greedyinsertion branch but I get a segmentation fault at:

Lifting all input polygons to 3D...
===== /LIFTING =====
===== LIFTING/ =====
=====  /ADJACENT FEATURES =====
=====  ADJACENT FEATURES/ =====
=====  /STITCHING =====
=====  STITCHING/ =====
=====  /BOWTIES =====
=====  BOWTIES/ =====
=====  /VERTICAL WALLS =====
=====  VERTICAL WALLS/ =====
=====  /CDT =====
[1]    25000 segmentation fault  3dfier  -o

Here are the files that I used: https://www.dropbox.com/s/6fyuevloj4j0jsx/segfault.zip?dl=0

3dfier.exe crashes after execution

Hello,
this post is following #35
tips and correction have been made, but 3dfier is crashing after execution of the command.
My laz files are 300Mo & 210Mo.
Is it too big ?

thanks,
antoine

Minimum nr. of points for triangulation

On master.
I have a point cloud where I separated the ground (2) points from the rest and filtered them. When I run 3dfier with the filtered ground points, the terrain is not generated/triangulated and it seems that the input polygons for the road (grey), terrain (yellow) features are ignored. However, the 'Auxilliary Traffic Area' (purple) polygons do receive points and get triangulated. Is there a minimum of the required points for the triangulation?

I'm using thinning: 0 for the point cloud and simplification: 0 for the terrain.
I'm using BGT polygons and prepared them according to the instructions.

3dfy with unfiltered point cloud:
full

The filtered point cloud (only the ground points are filtered):
pc

3dfy with the same settings as above, but with the filtered pc:
simplified

Input and config files:
https://www.dropbox.com/s/hiwazpyj0k30kbe/simplified.zip?dl=0

Generating geometric attributes in CityGML

CityGML foresees various attributes that can be computed from the geometry, and that are available in some open datasets (e.g. Rotterdam, Den Haag). It would be nice to have them generated by 3dfier, since it anyway computes the same stuff to generate the 3D model. For example, bldg:measuredHeight.
Additional ideas for the attributes:

  • absolute elevation of the top surface of the building and other features
  • absolute elevation of the bottom (terrain height)
    These two are available in the CSV output, so it would be great to have them stored in CityGML too.

Print 'MultiPolygon split into 1 Polygons' only once

When the input polygons are MultiPolygons they are split in to single poly and this operation is printed to the console for each polygon. For hundreds, thousands of polygons this clutters the console quite a bit. Would it be possible to print this info only once?

Reading input dataset: ./bgt_pand.gpkg
ERROR: field 'hoogtenive' not found in layer 'BuildingPart', using all polygons.
	Layer: BuildingPart
	(5,716 features --> Building)
	(MultiPolygon split into 1 Polygons)
	(MultiPolygon split into 1 Polygons)
	(MultiPolygon split into 1 Polygons)
	(MultiPolygon split into 1 Polygons)
	(MultiPolygon split into 1 Polygons)
	(MultiPolygon split into 1 Polygons)
	(MultiPolygon split into 1 Polygons)
	(MultiPolygon split into 1 Polygons)
	(MultiPolygon split into 1 Polygons)
        ...

Segmentation fault on ubuntu

While fixing/working around issue #2, I stumbled upon a yet another problem on ubuntu. When executing ./3dfier a segmentation fault happens:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6dede10 in boost::math::lanczos::lanczos_initializer<boost::math::lanczos::lanczos17m64, long double>::init::init() ()
   from /usr/lib/liblas.so.2

Possibly caused by not compiling 3dfier and all its dependencies that use boost with c++11 support (see this for instance)

Fix vertex height set to -9999

When applying simplification in terrain or forest classes some boundary vertices are set to -9999 even though there are ground points within radius.

Without simplification:
less_wrong_heights

With simplification:
wrong_heights

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.