Roof type identification method and system based on multi-source data
By using a roof type identification method based on multi-source data and utilizing slope and aspect analysis to generate roof range raster data, the problem of low efficiency and reliability in existing roof type identification technologies is solved, and fast and accurate roof type identification is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG PROVINCIAL LAND SURVEYING & MAPPING INST
- Filing Date
- 2026-01-30
- Publication Date
- 2026-05-15
AI Technical Summary
Existing technologies for roof type identification are not efficient and reliable, manual judgment is costly and inefficient, and airborne point cloud identification data is large in volume and has a simple identification logic, making it difficult to meet the timeliness and accuracy requirements of large-scale operations.
The roof type identification method based on multi-source data obtains basic geographic entity data and DSM data, generates roof range raster data, calculates slope and aspect values, performs reclassification, and determines the roof type by combining the area ratio of slope and aspect.
It improves the efficiency and reliability of roof type recognition, and can quickly and accurately identify different types such as flat roofs, single-slope roofs, gable roofs, hip roofs and spherical roofs, meeting the diverse recognition needs in complex scenarios.
Smart Images

Figure CN122049487A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of urban 3D model construction, and in particular to a method and system for roof type identification based on multi-source data. Background Technology
[0002] Against the backdrop of the in-depth advancement of "Real-world 3D China," the construction quality of urban 3D models, as the core foundation of digital twin space, directly determines the level of digital empowerment in areas such as refined management of natural resources, smart urban planning, and precise emergency response. The acquisition of roof structure types is one of the key elements ensuring the integrity of LOD1.3 level data.
[0003] In the context of large-scale production, roof type identification work, while ensuring accuracy, also needs to focus on cost and efficiency. Currently, roof type identification is mainly achieved through manual judgment or airborne point cloud recognition. The manual judgment mode relies on visual interpretation and attribute annotation, which has inherent drawbacks such as long operation cycles, high labor costs, and low efficiency, making it difficult to meet the timeliness requirements of large-scale operations. Although airborne point cloud recognition has the technical advantages of high recognition accuracy and fast automated processing speed, it still has the following problems: ① The data volume is huge, resulting in high costs for data storage, transmission, and preprocessing; ② The recognition logic is simple, mainly relying on basic geometric features such as the polygon area and normal vector of the roof for discrimination, which can effectively distinguish a narrow range of roof types, resulting in low efficiency and reliability of roof type identification.
[0004] To address this problem, the present invention provides a roof type identification method and system based on multi-source data to solve at least one of the aforementioned problems. Summary of the Invention
[0005] In order to solve the problems existing in the prior art, this invention innovatively proposes a roof type identification method and system based on multi-source data, which effectively solves the problem of low efficiency and reliability of roof type identification caused by the prior art, and effectively improves the efficiency and reliability of roof type identification.
[0006] The first aspect of this invention provides a roof type identification method based on multi-source data, comprising: Acquire basic geographic entity data and DSM data respectively. Based on the basic geographic entity data and DSM data, extract building entities and generate roof range raster data. For the roof area raster data, calculate the slope value and aspect value of each cell to generate slope raster data and aspect raster data; The slope raster data is reclassified so that different slope raster data correspond to different roof types; the aspect raster data is also reclassified so that different aspect raster data correspond to different slope aspects. Based on the roof area grid data, calculate the ratio of each slope aspect to the area of the roof within each section; Based on the reclassification results of the slope raster data and the ratio of each slope aspect to the area of the roof within each roof range, the type of roof to be identified is determined.
[0007] Optionally, basic geographic entity data and DSM data are acquired separately. Based on the basic geographic entity data and DSM data, building entities are extracted, and rooftop raster data is generated. Specifically, this includes: Acquire basic geographic entity data and DSM data separately; Extract polygons from the RJGZA layer in the basic geographic entity data. The CLASNAME field attribute value of the polygon is the CLASNAME field attribute value related to the roof type. The extracted patches are reduced to a first preset ratio, and the reduced patches are used as the roof area of the building. Using the building roof area as the clipping element, all roof areas are clipped from the DSM data to generate roof area raster data.
[0008] Optionally, for the roof area raster data, the slope value of each cell is calculated as follows: , in, The slope angle, Let x be the rate of change of elevation in the x-direction of the geodetic coordinate system. y is the rate of change of elevation in the y-direction of the geodetic coordinate system.
[0009] Optionally, for the roof area raster data, the slope value of each cell is calculated as follows: , in, The slope angle, Let x be the rate of change of elevation in the x-direction of the geodetic coordinate system. y is the rate of change of elevation in the y-direction of the geodetic coordinate system.
[0010] Optionally, the slope raster data can be reclassified, with different slope raster data corresponding to different roof types; the aspect raster data can also be reclassified, with different aspect raster data corresponding to different slope directions. Specifically, this includes: Reclassification values are obtained by reclassifying slope raster data based on slope angle. When the slope angle is in the first angle range and the second angle range, the corresponding reclassification values are the first reclassification value and the second reclassification value, respectively, and the corresponding roof types are flat roof and non-flat roof, respectively. The slope aspect grid data is first classified based on the slope aspect angle and the main angle of the house. When the slope aspect angle is in the fourth angle range, the fifth angle range, the sixth angle range, and the seventh angle range, the corresponding slope aspects are north slope, east slope, south slope, and west slope, respectively.
[0011] Furthermore, the slope aspect raster data is reclassified, with different slope aspect raster data corresponding to different slope aspects. Specifically, this includes: The slope aspect grid data is classified a second time based on the slope aspect angle and the main angle of the house. When the slope aspect angle is in the eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth, and fifteenth angle ranges, the corresponding slope aspects are North Slope, Northeast Slope, East Slope, Southeast Slope, South Slope, Southwest Slope, West Slope, and Northwest Slope, respectively.
[0012] Optionally, the area of each slope is the product of the number of pixels on that slope and the actual area of a single pixel, and the area of this roof is the product of the number of pixels on this roof and the actual area of a single pixel in the roof range raster data.
[0013] Furthermore, the ratio of each slope direction to the area of the roof within each roof area includes the area ratio of the four slope directions and the area ratio of the eight slope directions. The area ratio of the four slope directions is the ratio of the area of the north slope, east slope, south slope, and west slope to the area of the roof. The area ratio of the eight slope directions is the ratio of the area of the north slope, northeast slope, east slope, southeast slope, south slope, southwest slope, west slope, and northwest slope to the area of the roof.
[0014] Furthermore, based on the reclassification results of the slope raster data and the ratio of each slope aspect to the area of each roof within each roof area, the specific roof types to be identified are determined as follows: Obtain the slope angle of the roof to be identified. When the slope angle is within the first angle range, the corresponding roof type is flat roof. Obtain the ratio of each slope direction within the range of each roof to the area of the roof to be identified. If the area ratio of the slope direction with the largest area ratio is greater than the second preset ratio, the corresponding roof type is a single-slope roof. If the area proportion of symmetrical slopes is less than the first preset difference range and greater than the third preset proportion, the corresponding roof type is a gable roof. If the area ratio of each of the four slopes is less than the second preset difference range, and the difference between each ratio and the fourth preset ratio is less than the third preset difference range, the corresponding roof type is a four-slope roof. If the area ratio of each of the eight slopes is less than the fourth preset difference range, and the difference between each ratio and the fifth preset ratio is less than the fifth preset difference range, the corresponding roof type is a spherical roof; otherwise, the corresponding roof type is a four-slope roof.
[0015] A second aspect of the present invention provides a roof type identification system based on multi-source data, comprising: The acquisition module acquires basic geographic entity data and DSM data respectively. Based on the basic geographic entity data and DSM data, it extracts building entities and generates roof range raster data. The generation module calculates the slope and aspect values of each cell in the roof area raster data, and generates slope raster data and aspect raster data. The reclassification module reclassifies slope raster data, with different slope raster data corresponding to different roof types; it also reclassifies aspect raster data, with different aspect raster data corresponding to different slope directions. The calculation module calculates the ratio of each slope aspect to the area of the roof within each roof area based on the roof area grid data. The determination module identifies the type of roof to be identified based on the reclassification results of the slope raster data and the ratio of each slope aspect to the area of the roof within each roof range.
[0016] The technical solution adopted in this invention has the following technical effects: 1. In this invention, the slope and aspect values of each pixel in the roof area raster data are calculated to generate slope raster data and aspect raster data. The slope raster data is reclassified, with different slope raster data corresponding to different roof types. The aspect raster data is also reclassified, with different aspect raster data corresponding to different slope directions. Based on the roof area raster data, the ratio of each slope direction to the area of each roof area is calculated for each section. Based on the reclassification results of the slope raster data and the ratio of each slope direction to the area of each roof area, the roof type to be identified is determined. This effectively solves the problem of low efficiency and reliability of roof type identification caused by existing technologies, and effectively improves the efficiency and reliability of roof type identification.
[0017] 2. In the technical solution of this invention, the slope grid data is reclassified according to the slope value to obtain the reclassification value. When the slope value is in the first angle range and the second angle range respectively, the corresponding reclassification values are the first reclassification value and the second reclassification value, and the corresponding roof types are flat roof and non-flat roof respectively. By introducing the slope analysis in the terrain analysis, the "flat roof" can be identified simply, quickly and accurately, which improves the efficiency of roof type identification.
[0018] 3. In the technical solution of this invention, the slope direction grid data is first classified according to the slope angle and the main angle of the house. When the slope angle is in the fourth angle range, the fifth angle range, the sixth angle range, and the seventh angle range, the corresponding slope directions are north slope, east slope, south slope, and west slope, respectively. In the slope direction reclassification, the main angle of the house is calculated first, instead of directly using a single slope direction classification method, which effectively avoids the influence of the house orientation and improves the reliability of roof type identification.
[0019] 4. In the technical solution of this invention, the slope direction grid data is classified a second time based on the slope angle and the main angle of the house. When the slope angle is in the eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth, and fifteenth angle ranges, the corresponding slope directions are north-slope, northeast-slope, east-slope, southeast-slope, south-slope, southwest-slope, west-slope, and northwest-slope, respectively. This not only considers the reclassification of slope directions in four directions but also the reclassification of slope directions in eight directions, further improving the reliability of roof type identification.
[0020] 5. In the technical solution of this invention, the reclassification value obtained after reclassifying the slope values within each roof area of the roof to be identified is used as the slope constant value of the roof to be identified. When the slope constant value of the roof to be identified is the first slope constant value, the corresponding roof type is a flat roof. If the area proportion of the slope with the largest area proportion is greater than the second preset proportion, the corresponding roof type is a single-slope roof. If the area proportions of the symmetrical slopes are all less than the first preset difference range and are all greater than the third preset proportion, the corresponding roof type is a gable roof. If the area proportions of the four slopes are all less than the second preset difference range and the difference between them and the fourth preset proportion is less than the third preset difference range, the corresponding roof type is a four-slope roof. If the area proportions of the eight slopes are all less than the fourth preset difference range and the difference between them and the fifth preset proportion is less than the fifth preset difference range, the corresponding roof type is a spherical roof. Otherwise, the corresponding roof type is a four-slope roof. This method can quickly identify different types of roof types such as flat roofs, single-slope roofs, gable roofs, four-slope roofs, and spherical roofs, and can meet the diverse identification needs in complex scenarios.
[0021] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a flowchart illustrating the method of Embodiment 1 in the present invention; Figure 2 This is another flowchart illustrating the method of Embodiment 1 in the present invention; Figure 3 This is a schematic diagram of the main axis and main angle of the house in the method of Embodiment 1 of the present invention; Figure 4 This is a schematic diagram of the roof type identification (hierarchical classification determination) process in the method of Embodiment 1 of the present invention; Figure 5 This is a schematic diagram of the system structure in Embodiment 2 of the present invention. Detailed Implementation
[0024] To clearly illustrate the technical features of this solution, the invention will be described in detail below through specific embodiments and in conjunction with the accompanying drawings. The following disclosure provides many different embodiments or examples for implementing different structures of the invention. To simplify the disclosure of the invention, components and arrangements of specific examples are described below. Furthermore, reference numerals and / or letters may be repeated in different examples. This repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed. It should be noted that the components illustrated in the drawings are not necessarily drawn to scale. Descriptions of well-known components, processing techniques, and processes are omitted in this invention to avoid unnecessarily limiting the invention.
[0025] Example 1 like Figures 1-2 As shown, this invention provides a roof type identification method based on multi-source data, including: S1: Acquire basic geographic entity data and DSM data respectively. Based on the basic geographic entity data and DSM data, extract building entities and generate roof range raster data. S2, for the roof area raster data, calculate the slope value and aspect value of each cell, and generate slope raster data and aspect raster data respectively; S3 reclassifies the slope raster data, with different slope raster data corresponding to different roof types; it also reclassifies the aspect raster data, with different aspect raster data corresponding to different slope directions. S4, Based on the roof range grid data, calculate the ratio of each slope aspect to the area of the roof within each zone; S5. Based on the reclassification results of the slope raster data and the ratio of each slope aspect to the area of the roof within each roof range, determine the type of roof to be identified.
[0026] Specifically, step S1, corresponding to the data preparation stage, includes: S11, acquire basic geographic entity data and DSM data respectively; Two types of data are required: large-scale digital line graphics (DLG) data or basic geographic entity data in two-dimensional representation, and digital surface models (DSM). Large-scale DLG data or basic geographic entity data can be obtained from existing data from departments such as housing and urban-rural development and natural resources, and is mainly used to extract the vector extent of buildings. DSM data is a digital model describing the elevation of the Earth's surface and all objects on it (such as buildings, trees, bridges, etc.), and can be obtained through technologies such as satellite remote sensing, aerial photogrammetry, and lidar.
[0027] The basic geographic entity data used in this method are fundamental surveying and mapping results formed through data conversion and manual collection. The DSM data was created using airborne LiDAR point cloud technology. All data are in the CGCS2000 geodetic coordinate system.
[0028] S12, extract the CLASNAME field attribute value related to roof type from the RJGZA layer in the basic geographic entity data; Specifically, map features are extracted from the RJGZA layer in the basic geographic entity data. The CLASNAME field attribute value of the map features is the CLASNAME field attribute value related to the roof type, that is, the CLASNAME field attribute value is "ordinary house", "shed", "damaged house", "stilted house", "art building", "corridor house, stilted building", "cave dwelling", "yurt, grazing point" and other elements related to the roof type.
[0029] S13, reduce the extracted patches by a first preset ratio, and use the reduced patches as the roof area of the building; Specifically, each building entity extracted in S12 is reduced by 20% (preset ratio), and the reduced vector is used as the roof range of the building. The main reasons are: ① The base map used in the production of basic geographic entity data is oblique photogrammetric imagery, and there is a certain deviation between the directly extracted building entities and the actual roof range of the building; ② Building roofs are easily obstructed by trees, eaves of adjacent buildings, etc., affecting the judgment of roof structure type.
[0030] S14 uses the building roof range as the clipping element to clip all roof ranges from the DSM data and generate roof range raster data.
[0031] Specifically, using the roof range determined in step S13 as the clipping element, all roof ranges are clipped from the DSM data to generate "roof range raster data".
[0032] In step S2, the multi-dimensional building features include constant slope, area proportions of four-sided slopes, and area proportions of eight-sided slopes. Slope and aspect analyses are performed on the "roof area raster data" to calculate the slope and aspect values of each pixel, generating "slope raster data" and "aspect raster data." This calculation process can be completed using GIS software such as ArcGIS. Specifically, for the roof area raster data, the slope value of each pixel is calculated as follows: , in, The slope angle, Let x be the rate of change of elevation in the x-direction of the geodetic coordinate system. y is the rate of change of elevation in the y-direction of the geodetic coordinate system.
[0033] Slope describes the degree of inclination of a point on the Earth's surface, specifically the angle between the tangent plane at that point and the horizontal plane, expressed in degrees, ranging from 0° to 90°. For DSM data, slope calculation involves determining the ratio of the elevation change rate between the center point of a raster cell and the center points of its adjacent raster cells to the horizontal distance, and then converting this ratio into a slope angle (the calculation formula is shown above). The third-order inverse distance squared weighted difference method is commonly used to calculate these two parameters.
[0034] For the roof area raster data, the slope value of each cell is calculated as follows: , in, The slope angle, Let x be the rate of change of elevation in the x-direction of the geodetic coordinate system. y is the rate of change of elevation in the y-direction of the geodetic coordinate system.
[0035] Aspect is defined as the direction of the projection of the normal onto the horizontal plane, reflecting the orientation of the terrain unit. It is expressed in angles and ranges from 0° to 360°. For DSM data, the aspect calculation formula is shown above. The third-order inverse distance squared weighted difference method is commonly used to calculate these two parameters.
[0036] In step S3, the slope raster data is reclassified, with different slope raster data corresponding to different roof types; the aspect raster data is also reclassified, with different aspect raster data corresponding to different slope directions. Specifically, this includes: S31, Reclassify the slope raster data according to the slope value to obtain the reclassification value. When the slope value is in the first angle range and the second angle range respectively, the corresponding reclassification values are the first reclassification value and the second reclassification value, and the corresponding roof types are flat roof and non-flat roof respectively. Specifically, the slope raster data is reclassified using the following method: when the slope value... (First angle range), for "flat roof", reclassification value is 1; when the slope value (Second angle range), for "non-flat roof", reclassification value is -1; when the slope value (Third angle range), is "wall", reclassification value is 0.
[0037] Based on the "roof range raster data," the slope values of each roof range (including all roofs and other non-roof type objects such as solar water heaters within each roof range) are reclassified and statistically analyzed. The results include 1, -1, and 0, with 0 values being less common, mostly representing low-rise houses obscured by trees, requiring manual addition for identification. The constant values are calculated to ensure that the primary roof type is used as the final result when determining the roof type. The reclassified slope values obtained after reclassifying the slope values within each roof range of the roof to be identified are then used as the slope constant value for the roof to be identified.
[0038] S32. Based on the slope angle and the main angle of the house, the slope raster data is classified into the first category. When the slope angle is in the fourth angle range, the fifth angle range, the sixth angle range, and the seventh angle range, the corresponding slope directions are north slope, east slope, south slope, and west slope, respectively.
[0039] Specifically, the acquired slope raster data was smoothed using a Gaussian filter to remove noise. The principal angle values for each building were calculated using ArcGIS software's "Calculate Principal Angles of Surfaces". .like Figure 3 As shown, , , , These are the four corners of the house, their longer sides or The straight line containing the house is called the principal axis L, and the azimuth angle of the principal axis is called the principal angle of the house. .
[0040] House owner's perspective Calculation formula: .
[0041] The smoothed slope aspect raster data is reclassified based on slope aspect. The classification method is as follows: when the slope aspect value... satisfy (Fourth angle range), for "northward slope", reclassification value is 1; when slope value satisfy (Fifth angle range), for "eastward slope", reclassification value is 2; when slope value satisfy (Sixth angle range), for "southward slope", reclassification value is 3; when the slope value (Seventh angle range), is "west slope", reclassification value is 4; the rest are Nodata.
[0042] Preferably, in step S3, the reclassification of the slope aspect raster data, where different slope aspect raster data correspond to different slope aspects, further includes: S33. The slope aspect grid data is classified a second time based on the slope aspect angle and the main angle of the house. When the slope aspect angle is in the eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth, and fifteenth angle ranges, the corresponding slope aspects are North Slope, Northeast Slope, East Slope, Southeast Slope, South Slope, Southwest Slope, West Slope, and Northwest Slope, respectively.
[0043] Specifically, the acquired slope raster data is smoothed using a Gaussian filter to remove noise. The principal angle values for each building can be calculated using ArcGIS software's "Calculate Principal Angle of Surface". .
[0044] The smoothed slope aspect raster data is reclassified based on slope aspect. The classification method is as follows: when the slope aspect value... satisfy (Eighth angle range), for "north slope", reclassification value is 1; when slope value satisfy (Ninth angle range), for "northeast slope", reclassification value is 2; when slope value satisfy (Tenth angle range), for "eastward slope", reclassification value is 3; when slope value satisfy (Eleventh angle range), for "southeast slope", reclassification value 4; when slope value satisfy (Twelfth angle range), for "southward slope", reclassification value is 5; when the slope value satisfy (Thirteenth angle range), for "southwest slope", reclassification value 6; when slope value satisfy (Fourteenth angle range), is "west slope", reclassification value is 7; when slope value satisfy (15th angle range), is "northwest slope", reclassification value is 8; the rest are Nodata.
[0045] In step S4, based on the roof range raster data, the ratio of each slope aspect to the area of the roof within each roof range is calculated statistically. The area of each slope aspect is the number of pixels in that slope aspect multiplied by the actual area of a single pixel, and the area of the roof is the number of pixels corresponding to the roof in the roof range raster data multiplied by the actual area of a single pixel.
[0046] Specifically, the ratio of each slope direction to the area of the roof within each roof area includes the area ratio of the four slope directions and the area ratio of the eight slope directions. The area ratio of the four slope directions is the ratio of the area of the north slope, east slope, south slope, and west slope to the area of the roof. The area ratio of the eight slope directions is the ratio of the area of the north slope, northeast slope, east slope, southeast slope, south slope, southwest slope, west slope, and northwest slope to the area of the roof.
[0047] In step S5, such as Figure 4 As shown, based on the reclassification results of the slope raster data and the ratio of each slope aspect to the area of each roof within each roof area, the specific roof types to be identified include: S51, obtain the reclassification value obtained after reclassifying the slope value within each roof range, and take the reclassification value with the highest frequency as the slope constant value of the roof to be identified (the slope constant value refers to the reclassification value with the highest frequency of the slope value within each roof range). When the slope constant value of the roof to be identified is the first slope constant value, the corresponding roof type is flat roof. Specifically, based on the constant slope value, it is determined whether the roof is a "flat roof". If the constant slope value is 1, the roof type is "flat roof"; if the constant slope value is -1, the roof type is "non-flat roof", and the process proceeds to the next step. S52, obtain the ratio of each slope direction within each roof range of the roof to be identified to the area of this roof. If the area ratio of the slope direction with the largest area ratio is greater than the second preset ratio, the corresponding roof type is a single-slope roof. Specifically, the roof type is determined based on the area proportion of the four slope directions. If the area proportion of the dominant slope direction (i.e., the slope direction with the largest area proportion) is greater than 80% (the second preset proportion), the roof type is "single-slope roof"; otherwise, it is "non-single-slope roof", and the process proceeds to the next step. S53, if the area ratio of symmetrical slopes is less than the first preset difference range and greater than the third preset ratio, the corresponding roof type is a gable roof. Specifically, the roof type is determined based on the area proportion of the four slope directions. If the area proportions of the dominant slope direction (i.e., the slope direction with the largest area proportion) and the secondary slope direction (i.e., the slope direction with the second largest area proportion) are close (less than the first preset difference range, which can be 4% or can be flexibly adjusted according to the actual situation) and both are ≥30% (the third preset ratio), and the dominant slope direction and the secondary dominant slope direction are symmetrical slope directions, i.e., the two slope directions are south slope and north slope or east slope and west slope, the roof type is "gable roof", and the rest are "non-gable roof", then proceed to the next step of the judgment process. S54, if the area ratio of each of the four slopes is less than the second preset difference range, and the difference between each of them and the fourth preset ratio is less than the third preset difference range, the corresponding roof type is a four-slope roof. Specifically, the roof type is determined based on the area ratio of the four slopes. If the area ratio of each of the four slopes is within 20% to 30%, that is, the area ratio of each of the four slopes is less than the second preset difference range (e.g., 10%), and the difference between each of the four slopes and the fourth preset ratio (25%) is less than the third preset difference range (e.g., 5%), the roof type is either a "four-slope roof" or a "spherical roof", and proceeds to the next step of the judgment process; the rest are "other roofs", which require further manual judgment due to noise impacts such as tree obstruction, large roof solar area, roof damage, and roof under construction.
[0048] S55, if the area ratio of each of the eight slopes is less than the fourth preset difference range, and the difference between each ratio and the fifth preset ratio is less than the fifth preset difference range, the corresponding roof type is a spherical roof; otherwise, the corresponding roof type is a four-slope roof.
[0049] Specifically, based on the area ratio of the eight slopes, the roof type is distinguished as either "four-slope roof" or "spherical roof". When the area ratio of each of the eight slopes is within 10% to 15%, that is, the area ratio of each of the eight slopes is less than the fourth preset difference range (e.g., 5%), and the difference between each of the eight slopes and the fourth preset ratio (12.5%) is less than the fifth preset difference range (e.g., 2.5%), the roof type is "spherical roof", and the rest are "four-slope roof".
[0050] In this invention, the slope and aspect values of each pixel in the roof area raster data are calculated to generate slope raster data and aspect raster data. The slope raster data is reclassified, with different slope raster data corresponding to different roof types. The aspect raster data is also reclassified, with different aspect raster data corresponding to different slope directions. Based on the roof area raster data, the ratio of each slope direction to the area of each roof area is calculated for each section. Based on the reclassification results of the slope raster data and the ratio of each slope direction to the area of each roof area, the roof type to be identified is determined. This effectively solves the problem of low efficiency and reliability of roof type identification caused by existing technologies, and effectively improves the efficiency and reliability of roof type identification.
[0051] In the technical solution of this invention, slope grid data is reclassified based on slope value to obtain reclassification value. When the slope value is in the first angle range and the second angle range respectively, the corresponding reclassification values are the first reclassification value and the second reclassification value, and the corresponding roof types are flat roof and non-flat roof respectively. By introducing slope analysis in terrain analysis, "flat roof" can be identified simply, quickly and accurately, thus improving the efficiency of roof type identification.
[0052] In this invention, the slope aspect grid data is first classified based on the slope aspect angle and the main angle of the house. When the slope aspect angle is in the fourth, fifth, sixth, and seventh angle ranges, the corresponding slope aspects are north, east, south, and west, respectively. In the slope aspect reclassification, the main angle of the house is calculated first, instead of directly using a single slope aspect classification method, which effectively avoids the influence of the house orientation and improves the reliability of roof type identification.
[0053] In this invention, the slope aspect grid data is reclassified based on the slope aspect angle and the main angle of the building. When the slope aspect angle is in the eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth, and fifteenth angle ranges, the corresponding slope aspects are north-slope, northeast-slope, east-slope, southeast-slope, south-slope, southwest-slope, west-slope, and northwest-slope, respectively. This not only considers the reclassification of slope aspects in four directions but also in eight directions, further improving the reliability of roof type identification.
[0054] The technical solution of this invention obtains reclassified values after reclassifying the slope values within each roof area of the roof to be identified. The reclassified value with the highest frequency is taken as the slope constant value of the roof to be identified. When the slope constant value of the roof to be identified is the first slope constant value, the corresponding roof type is a flat roof. If the area proportion of the slope with the largest area proportion is greater than the second preset proportion, the corresponding roof type is a single-slope roof. If the area proportions of symmetrical slopes are all less than the first preset difference range and are all greater than the third preset proportion, the corresponding roof type is a gable roof. If the area proportions of the four slopes are all less than the second preset difference range and the difference between the four and the fourth preset proportion is less than the third preset difference range, the corresponding roof type is a four-slope roof. If the area proportions of the eight slopes are all less than the fourth preset difference range and the difference between the eight and the fifth preset proportion is less than the fifth preset difference range, the corresponding roof type is a spherical roof. Otherwise, the corresponding roof type is a four-slope roof. This method can quickly identify different types of roof types such as flat roofs, single-slope roofs, gable roofs, four-slope roofs, and spherical roofs, and can meet the diverse identification needs in complex scenarios.
[0055] Example 2 like Figure 5 As shown, the present invention also provides a roof type identification system based on multi-source data, comprising: The acquisition module 101 acquires basic geographic entity data and DSM data respectively. Based on the basic geographic entity data and DSM data, it extracts building entities and generates roof range raster data. The generation module 102 calculates the slope and aspect values of each pixel in the roof area raster data, and generates slope raster data and aspect raster data respectively. The reclassification module 103 reclassifies the slope raster data, with different slope raster data corresponding to different roof types; it also reclassifies the aspect raster data, with different aspect raster data corresponding to different slope directions. Calculation module 104 calculates the ratio of each slope aspect to the area of the roof within each roof area based on the roof range grid data. The determination module 105 determines the type of roof to be identified based on the reclassification results of the slope raster data and the ratio of each slope aspect to the area of the roof within each roof range.
[0056] It should be noted that the implementation process of the acquisition module 101, generation module 102, reclassification module 103, calculation module 104, and determination module 105 in this embodiment corresponds to the method steps in embodiment one, and will not be repeated here.
[0057] In this invention, the slope and aspect values of each pixel in the roof area raster data are calculated to generate slope raster data and aspect raster data. The slope raster data is reclassified, with different slope raster data corresponding to different roof types. The aspect raster data is also reclassified, with different aspect raster data corresponding to different slope directions. Based on the roof area raster data, the ratio of each slope direction to the area of each roof area is calculated for each section. Based on the reclassification results of the slope raster data and the ratio of each slope direction to the area of each roof area, the roof type to be identified is determined. This effectively solves the problem of low efficiency and reliability of roof type identification caused by existing technologies, and effectively improves the efficiency and reliability of roof type identification.
[0058] In the technical solution of this invention, slope grid data is reclassified based on slope value to obtain reclassification value. When the slope value is in the first angle range and the second angle range respectively, the corresponding reclassification values are the first reclassification value and the second reclassification value, and the corresponding roof types are flat roof and non-flat roof respectively. By introducing slope analysis in terrain analysis, "flat roof" can be identified simply, quickly and accurately, thus improving the efficiency of roof type identification.
[0059] In this invention, the slope aspect grid data is first classified based on the slope aspect angle and the main angle of the house. When the slope aspect angle is in the fourth, fifth, sixth, and seventh angle ranges, the corresponding slope aspects are north, east, south, and west, respectively. In the slope aspect reclassification, the main angle of the house is calculated first, instead of directly using a single slope aspect classification method, which effectively avoids the influence of the house orientation and improves the reliability of roof type identification.
[0060] In this invention, the slope aspect grid data is reclassified based on the slope aspect angle and the main angle of the building. When the slope aspect angle is in the eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth, and fifteenth angle ranges, the corresponding slope aspects are north-slope, northeast-slope, east-slope, southeast-slope, south-slope, southwest-slope, west-slope, and northwest-slope, respectively. This not only considers the reclassification of slope aspects in four directions but also in eight directions, further improving the reliability of roof type identification.
[0061] The technical solution of this invention obtains reclassified values after reclassifying the slope values within each roof area of the roof to be identified. The reclassified value with the highest frequency is taken as the slope constant value of the roof to be identified. When the slope constant value of the roof to be identified is the first slope constant value, the corresponding roof type is a flat roof. If the area proportion of the slope with the largest area proportion is greater than the second preset proportion, the corresponding roof type is a single-slope roof. If the area proportions of symmetrical slopes are all less than the first preset difference range and are all greater than the third preset proportion, the corresponding roof type is a gable roof. If the area proportions of the four slopes are all less than the second preset difference range and the difference between the four and the fourth preset proportion is less than the third preset difference range, the corresponding roof type is a four-slope roof. If the area proportions of the eight slopes are all less than the fourth preset difference range and the difference between the eight and the fifth preset proportion is less than the fifth preset difference range, the corresponding roof type is a spherical roof. Otherwise, the corresponding roof type is a four-slope roof. This method can quickly identify different types of roof types such as flat roofs, single-slope roofs, gable roofs, four-slope roofs, and spherical roofs, and can meet the diverse identification needs in complex scenarios.
[0062] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A roof type identification method based on multi-source data, characterized in that, include: Acquire basic geographic entity data and DSM data respectively. Based on the basic geographic entity data and DSM data, extract building entities and generate roof range raster data. For the roof area raster data, calculate the slope value and aspect value of each cell to generate slope raster data and aspect raster data; The slope raster data is reclassified so that different slope raster data correspond to different roof types; the aspect raster data is also reclassified so that different aspect raster data correspond to different slope aspects. Based on the roof area grid data, calculate the ratio of each slope aspect to the area of the roof within each section; Based on the reclassification results of the slope raster data and the ratio of each slope aspect to the area of the roof within each roof range, the type of roof to be identified is determined.
2. The roof type identification method based on multi-source data according to claim 1, characterized in that, The process involves acquiring basic geographic entity data and DSM data separately, extracting building entities based on the basic geographic entity data and DSM data, and generating rooftop raster data. Specifically, this includes: Acquire basic geographic entity data and DSM data separately; Extract polygons from the RJGZA layer in the basic geographic entity data. The CLASNAME field attribute value of the polygon is the CLASNAME field attribute value related to the roof type. The extracted patches are reduced to a first preset ratio, and the reduced patches are used as the roof area of the building. Using the building roof area as the clipping element, all roof areas are clipped from the DSM data to generate roof area raster data.
3. The roof type identification method based on multi-source data according to claim 1, characterized in that, For the roof area raster data, the slope value of each cell is calculated as follows: , in, The slope angle, Let x be the rate of change of elevation in the x-direction of the geodetic coordinate system. y is the rate of change of elevation in the y-direction of the geodetic coordinate system.
4. The roof type identification method based on multi-source data according to claim 1, characterized in that, For the roof area raster data, the slope value of each cell is calculated as follows: , in, The slope angle, Let x be the rate of change of elevation in the x-direction of the geodetic coordinate system. y is the rate of change of elevation in the y-direction of the geodetic coordinate system.
5. The roof type identification method based on multi-source data according to claim 1, characterized in that, The slope raster data is reclassified so that different slope raster data correspond to different roof types; the aspect raster data is also reclassified so that different aspect raster data correspond to different slope directions. Specifically, this includes: Reclassification values are obtained by reclassifying slope raster data based on slope values. When the slope values are in the first angle range and the second angle range, the corresponding reclassification values are the first reclassification value and the second reclassification value, respectively, and the corresponding roof types are flat roof and non-flat roof, respectively. The slope aspect grid data is first classified based on the slope aspect angle and the main angle of the house. When the slope aspect angle is in the fourth angle range, the fifth angle range, the sixth angle range, and the seventh angle range, the corresponding slope aspects are north slope, east slope, south slope, and west slope, respectively.
6. The roof type identification method based on multi-source data according to claim 5, characterized in that, Reclassification of slope aspect raster data, with different slope aspect raster data corresponding to different slope aspects, specifically includes: The slope aspect grid data is classified a second time based on the slope aspect angle and the main angle of the house. When the slope aspect angle is in the eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth, and fifteenth angle ranges, the corresponding slope aspects are North Slope, Northeast Slope, East Slope, Southeast Slope, South Slope, Southwest Slope, West Slope, and Northwest Slope, respectively.
7. A roof type identification method based on multi-source data according to claim 5 or 6, characterized in that, The area of each slope is the product of the number of pixels on that slope and the actual area of a single pixel. The area of this roof is the product of the number of pixels on this roof and the actual area of a single pixel in the roof range raster data.
8. The roof type identification method based on multi-source data according to claim 7, characterized in that, The ratio of each slope direction to the area of the roof includes the area ratio of the four slope directions and the area ratio of the eight slope directions. The area ratio of the four slope directions is the ratio of the area of the north, east, south, and west slope directions to the area of the roof. The area ratio of the eight slope directions is the ratio of the area of the north, northeast, east, southeast, south, southwest, west, and northwest slope directions to the area of the roof.
9. The roof type identification method based on multi-source data according to claim 8, characterized in that, Based on the reclassification results of the slope raster data and the ratio of each slope aspect to the area of each roof within each roof area, the specific roof types to be identified are as follows: After obtaining the slope values of each roof range of the roof to be identified and reclassifying them, the reclassification value obtained is the most frequent reclassification value as the slope constant value of the roof to be identified. When the slope constant value of the roof to be identified is the first slope constant value, the corresponding roof type is flat roof. Obtain the ratio of each slope direction within the range of each roof to the area of the roof to be identified. If the area ratio of the slope direction with the largest area ratio is greater than the second preset ratio, the corresponding roof type is a single-slope roof. If the area proportion of symmetrical slopes is less than the first preset difference range and greater than the third preset proportion, the corresponding roof type is a gable roof. If the area ratio of each of the four slopes is less than the second preset difference range, and the difference between each ratio and the fourth preset ratio is less than the third preset difference range, the corresponding roof type is a four-slope roof. If the area ratio of each of the eight slopes is less than the fourth preset difference range, and the difference between each ratio and the fifth preset ratio is less than the fifth preset difference range, the corresponding roof type is a spherical roof; otherwise, the corresponding roof type is a four-slope roof.
10. A roof type identification system based on multi-source data, characterized in that, include: The acquisition module acquires basic geographic entity data and DSM data respectively. Based on the basic geographic entity data and DSM data, it extracts building entities and generates roof range raster data. The generation module calculates the slope and aspect values of each cell in the roof area raster data, and generates slope raster data and aspect raster data. The reclassification module reclassifies slope raster data, with different slope raster data corresponding to different roof types; it also reclassifies aspect raster data, with different aspect raster data corresponding to different slope directions. The calculation module calculates the ratio of each slope aspect to the area of the roof within each roof area based on the roof area grid data. The determination module identifies the type of roof to be identified based on the reclassification results of the slope raster data and the ratio of each slope aspect to the area of the roof within each roof range.