tudelft3d / City3D

Large-scale LoD2 Building Reconstruction from Airborne LiDAR Point Clouds
https://github.com/tudelft3d/City3D
GNU General Public License v3.0
223 stars 36 forks source link

Prepare footprint .obj file #28

Closed QiaosiLi closed 5 months ago

QiaosiLi commented 7 months ago

Thanks for sharing the code. We use city3d to reconstruct our lod2 building model with our airborne LiDAR and the result looks great. I found that in the sample data you shared, the footprint obj file includes the Z coordinates (they are in the same value, I guess is the lowest elevation). We created footprint 2d shapefile from LiDAR data. How should we convert the shapefile to obj, is there any open-source code/tool we can use? Thanks

LiangliangNan commented 7 months ago

Thank you for your kind words! I am not aware of any tool that can directly convert shapefiles to obj format. But conceptually, a footprint is simply a 2D polygon. In City3D, we assigned each 2D polygon a Z value so it becomes a 3D polygon. This step is not necessary but we have it to allow visualizing the footprint (using the same data structure and rending code for the result mesh). Please feel free to integrate your shapefile parser into City3D, or modify the current code to allow 2D polygons as input).

yidahuang commented 7 months ago

City3D also allows a .geojson file as input, a possible way is to use QGIS to convert a .shp file into a .geosjon file.