Identification of Roof Surfaces from LiDAR Cloud Points by GIS Tools: A Case Study of Lučenec, Slovakia

The identification of roof surfaces is characterized by a sequence of several processing steps. The boundary detection of different types of roof is realized from light detection and ranging (LiDAR) cloud points and can confirm the real boundary of the roof. In the process of processing LiDAR data, shortcomings have been found regarding the inappropriate classification of points (class 6 “buildings”) concerning the roofs (the points of the building facade were marked as outliers and reclassified). In cases of insufficient point density, there is a problem with not being able to capture either the roof boundary or small roof objects, along with the possible occurrence of gaps inside the roof areas. This study proposes a processing procedure in a geographic information system (GIS) environment that advocates the identification of roof surfaces based on the LiDAR point cloud. We created the contours of a roof surface boundary with a simplified regular shape. From 824 roofs in the studied area, six different types of roof were selected, which this study presents in detail. The expected result of the study is the generation of segments inside the roof boundary. The study also includes the visualization of the outcomes of the spatial analyses of the identified roof surfaces, which forms the basis for determining the potential of solar systems with respect to green roofs for the development of smart city buildings.


Introduction
Today, more than two thirds of the union's population live in cities, consuming around 80% of its energy and producing up to 85% of Europe's gross domestic product [1]. Cities are thus becoming the birthplace of challenges, such as environmental pollution, social inequalities, and traffic restrictions, which cause persistent social, economic, or environmental problems. These impacts cause effects on spatial changes in the way land is used and transformed in favor of development [2,3]. Spatial and functional changes related to classes of urban areas characterize the information contained in the Corine Land Cover (CLC) classification database [4,5].
Within the construction of intelligent cities and their sustainability, one challenge is the creation of three-dimensional (3D) models of object buildings. The 3D city model is an essential part of several different applications and analyses related to infrastructure [6,7], planning and urbanism [8,9], solar radiation modeling in urban areas [10,11], and the potential for building green roofs in cities [12,13], geometric and topological parameters. We chose the LiDAR point cloud, photogrammetric images, and vector data from information systems in Slovakia as input data. The LiDAR data used in this study supplied already classified by the supplier (the Geodesy, Cartography, and Cadastre Authority of the Slovak Republic, GCCA SR). According to the Awrangjeb methodology [38], the generation of roof contours is performed on filtered LiDAR data (class 6-buildings). An irregular roof contour was created, which was then generalized to a regular roof contour. For a more detailed characterization of the roof area, the modeling of the ridge based on the methodology of watershed segmentation presented in the work of Merabet et al. [43].
Part of the solution also focusing on errors that may occur in the input data and their processing. The application of the chosen methodology is possible not only in a small area but also at the level of city districts or entire cities. The main benefits of this study are: a critical view of the errors in the input data; the analysis of the raster cell size entering the processing; the design of the extraction procedure of roof objects for processing in the GIS environment; automation to create a detailed roof model; the visualization of analyses of selected geometric and topological parameters of roof surfaces, with the possible application in the field of potential determination for solar systems and green roofs.

Materials and Methods
This part of the study presents the study area, data sources, and methodology for identifying roof objects concerning their selected geometric and topological parameters. The starting point of the processing works is a workflow diagram characterizing the segmentation of the roof surfaces ( Figure  1).

Study Area
The territory of the district town of Lučenec, which lies in the central part of the Lučenec basin ( Figure 2) at an altitude of 194 m above sea level, was chosen for the solution. With its population of 27,739 (status of the permanent population as of 31 December 2019, the Statistical Office of the Slovak Republic), it is in 22nd place out of 141 cities in Slovakia. The city is located in a warm climatic region, being also a dry subregion with a cold winter. The average annual air temperature is 9.1 °C. The mean annual sums of global radiation reach values around 1250 kWh.m −2 . The annual sums of sunshine range from 1800 to 1900 h [44].

Study Area
The territory of the district town of Lučenec, which lies in the central part of the Lučenec basin ( Figure 2) at an altitude of 194 m above sea level, was chosen for the solution. With its population of 27,739 (status of the permanent population as of 31 December 2019, the Statistical Office of the Slovak Republic), it is in 22nd place out of 141 cities in Slovakia. The city is located in a warm climatic region, being also a dry subregion with a cold winter. The average annual air temperature is 9.1 • C. The mean annual sums of global radiation reach values around 1250 kWh.m −2 . The annual sums of sunshine range from 1800 to 1900 h [44].
For the case study, an area with dimensions of 1.5 km × 1.15 km = 1.725 km 2 was chosen ( Figure 2b). The study area's choice took into account the availability of data, especially the ongoing process of aerial laser scanning (ALS) of the entire territory of Slovakia (wwww.geoportal.sk/sk/udaje/lls-dmr/). ALS takes place from the western part to the east, with the expected completion in 2023. The choice of the area also influenced by the representation of all types of roof areas of the buildings (Figure 3: industrial buildings, residential houses, and family houses). For the case study, an area with dimensions of 1.5 km × 1.15 km = 1.725 km 2 was chosen ( Figure  2b). The study area's choice took into account the availability of data, especially the ongoing process of aerial laser scanning (ALS) of the entire territory of Slovakia (www.geoportal.sk/sk/udaje/llsdmr/). ALS takes place from the western part to the east, with the expected completion in 2023. The choice of the area also influenced by the representation of all types of roof areas of the buildings ( Figure 3: industrial buildings, residential houses, and family houses).

Data Sources
Data from aerial laser scanning (*.las) and aerial photogrammetry (*.tiff) was used as input data. Data from the Basic Database for the GIS (ZBGIS) were available to display the building footprints. All the source data were provided by the GCCA SR. The buildings.shp file contained data for 2514 objects. This data then processed via GIS (the combination of ArcMap 10.7.1 and ArcGIS Pro 2.4. 3). An overview of the basic characteristics of the input data is shown in Table 1.   For the case study, an area with dimensions of 1.5 km × 1.15 km = 1.725 km 2 was chosen ( Figure  2b). The study area's choice took into account the availability of data, especially the ongoing process of aerial laser scanning (ALS) of the entire territory of Slovakia (www.geoportal.sk/sk/udaje/llsdmr/). ALS takes place from the western part to the east, with the expected completion in 2023. The choice of the area also influenced by the representation of all types of roof areas of the buildings ( Figure 3: industrial buildings, residential houses, and family houses).

Data Sources
Data from aerial laser scanning (*.las) and aerial photogrammetry (*.tiff) was used as input data. Data from the Basic Database for the GIS (ZBGIS) were available to display the building footprints. All the source data were provided by the GCCA SR. The buildings.shp file contained data for 2514 objects. This data then processed via GIS (the combination of ArcMap 10.7.1 and ArcGIS Pro 2.4.3). An overview of the basic characteristics of the input data is shown in Table 1.

Data Sources
Data from aerial laser scanning (*.las) and aerial photogrammetry (*.tiff) was used as input data. Data from the Basic Database for the GIS (ZBGIS) were available to display the building footprints. All the source data were provided by the GCCA SR. The buildings.shp file contained data for 2514 objects. This data then processed via GIS (the combination of ArcMap 10.7.1 and ArcGIS Pro 2.4.3). An overview of the basic characteristics of the input data is shown in Table 1.
The point cloud of the area of interest obtained from the ALS (LiDAR) contained 33,019,202 points stored in 6 files with the extension *.las. The average point spacing of the study area is 0.23 m. The average point cloud density in our study was 19 points/m 2 . Redweik et al. [45] also worked with approximately the same density of 20 points/m 2 . In the study [46], they worked with LiDAR data with an average density of 6.75 points/m 2 and in research [47] with an average density of 0.44 point/m 2 . A study by TriglavČekada et al. [48] is the recommended point density for a built-up area with vegetation of 12 to 20 point/m 2 . The provider already classified the LiDAR point cloud into nine classes for the study. Classes 2-ground and 6-buildings were necessary for our case study. An essential step in the processing was to check and possibly remove erroneous data from the *.las file, which could bring uncertainties to the expected result (presence of outliers).

Transformation of Coordinate Systems
The input data used are in different coordinate systems depending on their national implementations. To ensure quality results, the data are first transformed into a single binding coordinate system. Geodetic reference systems generally consist of a datum and a coordinate system ( Figure 4). The datum defines the origin position, scale, and orientation of the coordinate system axes, and the coordinate system is the assignment of coordinates to points. The point cloud of the area of interest obtained from the ALS (LiDAR) contained 33,019,202 points stored in 6 files with the extension *.las. The average point spacing of the study area is 0.23 m. The average point cloud density in our study was 19 points/m 2 . Redweik et al. [45] also worked with approximately the same density of 20 points/m 2 . In the study [46], they worked with LiDAR data with an average density of 6.75 points/m 2 and in research [47] with an average density of 0.44 point/m 2 . A study by Triglav Čekada et al. [48] is the recommended point density for a built-up area with vegetation of 12 to 20 point/m 2 .
The provider already classified the LiDAR point cloud into nine classes for the study. Classes 2-ground and 6-buildings were necessary for our case study. An essential step in the processing was to check and possibly remove erroneous data from the *.las file, which could bring uncertainties to the expected result (presence of outliers).

Transformation of Coordinate Systems
The input data used are in different coordinate systems depending on their national implementations. To ensure quality results, the data are first transformed into a single binding coordinate system. Geodetic reference systems generally consist of a datum and a coordinate system ( Figure 4). The datum defines the origin position, scale, and orientation of the coordinate system axes, and the coordinate system is the assignment of coordinates to points. Binding the geodetic reference systems and their valid implementations on the territory of Slovakia (Table 2)   Binding the geodetic reference systems and their valid implementations on the territory of Slovakia (Table 2) is determined by Decree 300/2009 Coll. Geodesy, Cartography, and Cadastre Authority of the Slovak Republic (https://www.slov-lex.sk/pravne-predpisy/SK/ZZ/2009/300/20140215). This decree implements the Act of the National Council of the Slovak Republic no. 215/1995 Coll. on geodesy and cartography. The implementation of a geodetic reference system involves the determination of coordinates, heights, or gravity accelerations related to physical points stabilized on the earth's surface. D-UTCN is defined by Bessel's ellipsoid 1841 and Křovák's representation as a rectangular planar coordinate system (x-axis points south and y-axis west). In the Slovak Republic, D-UTCN has two implementations. 1) UTCN is the original implementation and is binding for documenting and taking over the results of geodetic and cartographic activities for the information system of geodesy and cartography or real estate cadastre. 2) UTCN03 is a new implementation, determined using global navigation satellite systems (GNSS) observations and primarily intended for surveying works.
Transformation or conversion can be used to convert between geodetic coordinate systems ( Figure 5). The transformation parameters can only be derived empirically using identical points that have specified coordinates in both systems. In general, the conversion is unambiguous and with a high accuracy. A global transformation key (GTK) is used to transform point coordinates between ETRS89 (ETRF2000) and D-UTCN (UTCN03). GTK represents seven transformation parameters calculated by the spatial similarity transformation by the Burša-Wolf model. The GTK parameters are given in Table 3, according to [49].
Sustainability 2020, 12, x FOR PEER REVIEW 6 of 20 predpisy/SK/ZZ/2009/300/20140215). This decree implements the Act of the National Council of the Slovak Republic no. 215/1995 Coll. on geodesy and cartography. The implementation of a geodetic reference system involves the determination of coordinates, heights, or gravity accelerations related to physical points stabilized on the earth's surface. D-UTCN is defined by Bessel's ellipsoid 1841 and Křovák's representation as a rectangular planar coordinate system (x-axis points south and y-axis west). In the Slovak Republic, D-UTCN has two implementations. 1) UTCN is the original implementation and is binding for documenting and taking over the results of geodetic and cartographic activities for the information system of geodesy and cartography or real estate cadastre. 2) UTCN03 is a new implementation, determined using global navigation satellite systems (GNSS) observations and primarily intended for surveying works.
Transformation or conversion can be used to convert between geodetic coordinate systems ( Figure 5). The transformation parameters can only be derived empirically using identical points that have specified coordinates in both systems. In general, the conversion is unambiguous and with a high accuracy. A global transformation key (GTK) is used to transform point coordinates between ETRS89 (ETRF2000) and D-UTCN (UTCN03). GTK represents seven transformation parameters calculated by the spatial similarity transformation by the Burša-Wolf model. The GTK parameters are given in Table 3, according to [49].

Detection, Segmentation, and Extraction of Roof Objects
Knowledge of the geometry/typology of roofs is essential for various spatial analyses based on this group of objects. The process of detecting roof planes, ridges, hips, and valleys uses the assumption that all roof surfaces form parts with different slopes and orientations [50]. Another assumption of this study is that only planar roof segments can be detected, extracted, and segmented in further processing. This approach used into account in the group of the following types of roofs monitored by us ( Figure 6).

Detection, Segmentation, and Extraction of Roof Objects
Knowledge of the geometry/typology of roofs is essential for various spatial analyses based on this group of objects. The process of detecting roof planes, ridges, hips, and valleys uses the assumption that all roof surfaces form parts with different slopes and orientations [50]. Another assumption of this study is that only planar roof segments can be detected, extracted, and segmented in further processing. This approach used into account in the group of the following types of roofs monitored by us ( Figure 6). In the study, we applied GIS-based methods to the detection, extraction, and segmentation of building roofs. The choice of the solution of this part of the study was from professional work with a similar focus Palmer et al. [51], Höfle et al. [40], and Margolis et al. [52]. One of the aims of this study is to obtain a 2D/3D outline of a bounded polygon of the roof surface. In terms of methodological approaches, there are various recommendations from scientific studies on the issue applied in the study [43,53].
To represent the real shape of the roof ridge, the study uses a method derived from the modeling of river basins-namely, modeling the flow direction. Three types of flow direction methods-the deterministic eight-neighbors method (D8) [54], Multiple Flow Direction (MFD) [55], or D-Infinity (DINF) [56]-can be used in the GIS environment to capture the outflow direction. These methods make it possible to determine the characteristic regions for the flow direction, thus defining the boundaries of the individual roof segments. The process of extracting the selected group of objects follow a sequence of steps ( Figure 1).
We used a point cloud of the classification codes for 6-buildings to extract the polygons of roof objects from the LiDAR base. All the recommendations for the conversion of the buildings raster into polygons were met by setting the following parameters: • a minimum area of the roof segment; • preserving the squareness of the edges of objects (90°); • the boundary of the roof is made of a fully enclosed polygon without unnecessary holes (gaps).

Comparison of Dataset Integrity from Available National Spatial Databases
The real identification of the roof areas of residential buildings in this study was carried out based on the LiDAR data. The original intention of the study was to generate roof outlines based on the background data from available sources of map services (ZBGIS, Real Estate Cadastre). It is important to emphasize that the processing process itself was some to extent marked by the uncertainties identified. Uncertainties were associated with data processed and stored in different national implementations (UTCN-UTCN03). In the interval of updating objects, the data obtained were from different periods. The content of available datasets of ZBGIS map services is available in national implementations: In the study, we applied GIS-based methods to the detection, extraction, and segmentation of building roofs. The choice of the solution of this part of the study was from professional work with a similar focus Palmer et al. [51], Höfle et al. [40], and Margolis et al. [52]. One of the aims of this study is to obtain a 2D/3D outline of a bounded polygon of the roof surface. In terms of methodological approaches, there are various recommendations from scientific studies on the issue applied in the study [43,53].
To represent the real shape of the roof ridge, the study uses a method derived from the modeling of river basins-namely, modeling the flow direction. Three types of flow direction methods-the deterministic eight-neighbors method (D8) [54], Multiple Flow Direction (MFD) [55], or D-Infinity (DINF) [56]-can be used in the GIS environment to capture the outflow direction. These methods make it possible to determine the characteristic regions for the flow direction, thus defining the boundaries of the individual roof segments. The process of extracting the selected group of objects follow a sequence of steps ( Figure 1).
We used a point cloud of the classification codes for 6-buildings to extract the polygons of roof objects from the LiDAR base. All the recommendations for the conversion of the buildings raster into polygons were met by setting the following parameters: • a minimum area of the roof segment; • preserving the squareness of the edges of objects (90 • ); • the boundary of the roof is made of a fully enclosed polygon without unnecessary holes (gaps).

Comparison of Dataset Integrity from Available National Spatial Databases
The real identification of the roof areas of residential buildings in this study was carried out based on the LiDAR data. The original intention of the study was to generate roof outlines based on the background data from available sources of map services (ZBGIS, Real Estate Cadastre). It is important to emphasize that the processing process itself was some to extent marked by the uncertainties identified. Uncertainties were associated with data processed and stored in different national implementations (UTCN-UTCN03). In the interval of updating objects, the data obtained were from different periods. The content of available datasets of ZBGIS map services is available in national implementations: The data used in this study are in both D-UTCN implementations (UTCN and UTCN03). Failure to differentiate these national implementations during processing leads to increased inaccuracies and may cause erroneous results. Figure 7 shows the contents of the ZBGIS and Real Estate Cadastre databases based on the orthophoto. By comparing these background data, outdates are visible either in Figure 7b or in Figure 7c. The shopping center presented in Figure 7 is absent from the ZBGIS database, while the Real Estate Cadastre database displays this object. Another problematic aspect is the content of the database registered in the Real Estate Cadastre-dataset "Zappar" (Figure 7c-dark blue line). This part of the database contains information on real estate, registered until 2001. So far, the data are not registered in the official dataset "Kladpar"-blue area. The data used in this study are in both D-UTCN implementations (UTCN and UTCN03). Failure to differentiate these national implementations during processing leads to increased inaccuracies and may cause erroneous results. Figure 7 shows the contents of the ZBGIS and Real Estate Cadastre databases based on the orthophoto. By comparing these background data, outdates are visible either in Figure 7b or in Figure 7c. The shopping center presented in Figure 7 is absent from the ZBGIS database, while the Real Estate Cadastre database displays this object. Another problematic aspect is the content of the database registered in the Real Estate Cadastre-dataset "Zappar" (Figure 7cdark blue line). This part of the database contains information on real estate, registered until 2001. So far, the data are not registered in the official dataset "Kladpar"-blue area.  The data used in this study are in both D-UTCN implementations (UTCN and UTCN03). Failure to differentiate these national implementations during processing leads to increased inaccuracies and may cause erroneous results. Figure 7 shows the contents of the ZBGIS and Real Estate Cadastre databases based on the orthophoto. By comparing these background data, outdates are visible either in Figure 7b or in Figure 7c. The shopping center presented in Figure 7 is absent from the ZBGIS database, while the Real Estate Cadastre database displays this object. Another problematic aspect is the content of the database registered in the Real Estate Cadastre-dataset "Zappar" (Figure 7cdark blue line). This part of the database contains information on real estate, registered until 2001. So far, the data are not registered in the official dataset "Kladpar"-blue area.

Input Data Processing-LiDAR Point Cloud
Based on the confirmed inaccuracies (outdated, non-identity) of the underlying data (shown in Figures 7 and 8), only the LiDAR point cloud data were selected as the basis for calculation. Table 4 presents the quantitative characteristics of the classified point cloud of the subject area in the case study. The buildings partially located in the selected location and outside have been removed from the point cloud. The number of points of incomplete objects was 289,735, which represented 4.4% of the total number of points in the building class. The initial processing of the LiDAR data is on the verification of the occurrence of an inappropriate set of points in the "noise" category, which could distort/inaccurate the results in further processing. The following Figure 9 presents a sample of classified LiDAR data containing unwanted points identified as "noise". These bad points have moved to a separate "high noise" class. Subsequently, there was processing with a dataset of "cleaned" data according to the procedure ( Figure 1).   For further processing, classified (*.las) files were displayed in the form of a point cloud according to the required classes. Based on the orthophoto (Figure 10a), the result of displaying the point class "ground" (Figure 10b) and the point class "building" (Figure 10c) of the *.las dataset is presented. For further processing, classified (*.las) files were displayed in the form of a point cloud according to the required classes. Based on the orthophoto (Figure 10a), the result of displaying the point class "ground" (Figure 10b) and the point class "building" (Figure 10c) of the *.las dataset is presented.
In the process of the automatic classification of LiDAR data, in some cases the object is incorrectly identified. By comparing the orthophoto and the classified LiDAR data, incorrect classifications of objects can be found-e.g., a bus included in the "building" class ( Figure 11a). There are also outdated issues related to the different schedules for the implementation of aerial scanning and aerial photogrammetry. By comparing these results, it is possible to find, e.g., LiDAR data that show a completed family house ( Figure 11b) or a removed/demolished building (Figure 11c). For further processing, classified (*.las) files were displayed in the form of a point cloud according to the required classes. Based on the orthophoto (Figure 10a), the result of displaying the point class "ground" (Figure 10b) and the point class "building" (Figure 10c) of the *.las dataset is presented. In the process of the automatic classification of LiDAR data, in some cases the object is incorrectly identified. By comparing the orthophoto and the classified LiDAR data, incorrect classifications of objects can be found-e.g., a bus included in the "building" class ( Figure 11a). There are also outdated issues related to the different schedules for the implementation of aerial scanning and aerial photogrammetry. By comparing these results, it is possible to find, e.g., LiDAR data that show a completed family house ( Figure 11b) or a removed/demolished building (Figure 11c). Before identifying the roof areas of buildings, it was necessary to remove the set of points that were on the facade of the buildings and possibly other outliers. The display of these remote points, which do not belong to the point cloud of the roof, should be presented in 3D space. The following Figure 12 shows the points belonging to the "building" class with the identified outliers. These points have been reclassified to a separate area not to be used in further processing. The number of removed points was 613,371, which represented 9.3% of the total number of points in the building class.

Detection, Segmentation, and Extraction of Roof Objects
To identify the roof polygons used in a class (06 building) with a reduced number of 5,696,591 points, six different types of roofs shown in Figure 13 were selected to illustrate the processing procedure. Object (a) is a fuel station where the roof is a relatively flat surface with a slight slope. Building (b) is an apartment building with a flat roof; in the middle of the roof of the building, there Before identifying the roof areas of buildings, it was necessary to remove the set of points that were on the facade of the buildings and possibly other outliers. The display of these remote points, which do not belong to the point cloud of the roof, should be presented in 3D space. The following Figure 12 shows the points belonging to the "building" class with the identified outliers. These points have been reclassified to a separate area not to be used in further processing. The number of removed points was 613,371, which represented 9.3% of the total number of points in the building class. Before identifying the roof areas of buildings, it was necessary to remove the set of points that were on the facade of the buildings and possibly other outliers. The display of these remote points, which do not belong to the point cloud of the roof, should be presented in 3D space. The following Figure 12 shows the points belonging to the "building" class with the identified outliers. These points have been reclassified to a separate area not to be used in further processing. The number of removed points was 613,371, which represented 9.3% of the total number of points in the building class.

Detection, Segmentation, and Extraction of Roof Objects
To identify the roof polygons used in a class (06 building) with a reduced number of 5,696,591 points, six different types of roofs shown in Figure 13 were selected to illustrate the processing procedure. Object (a) is a fuel station where the roof is a relatively flat surface with a slight slope. Building (b) is an apartment building with a flat roof; in the middle of the roof of the building, there

Detection, Segmentation, and Extraction of Roof Objects
To identify the roof polygons used in a class (06 building) with a reduced number of 5,696,591 points, six different types of roofs shown in Figure 13 were selected to illustrate the processing procedure. Object (a) is a fuel station where the roof is a relatively flat surface with a slight slope. Building (b) is an apartment building with a flat roof; in the middle of the roof of the building, there is an elevator engine room. Object (c) is a shopping center with a flat roof with a slight slope. The slope of the roof surfaces mentioned so far is α ≤ 10 • . The following group of buildings represent family houses with a specific type of roof with a slope of 10 • < α < 45 • . By previous raster cell size analysis, a raster with a cell size of 0.3 m used for the object extraction process. The purified file data were then further processed. The objects ( Figure 15) were in terms of their processing divided into two groups: (a-c) represent flat roofs, (d-f) represent sloping roofs. The extracted objects are segmented in the next processing part. The segmentation process of roof surfaces was realized with the procedures in the ArcGIS Pro environment, according to [43]: Simplify Building and Regularize Building (Figure 15(3): (a)-(f)). The same procedure of segmentation could not apply to all types of roofs. When segmenting flat roofs, it was not necessary to detect the roof ridge ( Figure  15(1): (a)-(c)). The main idea of pitched roof segmentation realized the concept of modeling the roof ridge. This process depends on the results of the segmentation. Pitched roofs require the use of the The first processing step was to identify the edges of the roof areas. A raster was created from the LiDAR data (Class 6-buildings) to determine the course of the roof edges. Different raster cell sizes (0.3, 0.5, and 1.0 m) were selected to test the detail of the generated raster output. A comparison of the created raster with different cell sizes is shown in Figure 14. During the creation of the polygons, the preservation of the orthogonal shape of the object was taken into account. By previous raster cell size analysis, a raster with a cell size of 0.3 m used for the object extraction process. The purified file data were then further processed. The objects ( Figure 15) were in terms of their processing divided into two groups: (a-c) represent flat roofs, (d-f) represent sloping roofs. The extracted objects are segmented in the next processing part. The segmentation process of roof surfaces By previous raster cell size analysis, a raster with a cell size of 0.3 m used for the object extraction process. The purified file data were then further processed. The objects ( Figure 15) were in terms of their processing divided into two groups: (a-c) represent flat roofs, (d-f) represent sloping roofs. The extracted objects are segmented in the next processing part. The segmentation process of roof surfaces was realized with the procedures in the ArcGIS Pro environment, according to [43]: Simplify Building and Regularize Building (Figure 15(3): (a)-(f)). The same procedure of segmentation could not apply to all types of roofs. When segmenting flat roofs, it was not necessary to detect the roof ridge ( Figure 15(1): (a)-(c)). The main idea of pitched roof segmentation realized the concept of modeling the roof ridge. This process depends on the results of the segmentation. Pitched roofs require the use of the Flow direction method, which ensured the detection/identification of the ridge-ridges, hips, and valleys of the roof from the grid (Figure 15(1): (d)-(f)). The subsequent conversion of the raster to the vector format made it possible to obtain segments defining the modeled roof area's actual shape. This step, when applied to all types of roofs, provided a realistic model of the roof (Figure 15 The problem of using the LiDAR data source for the identification of roof areas is also the point cloud's density. The LLS process has a problem capturing the boundary roof surfaces because scanning is one of the non-selective data collection methods. In the case of objects located on the roof (chimneys, air conditioning, drainage equipment-gutters, etc.), the problem is their small size compared to the average distance of points. At low point densities, these objects do not detect or are detectable with an insufficient number of points. In the study, we used the LiDAR data source with an average density of 19 points per m −2 (with an average distance between adjacent points of 0.23 m). We recommend that if it is necessary to capture more precise details of the roof in the identification, it is more appropriate to use a higher density of points. The related problem is solved [57], which points out the issues related to small parts of the roofs, which may not be sufficiently captured, and thus we recommend choosing a higher density of cloud points.
Outliers identified by an automatic process that did not ensure their complete detection. This process was supplemented by the manual checking of objects. In the case of an automated process, the incorrect identification of points may occur, such as the chimney. This processing part is significant even if we want to create a detailed model of the roof.
The raster cell size density generated from the LiDAR data represents a limiting element of further spatial analyses with a view of the interpolation method used [58,59]. The size of the raster cell should depend on the average density of points, respectively, of the average distance of points. From the studied scientific works [60,61] devoted to the issue of modeling the roof ridge, modeling the direction of surface water runoff (flow direction) is proving to be a suitable method-this method is used regardless of the number of objects.
The process of segmentation itself required an individual approach due to the diversity of the representation of roof types in a given location. Based on our findings, within the specifics of our case study, six basic roofs were selected. It was found that the information on the kind of roof and the number of segments were needed by processing. A set of these characteristics would greatly facilitate the process of selecting these objects for automatic processing. A recommendation for the future is to add necessary data on the type of roof and its segments to datasets within the state information systems (ZBGIS, Real Estate Cadastre). The availability of this group of data would significantly simplify the process of automatic roof segmentation. Spatial analysis, according to [57] parameters such as the geometry of the territory, morphometric properties, and spatio-temporal arrangement, was performed on the whole study area. The result of this part of the study is that roof areas are colored according to selected geometric and topological parameters [62]. resulting generalization of the roof area while maintaining the condition of the minimum area of the roof segment, the squareness of the edges, and a closed simple polygon without gaps was provided by two generalization tools-i.e., Simplify Building and Regularize Building (Figure 15 The problem of using the LiDAR data source for the identification of roof areas is also the point cloud's density. The LLS process has a problem capturing the boundary roof surfaces because scanning is one of the non-selective data collection methods. In the case of objects located on the roof (chimneys, air conditioning, drainage equipment-gutters, etc.), the problem is their small size compared to the average distance of points. At low point densities, these objects do not detect or are detectable with an insufficient number of points. In the study, we used the LiDAR data source with an average density of 19 points per m −2 (with an average distance between adjacent points of 0.23 m). We recommend that if it is necessary to capture more precise details of the roof in the identification, it is more appropriate to use a higher density of points. The related problem is solved [57], which The analysis of the slope ratios of all roof areas (824 roofs) established by the ArcGIS Pro environment used a geoprocessing tool in the 3D Analyst Tools category with a set classification of up to seven classes (Table 5). In our study, we wanted to the basis of a mainly from two groups of roof surfaces (sloping roofs with a roof pitch of 10 • < α <45 • and flat roofs with an angle of α ≤ 10 • , with a recommended minimum slope of 2%). From the results, according to [63], we applied a seven-level classification. The reason was to capture all changes in the slope conditions of the site.
The azimuth orientation of roofs classified into eight classes according to the value of the azimuth and the corresponding colored roof area (roof areas colored) ( Table 6, 4th column). Subsequently, these results were reclassified only into two classes ( Table 6, 5th column) according to the suitability of their use for the needs of installation of systems using the amount of incident solar radiation. environment used a geoprocessing tool in the 3D Analyst Tools category with a set classification of up to seven classes (Table 5). In our study, we wanted to the basis of a mainly from two groups of roof surfaces (sloping roofs with a roof pitch of 10° < α <45° and flat roofs with an angle of α ≤ 10°, with a recommended minimum slope of 2%). From the results, according to [63], we applied a sevenlevel classification. The reason was to capture all changes in the slope conditions of the site. The azimuth orientation of roofs classified into eight classes according to the value of the azimuth and the corresponding colored roof area (roof areas colored) ( Table 6, 4th column). Subsequently, these results were reclassified only into two classes ( Table 6, 5th column) according to the suitability of their use for the needs of installation of systems using the amount of incident solar radiation.

10-20
2 sloping environment used a geoprocessing tool in the 3D Analyst Tools category with a set classification of up to seven classes (Table 5). In our study, we wanted to the basis of a mainly from two groups of roof surfaces (sloping roofs with a roof pitch of 10° < α <45° and flat roofs with an angle of α ≤ 10°, with a recommended minimum slope of 2%). From the results, according to [63], we applied a sevenlevel classification. The reason was to capture all changes in the slope conditions of the site. The azimuth orientation of roofs classified into eight classes according to the value of the azimuth and the corresponding colored roof area (roof areas colored) ( Table 6, 4th column). Subsequently, these results were reclassified only into two classes ( Table 6, 5th column) according to the suitability of their use for the needs of installation of systems using the amount of incident solar radiation.

20-30
3 sloping environment used a geoprocessing tool in the 3D Analyst Tools category with a set classification of up to seven classes (Table 5). In our study, we wanted to the basis of a mainly from two groups of roof surfaces (sloping roofs with a roof pitch of 10° < α <45° and flat roofs with an angle of α ≤ 10°, with a recommended minimum slope of 2%). From the results, according to [63], we applied a sevenlevel classification. The reason was to capture all changes in the slope conditions of the site. The azimuth orientation of roofs classified into eight classes according to the value of the azimuth and the corresponding colored roof area (roof areas colored) ( Table 6, 4th column). Subsequently, these results were reclassified only into two classes ( Table 6, 5th column) according to the suitability of their use for the needs of installation of systems using the amount of incident solar radiation.

30-40
4 sloping environment used a geoprocessing tool in the 3D Analyst Tools category with a set classification of up to seven classes (Table 5). In our study, we wanted to the basis of a mainly from two groups of roof surfaces (sloping roofs with a roof pitch of 10° < α <45° and flat roofs with an angle of α ≤ 10°, with a recommended minimum slope of 2%). From the results, according to [63], we applied a sevenlevel classification. The reason was to capture all changes in the slope conditions of the site. The azimuth orientation of roofs classified into eight classes according to the value of the azimuth and the corresponding colored roof area (roof areas colored) ( Table 6, 4th column). Subsequently, these results were reclassified only into two classes ( Table 6, 5th column) according to the suitability of their use for the needs of installation of systems using the amount of incident solar radiation. [40][41][42][43][44][45][46][47][48][49][50] 5 sloping environment used a geoprocessing tool in the 3D Analyst Tools category with a set classification of up to seven classes (Table 5). In our study, we wanted to the basis of a mainly from two groups of roof surfaces (sloping roofs with a roof pitch of 10° < α <45° and flat roofs with an angle of α ≤ 10°, with a recommended minimum slope of 2%). From the results, according to [63], we applied a sevenlevel classification. The reason was to capture all changes in the slope conditions of the site. The azimuth orientation of roofs classified into eight classes according to the value of the azimuth and the corresponding colored roof area (roof areas colored) ( Table 6, 4th column). Subsequently, these results were reclassified only into two classes ( Table 6, 5th column) according to the suitability of their use for the needs of installation of systems using the amount of incident solar radiation.

50-60 6 roof objects
The analysis of the slope ratios of all roof areas (824 roofs) established by the ArcGIS Pro environment used a geoprocessing tool in the 3D Analyst Tools category with a set classification of up to seven classes (Table 5). In our study, we wanted to the basis of a mainly from two groups of roof surfaces (sloping roofs with a roof pitch of 10° < α <45° and flat roofs with an angle of α ≤ 10°, with a recommended minimum slope of 2%). From the results, according to [63], we applied a sevenlevel classification. The reason was to capture all changes in the slope conditions of the site. The azimuth orientation of roofs classified into eight classes according to the value of the azimuth and the corresponding colored roof area (roof areas colored) ( Table 6, 4th column). Subsequently, these results were reclassified only into two classes ( Table 6, 5th column) according to the suitability of their use for the needs of installation of systems using the amount of incident solar radiation.

60-90 7 roof objects
The analysis of the slope ratios of all roof areas (824 roofs) established by the ArcGIS Pro environment used a geoprocessing tool in the 3D Analyst Tools category with a set classification of up to seven classes (Table 5). In our study, we wanted to the basis of a mainly from two groups of roof surfaces (sloping roofs with a roof pitch of 10° < α <45° and flat roofs with an angle of α ≤ 10°, with a recommended minimum slope of 2%). From the results, according to [63], we applied a sevenlevel classification. The reason was to capture all changes in the slope conditions of the site. The azimuth orientation of roofs classified into eight classes according to the value of the azimuth and the corresponding colored roof area (roof areas colored) ( Table 6, 4th column). Subsequently, these results were reclassified only into two classes ( Table 6, 5th column) according to the suitability of their use for the needs of installation of systems using the amount of incident solar radiation.  In a selected part of the study area, we presented the spatial analysis results with a view of the clarity and legibility of the graphic form of the visualization. The result was a representation of the positional and height ratios (Figure 16a), slope ratios (Figure 16b), the azimuth orientation of roof surfaces (Figure 16c), as well as the selection of suitable roof surfaces in terms of further possible usability (installation of systems using the amount of incident solar radiation) (Figure 16d).  In a selected part of the study area, we presented the spatial analysis results with a view of the clarity and legibility of the graphic form of the visualization. The result was a representation of the positional and height ratios (Figure 16a), slope ratios (Figure 16b), the azimuth orientation of roof surfaces (Figure 16c), as well as the selection of suitable roof surfaces in terms of further possible usability (installation of systems using the amount of incident solar radiation) (Figure 16d).  In a selected part of the study area, we presented the spatial analysis results with a view of the clarity and legibility of the graphic form of the visualization. The result was a representation of the positional and height ratios (Figure 16a), slope ratios (Figure 16b), the azimuth orientation of roof surfaces (Figure 16c), as well as the selection of suitable roof surfaces in terms of further possible usability (installation of systems using the amount of incident solar radiation) (Figure 16d).  In a selected part of the study area, we presented the spatial analysis results with a view of the clarity and legibility of the graphic form of the visualization. The result was a representation of the positional and height ratios (Figure 16a), slope ratios (Figure 16b), the azimuth orientation of roof surfaces (Figure 16c), as well as the selection of suitable roof surfaces in terms of further possible usability (installation of systems using the amount of incident solar radiation) (Figure 16d).  In a selected part of the study area, we presented the spatial analysis results with a view of the clarity and legibility of the graphic form of the visualization. The result was a representation of the positional and height ratios (Figure 16a), slope ratios (Figure 16b), the azimuth orientation of roof surfaces (Figure 16c), as well as the selection of suitable roof surfaces in terms of further possible usability (installation of systems using the amount of incident solar radiation) (Figure 16d).  In a selected part of the study area, we presented the spatial analysis results with a view of the clarity and legibility of the graphic form of the visualization. The result was a representation of the positional and height ratios (Figure 16a), slope ratios (Figure 16b), the azimuth orientation of roof surfaces (Figure 16c), as well as the selection of suitable roof surfaces in terms of further possible usability (installation of systems using the amount of incident solar radiation) (Figure 16d).  In a selected part of the study area, we presented the spatial analysis results with a view of the clarity and legibility of the graphic form of the visualization. The result was a representation of the positional and height ratios (Figure 16a), slope ratios (Figure 16b), the azimuth orientation of roof surfaces (Figure 16c), as well as the selection of suitable roof surfaces in terms of further possible usability (installation of systems using the amount of incident solar radiation) (Figure 16d).  In a selected part of the study area, we presented the spatial analysis results with a view of the clarity and legibility of the graphic form of the visualization. The result was a representation of the positional and height ratios (Figure 16a), slope ratios (Figure 16b), the azimuth orientation of roof surfaces (Figure 16c), as well as the selection of suitable roof surfaces in terms of further possible usability (installation of systems using the amount of incident solar radiation) (Figure 16d).  In a selected part of the study area, we presented the spatial analysis results with a view of the clarity and legibility of the graphic form of the visualization. The result was a representation of the positional and height ratios (Figure 16a), slope ratios (Figure 16b), the azimuth orientation of roof surfaces (Figure 16c), as well as the selection of suitable roof surfaces in terms of further possible usability (installation of systems using the amount of incident solar radiation) (Figure 16d).  In a selected part of the study area, we presented the spatial analysis results with a view of the clarity and legibility of the graphic form of the visualization. The result was a representation of the positional and height ratios (Figure 16a), slope ratios (Figure 16b), the azimuth orientation of roof surfaces (Figure 16c), as well as the selection of suitable roof surfaces in terms of further possible usability (installation of systems using the amount of incident solar radiation) (Figure 16d).  In a selected part of the study area, we presented the spatial analysis results with a view of the clarity and legibility of the graphic form of the visualization. The result was a representation of the positional and height ratios (Figure 16a), slope ratios (Figure 16b), the azimuth orientation of roof surfaces (Figure 16c), as well as the selection of suitable roof surfaces in terms of further possible usability (installation of systems using the amount of incident solar radiation) (Figure 16d).  In a selected part of the study area, we presented the spatial analysis results with a view of the clarity and legibility of the graphic form of the visualization. The result was a representation of the positional and height ratios (Figure 16a), slope ratios (Figure 16b), the azimuth orientation of roof surfaces (Figure 16c), as well as the selection of suitable roof surfaces in terms of further possible usability (installation of systems using the amount of incident solar radiation) (Figure 16d).  In a selected part of the study area, we presented the spatial analysis results with a view of the clarity and legibility of the graphic form of the visualization. The result was a representation of the positional and height ratios (Figure 16a), slope ratios (Figure 16b), the azimuth orientation of roof surfaces (Figure 16c), as well as the selection of suitable roof surfaces in terms of further possible usability (installation of systems using the amount of incident solar radiation) (Figure 16d).  In a selected part of the study area, we presented the spatial analysis results with a view of the clarity and legibility of the graphic form of the visualization. The result was a representation of the positional and height ratios (Figure 16a), slope ratios (Figure 16b), the azimuth orientation of roof surfaces (Figure 16c), as well as the selection of suitable roof surfaces in terms of further possible usability (installation of systems using the amount of incident solar radiation) (Figure 16d).  In a selected part of the study area, we presented the spatial analysis results with a view of the clarity and legibility of the graphic form of the visualization. The result was a representation of the positional and height ratios (Figure 16a), slope ratios (Figure 16b), the azimuth orientation of roof surfaces (Figure 16c), as well as the selection of suitable roof surfaces in terms of further possible usability (installation of systems using the amount of incident solar radiation) (Figure 16d).  In a selected part of the study area, we presented the spatial analysis results with a view of the clarity and legibility of the graphic form of the visualization. The result was a representation of the positional and height ratios (Figure 16a), slope ratios (Figure 16b), the azimuth orientation of roof surfaces (Figure 16c), as well as the selection of suitable roof surfaces in terms of further possible usability (installation of systems using the amount of incident solar radiation) (Figure 16d).  In a selected part of the study area, we presented the spatial analysis results with a view of the clarity and legibility of the graphic form of the visualization. The result was a representation of the positional and height ratios (Figure 16a), slope ratios (Figure 16b), the azimuth orientation of roof surfaces (Figure 16c), as well as the selection of suitable roof surfaces in terms of further possible usability (installation of systems using the amount of incident solar radiation) (Figure 16d).  In a selected part of the study area, we presented the spatial analysis results with a view of the clarity and legibility of the graphic form of the visualization. The result was a representation of the positional and height ratios (Figure 16a), slope ratios (Figure 16b), the azimuth orientation of roof surfaces (Figure 16c), as well as the selection of suitable roof surfaces in terms of further possible usability (installation of systems using the amount of incident solar radiation) (Figure 16d). In a selected part of the study area, we presented the spatial analysis results with a view of the clarity and legibility of the graphic form of the visualization. The result was a representation of the positional and height ratios (Figure 16a), slope ratios (Figure 16b), the azimuth orientation of roof surfaces (Figure 16c), as well as the selection of suitable roof surfaces in terms of further possible usability (installation of systems using the amount of incident solar radiation) (Figure 16d).
On mid-rise buildings is a visible difference in the achieved processing outputs from the level of presence of points of the outlier's group in the LiDAR file. Their presence in the results can cause incorrect classification of the roof's boundary during the analyses. For example, in slope analysis, the roof's boundary presented with red color (Figure 17a), which according to Table 5, represents a very steep slope roof (up to 90 • ), presenting the facades of buildings. Additionally, in the analysis of height conditions, the presence of color from the non-adjacent height interval (yellow corresponding to the blue edge) is visible on the boundary of the roofs (Figure 17b). Removing outliers points during processing is reflected in the visualization of the slope of the roof surfaces in the form of a uniform color of the roof surface (e.g., without red boundary or colors from lower height intervals).
From the results of the slope analysis (Figure 16b), is possible to identify flat roofs that show the potential for green roofs (dark green color). The results of the azimuth-orientation analysis (Figure 16c,d) provide the potential for the installation of solar systems. These buildings need supplementing by the technical parameters required for the installation of these systems.
The results of this case study form the basis for the identification of roof areas and the creation of 3D models of buildings/cities for a larger territory at the level of details 2 (LOD 2). The proposed method represents an easy and fast solution for the approximate determination of the usability of roof areas. The proposed method shows good results in the case of simple and regular types of roofs. For a more complex roof structure, an individual approach is suitable for more accurate capture of the geometry of the building. Three-dimensional urban models are used to create urban ecosystems for sustainable urban planning [64]. In a selected part of the study area, we presented the spatial analysis results with a view of the clarity and legibility of the graphic form of the visualization. The result was a representation of the positional and height ratios (Figure 16a), slope ratios (Figure 16b), the azimuth orientation of roof surfaces (Figure 16c), as well as the selection of suitable roof surfaces in terms of further possible usability (installation of systems using the amount of incident solar radiation) (Figure 16d). On mid-rise buildings is a visible difference in the achieved processing outputs from the level of presence of points of the outlier's group in the LiDAR file. Their presence in the results can cause incorrect classification of the roof's boundary during the analyses. For example, in slope analysis, the roof's boundary presented with red color (Figure 17a), which according to Table 5, represents a very steep slope roof (up to 90°), presenting the facades of buildings. Additionally, in the analysis of height conditions, the presence of color from the non-adjacent height interval (yellow corresponding to the blue edge) is visible on the boundary of the roofs (Figure 17b). Removing outliers points during processing is reflected in the visualization of the slope of the roof surfaces in the form of a uniform color of the roof surface (e.g., without red boundary or colors from lower height intervals). processing is reflected in the visualization of the slope of the roof surfaces in the form of a uniform color of the roof surface (e.g., without red boundary or colors from lower height intervals).
(a) (b) Figure 17. Comparison of LiDAR point cloud processing before and after removing the outlier points on the selected two apartment buildings: (a) slope analysis; (b) elevation analysis.
From the results of the slope analysis (Figure 16b), is possible to identify flat roofs that show the potential for green roofs (dark green color). The results of the azimuth-orientation analysis ( Figure  16c), (Figure 16d) provide the potential for the installation of solar systems. These buildings need supplementing by the technical parameters required for the installation of these systems.
The results of this case study form the basis for the identification of roof areas and the creation of 3D models of buildings/cities for a larger territory at the level of details 2 (LOD 2). The proposed method represents an easy and fast solution for the approximate determination of the usability of roof areas. The proposed method shows good results in the case of simple and regular types of roofs. For a more complex roof structure, an individual approach is suitable for more accurate capture of the geometry of the building. Three-dimensional urban models are used to create urban ecosystems for sustainable urban planning [64].
With climate change (warming), cities face an increased frequency and extent of extreme natural hazards and weather events, such as rising temperatures in growing cities (the formation of heat islands), severe storms, droughts, and floods from local storms. Without the possibility of knowing the space in which we live, it is impossible to face these challenges. As other studies [65] show, building roofs offer the potential to address the synergistic functioning of urban ecosystems. The identification of roof surfaces from LiDAR data in combination with the results of other collection methods opens up space for the creation of object geometry. The acquired properties of residential buildings (geometric and morphometric properties, the roof height of buildings) allow various types of spatial analyses. Knowledge of geometric and topological conditions of residential buildings forms With climate change (warming), cities face an increased frequency and extent of extreme natural hazards and weather events, such as rising temperatures in growing cities (the formation of heat islands), severe storms, droughts, and floods from local storms. Without the possibility of knowing the space in which we live, it is impossible to face these challenges. As other studies [65] show, building roofs offer the potential to address the synergistic functioning of urban ecosystems. The identification of roof surfaces from LiDAR data in combination with the results of other collection methods opens up space for the creation of object geometry. The acquired properties of residential buildings (geometric and morphometric properties, the roof height of buildings) allow various types of spatial analyses. Knowledge of geometric and topological conditions of residential buildings forms the basis of the calculation of incident solar radiation on roof areas.
Within the European Union, the share of fossil fuel power plants is declining overall, and more is being invested in renewable energy sources also by Directive (EU) 2018/2001 and the Council of 11 December 2018 on the promotion of the use of energy from renewable sources. In the conditions of the Slovak Republic, the subsidy support according to Act no. 309/2009 Coll. on the Support of Renewable Energy Sources and Highly Efficient Combined Production (www.slov-lex.sk/pravne-predpisy/SK/ZZ/2009/309/) enables the installation of equipment with an output of up to 100 kW placed on the roof structure or perimeter cladding of one building connected to the ground by a solid foundation registered in the Real Estate Cadastre. Additionally, for this reason it is necessary to know the theoretical potential of roof areas in the city within the construction of green cities in Slovakia.
The connection of results from our study with the database of descriptive properties or building information model (BIM) opens up space for the creation of a comprehensive database usable in the field of building design and architecture within the framework of sustainable urban planning strategy.

Conclusions
This study focused on the topic of identifying the roof areas of residential buildings to operatively determine the essential characteristics of these buildings in the construction of smart cities. The framework of this study proposed an emphasis on maintaining the regularity of the roof boundary, regarding the study aim.
We proposed a solution for extracting the contour and segments of the individual parts of roofs from the LiDAR data source. In solving this, we have used GIS tools complying the following sequence of steps. The first step was to assess the quality of the input data available from official public sources, guaranteeing the origin and quality of the spatial data. LiDAR data was the result of the first step, which ensured compliance with quality requirements. In the next level, these files provided the basis for the creation of a raster input, which served to identify the boundary of the roof surface of irregular shape. Methods of generalization created the contours of the roof surface boundary in a simplified regular form. From the total number of buildings in the examined area (824 roofs), six types of roofs were selected according to the chosen selection criteria. The segmentation process generated segments inside the roof boundary above the level of the selected group of objects.
The visualization of the analyses of selected geometric and topological parameters of roof surfaces was the last level of the study. The obtained results and the proposed solution represent a suitable basis for possible application in the field of potential determination for solar systems or green roofs in the field of building smart cities. As for future research, this study represents the basis for further research in the field of determining the solar potential of roof areas in the conditions of the Slovak Republic. Part of further research also includes the issue of green roofs and their impact on reducing the temperature in residential areas.