Method and system for obtaining indoor three-dimensional map vector data of a building based on CAD drawings

By conducting semantic analysis of CAD files and building closed polygon databases, combining parallel line recognition and spatial aggregation methods, the problems of accuracy loss and T-shaped wall recognition difficulties in indoor three-dimensional map generation are solved, and high-precision and high-quality indoor three-dimensional map generation are achieved.

CN114022892BActive Publication Date: 2025-03-14E-SCOPE SPATIAL INTELLINGENCE SCI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111313075.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-08
Publication Date
2025-03-14
Estimated Expiration
2041-11-08

AI Technical Summary

Technical Problem

In the prior art, when acquiring and generating indoor three-dimensional maps, there are problems such as loss of accuracy and difficulty in identifying T-shaped walls. The recognition rate of unclosed polygons based on image recognition is low, resulting in low quality of map data.

Method used

By semantic recognition and analysis of layer names in CAD files, a closed polygon database is constructed, and a complete room floor polygon data is generated through parallel line recognition and spatial aggregation methods to ensure the accuracy and integrity of the map.

Benefits of technology

High-precision indoor three-dimensional map generation is realized, solving the problems of difficulty in identifying T-shaped walls and low recognition rate of non-closed polygons, and improving the quality and consistency of map data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114022892B_ABST
    Figure CN114022892B_ABST
Patent Text Reader

Abstract

A method and system for obtaining indoor three-dimensional map vector data of a building based on a CAD drawing, comprising the following steps: S1, semantically identifying and analyzing the layer names of the original CAD file, and assigning attribute information to the lines, polygons and texts in all CAD files according to the layer names, wherein the attribute information includes but is not limited to the layer name, layer classification and height data; S2, building a closed polygon database; S3, filtering and merging closed polygons; S4, extracting room floor polygons; S5, generating new room floor polygon data: connecting all center lines that can be connected end to end to obtain multiple new room floor polygons formed by connecting multiple center lines end to end.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of navigation maps of indoor scenes, and in particular relates to a method and system for obtaining indoor three-dimensional map vector data of a building based on a CAD drawing. Background Art

[0002] Indoor navigation has become a hot topic of research since 2010, and the acquisition and production of navigation maps closely related to it has become a key step in research. Indoor navigation refers to a process of finding a planned path by determining one's current location to help the navigator move from the starting location to the final target location. Indoor maps, as the basis of indoor location services, have attracted widespread attention. However, due to the lack of automatic production methods for fine indoor maps, the contradiction between the data production efficiency and demand for indoor maps has become increasingly prominent. Automated indoor map data acquisition methods have become a key technical problem that needs to be solved in indoor location services.

[0003] At present, there are three main ways to make indoor maps, namely, laser scanning-based method (SLAM), crowdsourcing method and CAD file-based method. SLAM mainly obtains line segment sets or raster data through laser scanning, and then uses image processing technology to extract lines to build indoor maps. The cost of obtaining map data through this method is high, and the acquisition speed and processing speed are difficult to meet the needs of mass production. The crowdsourcing model obtains inertial navigation system data through handheld terminal devices, uses algorithms to restore the user's walking trajectory, and then infers the approximate structure of indoor rooms and corridors based on a large amount of repeated pedestrian trajectory data. At present, there are many problems in using mobile phone inertial navigation system data to build indoor maps, such as low accuracy of mobile terminal data and device differences, resulting in the accuracy of indoor maps cannot meet people's daily needs. The method of extracting indoor map data based on CAD files uses the building plane image output by CAD software as the data source, uploads it through each company's own 3D map editor as the background map, and then restores the indoor space vector data and attribute information by drawing. Therefore, taking the CAD architectural floor plan as the data source, using the semantic information layer and blocks in the architectural drawing to restore the topological relationship between map elements, and making a service interface for automatically identifying and converting CAD drawings into indoor three-dimensional map vector data based on the WEB service platform, instead of the previous manual drawing steps of basic CAD images, it can greatly save the time and labor cost of single repetitive operations. The parameters and settings in this method can be flexibly modified for different types of indoor scenes, thereby realizing an automatic generation method of indoor maps with higher adaptability and robustness, which is of great significance for realizing the batch and efficient production of indoor maps. At present, most algorithms have high requirements on the quality of drawing data. Many minor errors, such as wall lines not closed, doors and walls not connected, and straight lines overlapping each other, may cause the algorithm to fail completely in some cases; the differences in design specifications and drawing habits used by draftsmen make it almost impossible to obtain "idealized" architectural drawings, which increases the technical difficulty of fully automatic extraction of indoor map data. Currently, the CAD drawing recognition algorithms publicly available on the market include those based on image recognition and those based on spatial data recognition. The conversion of image recognition into spatial data will result in a loss of accuracy. 1 pixel may represent tens of millimeters, and the success rate of image recognition for non-closed polygons is very poor. The information of the layer name on the image is directly lost, which is equivalent to the loss of a parameter for judging the correctness of the classification.

[0004] For example, the patent document with application number 202010630778.6 discloses a method for converting an indoor navigation map based on a building CAD drawing, the method comprising:

[0005] S1. Perform semantic analysis on the original CAD file, establish an extraction model, and extract the initial room data in layers;

[0006] S2, extracting the center line and connecting the near points of the initial room data to obtain simplified image data;

[0007] S3, performing opening and closing operations on the simplified image data to repair holes or breakpoints, and performing refinement by skeleton extraction;

[0008] S4. Obtain independent room data through contour detection, and construct SVG map data under the PATH tag.

[0009] Preferably, in step S1, the original CAD file is a CAD file drawn in layers, the window layer draws windows, and the wall layer draws walls. In the specific objects of the CAD file, separation marks are used to indicate the splicing between straight lines.

[0010] Preferably, in step S1, the extraction model is specifically:

[0011] Read entities from the CAD file data, determine the entity object type, and if it is an INSERT entity, store the insertion point coordinates of the block; if not, determine whether it is Line, LWPolyLine, Circle, or Arc, and read and store the line data, polyline data, circle data, or arc data respectively;

[0012] For blocks, determine whether they are Line, LWPolyLine, Circle or Arc. For Line, read the straight line data and the insertion point coordinates and store them. For LWPolyLine, read the polyline data and the insertion point coordinates and store them. For Circle, read the circular data and the insertion point coordinates and store them. For Arc, read the arc data and the insertion point coordinates and store them.

[0013] Preferably, in step S2, extracting the centerline of the initial room data specifically includes:

[0014] Wall centerline extraction: read candidate straight lines, use the candidate straight lines as the straight lines of the outer loop, select a straight line different from the outer loop as the inner loop straight line, determine whether the two straight lines are parallel, and if so, determine whether the two straight lines meet the wall standard. For the two straight lines that meet the wall standard, calculate the corresponding center lines of the two straight lines and save them; mark the straight lines in the inner loop as processed, and perform the inner loop until the inner loop ends; mark the straight lines in the outer loop as processed, and loop until all candidate straight lines that meet the wall standard are processed;

[0015] Window centerline extraction: read candidate straight lines, use the candidate straight lines as the straight lines of the outer loop, select a straight line different from the outer loop as the straight line of the inner loop, determine whether the two straight lines are parallel, and if so, determine whether the two straight lines meet the window standards. For the two straight lines that meet the window standards, update the two outermost window straight lines, mark them, and perform an inner loop until the inner loop ends; calculate the window centerline based on the two outermost straight lines, and loop until all candidate straight lines that meet the window standards are processed.

[0016] The inventors have found that the above-mentioned method of identifying the center line of the wall based on spatial data recognition, which closes the room into a square through the center line, has the disadvantage of losing the expression of the wall area. In addition, it is difficult to judge the T-shaped wall in actual application by directly judging the wall according to the parallel line logic, so the T-shaped wall is lost. Summary of the invention

[0017] To solve the above problems, the purpose of the present invention is to provide a method and system for obtaining indoor three-dimensional map vector data of a building based on a CAD drawing. By analyzing and aggregating spatial data, the map accuracy is ensured not to be lost, thereby solving the problem of T-shaped walls being difficult to identify.

[0018] The technical solution of the present invention is as follows: A method for obtaining indoor three-dimensional map vector data of a building based on a CAD drawing, comprising the following steps:

[0019] S1. semantically identify and analyze the layer names of the original CAD file, and assign attribute information to all lines, polygons, and texts in the CAD file according to the layer names, wherein the attribute information includes but is not limited to layer name, layer classification, and height data;

[0020] S2. Build a closed polygon database: extract closed polygons and non-closed multi-point lines in the original CAD file;

[0021] Save the closed polygon to the closed polygon database;

[0022] Split the non-closed polygon into two-point line sets, and then extract the two-point line sets into multiple sets of parallel line sets (the interval between the lines is within 0.5 meters) by the line parallel principle; extract the two outermost parallel lines to form a rectangle, process the multiple sets of parallel line sets into closed polygon data, and save them in the closed polygon database;

[0023] S3, filtering and merging closed polygons: by comparing whether the edges of the closed polygons are in a containment relationship, identifying and filtering redundant closed polygons in the closed polygon database;

[0024] By comparing the adjacent relationship of closed polygons, the closed polygons that meet the adjacent relationship conditions are merged into a new closed polygon, and the closed polygon data before the two merged are deleted;

[0025] S4, extracting room floor polygons: identifying room floor polygons by judging the number of right angles and the size of the area of ​​the closed polygon (the identification criteria are that the number of right angles is more than 3 and the area is more than 3 square meters);

[0026] Determine whether the identified room floor polygon can generate a center line; if so, generate the center line;

[0027] Determine whether the center line of a room's floor polygon and the center line of another room's floor polygon are vertex-adjacent and the angle is approximately perpendicular;

[0028] If yes, then merge the two center lines and the room floor polygons corresponding to the two center lines;

[0029] S5. Generate new room floor polygon data: connect all center lines that can be connected end to end to obtain multiple new room floor polygons formed by connecting multiple center lines end to end; set the side of each new room floor polygon to a wall with a height of 3 meters; set the bottom surface of each new room floor polygon to the ground with a height of 0.3 meters; store the polygon result set containing classification and height data.

[0030] Further, the following steps are included:

[0031] Extract other building data: for closed polygons that are not identified as room floor polygons in step S4, identify the classification of the polygon according to the layer name of the polygon; set the height of the polygon according to the classification of the polygon; obtain the three-dimensional map vector data of other buildings, and store it in a polygon result set containing classification and height data.

[0032] Further, the step S2 includes the following steps: reading lines, polygons and text in the CAD file, determining whether it is a closed polygon, and if so, storing it in a closed polygon set; if not, determining whether it is a line or text; if it is a line, storing it in a line set; if it is text, storing it in a text set;

[0033] Construct a two-point line set: read a line in the line set, determine whether the line is a line with only two vertices, if so, store it in the two-point line set; if not, split the line into multiple lines with two vertices; store the split two-point lines in the two-point line set; traverse all lines; calculate the center point coordinates Cen(x,y), length Dis and angle Angle data of each two-point line, extract the layer classification information of each two-point line and save it;

[0034] Constructing a set of parallel lines: reading an unprocessed two-point line from the two-point line set to establish a parallel line group, and using the two-point line as a comparison standard; traversing and reading all other unprocessed two-point lines, and determining the angle difference, distance difference, and length difference between the two-point line and the two-point line used as the comparison standard; if the angle difference, distance difference, and length difference are within a preset interval (the preset interval is within 5 degrees for the angle difference and within 0.5 meters for the interval. The standard of the preset interval is that the two two-point lines are parallel and adjacent and have similar lengths, and the two two-point lines may be components of the same wall); then storing the two-point line in the parallel line group; traversing all two-point lines; repeating the above steps to obtain a plurality of parallel line groups, each of which contains at least two or more two-point lines;

[0035] Constructing a set of two outermost parallel lines: extracting two parallel lines from each parallel line group, setting one of the parallel lines as the outermost parallel line and the other as the innermost parallel line; determining the distance between the center point of the third parallel line and the two parallel lines; if the third line is located further outwards than the outermost parallel line, replacing the third line with the outermost parallel line; if the third line is located further inwards than the innermost parallel line, replacing the third line with the innermost parallel line;

[0036] Convert the set of two outermost parallel lines into a set of rectangles: read a set of two outermost parallel lines in the set of two outermost parallel lines; take the longer parallel line as the long side of the rectangle, obtain two perpendicular coordinates from two points at both ends of the long side to the shorter parallel line respectively, take the two points at both ends of the long side and the two perpendicular coordinates as the four vertices of the rectangle, convert the two outermost parallel lines into a closed rectangle; store it in the closed polygon database.

[0037] Preferably, the other building data includes but is not limited to walls, columns, doors, room floors, stairs, elevators, furniture, and parking spaces.

[0038] Furthermore, the method includes the following steps: identifying and filtering the text set, removing invalid POI texts in the wall area and the column area, removing text POIs with area information, and using the same text adjacent algorithm to remove repeated text POIs in the same area.

[0039] Furthermore, the following steps are included: if the layer name cannot be identified, the corresponding layer type and height information are manually set, and it is defined whether identification is required.

[0040] Furthermore, the construction of a set of parallel lines includes the following steps: determining the angle difference, distance difference and length difference between the two-point line and the two-point line used as a comparison standard; if the angle difference and distance difference are within a preset range (the preset range is that the angle difference is within 5 degrees and the interval is within 0.5 meters. The standard of the preset range is that the two two-point lines are parallel and adjacent and have similar lengths, and the two two-point lines may be parts of the same wall); but the length difference is not within the preset range, then the longer two-point line is broken into three two-point lines based on the shorter two-point line as the standard; and the three broken two-point lines are saved in the two-point line set.

[0041] Furthermore, the method comprises the following steps: filtering out smaller closed polygons from the closed polygon database, wherein the filtering criteria are closed polygons with a length or width within 0.8 meters and an area less than 2 square meters.

[0042] Furthermore, the following steps are included: associating the polygon result set containing classification and height data with the data in the text set; the association method can be: since the polygon includes the coordinate data of a plurality of points, and the location of the text also includes coordinate data, by comparing the coordinate data of the polygon and the text, it is determined whether the point is located within the polygon.

[0043] A system for obtaining indoor three-dimensional map vector data of a building based on a CAD drawing, characterized in that the system comprises:

[0044] Preprocessing module: performs semantic recognition and analysis on the layer names of the original CAD files, and assigns attribute information to the lines, polygons and texts in all CAD files according to the layer names. The attribute information includes but is not limited to the layer name, layer classification and height data;

[0045] Construct closed polygon database module: extract closed polygons and non-closed multi-point lines in the original CAD file;

[0046] Save the closed polygon to the closed polygon database;

[0047] Split a non-closed polygon into two-point line sets, and then extract the two-point line sets into multiple sets of parallel line sets according to the line parallelism principle; extract the two outermost parallel lines to form a rectangle, process the multiple sets of parallel line sets into closed polygon data, and save them in a closed polygon database;

[0048] Filtering and merging closed polygons module: by comparing whether the edges of closed polygons are in a containment relationship, identifying and filtering redundant closed polygons in the closed polygon database;

[0049] By comparing the adjacent relationship of closed polygons, the closed polygons that meet the adjacent relationship conditions are merged into a new closed polygon, and the closed polygon data before the two merged are deleted;

[0050] Extract room floor polygon module: Identify room floor polygons by judging the number of right angles and area of ​​closed polygons. The identification criteria are that the number of right angles is more than 3 and the area is more than 3 square meters;

[0051] Determine whether the identified room floor polygon can generate a center line; if so, generate the center line;

[0052] Determine whether the center line of a room's floor polygon and the center line of another room's floor polygon are vertex-adjacent and the angle is approximately perpendicular;

[0053] If yes, then merge the two center lines and the room floor polygons corresponding to the two center lines;

[0054] Generate new room floor polygon data module: connect all center lines that can be connected end to end to obtain multiple new room floor polygons formed by connecting multiple center lines end to end; set the side of each new room floor polygon to a wall with a height of 3 meters; the bottom surface of each new room floor polygon is the ground with a height of 0.3 meters; store the polygon result set containing classification and height data.

[0055] The beneficial effects of the present invention are as follows: First, the present invention overcomes the shortcomings of the current background technology that directly extracts the center line and then extracts the room through the parallel lines of the wall, and loses the regional information of the wall. First, multiple polygons are identified through parallel lines, and then spatial proximity analysis is performed on the polygons, and then aggregation is performed. This ensures that the identified polygons are definitely closed, thereby ensuring that the map accuracy is not lost.

[0056] Second, in order to solve the problem that the T-shaped fence is difficult to identify, the present invention creatively uses a multi-point line interruption to identify small rectangles, and then uses a spatial aggregation method.

[0057] Third, for non-closed lines, if the difference is within 0.5 meters, it will be lost for image recognition. The present invention creatively solves this problem by filling in the long sides and generating a rectangle.

[0058] Fourth, for rectangles with parallel lines of different lengths, the present invention creatively adopts a method of breaking long parallel lines with short parallel lines to solve the problem of incomplete polygons in CAD map drawing.

[0059] Fifth, the polygons in the present invention include but are not limited to rectangles, pentagons, hexagons, etc. For polygons that cannot generate center lines, vector data of buildings can also be obtained based on layer names or text sets.

[0060] Sixth, the present invention can also set invalid auxiliary line layers not to be recognized, manually set classifications and heights for drawings, recognize polygons and attribute names and heights, and construct indoor three-dimensional map vector data.

[0061] The present invention realizes the automatic data conversion from DWG files to indoor three-dimensional maps, reduces the degree of manual intervention in the existing stage, and improves the development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 It is a schematic diagram of the process of the present invention;

[0063] Figure 2 A schematic diagram of a flow chart of an embodiment of the present invention;

[0064] Figure 3 The type of layer name of the present invention and the attribute information diagram of line, polygon and text;

[0065] Figure 4 It is a schematic diagram of the following steps of the present invention: splitting a multi-point line into a plurality of two-point lines;

[0066] Figure 5 It is a schematic diagram of the following steps of the present invention: converting the parallel line group into two outermost parallel lines and then into a closed rectangle;

[0067] Figure 6 It is a schematic diagram of the following steps of the present invention: for a group of parallel lines with different lengths, the long parallel line is broken into three two-point lines according to the short parallel line;

[0068] Figure 7 It is a schematic diagram of the following steps of the present invention: filtering closed polygons having a containment relationship and three adjacent sides;

[0069] Figure 8 The following is a schematic diagram of the steps of the present invention: merging closed polygons that meet the adjacent relationship conditions into a new closed polygon, and deleting the closed polygon data before the two merging;

[0070] Fig. 9 It is a schematic diagram of the following steps of the present invention: connecting all center lines that can be connected end to end to obtain multiple new room floor polygons formed by connecting multiple center lines end to end.

[0071] Fig.10 is a schematic diagram of the original CAD file of the present invention;

[0072] Fig.11 It is an indoor three-dimensional map processed by the method or system of the present invention. DETAILED DESCRIPTION

[0073] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings and embodiments.

[0074] like Figure 1 , Figure 2 In the embodiment shown, a method for obtaining indoor three-dimensional map vector data of a building based on a CAD drawing comprises the following steps:

[0075] S1. Perform semantic recognition and analysis on the layer names of the original CAD file, and assign attribute information to all lines, polygons and texts in the CAD file according to the layer names. The attribute information includes but is not limited to the layer name, layer classification and height data. Figure 3 Layer names and layer categories include but are not limited to walls, columns, doors, room floors, stairs, elevators, furniture, and parking spaces.

[0076] S2, read the lines, polygons and texts in the CAD file, determine whether it is a closed polygon, if yes, store it in a closed polygon set; if no, determine whether it is a line or text; if it is a line, store it in a line set; if it is text, store it in a text set;

[0077] S3, construct a two-point line set: read a line in the line set, determine whether the line is a line with only two vertices, if yes, store it in the two-point line set; if no, split the line into multiple lines with two vertices; store the split two-point lines in the two-point line set; traverse all lines; calculate the center point coordinates Cen(x,y), length Dis and angle Angle data of each two-point line, extract the layer classification information of each two-point line and save it; Figure 4 shown.

[0078] S4. Construct a set of parallel lines: determine whether the relationship between two-point lines meets the conditions for extraction as a parallel line group. The judgment method can be as follows: read an unprocessed two-point line from the two-point line set to establish a parallel line group, and use the two-point line as a comparison standard; traverse and read all other unprocessed two-point lines, and determine the angle difference, distance difference and length difference between the two-point line and the two-point line used as the comparison standard; if the angle difference, distance difference and length difference are within the preset interval range, (the preset interval range is the angle difference within 5 degrees and the interval within 0.5 meters. The standard of the preset interval range is that the two two-point lines are parallel and adjacent and have similar lengths, and the two two-point lines may be components of the same wall); then store the two-point line in the parallel line group; traverse all two-point lines; repeat the above steps to obtain a plurality of parallel line groups and store them in the parallel line group set, each parallel line group contains at least 2 or more two-point lines;

[0079] like Figure 6 As shown, if in step S4, the relationship between the two-point line does not meet the condition of being extracted as a parallel line group, the angle difference, distance difference and length difference between the two-point line and the two-point line used as the comparison standard are determined; if the angle difference and distance difference are within the preset interval, but the length difference is not within the preset interval, the longer two-point line is broken into three two-point lines based on the shorter two-point line as the standard; the three broken two-point lines are saved in the two-point line set.

[0080] S5. Construct a set of two outermost parallel lines: extract two parallel lines from each parallel line group, set one of the parallel lines as the outermost parallel line, and set the other parallel line as the innermost parallel line; determine the distance between the center point of the third parallel line and the two parallel lines; if the third line is located outside the outermost parallel line, replace the third line with the outermost parallel line; if the third line is located inside the innermost parallel line, replace the third line with the innermost parallel line; Figure 5 shown.

[0081] S6. Convert the set of two outermost parallel lines into a set of rectangles: read a set of two outermost parallel lines in the set of two outermost parallel lines; take the longer parallel line as the long side of the rectangle, calculate two perpendicular coordinates from two points at both ends of the long side to the shorter parallel line respectively, take the two points at both ends of the long side and the two perpendicular coordinates as the four vertices of the rectangle, convert the two outermost parallel lines into a closed rectangle; store it in the closed polygon database. Figure 5 shown.

[0082] S7, filtering and merging closed polygons: by comparing whether the edges of the closed polygons are in a containment relationship, identifying and filtering the redundant closed polygons in the closed polygon database; Figure 7 shown.

[0083] S8, by comparing the adjacent relationship of closed polygons, the closed polygons that meet the adjacent relationship conditions are merged into a new closed polygon, and the closed polygon data before the two merges are deleted; Figure 8 shown.

[0084] like Fig. 9 As shown, S9, extracting room floor polygons: identifying room floor polygons by judging the number of right angles and the size of the area of ​​the closed polygon; the recognition standard is that the number of right angles is more than 3 and the area is more than 3 square meters; S10, judging whether the identified room floor polygon can generate a center line; if so, generating a center line; judging whether the relationship between the center line of one room floor polygon and the center line of another room floor polygon is that the vertices are adjacent and the angles are approximately vertical; if so, merging the two center lines and the room floor polygons corresponding to the two center lines; S11, generating new room floor polygon data: connecting all center lines that can be connected end to end to obtain multiple new room floor polygons formed by connecting multiple center lines end to end; setting the side of each of the new room floor polygons to a wall with a height of 3 meters; the bottom surface of each of the new room floor polygons to the ground with a height of 0.3 meters; storing a polygon result set containing classification and height data.

[0085] For the closed polygons that are not identified as room floor polygons in step S9, the classification of the polygon is identified according to the layer name of the polygon; the height of the polygon is set according to the classification of the polygon; the three-dimensional map vector data of other buildings is obtained and stored in a polygon result set containing classification and height data.

[0086] Furthermore, the following steps are included: if the layer name cannot be identified, the corresponding layer type and height information are manually set, and it is defined whether identification is required.

[0087] Furthermore, the method comprises the following steps: filtering out smaller closed polygons from the closed polygon database, wherein the filtering criteria are closed polygons with a length or width within 0.8 meters and an area less than 2 square meters.

[0088] Furthermore, the following steps are included: associating the polygon result set containing classification and height data with the data in the text set; the association method can be: since the polygon includes the coordinate data of a plurality of points, and the location of the text also includes coordinate data, by comparing the coordinate data of the polygon and the text, it is determined whether the point is located within the polygon.

[0089] The recognized spatial vector data is sent to the WEBGL 3D map engine for display. After map recognition, only polygons and related text POIs are retained. The text POIs are filtered to remove invalid POI texts in some wall areas and column areas, and some text POIs with area information are filtered. The same square character adjacent algorithm is used to remove some repeated text POIs in the same area.

[0090] A system for obtaining indoor three-dimensional map vector data of a building based on a CAD drawing, characterized in that the system comprises:

[0091] Preprocessing module: performs semantic recognition and analysis on the layer names of the original CAD files, and assigns attribute information to the lines, polygons and texts in all CAD files according to the layer names. The attribute information includes but is not limited to the layer name, layer classification and height data;

[0092] Construct closed polygon database module: extract closed polygons and non-closed multi-point lines in the original CAD file;

[0093] Save the closed polygon to the closed polygon database;

[0094] Split a non-closed polygon into two-point line sets, and then extract the two-point line sets into multiple sets of parallel line sets according to the line parallelism principle; extract the two outermost parallel lines to form a rectangle, process the multiple sets of parallel line sets into closed polygon data, and save them in a closed polygon database;

[0095] Filtering and merging closed polygons module: by comparing whether the edges of closed polygons are in a containment relationship, identifying and filtering redundant closed polygons in the closed polygon database;

[0096] By comparing the adjacent relationship of closed polygons, the closed polygons that meet the adjacent relationship conditions are merged into a new closed polygon, and the closed polygon data before the two merged are deleted;

[0097] Extract room floor polygon module: Identify room floor polygons by judging the number of right angles and area of ​​closed polygons. The identification criteria are that the number of right angles is more than 3 and the area is more than 3 square meters;

[0098] Determine whether the identified room floor polygon can generate a center line; if so, generate the center line;

[0099] Determine whether the center line of a room's floor polygon and the center line of another room's floor polygon are vertex-adjacent and the angle is approximately perpendicular;

[0100] If yes, then merge the two center lines and the room floor polygons corresponding to the two center lines;

[0101] Generate new room floor polygon data module: connect all center lines that can be connected end to end to obtain multiple new room floor polygons formed by connecting multiple center lines end to end; set the side of each new room floor polygon to a wall with a height of 3 meters; the bottom surface of each new room floor polygon is the ground with a height of 0.3 meters; store the polygon result set containing classification and height data.

[0102] The above description only relates to some specific embodiments of the present invention. Any replacement or improvement made by any technician in the field based on the spirit of the present invention should be covered by the protection scope of the present invention, and the protection scope of the present invention should be based on the claims.

Claims

1. A method for obtaining indoor three-dimensional map vector data of a building based on a CAD drawing, characterized in that: The steps include: S1. semantically identify and analyze the layer names of the original CAD file, and assign attribute information to all lines, polygons, and texts in the CAD file according to the layer names, wherein the attribute information includes but is not limited to layer name, layer classification, and height data; S2. Build a closed polygon database: extract closed polygons and non-closed multi-point lines in the original CAD file; Save the closed polygon to the closed polygon database; Split the non-closed polygon into two-point line sets, and then extract the two-point line sets into multiple sets of parallel line sets based on the line parallelism principle; By extracting two outermost parallel lines to form a rectangle, the plurality of sets of parallel lines are processed into closed polygon data and saved in a closed polygon database; S3, filtering and merging closed polygons: by comparing whether the edges of the closed polygons are in a containment relationship, identifying and filtering redundant closed polygons in the closed polygon database; By comparing the adjacent relationship of closed polygons, the closed polygons that meet the adjacent relationship conditions are merged into a new closed polygon, and the closed polygon data before the two merged are deleted; S4, extracting room floor polygon: identifying the room floor polygon by determining the number of right angles and the area of ​​the closed polygon; Determine whether the identified room floor polygon can generate a center line; If yes, generate the centerline; Determine whether the center line of a room's floor polygon and the center line of another room's floor polygon are vertex-adjacent and the angle is approximately perpendicular; If yes, then merge the two center lines and the room floor polygons corresponding to the two center lines; S5. Generate new room floor polygon data: connect all center lines that can be connected end to end to obtain multiple new room floor polygons formed by connecting multiple center lines end to end; set the side of each new room floor polygon to a wall with a height of 3 meters; set the bottom surface of each new room floor polygon to the ground with a height of 0.3 meters; store the polygon result set containing classification and height data.

2. The method for obtaining indoor three-dimensional map vector data of a building based on a CAD drawing according to claim 1, characterized in that: The steps include: Extracting other building data: for the closed polygon that is not identified as the room floor polygon in step S4, identifying the classification of the polygon according to the layer name of the polygon; setting the height of the polygon according to the classification of the polygon; Get the 3D map vector data of other buildings and store them in a polygon result set containing classification and height data.

3. The method for obtaining indoor three-dimensional map vector data of a building based on a CAD drawing according to claim 1, characterized in that: The step S2 comprises the following steps: reading lines, polygons and text in the CAD file, determining whether they are closed polygons, and if so, storing them in a closed polygon set; if not, determining whether they are lines or text; If it is a line, store it in the line collection; If it is text, it is stored in the text collection; Construct a two-point line set: read a line in the line set, determine whether the line is a line with only two vertices, if so, store it in the two-point line set; if not, split the line into multiple lines with two vertices; store the split two-point lines in the two-point line set; traverse all lines; calculate the center point coordinates Cen(x,y), length Dis and angle Angle data of each two-point line, extract the layer classification information of each two-point line and save it; Constructing a set of parallel lines: reading an unprocessed two-point line from the two-point line set to establish a parallel line group, and using the two-point line as a comparison standard; traversing and reading all other unprocessed two-point lines, and determining the angle difference, distance difference, and length difference between the two-point line and the two-point line used as the comparison standard; if the angle difference, distance difference, and length difference are within a preset range, storing the two-point line in the parallel line group; traversing all two-point lines; repeating the above steps to obtain a plurality of parallel line groups, each of which contains at least two or more two-point lines; Constructing a set of two outermost parallel lines: extracting two parallel lines from each parallel line group, setting one of the parallel lines as the outermost parallel line and the other as the innermost parallel line; determining the distance between the center point of the third parallel line and the two parallel lines; if the third line is located further outwards than the outermost parallel line, replacing the third line with the outermost parallel line; if the third line is located further inwards than the innermost parallel line, replacing the third line with the innermost parallel line; Convert the set of two outermost parallel lines into a set of rectangles: read a set of two outermost parallel lines in the set of two outermost parallel lines; take the longer parallel line as the long side of the rectangle, obtain two perpendicular coordinates from two points at both ends of the long side to the shorter parallel line respectively, take the two points at both ends of the long side and the two perpendicular coordinates as the four vertices of the rectangle, convert the two outermost parallel lines into a closed rectangle; store it in the closed polygon database.

4. The method for obtaining indoor three-dimensional map vector data of a building based on a CAD drawing according to claim 2, characterized in that: The other building data include but are not limited to walls, columns, doors, room floors, stairs, elevators, furniture, and parking spaces.

5. The method for obtaining indoor three-dimensional map vector data of a building based on a CAD drawing according to claim 3, characterized in that: The method comprises the following steps: identifying and filtering the text set, removing invalid POI texts in the wall area and the column area, removing text POIs with area information, and using the same text adjacent algorithm to remove repeated text POIs in the same area.

6. The method for obtaining indoor three-dimensional map vector data of a building based on a CAD drawing according to claim 1, characterized in that: The method comprises the following steps: if the layer name cannot be identified, the corresponding layer type and height information are manually set, and it is defined whether identification is required.

7. The method for obtaining indoor three-dimensional map vector data of a building based on a CAD drawing according to claim 3, characterized in that: The construction of the parallel line set includes the following steps: determining the angle difference, distance difference and length difference between the two-point line and the two-point line used as a comparison standard; if the angle difference and distance difference are within a preset interval, but the length difference is not within the preset interval, breaking the longer two-point line into three two-point lines with the shorter two-point line as the standard; and saving the three broken two-point lines into the two-point line set.

8. The method for obtaining indoor three-dimensional map vector data of a building based on a CAD drawing according to claim 1, characterized in that: The method comprises the following steps: filtering out smaller closed polygons from a closed polygon database, wherein the filtering criteria are closed polygons whose length or width is within 0.8 meters and whose area is less than 2 square meters.

9. The method for obtaining indoor three-dimensional map vector data of a building based on a CAD drawing according to claim 1, characterized in that: The method also includes the following steps: associating the polygon result set containing classification and height data with the data in the text set.

10. A system for obtaining indoor three-dimensional map vector data of a building based on a CAD drawing, characterized in that: The system comprises: Preprocessing module: performs semantic recognition and analysis on the layer names of the original CAD files, and assigns attribute information to the lines, polygons and texts in all CAD files according to the layer names. The attribute information includes but is not limited to the layer name, layer classification and height data; Construct closed polygon database module: extract closed polygons and non-closed multi-point lines in the original CAD file; Save the closed polygon to the closed polygon database; Split a non-closed polygon into two-point line sets, and then extract the two-point line sets into multiple sets of parallel line sets according to the line parallelism principle; extract the two outermost parallel lines to form a rectangle, process the multiple sets of parallel line sets into closed polygon data, and save them in a closed polygon database; Filtering and merging closed polygons module: by comparing whether the edges of closed polygons are in a containment relationship, identifying and filtering redundant closed polygons in the closed polygon database; By comparing the adjacent relationship of closed polygons, the closed polygons that meet the adjacent relationship conditions are merged into a new closed polygon, and the closed polygon data before the two merged are deleted; Extract room floor polygon module: Identify room floor polygon by judging the number of right angles and area size of closed polygon; Determine whether the identified room floor polygon can generate a center line; if so, generate the center line; Determine whether the center line of a room's floor polygon and the center line of another room's floor polygon are vertex-adjacent and the angle is approximately perpendicular; If yes, then merge the two center lines and the room floor polygons corresponding to the two center lines; Generate new room floor polygon data module: connect all center lines that can be connected end to end to obtain multiple new room floor polygons formed by connecting multiple center lines end to end; set the side of each new room floor polygon to a wall with a height of 3 meters; the bottom surface of each new room floor polygon is the ground with a height of 0.3 meters; store the polygon result set containing classification and height data.

Citation Information

Patent Citations

  • Indoor navigation map conversion method and system based on building CAD drawing

    CN111854758A

  • Architectural CAD drawing-based indoor topological map generating method and system

    CN108536923A

  • Indoor automatic drawing and modeling method based on planar image

    CN110532602A