tudelft3d/City3D

Prepare footprint .obj file

QiaosiLi opened this issue · 2 comments

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

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).

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