Method and device for extracting building outline

By preprocessing the planet format map data in 5G wireless network planning and fusion of adjacent polygons, the outer contour of the building is directly extracted, solving the problems of low accuracy and low efficiency in the prior art, and achieving efficient outer contour and accurate determination of internal structure information.

CN114255327BActive Publication Date: 2024-11-22CHINA MOBILE GROUP DESIGN INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011025255.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-25
Publication Date
2024-11-22
Estimated Expiration
2040-09-25

AI Technical Summary

Technical Problem

In the 5G wireless network planning optimization, the accuracy of building exterior contour extraction is not high, the processing efficiency is low, and the internal island problems need to be additionally determined, resulting in an increase in processing complexity.

Method used

By preprocessing the original map data, finding adjacent polygon collections, and fusing them according to topological relationships, determining whether there is an island, extracting outer contour nodes, and directly applying planet format map data without establishing a linked list structure.

Benefits of technology

It realizes accurate and efficient extraction of the outer contour of the building, simplifies the processing process, improves the accuracy and efficiency of judgment, solves the internal island problem, and is suitable for wireless network planning optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114255327B_ABST
    Figure CN114255327B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method and device for extracting the outer contour of a building, the method comprising: preprocessing the original map data to obtain multiple groups of processed map data; performing adjacent polygon search based on the processed map data to obtain an adjacent polygon set; and merging adjacent polygons according to the adjacent polygon set to determine whether there are islands, and extracting the outer contour nodes. The embodiment of the present invention determines the correlation through the adjacent topological relationship of the polygons, integrates the adjacent vector buildings, forms the overall outer contour of the building, and can effectively solve the problem of internal islands during the processing process. The commonly used planet map format is optimized for wireless network planning. The outer contour and internal structure information of the building can be easily determined without establishing a linked list structure, with high determination accuracy and high implementation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a method and device for extracting the outer contour of a building. Background Art

[0002] In the 5G th When planning and optimizing wireless networks based on the fifth generation mobile communication technology (fifth generation mobile communication technology), the coverage capability of outdoor sites to indoor areas should be fully considered. The overall outline of the building should be formed based on a high-precision map, and the depth coverage capability of outdoor sites to indoor areas should be further analyzed based on planning and optimization methods.

[0003] The planet format map with 5-meter accuracy is a high-precision map commonly used in wireless network planning and optimization. The planet format map stores vector building data, including building types, coordinates of all vertices of vector buildings, and point count information. The same building can be composed of monomers with different heights. The planet format map stores different monomers separately, and the storage content includes information such as building types, coordinates of all vertices of vector buildings, and point counts. Since the same building is stored as different vector buildings in the planet format map, a solution is needed to determine the outer contour of the building, integrate adjacent vector buildings, and form the overall outer contour of the building. The commonly used solution for adjacent polygon determination is to establish a linked list correspondence based on the edges of the polygons, and determine the relative relationship between the edges of different polygons by searching the common edges of the polygons. The pruning method and other solutions can be used to remove the common edges to form closed polygons. If there are multiple closed polygons, the internal islands need to be determined independently.

[0004] The existing scheme for determining the outer contour of a building requires that different edges be processed according to a linked list when determining the outer contour. A linked list structure needs to be established first, and a C++ program based on the linked list is used for analysis and processing. For non-linked list storage data such as planet format maps, the linked list structure is established before processing. The accuracy of outer contour extraction is not high, the processing efficiency is low, and additional determination is required for the problem of internal islands. Summary of the invention

[0005] The embodiment of the present invention provides a method and device for extracting the outer contour of a building, so as to solve the defects of low accuracy and low processing efficiency when extracting the outer contour of a building in the prior art, and realize accurate and efficient extraction of the outer contour of a building.

[0006] In a first aspect, an embodiment of the present invention provides a method for extracting a building outline, comprising:

[0007] Preprocessing the original map data to obtain multiple groups of processed map data;

[0008] Performing adjacent polygon search based on the processed map data to obtain an adjacent polygon set;

[0009] According to the adjacent polygon set, the adjacent polygons are merged and it is determined whether there are islands, and the outer contour nodes are extracted.

[0010] Optionally, according to a method for extracting outer contours of buildings according to an embodiment of the present invention, each set of map data includes a building vector ID, a building type, a number of boundary points, a plane coordinate longitude, and a plane coordinate latitude.

[0011] Optionally, according to a method for extracting the outer contour of a building in an embodiment of the present invention, the step of performing adjacent polygon search based on the processed map data to obtain an adjacent polygon set includes:

[0012] Based on the processed map data, all vertex data and polygon IDs corresponding to the vertex data are stored in Table 1, points that appear at least twice in Table 1 are defined as common nodes, the common node coordinates and the polygon IDs corresponding to the common node coordinates are obtained from Table 1, and the common node coordinates and the polygon IDs corresponding to the common node coordinates are stored in Table 2;

[0013] Extract all polygon IDs in the table 2 and perform deduplication processing to obtain table 3, wherein the table 3 consists of all polygon IDs that have adjacent relationships, and each polygon ID is unique;

[0014] According to the polygon ID value in Table 3, the vertex coordinates corresponding to the polygon ID value are extracted one by one from Table 2, and it is determined whether the vertex corresponding to the vertex coordinate exists in other polygons. If so, the ID of the other polygon is stored in the adjacent polygon set.

[0015] Optionally, according to a method for extracting the outer contour of a building in an embodiment of the present invention, the step of fusing adjacent polygons according to the adjacent polygon set and determining whether there are islands to extract the outer contour nodes includes:

[0016] Query each polygon node in the adjacent polygon set, obtain all node coordinate data, remove repeated common node data, and uniquely number them;

[0017] Determine the vector edge of the island based on the numbered node coordinate data;

[0018] Create the outer boundary vector edges of the polygon and the vector edges of the internal islands, and delete the common edges;

[0019] For any vector edge, find the next vector edge according to the first and last node numbers of the vector edge to connect, generate a fused polygon and store it, and determine whether the stored vector edge is less than the number of the original vector edges. If so, it is known that there is an island, and the vector edges that have not been traversed in the original data are continued to be connected to generate a new fused polygon and store it;

[0020] Compare the areas of two fused polygons that are associated or have internal and external relationships, and extract the outer contour nodes, where the larger area is the outer contour and the smaller area is the internal island.

[0021] In a second aspect, an embodiment of the present invention further provides a device for extracting a building outline, comprising:

[0022] A preprocessing module, used to preprocess the original map data to obtain multiple sets of processed map data;

[0023] An adjacent polygon extraction module, used for searching adjacent polygons based on the processed map data to obtain an adjacent polygon set;

[0024] The contour extraction module is used to merge adjacent polygons according to the adjacent polygon set, determine whether there are islands, and extract outer contour nodes.

[0025] Optionally, according to the building outline extraction device according to an embodiment of the present invention, each group of map data includes a building vector ID, a building type, a number of boundary points, a plane coordinate longitude, and a plane coordinate latitude.

[0026] Optionally, according to the building outline extraction device according to an embodiment of the present invention, the adjacent polygon extraction module is used for:

[0027] Based on the processed map data, all vertex data and polygon IDs corresponding to the vertex data are stored in Table 1, points that appear at least twice in Table 1 are defined as common nodes, the common node coordinates and the polygon IDs corresponding to the common node coordinates are obtained from Table 1, and the common node coordinates and the polygon IDs corresponding to the common node coordinates are stored in Table 2;

[0028] Extract all polygon IDs in the table 2 and perform deduplication processing to obtain table 3, wherein the table 3 consists of all polygon IDs that have adjacent relationships, and each polygon ID is unique;

[0029] According to the polygon ID value in Table 3, the vertex coordinates corresponding to the polygon ID value are extracted one by one from Table 2, and it is determined whether the vertex corresponding to the vertex coordinate exists in other polygons. If so, the ID of the other polygon is stored in the adjacent polygon set.

[0030] Optionally, according to the device for extracting the outer contour of a building according to an embodiment of the present invention, the contour extraction module is used for:

[0031] Query each polygon node in the adjacent polygon set, obtain all node coordinate data, remove repeated common node data, and uniquely number them;

[0032] Determine the vector edge of the island based on the numbered node coordinate data;

[0033] Create the outer boundary vector edges of the polygon and the vector edges of the internal islands, and delete the common edges;

[0034] For any vector edge, find the next vector edge according to the first and last node numbers of the vector edge to connect, generate a fused polygon and store it, and determine whether the stored vector edge is less than the number of the original vector edges. If so, it is known that there is an island, and the vector edges that have not been traversed in the original data are continued to be connected to generate a new fused polygon and store it;

[0035] Compare the areas of two fused polygons that are associated or have internal and external relationships, and extract the outer contour nodes, where the larger area is the outer contour and the smaller area is the internal island.

[0036] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the building outline extraction method as described in the first aspect are implemented.

[0037] In a fourth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the building outline extraction method as described in the first aspect.

[0038] The building outline extraction method and device provided by the embodiment of the present invention determine the correlation through the adjacent topological relationship of polygons, integrate adjacent vector buildings to form the overall building outline, and can effectively solve the internal island problem in the processing process. The commonly used planet map format is optimized for wireless network planning. The building outline and internal structure information can be easily determined without establishing a linked list structure, with high determination accuracy and high implementation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1 A schematic diagram of a flow chart of a method for extracting the outer contour of a building provided by an embodiment of the present invention;

[0041] Figure 2 A schematic diagram of a polygon provided by an embodiment of the present invention;

[0042] Figure 3 A schematic diagram of deleting a common edge provided by an embodiment of the present invention;

[0043] Figure 4 A schematic diagram of adjacent polygon fusion provided by an embodiment of the present invention;

[0044] Figure 5 A schematic diagram of the structure of a building outline extraction device provided by an embodiment of the present invention;

[0045] Figure 6 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0047] Figure 1 A schematic flow chart of a method for extracting the outer contour of a building provided by an embodiment of the present invention includes:

[0048] Step 100: pre-processing the original map data to obtain multiple sets of processed map data;

[0049] Specifically, the building outline extraction method provided by the embodiment of the present invention is applied to a planet format map. The original map data refers to the planet format map data. The planet format map stores vector building data, including building types, coordinates of all vertices of the vector building, and point number information.

[0050] The data in the BuildVector file of the planet format map identifies the vertex information of the building. The example is as follows:

[0051] 1buildings 5 818808.530000 2501307.210000 818817.410000 2501305.480000 818815.670000 2501296.600000 818806.790000 2501298.340000 818808.530000 2501307.210000

[0057] In order to facilitate subsequent data processing, the original map data is preprocessed to obtain multiple sets of processed map data.

[0058] In one embodiment, the format of each set of map data is as follows, including building vector ID, building type, number of boundary points, plane coordinate longitude and plane coordinate latitude:

[0059] ID, building type, number of boundary points, plane coordinate longitude, plane coordinate latitude

[0060] 2,buildings,5,792800.47,2514604.12

[0061] 2,buildings,5,792784.26,2514579.82

[0062] 2,buildings,5,792774.27,2514586.49

[0063] 2,buildings,5,792790.47,2514610.79

[0064] 2,buildings,5,792800.47,2514604.12

[0065] 3,buildings,5,792873.86,2514587.10

[0066] 3,buildings,5,792867.09,2514578.81

[0067] 3,buildings,5,792858.72,2514585.65

[0068] Step 101: searching for adjacent polygons based on the processed map data to obtain an adjacent polygon set;

[0069] Specifically, the embodiment of the present invention directly searches for adjacent polygons based on the processed map data without establishing a linked list correspondence relationship.

[0070] The search process is as follows: first obtain the node coordinates of the polygon and find the common node coordinates, then determine all polygons containing the common nodes, and finally determine the relevance through the adjacent topological relationship of the polygons to obtain a set of polygons with adjacent relationships.

[0071] Step 102: According to the adjacent polygon set, adjacent polygons are merged and it is determined whether there are islands, and outer contour nodes are extracted.

[0072] Specifically, according to the adjacent polygon set, each polygon node in the adjacent polygon set is queried, the vector edge judgment of the island in the polygon is performed, the vector edges that constitute the outer boundary of the polygon and the internal island are established, the common edges are deleted, the adjacent polygons are merged and the island judgment is performed, and finally the outer contour nodes are extracted.

[0073] The building outline extraction method provided by the embodiment of the present invention determines the correlation through the adjacent topological relationship of polygons, integrates adjacent vector buildings to form the overall building outline, and can effectively solve the internal island problem during the processing. The commonly used planet map format is optimized for wireless network planning. The building outline and internal structure information can be easily determined without establishing a linked list structure, with high determination accuracy and high implementation efficiency.

[0074] Based on the content of the above embodiment, the adjacent polygon search is performed based on the processed map data to obtain an adjacent polygon set, including:

[0075] Based on the processed map data, all vertex data and polygon IDs corresponding to the vertex data are stored in Table 1, points that appear at least twice in Table 1 are defined as common nodes, the common node coordinates and the polygon IDs corresponding to the common node coordinates are obtained from Table 1, and the common node coordinates and the polygon IDs corresponding to the common node coordinates are stored in Table 2;

[0076] Extract all polygon IDs in the table 2 and perform deduplication processing to obtain table 3, wherein the table 3 consists of all polygon IDs that have adjacent relationships, and each polygon ID is unique;

[0077] According to the polygon ID value in Table 3, the vertex coordinates corresponding to the polygon ID value are extracted one by one from Table 2, and it is determined whether the vertex corresponding to the vertex coordinate exists in other polygons. If so, the ID of the other polygon is stored in the adjacent polygon set.

[0078] Specifically, based on the processed map data, all vertex data and polygon IDs corresponding to the vertex data are stored in Table 1 PointAll, points that appear at least twice in Table 1 PointAll are defined as common nodes, the common node coordinates and the polygon IDs corresponding to the common node coordinates are obtained from Table 1 PointAll, and the common node coordinates and the polygon IDs corresponding to the common node coordinates are stored in Table 2 PointCom;

[0079] Extract all polygon IDs in the second table PointCom and perform deduplication processing to obtain the third table PointComID, wherein the third table PointComID consists of all polygon IDs that have adjacent relationships, and each polygon ID is unique;

[0080] According to the polygon ID value in Table 3 PointComID, the vertex coordinates corresponding to the polygon ID value are extracted one by one from Table 2 PointCom, and it is determined whether the vertex corresponding to the vertex coordinate exists in other polygons. If so, the ID of the other polygon is stored in the adjacent polygon set RelatePolygonID.

[0081] The building outline extraction method provided by the embodiment of the present invention determines the correlation through the adjacent topological relationship of polygons, does not rely on the processing of linked lists, has a simple data structure, and is widely applicable.

[0082] Based on the content of the above embodiment, the method of fusing adjacent polygons according to the adjacent polygon set and determining whether there is an island, and extracting outer contour nodes, includes:

[0083] Query each polygon node in the adjacent polygon set, obtain all node coordinate data, remove repeated common node data, and uniquely number them;

[0084] Determine the vector edge of the island based on the numbered node coordinate data;

[0085] Create the outer boundary vector edges of the polygon and the vector edges of the internal islands, and delete the common edges;

[0086] For any vector edge, find the next vector edge according to the first and last node numbers of the vector edge to connect, generate a fused polygon and store it, and determine whether the stored vector edge is less than the number of the original vector edges. If so, it is known that there is an island, and the vector edges that have not been traversed in the original data are continued to be connected to generate a new fused polygon and store it;

[0087] Compare the areas of two fused polygons that are associated or have internal and external relationships, and extract the outer contour nodes, where the larger area is the outer contour and the smaller area is the internal island.

[0088] Specifically, each polygon node in the adjacent polygon set is queried and numbered: all node coordinate data are obtained, repeated common node data are removed and uniquely numbered. Figure 2 A polygonal schematic diagram provided by an embodiment of the present invention, such as Figure 2 As shown, polygon A and polygon B are adjacent polygons, A1 and B1, A2 and B2 are common nodes. If data is stored, since A1 and B1, A2 and B2 have the same coordinates and are the same node, it is necessary to deduplicate the coordinate data and only retain any one of them and number them.

[0089] Next, the vector edge of the island in the polygon is determined: if there is a hollow ring structure inside, there is an island; if the polygon P contains an island, the node set of its outer boundary is S_0, and the node set of the island is S_1, then the node set of the polygon P in the planet map is S = {S_0, S_1}. The nodes belonging to the island are determined according to the position of each node in the polygon node set, and flag = 0 is added. For the nodes on the outer boundary, flag = 1 is marked.

[0090] Then, establish the outer boundary vector edges of the polygon and the vector edges of the internal islands. In the planet format map, the outer boundary nodes of the polygon are stored in clockwise order, and the internal island nodes are stored in counterclockwise order. Establish the pointing relationship between the nodes in clockwise order, mark the starting point start and the end point end, and save the element element (the vector edge composed of the starting point and the end point), construct the vector edge, and add the flag to distinguish the vector edges of the outer boundary and the island.

[0091] Delete common edges: Delete common edges by taking advantage of the fact that the common edge vectors of adjacent polygons have opposite directions and the elements that make up the vector edges are the same. Figure 3 A schematic diagram of deleting common edges provided by an embodiment of the present invention. Figure 3 As shown, for adjacent polygons A and B, there are vector edges [6,5] and [5,6] which are common edges. Delete the common edges.

[0092] Adjacent polygon fusion and island determination: After removing the common edges, the remaining vector edges are the vector edges of the fused polygons and possible islands. Keep the attributes stored clockwise in the polygon nodes, traverse the vector edges and connect them according to the first and last node numbers, and store the results. Figure 4 Schematic diagram of adjacent polygon fusion provided by an embodiment of the present invention. Figure 4 As shown, it is determined whether the number of stored vector edges is less than the number of original vector edges. If so, there are islands. At this time, the vector edges that have not been traversed in the original data are connected to generate new fused polygons and store them independently. The areas of two fused polygons that are associated or have internal and external relationships are compared. The larger area is the outer contour, and the smaller area is the internal island.

[0093] It is known that polygons A and B are associated polygons and their common edges have been removed:

[0094] The vector edge set L1 of polygon A: {[6,1],[1,2],[2,3],[3,4],[4,5]}

[0095] The vector edge set L2 of polygon B: {[5,8],[8,7],[7,6]}

[0096] Select any vector edge, such as [4,5] in L1, and find the next vector edge [5,8] in L2 according to the first and last node numbers of the vector edge. Store [[4,5], [5,8]] in the data structure, and repeat the above steps until the data structure contains all elements in L1 and L2. Finally, the fused polygon is as follows Figure 4 As shown in , the results are: [[1,2],[2,3],[3,4],[4,5],[5,8],[8,7],[7,6],[6,1]].

[0097] Finally, the outer contour nodes are extracted and converted into the planet format map data shown in step 100, thus completing the extraction of the outer contour of the building.

[0098] The building outline extraction method provided by the embodiment of the present invention can better solve the island problem in polygons, and can simply and quickly distinguish the internal and external outlines of buildings. There is no need to independently establish linked lists for internal and external islands. The original data format of the planet format map can be directly applied, which has advantages in map data cleaning and reuse.

[0099] Figure 5 The schematic diagram of the structure of the building outline extraction device provided by an embodiment of the present invention includes: a pre-processing module 510, an adjacent polygon extraction module 520 and a contour extraction module 530, wherein:

[0100] A preprocessing module 510 is used to preprocess the original map data to obtain multiple sets of processed map data;

[0101] An adjacent polygon extraction module 520 is used to search for adjacent polygons based on the processed map data to obtain an adjacent polygon set;

[0102] The contour extraction module 530 is used to merge adjacent polygons according to the adjacent polygon set, determine whether there are islands, and extract outer contour nodes.

[0103] It should be noted here that the above-mentioned building outline extraction device provided in the embodiment of the present invention can implement all the method steps implemented in the above-mentioned building outline extraction method embodiment, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be specifically described here.

[0104] Optionally, according to the building outline extraction device according to an embodiment of the present invention, each group of map data includes a building vector ID, a building type, a number of boundary points, a plane coordinate longitude, and a plane coordinate latitude.

[0105] It should be noted here that the above-mentioned building outline extraction device provided in the embodiment of the present invention can implement all the method steps implemented in the above-mentioned building outline extraction method embodiment, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be specifically described here.

[0106] Optionally, according to the building outline extraction device according to an embodiment of the present invention, the adjacent polygon extraction module is used for:

[0107] Based on the processed map data, all vertex data and polygon IDs corresponding to the vertex data are stored in Table 1, points that appear at least twice in Table 1 are defined as common nodes, the common node coordinates and the polygon IDs corresponding to the common node coordinates are obtained from Table 1, and the common node coordinates and the polygon IDs corresponding to the common node coordinates are stored in Table 2;

[0108] Extract all polygon IDs in the table 2 and perform deduplication processing to obtain table 3, wherein the table 3 consists of all polygon IDs that have adjacent relationships, and each polygon ID is unique;

[0109] According to the polygon ID value in Table 3, the vertex coordinates corresponding to the polygon ID value are extracted one by one from Table 2, and it is determined whether the vertex corresponding to the vertex coordinate exists in other polygons. If so, the ID of the other polygon is stored in the adjacent polygon set.

[0110] It should be noted here that the above-mentioned building outline extraction device provided in the embodiment of the present invention can implement all the method steps implemented in the above-mentioned building outline extraction method embodiment, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be specifically described here.

[0111] Optionally, according to the device for extracting the outer contour of a building according to an embodiment of the present invention, the contour extraction module is used for:

[0112] Query each polygon node in the adjacent polygon set, obtain all node coordinate data, remove repeated common node data, and uniquely number them;

[0113] Determine the vector edge of the island based on the numbered node coordinate data;

[0114] Create the outer boundary vector edges of the polygon and the vector edges of the internal islands, and delete the common edges;

[0115] For any vector edge, find the next vector edge according to the first and last node numbers of the vector edge to connect, generate a fused polygon and store it, and determine whether the stored vector edge is less than the number of the original vector edges. If so, it is known that there is an island, and the vector edges that have not been traversed in the original data are continued to be connected to generate a new fused polygon and store it;

[0116] Compare the areas of two fused polygons that are associated or have internal and external relationships, and extract the outer contour nodes, where the larger area is the outer contour and the smaller area is the internal island.

[0117] It should be noted here that the above-mentioned building outline extraction device provided in the embodiment of the present invention can implement all the method steps implemented in the above-mentioned building outline extraction method embodiment, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be specifically described here.

[0118] Figure 6 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention is shown in FIG. Figure 6As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the building outer contour extraction method, which includes: pre-processing the original map data to obtain multiple groups of processed map data; performing adjacent polygon search based on the processed map data to obtain an adjacent polygon set; according to the adjacent polygon set, merging the adjacent polygons and determining whether there is an island, and extracting the outer contour nodes.

[0119] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0120] On the other hand, an embodiment of the present invention further provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the building outline extraction method provided by the above-mentioned method embodiments, and the method includes: preprocessing the original map data to obtain multiple groups of processed map data; performing adjacent polygon searches based on the processed map data to obtain an adjacent polygon set; based on the adjacent polygon set, merging adjacent polygons and determining whether there are islands, and extracting outer contour nodes.

[0121] On the other hand, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the building outline extraction method provided by the above-mentioned embodiments, the method comprising: preprocessing the original map data to obtain multiple groups of processed map data; performing adjacent polygon searches based on the processed map data to obtain an adjacent polygon set; based on the adjacent polygon set, merging adjacent polygons and determining whether there are islands to extract outline nodes.

[0122] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0123] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for extracting the outer contour of a building, characterized in that: include: Preprocessing the original map data to obtain multiple groups of processed map data; Performing adjacent polygon search based on the processed map data to obtain an adjacent polygon set; According to the adjacent polygon set, adjacent polygons are merged and whether there is an island is determined, and outer contour nodes are extracted; The adjacent polygon search process is as follows: obtain the node coordinates of the polygon, and search for the common node coordinates, determine all polygons containing the common nodes, perform correlation determination through the adjacent topological relationship of the polygons, and obtain a set of polygons with adjacent relationships; The step of fusing adjacent polygons according to the adjacent polygon set and determining whether there are islands, and extracting outer contour nodes, comprises: According to the adjacent polygon set, query each polygon node in the adjacent polygon set, determine the vector edges of the islands in the polygon, establish the vector edges that constitute the outer boundary of the polygon and the internal islands, delete the common edges, merge the adjacent polygons and determine the islands, and finally extract the outer contour nodes.

2. The building outline extraction method according to claim 1, characterized in that: Each set of the map data includes a building vector ID, a building type, a number of boundary points, a plane coordinate longitude, and a plane coordinate latitude.

3. The building outline extraction method according to claim 1, characterized in that: The step of searching adjacent polygons based on the processed map data to obtain an adjacent polygon set includes: Based on the processed map data, all vertex data and polygon IDs corresponding to the vertex data are stored in Table 1, points that appear at least twice in Table 1 are defined as common nodes, the common node coordinates and the polygon IDs corresponding to the common node coordinates are obtained from Table 1, and the common node coordinates and the polygon IDs corresponding to the common node coordinates are stored in Table 2; Extract all polygon IDs in the table 2 and perform deduplication processing to obtain table 3, wherein the table 3 consists of all polygon IDs that have adjacent relationships, and each polygon ID is unique; According to the polygon ID value in Table 3, the vertex coordinates corresponding to the polygon ID value are extracted one by one from Table 2, and it is determined whether the vertex corresponding to the vertex coordinate exists in other polygons. If so, the ID of the other polygon is stored in the adjacent polygon set.

4. The method for extracting the outer contour of a building according to claim 1, wherein the step of fusing adjacent polygons and determining whether there are islands based on the adjacent polygon set to extract the outer contour nodes comprises: Query each polygon node in the adjacent polygon set, obtain all node coordinate data, remove repeated common node data, and uniquely number them; Determine the vector edge of the island based on the numbered node coordinate data; Create the outer boundary vector edges of the polygon and the vector edges of the internal islands, and delete the common edges; For any vector edge, find the next vector edge according to the first and last node numbers of the vector edge to connect, generate a fused polygon and store it, and determine whether the stored vector edge is less than the number of the original vector edges. If so, it is known that there is an island, and the vector edges that have not been traversed in the original data are continued to be connected to generate a new fused polygon and store it; Compare the areas of two fused polygons that are associated or have internal and external relationships, and extract the outer contour nodes, where the larger area is the outer contour and the smaller area is the internal island.

5. A device for extracting the outer contour of a building, characterized in that: include: A preprocessing module, used to preprocess the original map data to obtain multiple sets of processed map data; An adjacent polygon extraction module, used for searching adjacent polygons based on the processed map data to obtain an adjacent polygon set; A contour extraction module, used to merge adjacent polygons according to the adjacent polygon set, determine whether there are islands, and extract outer contour nodes; The adjacent polygon extraction module is further used to: obtain the node coordinates of the polygons, and search for common node coordinates, determine all polygons containing common nodes, perform correlation determination through adjacent topological relationships of the polygons, and obtain a set of polygons with adjacent relationships; The contour extraction module is also used for: According to the adjacent polygon set, query each polygon node in the adjacent polygon set, determine the vector edges of the islands in the polygon, establish the vector edges that constitute the outer boundary of the polygon and the internal islands, delete the common edges, merge the adjacent polygons and determine the islands, and finally extract the outer contour nodes.

6. The building outline extraction device according to claim 5, characterized in that: Each set of the map data includes a building vector ID, a building type, a number of boundary points, a plane coordinate longitude, and a plane coordinate latitude.

7. The building outline extraction device according to claim 5, characterized in that: The adjacent polygon extraction module is used for: Based on the processed map data, all vertex data and polygon IDs corresponding to the vertex data are stored in Table 1, points that appear at least twice in Table 1 are defined as common nodes, the common node coordinates and the polygon IDs corresponding to the common node coordinates are obtained from Table 1, and the common node coordinates and the polygon IDs corresponding to the common node coordinates are stored in Table 2; Extract all polygon IDs in the table 2 and perform deduplication processing to obtain table 3, wherein the table 3 consists of all polygon IDs that have adjacent relationships, and each polygon ID is unique; According to the polygon ID value in Table 3, the vertex coordinates corresponding to the polygon ID value are extracted one by one from Table 2, and it is determined whether the vertex corresponding to the vertex coordinate exists in other polygons. If so, the ID of the other polygon is stored in the adjacent polygon set.

8. The building outline extraction device according to claim 5, characterized in that: The contour extraction module is used for: Query each polygon node in the adjacent polygon set, obtain all node coordinate data, remove repeated common node data, and uniquely number them; Determine the vector edge of the island based on the numbered node coordinate data; Create the outer boundary vector edges of the polygon and the vector edges of the internal islands, and delete the common edges; For any vector edge, find the next vector edge according to the first and last node numbers of the vector edge to connect, generate a fused polygon and store it, and determine whether the stored vector edge is less than the number of the original vector edges. If so, it is known that there is an island, and the vector edges that have not been traversed in the original data are continued to be connected to generate a new fused polygon and store it; Compare the areas of two fused polygons that are associated or have internal and external relationships, and extract the outer contour nodes, where the larger area is the outer contour and the smaller area is the internal island.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the building outline extraction method according to any one of claims 1 to 4 are implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the building outline extraction method as claimed in any one of claims 1 to 4 are implemented.