So djordje just introduced me to the Gismo plugin earlier today, when I was asking for a solution to generate roofs in the McNeel forum. I think it’s awesome, but it’s not sufficiently accurate for the area I’m working on - Maribor, Slovenia.
My goal is to generate somewhat accurate buildings on non-planar (real) terrain where building height information is limited.
Many countries, like Slovenia, enable free access to lidar point clouds, which can be used to generate accurate terrain models, as well as for extracting roof (and other) heights.
Combining OSM and point clouds can produce more accurate buildings where no other data is available.
I spent the day playing around in grasshopper and was able to produce these results for my hometown - Maribor, Slovenia:
(Gismo generated buildings)
(My attempt - Extruding buildings to the highest point)
I’ll try to explain the workflow a simple as possible. I can explain more in-depth if necessary, but it’s still only a concept - ?feasibility study?
- Acquire lidar point clouds for Slovenia from HERE.
- Download (GKOT) LAZ for classified raw points and DMR for cleaned terrain points.
- Load point clouds to CloudCompare and subsample points for more manageable file sizes.
- Make mesh from DMR for terrain and extract roofs from LAZ.
- Load mesh and points to Rhino and link to GH
- Find the center coordinate of the square block and convert to WGS84 (for OSM). For example - D96TM (Slovenian CS) to WGS84 (GPS). X=549500, Y=157500 to Lat=46.55531840244368, Lon=15.645565563285729.
- Type WGS84 coordinate to Gismo example file, and move the generated building outlines to target coorinate (eg. 549500,157500)
- Move the buildings in Z to the terrain (I projected the polygon center point to the mesh)
- Assign points to buildings (I used Point in Curves) and sort them by Z.
- Find the highest (or lowest) point for each building, measure distance to ground (building center point) and extrude by measured distance.
I think this can be developed even further to generate relatively accurate roof heights by finding the lowest roof point for each building. It would be a little more challenging, because some lower points are not roofs (ground?). Maybe it can be done by manually cleaning or some other trickery (average?, culling ends of lists?).
There are some problems I encountered.
The OSM map is not 100% aligned to the terrain, roof point clouds. The center of the map seems good, but the further out you look, the more the buildings seem to be misaligned.
I think this is because I only moved the OSM map from the center to the center point of the target coordinate system. I don’t really know how projections work, but I assume every point from OSM would have to be converted?
I also need to figure out how to handle multipolygons (buildings with inner lines). For now, I only used the outer line.
Maybe someone can dig further down this rabbit hole, I think I exhausted my current capabilities.
Would it be maybe also be possible to implement coordinate conversion into the plugin? Something like https://twcc.fr/en/# ?
It would be great if it was possible to convert multiple points at once to different coordinate systems.
The example files can be found HERE.
The GH file is not optimized, but should work for this example. The point is only to get the idea across for now…