Roofs: Difference between revisions

From Tygron Preview Support Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{stub}}
The roof shapes for [[building]] [[section]]s in the {{software}} are calculated as follows:


==Roof shapes==
* Based on a [[Project_Sources#Sources_connected_to_the_Tygron_Platform|BAG]] building polygon, we look at the [[elevation model|DTM]] (height points every 50cm).
The roof shapes in the {{software}} are calculated as follows:
 
*Based on a [[Project_Sources#Sources_connected_to_the_Tygron_Platform|BAG]] building polygon, we look at the [[Terrain_height#DTM_for_projects_in_The_Netherlands|DTM]] (height points every 50cm).
*Then we use the ''Hough Line algorithm'' to recognize lines in the elevation data (https://docs.opencv.org/2.4/doc/tutorials/imgproc/imgtrans/hough_lines/hough_lines.html). These lines are often the division between higher and lower parts in the BAG building polygon. Think of a garage next to a house that is lower than the house itself. The advantage of these lines is that you get a sharp demarcation instead of fuzzy deviations in an inaccurate height model.
*Then we use the ''Hough Line algorithm'' to recognize lines in the elevation data (https://docs.opencv.org/2.4/doc/tutorials/imgproc/imgtrans/hough_lines/hough_lines.html). These lines are often the division between higher and lower parts in the BAG building polygon. Think of a garage next to a house that is lower than the house itself. The advantage of these lines is that you get a sharp demarcation instead of fuzzy deviations in an inaccurate height model.


*The BAG building polygon is then divided into sections (garage, house, conservatory etc.). We calculate the standard deviation per section. If it is higher than a certain threshold and the model probably has a sloping roof (for example houses from the 1960s), we calculate a roof height attribute, which is the difference in height between the gutter and the ridge.
* The BAG building polygon is then divided into sections (garage, house, conservatory etc.). We calculate the standard deviation per section. If it is higher than a certain threshold and the model probably has a sloping roof (for example houses from the 1960s), we calculate a roof height attribute, which is the difference in height between the gutter and the ridge.
*We then use a ''Skeleton algorithm'' to determine the ridge of the roof. We include adjacent terraced houses (same construction date and height) so that you get a nice continuous roof ridge.
* We then use a ''Skeleton algorithm'' to determine the ridge of the roof. We include adjacent terraced houses (same construction date and height) so that you get a nice continuous roof ridge.


Based on the ridge lines and the gutter lines (polygon edges) we use a ''triangulation algorithm'' to build triangles which are needed for the 3D model.
Based on the ridge lines and the gutter lines (polygon edges) we use a ''triangulation algorithm'' to build triangles which are needed for the 3D model.
We also store the following data:  
We also store the following data:  
* The outer walls (for insulation), but you cannot yet query them with [[Tygron_Query_Language|TQL]].  
* The outer walls (for insulation), but you cannot yet query them with [[TQL]].  
* The different sections as separate polygons. Each section has its own building height and an estimated number of floors.  
* The different sections as separate polygons. Each section has its own building height and an estimated number of floors.  
* The color of the roof (based on aerial images).
* The color of the roof (based on aerial images).
Line 21: Line 18:
The location of the ridge is determined as being the center of the building and not directly based on the height data.
The location of the ridge is determined as being the center of the building and not directly based on the height data.
This is adequate for many common Dutch terraced houses, but there may be a deviation, especially with more complex roof shapes.
This is adequate for many common Dutch terraced houses, but there may be a deviation, especially with more complex roof shapes.
{{article end
|seealso=
*[[Section]]
*[[Building]]
}}

Latest revision as of 14:17, 2 March 2023

The roof shapes for building sections in the Tygron Platform are calculated as follows:

  • Based on a BAG building polygon, we look at the DTM (height points every 50cm).
  • Then we use the Hough Line algorithm to recognize lines in the elevation data (https://docs.opencv.org/2.4/doc/tutorials/imgproc/imgtrans/hough_lines/hough_lines.html). These lines are often the division between higher and lower parts in the BAG building polygon. Think of a garage next to a house that is lower than the house itself. The advantage of these lines is that you get a sharp demarcation instead of fuzzy deviations in an inaccurate height model.
  • The BAG building polygon is then divided into sections (garage, house, conservatory etc.). We calculate the standard deviation per section. If it is higher than a certain threshold and the model probably has a sloping roof (for example houses from the 1960s), we calculate a roof height attribute, which is the difference in height between the gutter and the ridge.
  • We then use a Skeleton algorithm to determine the ridge of the roof. We include adjacent terraced houses (same construction date and height) so that you get a nice continuous roof ridge.

Based on the ridge lines and the gutter lines (polygon edges) we use a triangulation algorithm to build triangles which are needed for the 3D model. We also store the following data:

  • The outer walls (for insulation), but you cannot yet query them with TQL.
  • The different sections as separate polygons. Each section has its own building height and an estimated number of floors.
  • The color of the roof (based on aerial images).

The advantage of this calculation method is that it is completely procedural. You can easily make new buildings with it and give them a visual representation. A disadvantage is that it is an approximation and therefore not 100% accurate.

The location of the ridge is determined as being the center of the building and not directly based on the height data. This is adequate for many common Dutch terraced houses, but there may be a deviation, especially with more complex roof shapes.

See also