Closed LaiaWilson closed 9 months ago
Just as in https://github.com/tudelft3d/City4CFD/issues/13#issuecomment-1872250931, you have to make sure that the local coordinate system, typically defined by points, is aligned with the local coordinate system of your polygons. You have more information on this alignment in the wiki.
The link to the files:
The link to the files:
Hello, I'm missing a point cloud to be able to check the reconstruction.
I could not get it uploaded.
https://drive.google.com/drive/folders/1JrViFP3ZPVn7vmymEtIdZLFC72R3O9yc?usp=sharing
It appears that the point cloud has been shifted to some sort of a local coordinate system and thus is not overlapping with polygons. It would be beneficial to know how that shift happened. Was AHN3 the original input or you obtained the point cloud like that?
I got it from PDOK and then created the point clouds inputting the data on meshlab.
It looks like meshlab shifted coordinates to local values to avoid precision error (coordinates are rather large numbers) and you ended up storing them in those coordinates. You can check the extent of both (polygons in QGIS and point cloud in meshlab) and see that they are vastly different -- point cloud values are around 0 (from -400 to 400).
Something like CloudCompare or lastools (more specifically lasmerge and las2las) are better options for handling a point cloud. Even more so because you can store your manipulation back in .laz, load it directly into QGIS, and check if the point cloud and polygons overlap. Lastools is also great because you can easily thin the point cloud to meet your memory capabilities.
Here, I took the liberty to quickly fetch the point cloud (using coordinates from polygons) and create thinned ground and buildings from it: https://surfdrive.surf.nl/files/index.php/s/ndrwgLt6LbJ20wc
Also, you point of interest had wrong coordinates. I used Value Tool in QGIS (it's a plugin) to define it -- check the lower left corner of the screenshot (135517.421, 452966.668) -- those are the numbers I got once I clicked roughly in the center of your polygons.
You can also see the way my .laz point cloud and your polygons nicely overlap.
Any update on this?
This what I get in the Ubuntu terminal. I'm really desperate with the use of this program, can someone help me out?????????
This is what the output file looks like, as you may understand it shouldn't be like this:
wilai@Laias-Laptop:~$ ~/City4CFD/build/city4cfd /home/wilai/config_bpg.json --output_dir /home/wilai/results
City4CFD Copyright (C) 2021-2023 3D Geoinformation Research Group, TU Delft
Work directory: "/home/wilai"
Validating JSON configuration file...Configuration file is valid!
INFO: Did not find any ground points! Will calculate ground as a flat surface. WARNING: Ground elevation of buildings can only be approximated. If you are using point cloud to reconstruct buildings, building height estimation can be wrong.
Reading building points Points read: 1691666 Reading polygons Reading polygon file: /home/wilai/files_city4CFD/real_buildings.geojson type: GeoJSON CRS information: EPSG code: 3857 Polygons read: 6436
Creating flat terrain Smoothing terrain Smoothing terrain...done
Attaching point cloud points to buildings
Defining influence region Number of building geometries in the influence region: 62
Removing extra terrain points
Reconstructing buildings Number of successfully reconstructed buildings: 62
INFO: Domain boundaries not defined in config. Calculating with BPG.
Calculating blockage ratio for flow direction (1 1) Blockage ratio is: -nan
Reconstructing terrain Lifting polygon edges to terrain elevation
Reconstructing boundaries
Outputting surface meshes Folder: "/home/wilai/results"
Creating log file 'logFile.log' Outputting failed building reconstructions to 'failedReconstructions.geojson'
Program executed in 6.11155 s End