CN113313101B - Building contour automatic aggregation method, device, equipment and storage medium - Google Patents

Building contour automatic aggregation method, device, equipment and storage medium Download PDF

Info

Publication number
CN113313101B
CN113313101B CN202110878165.9A CN202110878165A CN113313101B CN 113313101 B CN113313101 B CN 113313101B CN 202110878165 A CN202110878165 A CN 202110878165A CN 113313101 B CN113313101 B CN 113313101B
Authority
CN
China
Prior art keywords
building
contour
buildings
isolated
outline
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110878165.9A
Other languages
Chinese (zh)
Other versions
CN113313101A (en
Inventor
刘萌
范渊
黄进
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
DBAPPSecurity Co Ltd
Original Assignee
DBAPPSecurity Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by DBAPPSecurity Co Ltd filed Critical DBAPPSecurity Co Ltd
Priority to CN202110878165.9A priority Critical patent/CN113313101B/en
Publication of CN113313101A publication Critical patent/CN113313101A/en
Application granted granted Critical
Publication of CN113313101B publication Critical patent/CN113313101B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/64Three-dimensional objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/24323Tree-organised classifiers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Processing Or Creating Images (AREA)
  • Image Analysis (AREA)

Abstract

The application discloses a building outline automatic aggregation method, a building outline automatic aggregation device, building outline automatic aggregation equipment and a storage medium. The method comprises the following steps: acquiring a contour parameter set of a building in a target area; classifying the buildings according to the spatial topological relation based on the contour parameter set according to the screening condition to obtain an isolated building set and a non-isolated building set; the screening conditions comprise a first screening condition based on a building external rectangular frame and a second screening condition based on a building outline; merging the buildings with adjacent relations in the non-isolated building set to obtain a merged building cluster; and obtaining a contour aggregation result of the buildings in the target area based on the isolated building set and all the merged building clusters. The method can accelerate the retrieval time of isolated buildings, is not limited by application scenes, and improves the efficiency of building contour clustering on the basis of ensuring the accuracy and reliability of clustering results.

Description

Building contour automatic aggregation method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of spatial clustering, in particular to a method, a device, equipment and a storage medium for automatically aggregating building outlines.
Background
The Geographic Information System (GIS) is a new marginal discipline integrating computer science, mapping and remote sensing, Geography, environmental science, space science, Information science, and management science. The spatial analysis is the core and soul of the GIS and is also an important component for realizing the value increment of spatial data. The spatial analysis can provide powerful and rich spatial data query functions in cooperation with attribute information of spatial data. The spatial clustering is used as an important component in spatial analysis, which means that objects in a spatial data set are integrated by similar or related objects, the same class has higher similarity or the same characteristic, the difference between different classes is larger, and the spatial clustering is used as an unsupervised learning method without any prior knowledge. According to the selection of principle and similarity, it can be divided into the following categories: partition-based clustering, hierarchy-based clustering, density-based clustering, and grid-based clustering.
The urban space visualization integrates multiple aspects of data visualization, GIS space analysis and space display, and is used as a main display means of the smart city. In which, three-dimensional urban space visualization is gradually emphasized with the rise of three-dimensional GIS in recent years. In a three-dimensional urban space, building data is taken as a main data resource, and the display forms of the building data are continuously abundant, including white model buildings, fine model buildings, building BIM and the like. The building is an important component of urban space visualization, but because the number of the buildings in the urban space is large, the difficulty in accurately modeling each building is high, and the typical buildings without landmarks are mostly represented by the rough outline of the building at present; the existing building contour data are mainly automatically produced on the basis of surveying and mapping results such as high-resolution remote sensing images, unmanned aerial vehicle images, airborne three-dimensional laser radars and the like, but because the automatic extraction process only focuses on contour surface characteristics, a complete building contour can be divided into a plurality of polygons according to geometric characteristics, and the whole building contour is difficult to pay attention to. In a smaller application, building singleization is a common application, for example, a main building and an apron building of a building are an organic whole and cannot be separated independently in space selection operation, so that how to rapidly cluster and divide buildings with mutually adjacent spaces is a problem to be solved urgently at present.
In the prior art, each element is judged one by one directly according to a topological relation based on a Delaunay triangulation network or a space, but the Delaunay triangulation network method generally needs to establish a triangulation network for all nodes of all building outline elements at first, the time and space overhead of network establishment is large when the scale is large, and low efficiency is caused by the fact that the network establishment and complex surface fusion operation are included. In the prior art, clustering is also performed based on central points, spatial distances, areas and other quantities, but the application scope is generally limited to large-range spatial scenes such as cartographic synthesis, and the application of building singleization as a representative in a small scene is difficult to meet. In the prior art, feature points are also calculated by means of additional data sources, such as a Digital Surface Model (DSM), a Digital Elevation Model (DEM), or a Digital ortho image (DOM), but under real-world operating conditions, more data sources mean more cost and overhead, reducing the efficiency of contour aggregation.
Disclosure of Invention
In view of the above, the present invention provides a method, an apparatus, a device and a medium for automatically aggregating building outlines, which can improve the efficiency of building outline clustering. The specific scheme is as follows:
in a first aspect, the present application discloses a method for automatically aggregating building outlines, comprising:
acquiring a contour parameter set of a building in a target area;
classifying the buildings according to the spatial topological relation based on the contour parameter set according to the screening condition to obtain an isolated building set and a non-isolated building set; the screening conditions comprise a first screening condition based on a building external rectangular frame and a second screening condition based on a building outline;
merging the buildings with adjacent relations in the non-isolated building set to obtain a merged building cluster;
and obtaining a contour aggregation result of the buildings in the target area based on the isolated building set and all the merged building clusters.
Optionally, the classifying the buildings according to the spatial topological relation based on the contour parameter set according to the screening condition includes:
constructing an external rectangular frame for each building according to the outline parameter set to obtain an external rectangular frame parameter set;
and constructing a corresponding first kd-tree index based on the circumscribed rectangle frame parameter set, and screening the circumscribed rectangle frames without adjacency relation by traversing the first kd-tree index by using the first screening condition based on the building circumscribed rectangle frames to obtain a first non-adjacent building set and a screened first adjacent building set.
Optionally, the classifying the buildings according to the spatial topological relation based on the contour parameter set according to the screening condition to obtain an isolated building set and a non-isolated building set, includes:
constructing a corresponding second kd-tree index based on the contour parameters corresponding to the buildings in the first adjacent building set;
screening out the building outline without the adjacency relation by traversing the second kd-tree index by utilizing the second screening condition based on the building outline so as to obtain a second non-adjacency building set and a screened second adjacency building set;
obtaining the isolated building set based on the first non-contiguous building set and the second non-contiguous building set, and regarding the second contiguous building set as the non-isolated building set.
Optionally, the constructing a bounding rectangle frame for each building according to the contour parameter set includes:
determining the top point of each building in a top view according to the contour parameter set;
and constructing the circumscribed rectangle frame for each building according to the vertexes and the building coordinate system.
Optionally, the contour parameters for each building in the contour parameter set include a contour unique number and a contour geometric parameter;
the contour parameters also comprise an adjacent element set which is used for storing the unique number of the contour of the building which is screened out in real time and has the adjacent relation with the contour in the automatic aggregation process of the contour of the building; the adjacency includes circumscribed, intersected, inscribed, and inclusive.
Optionally, the obtaining a contour aggregation result of the buildings in the target area based on the isolated building set and all the merged building clusters includes:
taking the unique contour number corresponding to the building in the isolated building set as a parameter name, and taking the corresponding geometric contour parameter as a parameter value to obtain a first class key value pair;
generating unique numbers of the merged building clusters as parameter names based on the unique contour numbers corresponding to the buildings in the merged building clusters, and taking the geometric contour parameters corresponding to all the buildings in the merged building clusters as parameter values of the merged building clusters to obtain second class key value pairs;
and obtaining a contour aggregation result of the buildings in the target area based on the first class key value pair and the second class key value pair.
Optionally, the merging the buildings with the adjacent relation in the non-isolated building set to obtain a merged building cluster includes:
screening out buildings with direct adjacency relation and indirect adjacency relation among each other according to adjacency relation among different buildings in the non-isolated building set as a set to be merged;
and carrying out contour merging on the buildings in each set to be merged to obtain the merged building cluster.
In a second aspect, the present application discloses an automatic building contour aggregation apparatus, comprising:
the parameter acquisition module is used for acquiring a contour parameter set of a building in a target area;
the screening module is used for classifying the buildings according to the screening conditions based on the contour parameter set to obtain an isolated building set and a non-isolated building set; the screening conditions comprise a first screening condition based on a building external rectangular frame and a second screening condition based on a building outline;
the merging module is used for merging the buildings with the adjacent relation in the non-isolated building set to obtain a merged building cluster;
and the contour aggregation result determining module is used for obtaining a contour aggregation result of the buildings in the target area based on the isolated building set and all the merged building clusters.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
and the processor is used for executing the computer program to realize the building outline automatic aggregation method.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program; wherein the computer program when executed by the processor implements the aforementioned building outline automatic aggregation method.
In the application, a contour parameter set of a building in a target area is obtained; classifying the buildings according to the spatial topological relation based on the contour parameter set according to the screening condition to obtain an isolated building set and a non-isolated building set; the screening conditions comprise a first screening condition based on a building external rectangular frame and a second screening condition based on a building outline; merging the buildings with adjacent relations in the non-isolated building set to obtain a merged building cluster; and obtaining a contour aggregation result of the buildings in the target area based on the isolated building set and the merged building cluster.
Therefore, the buildings are classified according to the spatial topological relation through the first screening condition based on the building external rectangular frame and the second screening condition based on the building outline in sequence to obtain an isolated building set and a non-isolated building set, the building outline is utilized to generate the external rectangular frame so as to simplify the spatial characteristics of elements, most isolated buildings are quickly screened preliminarily, then careful screening is carried out according to the building outline, and the retrieval time of the isolated buildings is shortened. And then, buildings with adjacent relations in the non-isolated building set are merged, so that the building outlines with adjacent relations are automatically divided into a cluster, building unitization processing and other applications in an urban space visualization scene are facilitated, the application scene is not limited, and the efficiency of building outline clustering is improved on the basis of ensuring the accuracy and reliability of a clustering result.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a method for automatically aggregating building outlines provided herein;
FIG. 2 is a flow chart of a specific building outline automatic aggregation method provided by the present application;
FIG. 3 is a schematic diagram of several topological relationships provided herein;
FIG. 4 is a schematic view of an external rectangular frame of a building provided by the present application;
FIG. 5 is a schematic illustration of a direct and indirect abutment relationship provided herein;
FIG. 6 is a schematic diagram of a building cluster structure to be merged according to the present application;
FIG. 7 is a graphical illustration of the two-dimensional building outline aggregation results provided herein;
FIG. 8 is a schematic diagram of the aggregation result of a three-dimensional building outline provided by the present application;
FIG. 9 is a schematic structural view of an automatic building outline polymerization device provided by the present application;
fig. 10 is a block diagram of an electronic device provided in the present application.
Detailed Description
In the prior art, aggregation efficiency is reduced by directly judging each element one by one according to a topological relation based on a Delaunay triangulation network or a space, or clustering is performed by using quantities such as a central point, a spatial distance and an area, but the clustering is limited by applicable scenes. In order to overcome the technical problem, the application provides an automatic building contour aggregation method which can improve the efficiency of building contour aggregation.
The embodiment of the application discloses an automatic building outline polymerization method, and as shown in fig. 1, the method can comprise the following steps:
step S11: and acquiring a contour parameter set of buildings in the target area.
In this embodiment, first, a contour parameter set of buildings in a target area, that is, a contour parameter corresponding to each building in the target area is obtained. It is understood that a building outline refers to a symbolic representation of a building, such as a building, a factory building, a shed, etc., in a two-dimensional map, each building outline being a separate spatial element whose spatial attributes are typically represented as a single polygon, and when the outline has a height attribute, a three-dimensional effect can be represented in a three-dimensional space. The profile parameters may include, but are not limited to, the number of the profile and the geometric attribute information of the profile.
In this embodiment, the contour parameters for each building in the contour parameter set may include a contour unique number, a contour geometric parameter; the contour parameters also comprise an adjacent element set which is used for storing the unique number of the contour of the building which is screened out in real time and has the adjacent relation with the contour in the automatic aggregation process of the contour of the building. That is, the adjacent element set is initially an empty set, and the unique number of the outline of the building having the adjacent relation with itself is continuously stored in the process of automatic aggregation of the outline of the building.
Step S12: classifying the buildings according to the spatial topological relation based on the contour parameter set according to the screening condition to obtain an isolated building set and a non-isolated building set; the screening conditions comprise a first screening condition based on a building external rectangular frame and a second screening condition based on a building outline.
In this embodiment, based on the obtained contour parameter set, the buildings are firstly roughly classified according to the spatial topological relationship according to a first screening condition based on the building external rectangular frame in the screening conditions, then the buildings are firstly finely classified according to the spatial topological relationship according to a second screening condition based on the building contour in the screening conditions, and the range of the second screening is the first screened non-isolated building. The spatial topological relationship may include disjoining and adjoining, and the adjoining relationship may include circumscribed, intersecting, inscribed and inclusive.
In this embodiment, the classifying the buildings according to the spatial topological relation based on the profile parameter set according to the screening condition may include: constructing an external rectangular frame for each building according to the outline parameter set to obtain an external rectangular frame parameter set; and constructing a corresponding first kd-tree index based on the circumscribed rectangle frame parameter set, and screening the circumscribed rectangle frames without adjacency relation by traversing the first kd-tree index by using the first screening condition based on the building circumscribed rectangle frames to obtain a first non-adjacent building set and a screened first adjacent building set. Then, constructing a corresponding second kd-tree index based on the contour parameters corresponding to the buildings in the first adjacent building set; screening out the building outline without the adjacency relation by traversing the second kd-tree index by utilizing the second screening condition based on the building outline so as to obtain a second non-adjacency building set and a screened second adjacency building set; obtaining the isolated building set based on the first non-contiguous building set and the second non-contiguous building set, and regarding the second contiguous building set as the non-isolated building set.
In this embodiment, the first screening condition and the second screening condition have an order relationship, and the first screening condition is executed first and then the second screening condition is executed. In the embodiment, a two-step mode is adopted to judge the isolated building, the adjacent retrieval object is set as the rectangular outer frame of the building in the first step, the spatial characteristics of the outline are simplified, the rapid retrieval of all elements can be realized, on the basis of the primary screening in the first step, all isolated elements are further screened out by means of the spatial adjacent relation of the building outline in the second step, and the retrieval range is changed from the original global elements to other elements adjacent to the rectangular frame of the second step, so that the retrieval time of the isolated elements is greatly reduced compared with means such as full-element query and triangulation.
In this embodiment, the constructing a bounding rectangle for each building according to the profile parameter set may include: determining the top point of each building in a top view according to the contour parameter set; and constructing the circumscribed rectangle frame for each building according to the vertexes and the building coordinate system. In other words, in this embodiment, a bounding rectangle frame is constructed for each building according to the current building coordinate system based on the vertices of the building in the top view, and the range of the constructed bounding rectangle frame is greater than or equal to the corresponding building.
Step S13: and merging the buildings with the adjacent relation in the non-isolated building set to obtain a merged building cluster.
In this embodiment, after the non-isolated building set is obtained through twice screening, it may be determined that the buildings in the set must have an adjacent relationship with other buildings, so that the buildings having an adjacent relationship in the non-isolated building set are merged to obtain a merged building cluster, that is, the merged building cluster is isolated from other building units or clusters. Thus, by focusing on the integrity of buildings, building structures having an adjacency with each other are grouped into a cluster according to the adjacency of the buildings to form a logically integral whole, and isolated elements are separated into a cluster as a single individual in space;
in this embodiment, the merging the buildings having the adjacent relationship in the non-isolated building set to obtain a merged building cluster may include: screening out buildings with direct adjacency relation and indirect adjacency relation among each other according to adjacency relation among different buildings in the non-isolated building set as a set to be merged; and carrying out contour merging on the buildings in each set to be merged to obtain the merged building cluster. It can be understood that, in the embodiment, according to the distribution characteristics of the building profiles, concepts of direct adjacency and indirect adjacency are introduced for non-isolated building elements, the non-isolated profiles are simplified into two relationships, and the essence of the generation of the adjacency clusters is to search all connected clusters formed by the non-isolated elements, so that all the adjacent building profiles can be gathered into the same cluster.
Step S14: and obtaining a contour aggregation result of the buildings in the target area based on the isolated building set and the merged building cluster.
In this embodiment, through the operations in the above steps, all buildings in the target area are divided into isolated buildings and merged building clusters, so that the contour aggregation is completed, and a contour aggregation result of the buildings is obtained.
In this embodiment, the obtaining a contour aggregation result of the buildings in the target area based on the isolated building set and the merged building cluster may include: taking the unique contour number corresponding to the building in the isolated building set as a parameter name, and taking the corresponding geometric contour parameter as a parameter value to obtain a first class key value pair; generating unique numbers of the merged building clusters as parameter names based on the unique contour numbers corresponding to the buildings in the merged building clusters, and taking the geometric contour parameters corresponding to all the buildings in the merged building clusters as parameter values of the merged building clusters to obtain second class key value pairs; and obtaining a contour aggregation result of the buildings in the target area based on the first class key value pair and the second class key value pair. It will be appreciated that each isolated building corresponds to a unique building number, and associated parameter information, and that the resulting key-value pairs are aggregated as a result of the building's outline for subsequent querying for processing.
As can be seen from the above, in this embodiment, the buildings are classified according to the spatial topological relation sequentially through the first screening condition based on the building external rectangular frame and the second screening condition based on the building outline to obtain the isolated building set and the non-isolated building set, the building outline is used to generate the external rectangular frame so as to simplify the spatial characteristics of the elements, most of the isolated buildings are quickly and preliminarily screened, and then the isolated buildings are carefully screened according to the building outline, so that the retrieval time of the isolated buildings is shortened. And then, buildings with adjacent relations in the non-isolated building set are merged, so that the building outlines with adjacent relations are automatically divided into a cluster, building unitization processing and other applications in an urban space visualization scene are facilitated, the application scene is not limited, and the efficiency of building outline clustering is improved on the basis of ensuring the accuracy and reliability of a clustering result.
The embodiment of the application discloses a specific building outline automatic polymerization method, and as shown in fig. 2, the method can comprise the following steps:
s201: firstly, acquiring a contour parameter set O of buildings in a target area, wherein the contour parameter oi of each building element comprises the following attributes:
class Outline
{
int pid,// number of outline, unique value
Geometrical get// outline geometric Properties
Set of adjacent elements of Array neighbors// outline
}
The adjacency relation defining the outline of the building includes several topological relations, as shown in fig. 3, intersection (there is a common part but no inclusion relation), circumscribed (there is a common edge but no inclusion relation), inscribed (there is a common edge and there is an inclusion relation), and contained (there is an inclusion relation but no common edge). A judgment that the above topological relationship is not satisfied (i.e., the phase is separated) is non-contiguous.
S202: for each member oi in O, calculating a circumscribed rectangle bi of the geo attribute, putting the circumscribed rectangle bi into a set B, and creating a kd-tree spatial index for B, such as the schematic diagram of the circumscribed rectangle of the building shown in FIG. 4; wherein bi comprises the following attributes, and oi and bi have the same pid and are in a mapping relation with each other;
class Bbox
{
int pid,// number of outline, unique value
Geometrical get,// geometric Property of the rectangular Box
}
S203: for each member bi in B, other elements bj are searched in B, and if bj and bi have an adjacent relation, pid of bj is stored in neighbor attributes of mapping element oi of bi in O.
S204: the step of S203 is repeated until all members in B complete the search.
S205: and screening out elements with null neighbor attributes in the O, storing the elements with null neighbor attributes into a dictionary T by taking the unique value km of the contour number as a key and the value oi as a value, and storing the elements with null neighbor attributes into a set C.
It is understood that, the filtering in steps S203 to S205 is performed based on the first filtering condition of the external rectangular frame of the building, the rectangular frame defines the maximum coordinate range of the elements, and if the external rectangular frame of the elements does not have an adjacent relation, the elements are not necessarily adjacent; in addition, the judgment mode of the adjacency relation of the rectangular frame is simple, the specific topological relation does not need to be judged in sequence, the efficiency is high, and the judgment can be quickly carried out by the following method:
a. if the coordinates of the lower left corner of one circumscribed rectangular frame r are (x _ sw, y _ sw), the coordinates of the upper right corner are (x _ ne, y _ ne), and the coordinates of the vertex p of the other circumscribed rectangular frame are (x, y); if x > = x _ sw and x < = x _ ne, and y > = y _ sw and y < = y _ ne are satisfied, then p is inside r, otherwise p is outside r:
b. for the rectangle riAnd rjIf r isiIs at rjOutside, or if rjIs at riOtherwise, then riAnd rjThere is no adjacency, whereas there is an adjacency.
So far, the building elements in T are called isolated elements, i.e. not adjacent to any element in space, and individually serve as a complete cluster, while the elements in C must contain non-isolated elements and may contain isolated elements, which need further screening.
S206: a kd-tree spatial index is created for C.
S207: for each member ci in C, except ci, the set formed by the elements of C with pid attributes falling in ci and neighbors is recorded as Ti, and ci and the members Ti in Ti are compared with each other in a spatial adjacency relationship. If ci and Ti are not contiguous, then Ti is removed from Ti, and the pid attribute of Ti is removed from ci, neighbors.
S208: the step of S207 is repeated until all members in C complete the judgment.
S209: and screening out elements with null neighbor in the C, and storing the elements with the unique value km as a key and the value oi as a value into the dictionary T.
It is understood that steps S206 to S208 further screen out possible isolated elements, ensuring the accuracy and reliability of the screening of isolated and non-isolated elements. Possible isolated elements are rectangular frames between elements that are adjacent to each other but not adjacent to each other, as shown in fig. 4.
In addition, in steps S206 to S208, the comparison object of each element in C is only the element specified in its neighbor attributes, and the number is limited. Therefore, steps S206 to S208 can efficiently screen out isolated and non-isolated elements.
S210: for any pair of elements ci and cj in C, the following concepts are defined, such as the direct adjacency and indirect adjacency relationships shown in fig. 5. Direct adjacency: if ci.pid is contained in cj, neighbors or cj.pid is contained in ci, neighbors, ci and cj are called directly adjacent, and it is spatially shown that two outlines of ci and cj directly satisfy the adjacent relation described in step S201, and is marked as ci < = > cj, otherwise is marked as ci < ≠ cj. Since each element is inspected for other elements adjacent thereto through steps S203 to S208, the adjacent features are mutual and non-directional, i.e., a is adjacent to B, which is also necessarily adjacent to a. Thus if ci.pid is contained in the neighbors of cj or cj.pid is contained in the neighbors of ci, only one condition needs to be checked for satisfaction.
Indirect adjacency: if ci < ≠ cj but there is a sequence of elements cm1, cm2, … cmn, where n > =1, such that ci < = cm1, cm1< = > cm2 … cmn-1< = cmn, cmn < = > cj are satisfied simultaneously, then ci and cj are said to be indirectly contiguous and spatially present as the other profiles spaced between the two profiles ci and cj, but in the same contiguous cluster, as ci < - > cj.
S211: and searching adjacent clusters in C for any element ci in C to determine a building set to be merged, wherein the cluster structure is shown in FIG. 6. The specific operation steps are as follows: and searching all elements which are directly adjacent to ci and indirectly adjacent to ci in the C to form a set of Clusteri, storing the Clusteri into a dictionary T by taking the unique value km as a key and the Clusteri as a value, and clearing all the elements in the Clusteri from the C.
S212: and repeating the step S211 until C is empty, wherein T is the aggregated result, the key set is the cluster number, and the value corresponding to each key is all the outline elements of the designated cluster.
Since the adjacent relation between the elements in C is already determined in steps S203 to S208, the adjacent cluster search described in steps S210 to S212 does not need to determine the adjacent relation again for the contour, and does not involve space calculation, and the number of elements in C is greatly reduced compared to O, so the contour cluster search portion does not have high calculation overhead, and has a significant efficiency advantage compared to the existing method.
The result of the aggregation of the building outlines as shown in fig. 7 and fig. 8, wherein fig. 7 shows the effect of the building outlines under the two-dimensional map, the left graph of fig. 7 shows the building outlines before clustering, the right graph of fig. 7 shows the outlines after clustering, and the dark graph in the right graph shows all the buildings in one cluster, wherein all the members are adjacent to each other, and other isolated elements exist around the members. Fig. 8 shows the display effect of the building outline in a three-dimensional space visualization scene, with the addition of a height attribute. The left image is the three-dimensional display of the contour before clustering, and the dark building in the right image is the three-dimensional display of the dark cluster in the right image of fig. 7, and can be selected as a whole in the three-dimensional space without influencing other surrounding elements.
Therefore, the method provided by the embodiment can realize the selection of a complete building in a scene without affecting other buildings, thereby ensuring the logic integrity of the building, or grouping or other subsequent processing according to specific requirements on the basis of the result of the method, and the grouping result is more accurate and reliable because the method makes full use of the space topological relation of the building. In addition, the spatial distribution characteristics and the spatial topological relation of the building outline are fully utilized, and concepts of direct adjacency and indirect adjacency are introduced to search the outline cluster of the spatial adjacency, so that on one hand, the accuracy and the reliability of a clustering result are ensured, on the other hand, a user does not need to input and select related model parameters, the deviation and the influence of subjective factors on the result of the method are avoided, and meanwhile, the influence caused by the limitation of the model is also avoided. In addition, the method is not dependent on other data sources, and is only completed by the building outline data, so that the method is relatively more flexible. Compared with the method of the Delaunay triangulation network and the like, the method avoids performing surface construction and complex edge search and surface fusion operation on all nodes, and improves the contour aggregation efficiency.
Correspondingly, the embodiment of the present application further discloses an automatic building outline aggregation device, which is shown in fig. 9 and comprises:
the parameter acquisition module 11 is used for acquiring a contour parameter set of a building in a target area;
the screening module 12 is configured to classify the buildings according to the spatial topological relation based on the contour parameter set according to a screening condition to obtain an isolated building set and a non-isolated building set; the screening conditions comprise a first screening condition based on a building external rectangular frame and a second screening condition based on a building outline;
a merging module 13, configured to merge buildings in the non-isolated building set that have an adjacency relation, so as to obtain a merged building cluster;
and a contour aggregation result determining module 14, configured to obtain a contour aggregation result of the buildings in the target area based on the isolated building set and the merged building cluster.
As can be seen from the above, in this embodiment, the buildings are classified according to the spatial topological relation sequentially through the first screening condition based on the building external rectangular frame and the second screening condition based on the building outline to obtain the isolated building set and the non-isolated building set, the building outline is used to generate the external rectangular frame so as to simplify the spatial characteristics of the elements, most of the isolated buildings are quickly and preliminarily screened, and then the isolated buildings are carefully screened according to the building outline, so that the retrieval time of the isolated buildings is shortened. And then, buildings with adjacent relations in the non-isolated building set are merged, so that the building outlines with adjacent relations are automatically divided into a cluster, building unitization processing and other applications in an urban space visualization scene are facilitated, the application scene is not limited, and the efficiency of building outline clustering is improved on the basis of ensuring the accuracy and reliability of a clustering result.
In some embodiments, the screening module 12 may specifically include:
the circumscribed rectangular frame construction unit is used for constructing a circumscribed rectangular frame for each building according to the outline parameter set to obtain a circumscribed rectangular frame parameter set;
and the first screening unit is used for constructing a corresponding first kd-tree index based on the circumscribed rectangle frame parameter set, and screening the circumscribed rectangle frame without the adjacency relation by traversing the first kd-tree index by utilizing the first screening condition based on the building circumscribed rectangle frame so as to obtain a first non-adjacent building set and a screened first adjacent building set.
In some embodiments, the screening module 12 may specifically include:
the second screening unit is used for constructing a corresponding second kd-tree index based on the outline parameters corresponding to the buildings in the first adjacent building set; screening out the building outline without the adjacency relation by traversing the second kd-tree index by utilizing the second screening condition based on the building outline so as to obtain a second non-adjacency building set and a screened second adjacency building set;
a set determination unit configured to obtain the isolated building set based on the first non-contiguous building set and the second non-contiguous building set, and to use the second contiguous building set as the non-isolated building set.
In some embodiments, the circumscribed rectangular frame building unit may specifically include:
the vertex determining unit is used for determining the vertex of each building in the top view according to the contour parameter set;
and the circumscribed rectangular frame generating unit is used for constructing the circumscribed rectangular frame for each building according to the vertex and the building coordinate system.
In some specific embodiments, the contour parameters for each of the buildings in the contour parameter set include a contour unique number, a contour geometric parameter;
the contour parameters also comprise an adjacent element set which is used for storing the unique number of the contour of the building which is screened out in real time and has the adjacent relation with the contour in the automatic aggregation process of the contour of the building; the adjacency includes circumscribed, intersected, inscribed, and inclusive.
In some embodiments, the contour aggregation result determining module 14 may specifically include:
the first key value pair determining unit is used for taking the unique contour number corresponding to the building in the isolated building set as a parameter name and taking the corresponding geometric contour parameter as a parameter value to obtain a first key value pair;
a second-class key value pair determining unit, configured to generate, based on the unique contour numbers corresponding to the buildings in the merged building cluster, a unique number of the merged building cluster as a parameter name, and use the geometric contour parameters corresponding to all the buildings in the merged building cluster as parameter values of the merged building cluster to obtain a second-class key value pair;
and the outline aggregation result determining unit is used for obtaining the outline aggregation result of the building in the target area based on the first class key value pair and the second class key value pair.
In some specific embodiments, the merging module 13 may specifically include:
the to-be-merged set screening unit is used for screening out buildings with direct adjacency relation and indirect adjacency relation between the buildings according to the adjacency relation between different buildings in the non-isolated building set as to-be-merged sets;
and the merging unit is used for carrying out contour merging on the buildings in each set to be merged to obtain the merged building cluster.
Further, the embodiment of the present application also discloses an electronic device, which is shown in fig. 10, and the content in the drawing cannot be considered as any limitation to the application scope.
Fig. 10 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present disclosure. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. Wherein the memory 22 is used for storing a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the building outline automatic aggregation method disclosed in any one of the foregoing embodiments.
In this embodiment, the power supply 23 is configured to provide a working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and a communication protocol followed by the communication interface is any communication protocol applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to obtain external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
In addition, the memory 22 is used as a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., the resources stored thereon include an operating system 221, a computer program 222, data 223 including a set of profile parameters, etc., and the storage manner may be a transient storage or a permanent storage.
The operating system 221 is used for managing and controlling each hardware device and the computer program 222 on the electronic device 20, so as to realize the operation and processing of the mass data 223 in the memory 22 by the processor 21, and may be Windows Server, Netware, Unix, Linux, and the like. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the building outline automatic aggregation method disclosed in any of the foregoing embodiments and executed by the electronic device 20.
Further, the embodiment of the present application also discloses a computer storage medium, in which computer executable instructions are stored, and when the computer executable instructions are loaded and executed by a processor, the building outline automatic aggregation method steps disclosed in any one of the foregoing embodiments are implemented.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method, the device, the equipment and the medium for automatically polymerizing the building outline provided by the invention are described in detail, the principle and the implementation mode of the invention are explained by applying specific examples, and the description of the examples is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (9)

1. An automatic building contour aggregation method is characterized by comprising the following steps:
acquiring a contour parameter set of a building in a target area;
classifying the buildings according to the spatial topological relation based on the contour parameter set according to the screening condition to obtain an isolated building set and a non-isolated building set; the screening conditions comprise a first screening condition based on a building external rectangular frame and a second screening condition based on a building outline;
merging the buildings with adjacent relations in the non-isolated building set to obtain a merged building cluster;
obtaining a contour aggregation result of the buildings in the target area based on the isolated building set and all the merged building clusters;
the classifying the buildings according to the spatial topological relation based on the contour parameter set according to the screening condition comprises the following steps:
constructing an external rectangular frame for each building according to the outline parameter set to obtain an external rectangular frame parameter set;
and constructing a corresponding first kd-tree index based on the circumscribed rectangle frame parameter set, and screening the circumscribed rectangle frames without adjacency relation by traversing the first kd-tree index by using the first screening condition based on the building circumscribed rectangle frames to obtain a first non-adjacent building set and a screened first adjacent building set.
2. The method for automatically aggregating building outlines according to claim 1, wherein the classifying the buildings according to the spatial topological relation based on the outline parameter set according to the screening condition to obtain an isolated building set and a non-isolated building set comprises:
constructing a corresponding second kd-tree index based on the contour parameters corresponding to the buildings in the first adjacent building set;
screening out the building outline without the adjacency relation by traversing the second kd-tree index by utilizing the second screening condition based on the building outline so as to obtain a second non-adjacency building set and a screened second adjacency building set;
obtaining the isolated building set based on the first non-contiguous building set and the second non-contiguous building set, and regarding the second contiguous building set as the non-isolated building set.
3. The method for automatically aggregating building outlines according to claim 1, wherein the constructing of a bounding rectangle frame for each building according to the outline parameter set comprises:
determining the top point of each building in a top view according to the contour parameter set;
and constructing the circumscribed rectangle frame for each building according to the vertexes and the building coordinate system.
4. The method for automatically aggregating building outlines according to claim 1, wherein the outline parameters for each building in the outline parameter set include an outline unique number, outline geometric parameters;
the contour parameters also comprise an adjacent element set which is used for storing the unique number of the contour of the building which is screened out in real time and has the adjacent relation with the contour in the automatic aggregation process of the contour of the building; the adjacency includes circumscribed, intersected, inscribed, and inclusive.
5. The method for automatically aggregating building outlines according to claim 4, wherein the obtaining of the aggregate result of the building outlines in the target area based on the isolated building set and all the merged building clusters comprises:
taking the unique contour number corresponding to the building in the isolated building set as a parameter name, and taking the corresponding geometric contour parameter as a parameter value to obtain a first class key value pair;
generating unique numbers of the merged building clusters as parameter names based on the unique contour numbers corresponding to the buildings in the merged building clusters, and taking the geometric contour parameters corresponding to all the buildings in the merged building clusters as parameter values of the merged building clusters to obtain second class key value pairs;
and obtaining a contour aggregation result of the buildings in the target area based on the first class key value pair and the second class key value pair.
6. The method for automatically aggregating building outlines according to any one of claims 1 to 5, wherein the merging of the buildings with adjacent relations in the non-isolated building set to obtain a merged building cluster comprises:
screening out buildings with direct adjacency relation and indirect adjacency relation among each other according to adjacency relation among different buildings in the non-isolated building set as a set to be merged;
and carrying out contour merging on the buildings in each set to be merged to obtain the merged building cluster.
7. An automatic building outline polymerization device, comprising:
the parameter acquisition module is used for acquiring a contour parameter set of a building in a target area;
the screening module is used for classifying the buildings according to the screening conditions based on the contour parameter set to obtain an isolated building set and a non-isolated building set; the screening conditions comprise a first screening condition based on a building external rectangular frame and a second screening condition based on a building outline;
the merging module is used for merging the buildings with the adjacent relation in the non-isolated building set to obtain a merged building cluster;
a contour aggregation result determination module, configured to obtain a contour aggregation result of the buildings in the target area based on the isolated building set and all the merged building clusters;
the screening module includes:
the circumscribed rectangular frame construction unit is used for constructing a circumscribed rectangular frame for each building according to the outline parameter set to obtain a circumscribed rectangular frame parameter set;
and the first screening unit is used for constructing a corresponding first kd-tree index based on the circumscribed rectangle frame parameter set, and screening the circumscribed rectangle frame without the adjacency relation by traversing the first kd-tree index by utilizing the first screening condition based on the building circumscribed rectangle frame so as to obtain a first non-adjacent building set and a screened first adjacent building set.
8. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the building profile auto-aggregation method as claimed in any one of claims 1 to 6.
9. A computer-readable storage medium for storing a computer program; wherein the computer program when executed by the processor implements the building outline auto-aggregation method as claimed in any one of claims 1 to 6.
CN202110878165.9A 2021-08-02 2021-08-02 Building contour automatic aggregation method, device, equipment and storage medium Active CN113313101B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110878165.9A CN113313101B (en) 2021-08-02 2021-08-02 Building contour automatic aggregation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110878165.9A CN113313101B (en) 2021-08-02 2021-08-02 Building contour automatic aggregation method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113313101A CN113313101A (en) 2021-08-27
CN113313101B true CN113313101B (en) 2021-10-29

Family

ID=77382402

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110878165.9A Active CN113313101B (en) 2021-08-02 2021-08-02 Building contour automatic aggregation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113313101B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106204446A (en) * 2016-07-01 2016-12-07 中国测绘科学研究院 The building of a kind of topography merges method
CN108537782A (en) * 2018-04-02 2018-09-14 东北大学 A method of building images match based on contours extract with merge
CN112328880A (en) * 2020-11-05 2021-02-05 北京嘀嘀无限科技发展有限公司 Geographical region clustering method and device, storage medium and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106204446A (en) * 2016-07-01 2016-12-07 中国测绘科学研究院 The building of a kind of topography merges method
CN108537782A (en) * 2018-04-02 2018-09-14 东北大学 A method of building images match based on contours extract with merge
CN112328880A (en) * 2020-11-05 2021-02-05 北京嘀嘀无限科技发展有限公司 Geographical region clustering method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN113313101A (en) 2021-08-27

Similar Documents

Publication Publication Date Title
Richter et al. Concepts and techniques for integration, analysis and visualization of massive 3D point clouds
US11720606B1 (en) Automated geospatial data analysis
CN110134752B (en) Three-dimensional large-scene modeling data processing method and device
CN111695488A (en) Interest plane identification method, device, equipment and storage medium
US20070188491A1 (en) System and method for fast efficient contour shading of sampled data
CN111090712A (en) Data processing method, device and equipment and computer storage medium
US20150235325A1 (en) Management of Tax Information Based on Topographical Information
CN113487523B (en) Method and device for optimizing graph contour, computer equipment and storage medium
CN114820975B (en) Three-dimensional scene simulation reconstruction system and method based on all-element parameter symbolization
CN113033516A (en) Object identification statistical method and device, electronic equipment and storage medium
Tarsha Kurdi et al. Automatic evaluation and improvement of roof segments for modelling missing details using Lidar data
CN112527916A (en) Grid visual definition and intelligent feature analysis method based on remote sensing image
US20130231897A1 (en) Systems and methods for efficient analysis of topographical models
Aljumaily et al. Voxel change: Big data–based change detection for aerial urban LiDAR of unequal densities
Basaraner et al. A structure recognition technique in contextual generalisation of buildings and built-up areas
Borisov et al. An automated process of creating 3D city model for monitoring urban infrastructures
CN111080080B (en) Village geological disaster risk prediction method and system
CN113313101B (en) Building contour automatic aggregation method, device, equipment and storage medium
US20230104674A1 (en) Machine learning techniques for ground classification
LU502699B1 (en) Method and system for predicting risk of geological disasters in villages and towns
Namouchi et al. Piecewise horizontal 3d roof reconstruction from aerial lidar
Kostrikov et al. Automated Extraction of Heavyweight and Lightweight Models of Urban Features from LiDAR Point Clouds by Specialized Web-Software
CN115357675A (en) Method and system for establishing image control point database through image control point standardization processing
CN115033972A (en) Method and system for unitizing building main body structures in batches and readable storage medium
CN111612869B (en) Analysis method for geological mapping based on raster data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant