















技术领域technical field
本发明涉及地图制图领域,具体来说,涉及一种室内自动生成道路线的方法、计算机设备及存储介质。The invention relates to the field of cartography, in particular, to a method, computer equipment and storage medium for automatically generating road lines indoors.
背景技术Background technique
随着城市现代化程度的不断提高,大型建筑物的数量不断增长,室内空间的物理布局也越来越复杂。因此,人们对于室内导航服务的需求显著增长。然而,当前地图要素中,室内地图通常以面要素为主,难以实现定位、导航等一系列功能。As cities continue to modernize, the number of large buildings continues to grow, and the physical layout of interior spaces becomes more complex. As a result, the demand for indoor navigation services has grown significantly. However, among the current map elements, indoor maps are usually dominated by surface elements, and it is difficult to achieve a series of functions such as positioning and navigation.
发明内容SUMMARY OF THE INVENTION
为了克服上述现有技术的不足之处,本发明提供一种室内自动生成道路线的方法,包括如下步骤:In order to overcome the deficiencies of the above-mentioned prior art, the present invention provides a method for automatically generating road lines indoors, comprising the following steps:
S1、获取室内地图信息,地图信息中包括若干个通道面要素、若干个房间面要素以及若干个房门点要素;S1. Obtain indoor map information, the map information includes several channel surface elements, several room surface elements and several door point elements;
S2、利用地图信息中的通道面要素,以及所有位于通道面要素的边线上的房门点要素,获取每个通道面要素的中心线,称为通道中心线,再做这些房门点要素到对应的通道中心线的连线并对通道中心线进行处理,从而在地图中生成通道面要素的道路指示线;S2. Use the channel area elements in the map information and all the door point elements located on the edge of the channel area elements to obtain the center line of each channel area element, which is called the channel center line, and then make these door point elements to Connect the corresponding channel center line and process the channel center line to generate the road indication line of the channel polygon element in the map;
S3、利用地图信息中的房间面要素,以及每个房间面要素对应的房门点要素,获取每个房间面要素的内部到对应的房门点要素的连线,从而在地图中生成房间面要素的道路指示线。S3. Use the room area elements in the map information and the door point elements corresponding to each room area element to obtain the connection between the interior of each room area element and the corresponding door point element, so as to generate a room area in the map The road guide for the feature.
在一些实施例中,若在步骤S1中获取的地图信息中还包括若干个对应于楼梯或电梯的楼梯点要素,则在步骤S3后,还包括步骤S4:对于每一个内部包含有楼梯点要素的通道面要素或房间面要素,判断该面要素中是否存在道路指示线,若该面要素中存在道路指示线,则获取该面要素内的楼梯点要素到最近的道路指示线的连线,从而在地图中生成通向楼梯点要素的道路指示线;若该面要素中不存在道路指示线,则先获取该面要素的中心线,再做该面要素中的楼梯点要素到中心线的连线,再该面要素的中心线进行处理,从而在地图中生成通向楼梯点要素的道路指示线。In some embodiments, if the map information obtained in step S1 further includes several stair point elements corresponding to stairs or elevators, then after step S3, step S4 is further included: for each interior containing stair point elements If there is a road indication line in the area element, get the connection line from the stair point element in the area element to the nearest road indication line, Thereby, the road indication line leading to the stair point element is generated in the map; if there is no road indication line in the polygon element, the center line of the polygon element is obtained first, and then the stair point element in the polygon element to the center line is obtained. Connect the line, and then process the center line of the polygon feature to generate the road indication line leading to the stair point feature in the map.
在一些实施例中,在步骤S2前,还包括步骤:校正地图信息中的房门点要素,使每个房门点要素均位于地图信息中的房间面要素的边线上,且每个房门点要素与对应的房间面要素的边线的方向平行。In some embodiments, before step S2, it further includes the step of: correcting the door point elements in the map information, so that each door point element is located on the edge of the room surface element in the map information, and each door Point features are oriented parallel to the edges of the corresponding room polygon features.
在一些实施例中,步骤S2中,具体包括如下步骤:In some embodiments, step S2 specifically includes the following steps:
S21、对于任意一个通道面要素,获取该通道面要素的边线点集,其中所述边线点集中的点包括地图信息中生成该通道面要素的边线时所用到的每个点,以及位于该通道面要素的边线上的每个房门点要素,还包括每个房门点要素到一定区域内的该通道面要素的其他边线的垂点;S21. For any channel surface feature, obtain the edge point set of the channel surface feature, wherein the points in the edge point set include each point in the map information used when generating the edge of the channel surface feature, and the points located in the channel Each door point element on the edge of the polygon element, also includes the vertical point of each door point element to other edge lines of the channel polygon element in a certain area;
S22、若步骤S21中建立的边线点集中存在距离小于预设阈值的不同的点,则视为存在重复点,对边线点集中的点进行删除、化简处理,直到边线点集中不存在重复点,且在处理时,保留所有房门点要素;S22. If there are different points whose distance is less than the preset threshold in the set of edge points established in step S21, it is deemed that there are duplicate points, and the points in the set of edge points are deleted and simplified until there are no duplicate points in the set of edge points , and when processing, keep all the door point elements;
S23、利用Delaunay三角剖分算法,根据步骤S22处理后的边线点集创建三角网,并利用创建得到的三角网来提取通道中心线,该通道中心线由三角网中多个三角形的中位线首尾相连而成;S23. Use the Delaunay triangulation algorithm to create a triangulation according to the edge point set processed in step S22, and use the created triangulation to extract the channel center line, where the channel center line is determined by the median line of a plurality of triangles in the triangulation. connected end to end;
S24、做边线点集中的每个房门点要素到该通道中心线的连线;S24. Connect each door point element in the sideline point set to the center line of the passage;
S25、去除步骤S24处理后的线条中末端不经过房门点要素的线段,最终得到该通道面要素对应的通道中的道路指示线;S25, remove the line segment whose end does not pass through the door point element in the line processed in step S24, and finally obtain the road indication line in the channel corresponding to the channel surface element;
S26、重复步骤S21-S25,直到得到每个通道面要素对应的通道中的道路指示线。S26. Repeat steps S21-S25 until the road indication line in the channel corresponding to each channel surface element is obtained.
在一些实施例中,步骤S24中,具体采用如下方法来做边线点集中的每个房门点要素到通道中心线的连线:In some embodiments, in step S24, the following method is specifically used to connect each door point element in the edge point set to the center line of the passage:
S241、对于边线点集中的任意一个房门点要素,找到在步骤S23中建立的三角网中,以该房门点要素作为顶点的若干个三角形;S241, for any door point element in the edge point set, find several triangles with the door point element as the vertex in the triangular network established in step S23;
S242、找到这若干个三角形中,与该房门点要素相邻的若干条边,并判断每一条相邻的边的中点是否在步骤S23中创建的通道中心线上,若是,则将该条边的中点记录为邻接点,若否,则将该条边的中点记录为边界点;S242: Find several edges adjacent to the door point element in the several triangles, and determine whether the midpoint of each adjacent edge is on the centerline of the channel created in step S23, and if so, then The midpoint of the edge is recorded as the adjacent point, if not, the midpoint of the edge is recorded as the boundary point;
S243、找到这若干个三角形中,与该房门点要素相对的若干条边,并判断每一条相对的边的中点是否在S23中提取的通道中心线上,若是,则将该条边的中点记录为邻接点,若否,则做该房门点要素到该条边的中点的连线,并将连线与通道中心线的交点记录为邻接点;S243: Find several sides of the several triangles that are opposite to the door point element, and determine whether the midpoint of each opposite side is on the centerline of the passage extracted in S23, and if so, then the edge of the side is determined. The midpoint is recorded as the adjacent point, if not, the connection between the door point element and the midpoint of the edge is made, and the intersection of the connection line and the center line of the passage is recorded as the adjacent point;
S244、做该房门点要素到对应的通道中心线的垂线,若垂足在通道中心线上,则将垂足记录为邻接点,否则不做记录;S244. Make the vertical line from the door point element to the corresponding passage center line. If the hanging foot is on the passage center line, the hanging foot is recorded as the adjacent point, otherwise it is not recorded;
S245、利用步骤S242-S244中记录的所有的邻接点与边界点,分别获取该房门点要素到每个邻接点的向量,称为邻接点向量,以及该房门点要素到每个边界点的向量,称为边界点向量,再计算每个邻接点向量与边界点向量之间的夹角,找到夹角最接近于90°的邻接点向量与边界点向量,获取对应的邻接点,则该房门点要素与该邻接点的连线即为该房门点要素到通道中心线的连线;S245, using all the adjacent points and boundary points recorded in steps S242-S244, respectively obtain the vector from the door point element to each adjacent point, which is called the adjacent point vector, and the door point element to each boundary point. , called the boundary point vector, then calculate the angle between each adjacent point vector and the boundary point vector, find the adjacent point vector and boundary point vector with the angle closest to 90°, and obtain the corresponding adjacent point, then The connection line between the door point element and the adjacent point is the connection line between the door point element and the center line of the passage;
S246、遍历边线点集中的每个房门点要素并重复步骤S241-S245,直到得到边线点集中的每个房门点要素到通道中心线的连线。S246, traverse each door point element in the edge point set and repeat steps S241-S245 until the connection between each door point element in the edge point set and the center line of the passage is obtained.
在一些实施例中,步骤S3中,具体包括如下步骤:In some embodiments, step S3 specifically includes the following steps:
S31、对于任意一个房间面要素,判断其边线上的房门点要素的个数,若为0则不作处理,若为1则进入步骤S32a,若大于1则进入步骤S32b;S31, for any room surface element, determine the number of the door point elements on its edge, if it is 0, do not process, if it is 1, then enter step S32a, if it is greater than 1, enter step S32b;
S32a、找到该房间面要素的中心点,若该中心点在该房间面要素内,用P表示该中心点,该房间面要素对应的一个房门点要素用D表示,则过P点做D点所在的边的平行线,再从D点做该平行线的垂线,垂足用D’表示,判断得到的折线DD'P是否完全在该房间面要素内,若是,则以折线DD'P作为该房间内的道路指示线,若否,则获取该房间面要素的中心线,称为房间中心线,再分别做D点与P点到房间中心线的连线,再去除连线后的线条中末端不经过D点与P点的线段,得到房间内的道路指示线,若该中心点不在该房间面要素内,则跳转到步骤S32b进行处理;S32a: Find the center point of the room surface element, if the center point is in the room surface element, use P to represent the center point, and a door point element corresponding to the room surface element is represented by D, then pass the point P to make D The parallel line of the side where the point is located, and then make the vertical line of the parallel line from point D, and the vertical foot is represented by D', and judge whether the obtained polyline DD'P is completely within the room surface element, if so, use the polyline DD' P is used as the road indicator line in the room. If not, the center line of the room surface element is obtained, which is called the room center line, and then the connection between point D and point P to the center line of the room is made, and then the connection line is removed. The end of the line does not pass through the line segment of point D and point P, and the road indication line in the room is obtained. If the center point is not in the room surface element, then jump to step S32b for processing;
S32b、获取该房间面要素的中心线,称为房间中心线,再分别做该房间面要素对应的每个房门点要素到房间中心线的连线,再去除连线后的线条中末端不经过房门点要素的线段,得到房间内的道路指示线;S32b: Obtain the center line of the room surface element, which is called the room center line, and then connect each door point element corresponding to the room surface element to the room center line, and then remove the lines that are not connected at the ends. Through the line segment of the door point element, the road indication line in the room is obtained;
S33、重复以上步骤,直到得到每个房间面要素对应的房间内的道路指示线。S33, repeating the above steps until the road indication line in the room corresponding to each room surface element is obtained.
在一些实施例中,步骤S4中,具体包括如下步骤:In some embodiments, step S4 specifically includes the following steps:
S41、对于任意一个内部包含有楼梯点要素的通道面要素或房间面要素,判断该面要素中是否存在道路指示线,若是,则进入步骤S42a,否则进入步骤S42b;S41, for any passage surface element or room surface element that contains stair point elements inside, determine whether there is a road indicator line in the surface element, if so, go to step S42a, otherwise go to step S42b;
S42a、做该面要素内每个楼梯点要素到道路指示线的连线,从而获得该楼梯点要素的道路指示线;S42a, connect each stair point element in the surface element to the road indication line, so as to obtain the road indication line of the stair point element;
S42b、先获取该面要素的中心线,再判断该面要素内的楼梯点要素的个数,若该面要素内仅有1个楼梯点要素,则再获取该面要素的中心点,分别做楼梯点要素与中心点到中心线的连线,再去除该连线后的线条中末端不经过楼梯点要素与中心线的线段,从而获得通向楼梯点要素的道路指示线,若该面要素内的楼梯点要素的个数大于1个,则分别做每个楼梯点要素到中心线的连线,再去除该连线后的线条中末端不经过楼梯点要素的线段,从而获得通向楼梯点要素的道路指示线;S42b, first obtain the center line of the area element, and then determine the number of stair point elements in the area element. If there is only one stair point element in the area element, then obtain the center point of the area element, and do The connecting line between the stair point element and the center point to the center line, and then remove the line segment whose end does not pass through the stair point element and the center line, so as to obtain the road indication line leading to the stair point element. If the number of stair point elements in the interior is greater than 1, then connect each stair point element to the center line, and then remove the line segment whose end does not pass through the stair point element in the line after the connection, so as to obtain the leading to the stair. Road guideline for point features;
S43、重复以上步骤,直到得到每个内部包含有楼梯点要素的通道面要素或房间面要素中的通向楼梯点要素的道路指示线。S43 , repeating the above steps until obtaining a road indication line leading to a stair point element in each passage area element or room area element containing the stair point element in the interior.
在一些实施例中,步骤S42a中,具体采用如下方法,做楼梯点要素到道路指示线的连线:In some embodiments, in step S42a, the following method is specifically used to connect the stair point element to the road indication line:
对于任意一个楼梯点要素,做该楼梯点要素到道路指示线的每一条线段的垂线,若垂足位于对应的线段上则取该垂线作为待定连线,若垂足位于对应的线段的延长线上,则取垂线和延长线组成的折线作为待定连线,再判断每条待定连线是否满足全部位于该楼梯点要素所在的面要素内,若存在满足上述条件的待定连线,则从满足上述条件的待定连线中选择最短的待定连线作为所需的连线;For any stair point feature, make a vertical line from the stair point feature to each line segment of the road indication line. If the vertical foot is located on the corresponding line segment, the vertical line is taken as the undetermined connection line. If the vertical foot is located on the corresponding line segment On the extension line, the polyline composed of the vertical line and the extension line is taken as the pending connection line, and then it is judged whether each pending connection line is all located in the surface element where the stair point element is located. If there is a pending connection line that meets the above conditions, Then select the shortest pending connection from the pending connections that meet the above conditions as the required connection;
若所有待定连线均不满足上述条件,则另外获取道路指示线的每一条线段上距离该楼梯点要素最近的点,称为最近点,连接最近点与该楼梯点要素并将得到的线段作为新的待定连线,判断每条待定连线是否全部位于该楼梯点要素所在的面要素内,取满足条件最短的待定连线作为所需的连线;If all undetermined connection lines do not meet the above conditions, additionally obtain the point closest to the stair point element on each line segment of the road indication line, which is called the closest point, connect the closest point and the stair point element, and use the obtained line segment as For the new pending connection, determine whether each pending connection is all located in the polygon element where the stair point element is located, and take the pending connection that satisfies the shortest condition as the required connection;
若所有待定连线均不满足上述条件,则获取该面要素的中心线,做该楼梯点要素到中心线的连线,然后判断该面要素内的线条是否存在不相连的部分,若否,则去除线条中末端不经过楼梯点要素及房门点要素的线段,若是,则做该面要素内的中心点到中心线的连线,然后再去除线条中末端不经过楼梯点要素、房门点要素及中心点的线段;If all pending connections do not meet the above conditions, the center line of the polygon element is obtained, and the connection between the stair point element and the center line is made, and then it is judged whether the lines in the polygon element have disconnected parts, if not, Then remove the line segment whose end does not pass through the stair point element and the door point element. If so, make a connection from the center point in the area element to the center line, and then remove the line segment that does not pass through the stair point element and the door at the end of the line. Point feature and line segment of center point;
重复上述步骤,直到完成每个楼梯点要素到道路指示线的连线。Repeat the above steps until you complete the connection of each stair point feature to the road guideline.
本发明另一方面提供了一种计算机设备,所述计算机设备包括处理器,所述处理器用于执行存储器中存储的计算机程序时,实现上述的室内自动生成道路线的方法。Another aspect of the present invention provides a computer device, the computer device includes a processor, and the processor is configured to implement the above-mentioned method for automatically generating a road route indoors when the processor executes a computer program stored in a memory.
本发明另一方面提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时,实现上述的室内自动生成道路线的方法。Another aspect of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, realizes the above-mentioned method for automatically generating a road route indoors.
与现有技术相比,本发明的有益效果是:Compared with the prior art, the beneficial effects of the present invention are:
本发明提供的室内自动生成道路线的方法,利用已知的通道、房间等面图层,以及门、楼梯等点图层,能够自动生成室内道路线图层,本发明生成线图层的效率高、生成结果精确且成图美观,有利于实现室内的定位、导航等一系列功能。The method for automatically generating indoor road lines provided by the present invention utilizes known surface layers such as passages, rooms, and point layers such as doors and stairs, and can automatically generate indoor road line layers. The efficiency of the present invention for generating line layers High, accurate results and beautiful graphics, which are conducive to the realization of a series of functions such as indoor positioning and navigation.
附图说明Description of drawings
图1为本发明提供的室内自动生成道路线的方法的流程图;1 is a flowchart of a method for automatically generating road lines indoors provided by the present invention;
图2为一个具体实施例中初始的地图信息示意图;2 is a schematic diagram of initial map information in a specific embodiment;
图3在图2的基础上经过校正后的示意图;Fig. 3 is the schematic diagram after correction on the basis of Fig. 2;
图4在图3的基础上增加道路中心线后的示意图;Fig. 4 is the schematic diagram after adding the road centerline on the basis of Fig. 3;
图5为获取房门点要素对应的三角形的示意图;5 is a schematic diagram of obtaining a triangle corresponding to a door point element;
图6为一种实施例中房门点要素对应的邻接点的示意图;6 is a schematic diagram of adjacent points corresponding to door point elements in an embodiment;
图7为另一种实施例中房门点要素对应的邻接点的示意图;7 is a schematic diagram of adjacent points corresponding to door point elements in another embodiment;
图8为在图4的基础上处理后得到的通道道路指示线的示意图;Fig. 8 is the schematic diagram of the channel road indication line obtained after processing on the basis of Fig. 4;
图9为第一种实施例中生成房间道路指示线的示意图;FIG. 9 is a schematic diagram of generating a room road indication line in the first embodiment;
图10为第二种实施例中生成房间道路指示线的示意图;10 is a schematic diagram of generating a room road indication line in the second embodiment;
图11为第三种实施例中生成房间道路指示线的示意图;11 is a schematic diagram of generating a room road indication line in the third embodiment;
图12为在图8的基础上增加房间道路指示线后的示意图;Fig. 12 is the schematic diagram after adding room road indication line on the basis of Fig. 8;
图13为第一种实施例中生成楼梯道路指示线的示意图Fig. 13 is a schematic diagram of generating a stair road indicator line in the first embodiment
图14为第二种实施例中生成楼梯道路指示线的示意图Fig. 14 is a schematic diagram of generating a stair road indicator line in the second embodiment
图15为第三种实施例中生成楼梯道路指示线的示意图Fig. 15 is a schematic diagram of generating a stair road indicator line in the third embodiment
图16为第四种实施例中生成楼梯道路指示线的示意图。FIG. 16 is a schematic diagram of generating a stair road indicator line in the fourth embodiment.
具体实施方式Detailed ways
为使本发明实现的技术手段、创作特征、达成目的与功效易于明白了解,下面结合附图和具体实施方式,进一步阐述本发明是如何实施的。In order to make the technical means, creative features, achievement goals and effects realized by the present invention easy to understand, how the present invention is implemented is further described below with reference to the accompanying drawings and specific embodiments.
参照图1所示,本发明提供了一种室内自动生成道路线的方法,包括如下步骤:Referring to Figure 1, the present invention provides a method for automatically generating road lines indoors, including the following steps:
S1、获取室内地图信息,地图信息中包括若干个通道面要素、若干个房间面要素以及若干个房门点要素。S1. Acquire indoor map information, where the map information includes several passage surface elements, several room surface elements, and several door point elements.
S2、利用地图信息中的通道面要素,以及所有位于通道面要素的边线上的房门点要素,获取每个通道面要素的中心线,称为通道中心线,再做这些房门点要素到对应的通道中心线的连线并对通道中心线进行处理,从而在地图中生成通道面要素的道路指示线。S2. Use the channel area elements in the map information and all the door point elements located on the edge of the channel area elements to obtain the center line of each channel area element, which is called the channel center line, and then make these door point elements to Connect the corresponding channel centerline and process the channel centerline, so as to generate the road indication line of the channel polygon feature in the map.
S3、利用地图信息中的房间面要素,以及每个房间面要素对应的房门点要素,获取每个房间面要素的内部到对应的房门点要素的连线,从而在地图中生成房间面要素的道路指示线。S3. Use the room area elements in the map information and the door point elements corresponding to each room area element to obtain the connection between the interior of each room area element and the corresponding door point element, so as to generate a room area in the map The road guide for the feature.
可以理解的是,每个房间面要素对应于地图信息中的一个房间,每个通道面要素对应于若干条不经过房间即可相互连通的通道整体,房门点要素对应于一个房间的门。在图2示出的具体实施例中,所有的通道均相互连通,因此只包括一个通道面要素。另外,房间门可能朝向通道,也可能朝向其他房间,这些均可在地图信息中反映出来,朝向通道的房间门,其对应的房门点要素既位于房间面要素的边线上,又位于通道面要素的边线上;并且,房门点要素也不一定要对应于实际的一扇门,而是指房间的门口区域,可能存在房间门口未装设有房门的情况,但同样在地图信息中的相应位置存在房门点要素。It can be understood that each room surface element corresponds to a room in the map information, each passage surface element corresponds to a whole of several passages that can be connected to each other without passing through the room, and the door point element corresponds to the door of a room. In the specific embodiment shown in FIG. 2 , all the channels are connected with each other, so only one channel surface element is included. In addition, the room door may face the passage or other rooms, which can be reflected in the map information. For the room door facing the passage, the corresponding door point element is located on the edge of the room surface element and the passage surface. The edge of the element; and, the door point element does not necessarily correspond to an actual door, but refers to the door area of the room. There may be no door installed at the door of the room, but it is also in the map information. There is a door point feature at the corresponding position of .
进一步地,若在步骤S1中获取的地图信息中还包括若干个对应于楼梯或电梯的楼梯点要素,则在步骤S3后,还包括步骤S4:对于每一个内部包含有楼梯点要素的通道面要素或房间面要素,判断该面要素中是否存在道路指示线,若该面要素中存在道路指示线,则获取该面要素内的楼梯点要素到最近的道路指示线的连线,从而在地图中生成通向楼梯点要素的道路指示线;若该面要素中不存在道路指示线,则先获取该面要素的中心线,再做该面要素中的楼梯点要素到中心线的连线,再该面要素的中心线进行处理,从而在地图中生成通向楼梯点要素的道路指示线。Further, if the map information obtained in step S1 also includes several stair point elements corresponding to stairs or elevators, then after step S3, step S4 is also included: for each passage surface containing stair point elements inside. feature or room area element, determine whether there is a road indication line in the area element, if there is a road indication line in the area element, obtain the connection line between the stair point element in the area element and the nearest road indication line, so as to display the map on the map. Generate the road guide line leading to the stair point feature in the area; if there is no road guide line in the area feature, first obtain the center line of the area feature, and then connect the stair point element in the area feature to the center line, Then the center line of the polygon feature is processed to generate a road indication line leading to the stair point feature in the map.
可以理解的是,对于其他地图信息中的特殊点要素,若需要生成相应的指示线,均可按照类似于步骤S4的方案来进行处理。It can be understood that, for special point elements in other map information, if a corresponding indicator line needs to be generated, it can be processed according to a solution similar to step S4.
以下结合附图,介绍本发明的具体实施例中的方案。The solutions in the specific embodiments of the present invention are described below with reference to the accompanying drawings.
参照图2所示,经过步骤S1后,获取的初始的地图信息中,房门点要素可能存在误差,导致不能很好地落在房间面要素的边线上,且所有房门点要素的朝向均相同,不能反映出房门的朝向相信。Referring to Figure 2, after step S1, in the initial map information obtained, there may be errors in the door point elements, which may not fall well on the edge of the room surface elements, and the orientations of all door point elements are the same. The same, cannot reflect the orientation of the door.
因此,在步骤S2前,还可包括步骤:校正地图信息中的房门点要素,使每个房门点要素均位于地图信息中的房间面要素的边线上,且每个房门点要素与对应的房间面要素的边线的方向平行。经过该步骤处理后的地图信息如图3所示。Therefore, before step S2, it may further include the step of correcting the door point elements in the map information, so that each door point element is located on the edge of the room surface element in the map information, and each door point element is the same as the one in the map information. The directions of the edges of the corresponding room polygon features are parallel. The map information processed in this step is shown in Figure 3.
进一步地,步骤S2中,具体可包括如下步骤:Further, in step S2, the following steps may be specifically included:
S21、对于任意一个通道面要素,获取该通道面要素的边线点集,其中所述边线点集中的点包括地图信息中生成该通道面要素的边线时所用到的每个点(可以理解的是,这些点中,必然包括位于边线弯折处的每个点),以及位于该通道面要素的边线上的每个房门点要素,还包括每个房门点要素到一定区域内的该通道面要素的其他边线的垂点。S21. For any channel surface element, obtain the edge point set of the channel surface element, wherein the points in the edge point set include each point in the map information used to generate the edge of the channel surface element (it can be understood that , these points must include each point located at the bend of the edge), and each door point feature located on the edge of the channel polygon feature, and also include each door point feature to the channel within a certain area The vertical point of the other edge of the polygon feature.
S22、若步骤S21中建立的边线点集中存在距离小于预设阈值的不同的点,则视为存在重复点,对边线点集中的点进行删除、化简处理,直到边线点集中不存在重复点,且在处理时,保留所有房门点要素。S22. If there are different points whose distance is less than the preset threshold in the set of edge points established in step S21, it is deemed that there are duplicate points, and the points in the set of edge points are deleted and simplified until there are no duplicate points in the set of edge points , and when processing, all door point features are preserved.
S23、利用Delaunay三角剖分算法,根据步骤S22处理后的边线点集创建三角网,并利用创建得到的三角网来提取通道中心线,该通道中心线由三角网中多个三角形的中位线首尾相连而成。通道中心线如图4所示。S23. Use the Delaunay triangulation algorithm to create a triangulation according to the edge point set processed in step S22, and use the created triangulation to extract the channel center line, where the channel center line is determined by the median line of a plurality of triangles in the triangulation. Connected end to end. The channel centerline is shown in Figure 4.
可以理解的是,利用Delaunay三角剖分算法,分得的Delaunay三角网是一系列相连的但不重叠的三角形的集合,而且这些三角形的外接圆不包含这个面域的其他任何点。它具有两个特有的性质:1)每个Delaunay三角形的外接圆不包含面内的其他任何点,这个特征已经作为创建Delaunay三角网的一项判别标准;2)每两个相邻的三角形构成的凸四边形的对角线,在相互交换后,六个内角的最小角不再增大。Delaunay三角网的优点是结构良好,数据结构简单,数据冗余度小,存储效率高,与不规则的地面特征和谐一致,可以表示线性特征和迭加任意形状的区域边界,易于更新,可适应各种分布密度的数据等。It can be understood that, using the Delaunay triangulation algorithm, the obtained Delaunay triangulation is a collection of connected but non-overlapping triangles, and the circumcircles of these triangles do not contain any other points in this area. It has two peculiar properties: 1) the circumcircle of each Delaunay triangle does not contain any other points in the surface, and this feature has been used as a criterion for creating a Delaunay triangulation; 2) every two adjacent triangles constitute The diagonals of the convex quadrilateral of , after being exchanged with each other, the smallest angle of the six interior angles no longer increases. The advantages of Delaunay triangulation are good structure, simple data structure, small data redundancy, high storage efficiency, harmonious and consistent with irregular ground features, can represent linear features and superimpose area boundaries of arbitrary shapes, easy to update, adaptable Data of various distribution densities, etc.
进一步地,进入步骤S24、做边线点集中的每个房门点要素到该通道中心线的连线。Further, go to step S24 to connect each door point element in the sideline point set to the center line of the passage.
步骤S24中,具体采用如下方法来做边线点集中的每个房门点要素到通道中心线的连线:In step S24, the following method is specifically used to connect each door point element in the sideline point set to the center line of the passage:
S241、对于边线点集中的任意一个房门点要素,找到在步骤S23中建立的三角网中,以该房门点要素作为顶点的若干个三角形。参照图5所示,图中,房间门要素点用D表示,三角形网中,包括以D点为顶点的两个三角形①和②。S241. For any door point element in the edge point set, find several triangles with the door point element as the vertex in the triangular network established in step S23. Referring to FIG. 5 , in the figure, the room door element point is represented by D, and the triangle net includes two
S242、找到这若干个三角形中,与该房门点要素相邻的若干条边,并判断每一条相邻的边的中点是否在步骤S23中创建的通道中心线上,若是,则将该条边的中点记录为邻接点,若否,则将该条边的中点记录为边界点。可以理解的是,图5所示的实施例中,P2即为邻接点,P3与P5均为边界点;图6所示的实施例中,P3为邻接点,在D点的另一侧还有一个未绘出的邻接点,P1为边界点;图7所示的实施例中,P1、P2均为邻接点。S242: Find several edges adjacent to the door point element in the several triangles, and determine whether the midpoint of each adjacent edge is on the centerline of the channel created in step S23, and if so, then The midpoint of the edge is recorded as the adjacent point, if not, the midpoint of the edge is recorded as the boundary point. It can be understood that in the embodiment shown in FIG. 5 , P2 is the adjacent point, and P3 and P5 are both boundary points; in the embodiment shown in FIG. 6 , P3 is the adjacent point, and there is a There is an undrawn adjacent point, and P1 is a boundary point; in the embodiment shown in FIG. 7 , both P1 and P2 are adjacent points.
S243、找到这若干个三角形中,与该房门点要素相对的若干条边,并判断每一条相对的边的中点是否在S23中提取的通道中心线上,若是,则将该条边的中点记录为邻接点,若否,则做该房门点要素到该条边的中点的连线,并将连线与通道中心线的交点记录为邻接点。可以理解的是,图5所示的实施例中,P1与P4也均为邻接点;图6所示的实施例中,P2为邻接点,在另一条相对的边上还有一个未绘出的邻接点;图7所示的实施例中,D到P3的线段与P1到P2的线段的交点为邻接点。S243: Find several sides of the several triangles that are opposite to the door point element, and determine whether the midpoint of each opposite side is on the centerline of the passage extracted in S23, and if so, then the edge of the side is determined. The midpoint is recorded as the adjacent point, if not, the connection between the door point element and the midpoint of the edge is made, and the intersection of the connection line and the center line of the passage is recorded as the adjacent point. It can be understood that, in the embodiment shown in FIG. 5, P1 and P4 are also adjacent points; in the embodiment shown in FIG. 6, P2 is the adjacent point, and there is an undrawn one on the other opposite side. In the embodiment shown in FIG. 7 , the intersection of the line segment from D to P3 and the line segment from P1 to P2 is the adjacent point.
S244、做该房门点要素到对应的通道中心线的垂线,若垂足在通道中心线上,则将垂足记录为邻接点,否则不做记录。图6所示的实施例中,垂足D’为邻接点。S244: Make a vertical line from the door point element to the corresponding passage center line. If the hanging foot is on the passage center line, the hanging foot is recorded as an adjacent point, otherwise, no record is made. In the embodiment shown in Figure 6, the foot D' is an abutment point.
S245、利用步骤S242-S244中记录的所有的邻接点与边界点,分别获取该房门点要素到每个邻接点的向量,称为邻接点向量,以及该房门点要素到每个边界点的向量,称为边界点向量,再计算每个邻接点向量与边界点向量之间的夹角,找到夹角最接近于90°的邻接点向量与边界点向量,获取对应的邻接点,则该房门点要素与该邻接点的连线即为该房门点要素到通道中心线的连线。可以理解的是,通过这样的方案,基本能找到最优的邻接点,从而得到房门点要素到通道中心线的合适的连线。S245, using all the adjacent points and boundary points recorded in steps S242-S244, respectively obtain the vector from the door point element to each adjacent point, which is called the adjacent point vector, and the door point element to each boundary point. , called the boundary point vector, then calculate the angle between each adjacent point vector and the boundary point vector, find the adjacent point vector and boundary point vector with the angle closest to 90°, and obtain the corresponding adjacent point, then The connection line between the door point element and the adjacent point is the connection line between the door point element and the center line of the passage. It can be understood that, through such a scheme, the optimal adjacent point can be basically found, so as to obtain a suitable connection line between the door point element and the passage center line.
S246、遍历边线点集中的每个房门点要素并重复步骤S241-S245,直到得到边线点集中的每个房门点要素到通道中心线的连线。S246, traverse each door point element in the edge point set and repeat steps S241-S245 until the connection between each door point element in the edge point set and the center line of the passage is obtained.
可以理解的是,若房门点要素到对应的通道中心线存在符合要求的垂线与垂点,则该垂点必然就是最优的邻接点,垂线即为所需的连线;但在特殊情况下,通道中心线可能刚好在房门点要素附近存在弯折,导致不存在符合要求的垂线与垂点,此时按照上述方法对比不同的邻接点,依然能够找到最优的邻接点。It can be understood that if there is a vertical line and a vertical point that meet the requirements from the door point element to the corresponding passage center line, the vertical point must be the optimal adjacent point, and the vertical line is the required connection; In special cases, the center line of the passage may be bent just near the door point element, resulting in no vertical line and vertical point that meet the requirements. At this time, comparing different adjacent points according to the above method, the optimal adjacent point can still be found. .
完成步骤S24后,进入步骤S25、去除步骤S24处理后的线条中末端不经过房门点要素的线段,最终得到该通道面要素对应的通道中的道路指示线,如图8所示。After completing step S24, go to step S25, remove the line segment whose end does not pass through the door point element in the line processed in step S24, and finally obtain the road indication line in the channel corresponding to the channel surface element, as shown in Figure 8.
S26、重复步骤S21-S25,直到得到每个通道面要素对应的通道中的道路指示线,在图8所示实施例中,仅包括一个通道面要素,因此无需重复。S26. Repeat steps S21-S25 until the road indication line in the channel corresponding to each channel surface element is obtained. In the embodiment shown in FIG. 8, only one channel surface element is included, so no repetition is required.
特殊情况下,存在整个区域的最外端的门,其外侧为外部区域,内侧为通道,室内还可能存在一些两端均为通道的门,这样的门均不属于房门点要素。这种情况下,只需将这样的门视为通道的一部分即可,此后同样可以按照本发明提供的方案进行处理,以得到通道中的道路指示线,然后在道路指示线中存在这样的门的位置用特殊的点要素进行标注即可。In special cases, there is a door at the outermost end of the entire area, the outer side is the outer area, and the inner side is the passage. There may also be some doors with passages at both ends in the room. Such doors are not part of the door point element. In this case, it is only necessary to regard such a door as a part of the passage, and then it can also be processed according to the solution provided by the present invention to obtain the road indication line in the passage, and then there is such a door in the road indication line The location can be marked with a special point feature.
此时同样可按照上述方法,获取通道面要素的中心线,区别在于其边线点集中不包括房门点要素,无需执行后续的步骤S24、S25,At this time, the center line of the channel surface element can also be obtained according to the above method, the difference is that the edge point set does not include the door point element, and the subsequent steps S24 and S25 do not need to be performed.
进一步地,步骤S3中,具体包括如下步骤:Further, in step S3, it specifically includes the following steps:
S31、对于任意一个房间面要素,判断其边线上的房门点要素的个数,若为0则不作处理(房门点要素的个数为0的情况基本不存在,但在特殊情况下,例如某个房间没有房门,仅能通过内部的楼梯或电梯进入,则此时其房门点要素的个数为0),若为1则进入步骤S32a,若大于1则进入步骤S32b。S31. For any room surface element, determine the number of door point elements on its edge, if it is 0, no processing is performed (the case where the number of door point elements is 0 basically does not exist, but in special cases, For example, a room has no door and can only be entered through internal stairs or elevators, then the number of door point elements is 0).
S32a、找到该房间面要素的中心点,若该中心点在该房间面要素内,参照图9所示,用P表示该中心点,该房间面要素对应的一个房门点要素用D表示,过P点做D点所在的边的平行线,再从D点做该平行线的垂线,垂足用D’表示,判断得到的折线DD'P是否完全在该房间面要素内,若是,则以折线DD'P作为该房间内的道路指示线,若否,则参照图10所示,获取该房间面要素的中心线,称为房间中心线,再分别做D点与P点到房间中心线的连线,再去除连线后的线条中末端不经过D点与P点的线段,得到房间内的道路指示线;若该中心点不在该房间面要素内,则跳转到步骤S32b进行处理。S32a, find the center point of the room surface element, if the center point is within the room surface element, referring to FIG. 9 , use P to represent the center point, and a door point element corresponding to the room surface element to represent D, Make a parallel line of the side where point D is located through point P, and then make a vertical line of the parallel line from point D, the vertical foot is represented by D', and judge whether the obtained polyline DD'P is completely within the room surface element, if so, Then take the polyline DD'P as the road indication line in the room. If not, then refer to Figure 10 to obtain the center line of the room surface element, which is called the room center line, and then make points D and P to the room respectively. The connection of the center line, and then remove the line segment whose end does not pass through point D and point P after the connection, to obtain the road indication line in the room; if the center point is not in the room surface element, then jump to step S32b to be processed.
S32b、参照图11所示,获取该房间面要素的中心线,称为房间中心线,再分别做该房间面要素对应的每个房门点要素到房间中心线的连线,再去除连线后的线条中末端不经过房门点要素的线段,得到房间内的道路指示线。S32b, as shown in Figure 11, obtain the center line of the room surface element, which is called the room center line, and then connect each door point element corresponding to the room surface element to the room center line, and then remove the connection line In the latter line, the end of the line does not pass through the line segment of the door point element, and the road indication line in the room is obtained.
S33、重复以上步骤,直到得到每个房间面要素对应的房间内的道路指示线。S33, repeating the above steps until the road indication line in the room corresponding to each room surface element is obtained.
如图12所示,可见,按照本发明提供的方法,得到通道面要素与房间面要素对应的道路指示线后,二者的道路指示线会自动连为一体,能够用于指示室内路线,其结果精确且成图美观。另外,可以理解的是,在处理过程中,需要获取房间中心线时,其具体方法可与步骤S23中的方法类似,即利用Delaunay三角剖分算法,提取对应的房间面要素的边线点集后创建三角网,然后再获取房间中心线。As shown in Fig. 12, it can be seen that, according to the method provided by the present invention, after obtaining the road indication lines corresponding to the passage surface element and the room surface element, the road indication lines of the two will be automatically connected into one, which can be used to indicate the indoor route. The results are accurate and nicely plotted. In addition, it can be understood that, in the processing process, when the room center line needs to be obtained, the specific method can be similar to the method in step S23, that is, the Delaunay triangulation algorithm is used to extract the edge point set of the corresponding room surface element. Create a triangulation before getting the room centerline.
可以理解的是,需要获取房门点要素到房间中心线的连线时,其具体方法可与步骤S24中的方法类似,若存在符合要求的垂线和垂点,则取垂线作为连线;若不存在符合要求的垂线和垂点,则对比不同的邻接点,来找到最优的邻接点,从而得到连线。另外,房间面要素的中心点为能够按照现有的算法找到的几何中心点,对于一些形状规则的房间来说,其中心点会落在中心线上,对于一些形状不规则的房间来说,其中心点可能会偏离其中心线上,甚至落在房间面要素的外侧;当中心点偏离中心线但位于房间面要素内,需要获取房间面要素的中心点到房间中心线的连线时,如图10所示,另外做中心点到中心线最近且位于面要素内的垂线即可。It can be understood that when it is necessary to obtain the connection line between the door point element and the room center line, the specific method can be similar to the method in step S24. If there are vertical lines and vertical points that meet the requirements, the vertical line is taken as the connection line. ; If there is no vertical line and vertical point that meet the requirements, compare different adjacent points to find the optimal adjacent point, thereby obtaining a connection. In addition, the center point of the room surface element is the geometric center point that can be found according to the existing algorithm. For some rooms with regular shapes, the center point will fall on the center line. For some rooms with irregular shapes, Its center point may deviate from its center line, or even fall outside the room polygon feature; when the center point deviates from the center line but is located within the room polygon feature, it is necessary to obtain the connection from the center point of the room polygon feature to the room center line. As shown in Figure 10, another vertical line from the center point to the center line that is closest to the center line and located in the area element can be made.
进一步地,对于地图信息中还包括楼梯点要素的情况,步骤S4中,具体包括如下步骤:Further, for the situation that the map information also includes stair point elements, in step S4, the following steps are specifically included:
S41、对于任意一个内部包含有楼梯点要素的通道面要素或房间面要素,判断该面要素中是否存在道路指示线,若是,则进入步骤S42a,否则进入步骤S42b。S41. For any passage surface element or room surface element that contains stair point elements, determine whether there is a road indicator line in the surface element, if so, go to step S42a, otherwise go to step S42b.
S42a、做该面要素内每个楼梯点要素到道路指示线的连线,从而获得该楼梯点要素的道路指示线。S42a, connect each stair point element in the polygon element to the road indication line, so as to obtain the road indication line of the stair point element.
S42b、先获取该面要素的中心线,再判断该面要素内的楼梯点要素的个数,若该面要素内仅有1个楼梯点要素,则参照图16所示,再获取该面要素的中心点,分别做楼梯点要素与中心点到中心线的连线,再去除该连线后的线条中末端不经过楼梯点要素与中心线的线段,从而获得通向楼梯点要素的道路指示线,若该面要素内的楼梯点要素的个数大于1个,则分别做每个楼梯点要素到中心线的连线,再去除该连线后的线条中末端不经过楼梯点要素的线段,从而获得通向楼梯点要素的道路指示线。S42b, first obtain the center line of the surface element, and then determine the number of stair point elements in the surface element. If there is only one stair point element in the surface element, refer to Figure 16, and then obtain the surface element The center point of the stair point element and the connection line from the center point to the center line are respectively made, and then the line segment at the end of the line that does not pass through the stair point element and the center line is removed, so as to obtain the road indication leading to the stair point element. Line, if the number of stair point elements in the area element is greater than 1, connect each stair point element to the center line separately, and then remove the line segment whose end does not pass through the stair point element in the line after the connection. , to obtain a road guideline to the stair point feature.
S43、重复以上步骤,直到得到每个内部包含有楼梯点要素的通道面要素或房间面要素中的通向楼梯点要素的道路指示线。S43 , repeating the above steps until obtaining a road indication line leading to a stair point element in each passage area element or room area element containing the stair point element in the interior.
进一步地,步骤S42a中,具体采用如下方法,做楼梯点要素到道路指示线的连线:Further, in step S42a, the following method is specifically used to connect the stair point element to the road indication line:
对于任意一个楼梯点要素,做该楼梯点要素到道路指示线的每一条线段的垂线,若垂足位于对应的线段上则取该垂线作为待定连线,如图13所示;若垂足位于对应的线段的延长线上,则取垂线和延长线组成的折线作为待定连线,再判断每条待定连线是否满足全部位于该楼梯点要素所在的面要素内,若存在满足上述条件的待定连线,则从满足上述条件的待定连线中选择最短的待定连线作为所需的连线,如图14所示。For any stair point feature, make a vertical line from the stair point feature to each line segment of the road indication line. If the vertical foot is located on the corresponding line segment, take the vertical line as the undetermined connection line, as shown in Figure 13; If the foot is located on the extension line of the corresponding line segment, the polyline composed of the vertical line and the extension line is taken as the undetermined connection line, and then it is judged whether each undetermined connection line is all located in the surface element where the stair point element is located. For pending connections of the conditions, select the shortest pending connections from the pending connections that satisfy the above conditions as the required connections, as shown in Figure 14.
若所有待定连线均不满足上述条件,则另外获取道路指示线的每一条线段上距离该楼梯点要素最近的点,称为最近点,连接最近点与该楼梯点要素并将得到的线段作为新的待定连线,判断每条待定连线是否全部位于该楼梯点要素所在的面要素内,取满足条件最短的待定连线作为所需的连线,如图15所示。If all undetermined connection lines do not meet the above conditions, additionally obtain the point closest to the stair point element on each line segment of the road indication line, which is called the closest point, connect the closest point and the stair point element, and use the obtained line segment as For the new pending connection, determine whether each pending connection is all located in the surface element where the stair point element is located, and take the pending connection that satisfies the shortest condition as the required connection, as shown in Figure 15.
若所有待定连线均不满足上述条件,则获取该面要素的中心线,做该楼梯点要素到中心线的连线,然后判断该面要素内的线条是否存在不相连的部分,若否,则去除线条中末端不经过楼梯点要素及房门点要素的线段,若是,则做该面要素内的中心点到中心线的连线,然后再去除线条中末端不经过楼梯点要素、房门点要素及中心点的线段。If all pending connections do not meet the above conditions, the center line of the polygon element is obtained, and the connection between the stair point element and the center line is made, and then it is judged whether the lines in the polygon element have disconnected parts, if not, Then remove the line segment whose end does not pass through the stair point element and the door point element. If so, make a connection from the center point in the area element to the center line, and then remove the line segment that does not pass through the stair point element and the door at the end of the line. Point features and line segments at their center points.
重复上述步骤,直到完成每个楼梯点要素到道路指示线的连线。Repeat the above steps until you complete the connection of each stair point feature to the road guideline.
可见,通过上述方法,做楼梯点要素到道路指示线的连线时,优先做垂线,若不满足则做只具有直角的折线,依然不能满足再考虑做斜线,通过这样的方案绘制的连线,在整个地图上显示出来时更具有整体性,更加美观。在特殊情况下,若该面要素的形状复杂,且楼梯点要素的位置特殊,如楼梯点要素位于该面要素的拐角内,可能导致按照上述方法无法得到全部位于该面要素内的连线,此时则需要重新绘制出该面要素内的中心线,因为Delaunay三角网的性质,所提取的中心线必然会延伸至该面要素的各个角落附近,以中心线代替原道路指示线后,必然能够按照上述方法得到该楼梯点要素到中心线的连线;此后,若中心线与原道路指示线存在相交或重合的部分,则直接去除线条中末端不经过楼梯点要素及房门点要素的线段,即可得到新的道路指示线;若中心线与原道路指示线不存在相交或重合的部分,说明原道路指示线为中心点到房门点要素的连线,且中心点不在中心线上,则做中心点到中心线的连线即可,然后再去除线条中末端不经过楼梯点要素、房门点要素及中心点的线段,即可得到新的道路指示线。It can be seen that through the above method, when connecting the stair point element to the road indication line, the vertical line is given priority. If it is not satisfied, the polyline with only right angles is made. Connections are more integrated and more beautiful when displayed on the entire map. In special cases, if the shape of the area feature is complex and the location of the stair point element is special, such as the stair point element is located in the corner of the area element, it may be impossible to obtain all the connections within the area element according to the above method. At this time, it is necessary to redraw the center line in the area element. Because of the nature of the Delaunay triangulation, the extracted center line will inevitably extend to the vicinity of each corner of the area element. The connection line between the stair point element and the center line can be obtained according to the above method; after that, if the center line intersects or overlaps with the original road indication line, the end of the line that does not pass through the stair point element and the door point element is directly removed. Line segment, you can get a new road indication line; if there is no intersection or overlap between the center line and the original road indication line, it means that the original road indication line is the connection between the center point and the door point element, and the center point is not on the center line. On, just connect the center point to the center line, and then remove the line segment whose end does not pass through the stair point element, the door point element and the center point, and then a new road indication line can be obtained.
可以理解的是,通常情况下,楼梯点要素所在的通道面要素或房间面要素中,会包含按上述步骤S2或S3得到的道路指示线,此时按照步骤S42a进行处理即可。It can be understood that, under normal circumstances, the passage surface element or room surface element where the stair point element is located will contain the road indication line obtained according to the above step S2 or S3, in this case, the processing can be performed according to step S42a.
特殊情况下,可能存在以下情况,即房间面要素或通道面要素内具有若干个楼梯点要素,但房间面要素或通道面要素的边线上并没有任何一个房门点要素。对应于实际情况下没有房门,仅能通过内部的楼梯或电梯进入的房间;或不通向任何房间,只通向楼梯或电梯的通道。这种情况下,经过上述步骤处理后,因相应的面要素内相对于其他面要素封闭,不存在道路指示线。此时就需要按照步骤S42b进行处理,先获取中心线在做连线。具体获取中心线和连线的方法可与上述的方法类似:利用Delaunay三角剖分算法,提取对应的面要素的边线点集后创建三角网,然后再获取中心线;需要获取连线时,步骤与S42a类似,对于任一一点,优先做到中心线的垂线,若不满足则做只具有直角的折线,依然不能满足再考虑做斜线。In special cases, there may be several stair point features within a room polygon feature or aisle polygon feature, but there is no door point feature on the edge of the room polygon feature or aisle polygon feature. Corresponds to a room that has no door and can only be accessed through internal stairs or elevators; or does not lead to any room, but only leads to stairs or elevator passages. In this case, after the above steps, there is no road indication line because the corresponding polygon is closed relative to other polygons. In this case, the processing needs to be performed according to step S42b, and the center line is obtained first for connection. The specific method of obtaining the centerline and the connection line can be similar to the above method: use the Delaunay triangulation algorithm to extract the edge point set of the corresponding surface element, create a triangulation network, and then obtain the centerline; when the connection line needs to be obtained, step Similar to S42a, for any point, the vertical line of the center line is given priority. If it is not satisfied, it is only a folded line with a right angle.
经过上述方法处理后,即可获得室内的完整的道路线。After processing by the above method, the complete indoor road line can be obtained.
本发明另一方面提供了一种计算机设备,计算机设备包括处理器,处理器用于执行存储器中存储的计算机程序时,实现上述的室内自动生成道路线的方法。Another aspect of the present invention provides a computer device, the computer device includes a processor, when the processor is configured to execute the computer program stored in the memory, to implement the above-mentioned method for automatically generating a road line indoors.
本发明另一方面提供了一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时,实现上述的室内自动生成道路线的方法。Another aspect of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the above-mentioned method for automatically generating a road route indoors is implemented.
综上,本发明利用已知的通道、房间等面图层,以及门、楼梯等点图层,利用Delaunay三角网获取中心线的算法,能够自动生成室内道路线图层,本发明生成线图层的效率高、生成结果精确且成图美观,有利于实现室内的定位、导航等一系列功能。To sum up, the present invention utilizes the known plane layers such as passages and rooms, as well as point layers such as doors and stairs, and uses the algorithm of Delaunay triangulation to obtain the center line, which can automatically generate the indoor road line layer, and the present invention generates a line map. The layer has high efficiency, accurate results and beautiful graphics, which is conducive to the realization of a series of functions such as indoor positioning and navigation.
最后说明的是,以上实施例仅用以说明本发明的技术方案而非限制,尽管参照较佳实施例对本发明进行了详细说明,本领域的普通技术人员应当理解,可以对本发明的技术方案进行修改或者等同替换,而不脱离本发明技术方案的宗旨和范围,其均应涵盖在本发明的权利要求范围中。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be Modifications or equivalent substitutions, without departing from the spirit and scope of the technical solutions of the present invention, should all be included in the scope of the claims of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111634814.7ACN114359440A (en) | 2021-12-29 | 2021-12-29 | Method, computer equipment and storage medium for automatically generating road route indoors |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111634814.7ACN114359440A (en) | 2021-12-29 | 2021-12-29 | Method, computer equipment and storage medium for automatically generating road route indoors |
| Publication Number | Publication Date |
|---|---|
| CN114359440Atrue CN114359440A (en) | 2022-04-15 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202111634814.7APendingCN114359440A (en) | 2021-12-29 | 2021-12-29 | Method, computer equipment and storage medium for automatically generating road route indoors |
| Country | Link |
|---|---|
| CN (1) | CN114359440A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116433796A (en)* | 2023-03-14 | 2023-07-14 | 东南大学 | Indoor map road network automatic generation method based on Mi-shaped grid |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN209500102U (en)* | 2018-05-29 | 2019-10-18 | 华南理工大学 | A kind of intelligent wheelchair of interior independent navigation Internet of Things |
| CN111836199A (en)* | 2020-06-01 | 2020-10-27 | 同济大学 | A dynamic obstacle avoidance path finding method for indoor navigation |
| CN112149217A (en)* | 2020-11-03 | 2020-12-29 | 苍穹数码技术股份有限公司 | Method and device for generating three-dimensional indoor navigation scene, electronic equipment and storage medium |
| US20210125397A1 (en)* | 2019-10-28 | 2021-04-29 | Zillow Group, Inc. | Generating Floor Maps For Buildings From Automated Analysis Of Visual Data Of The Buildings' Interiors |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN209500102U (en)* | 2018-05-29 | 2019-10-18 | 华南理工大学 | A kind of intelligent wheelchair of interior independent navigation Internet of Things |
| US20210125397A1 (en)* | 2019-10-28 | 2021-04-29 | Zillow Group, Inc. | Generating Floor Maps For Buildings From Automated Analysis Of Visual Data Of The Buildings' Interiors |
| CN111836199A (en)* | 2020-06-01 | 2020-10-27 | 同济大学 | A dynamic obstacle avoidance path finding method for indoor navigation |
| CN112149217A (en)* | 2020-11-03 | 2020-12-29 | 苍穹数码技术股份有限公司 | Method and device for generating three-dimensional indoor navigation scene, electronic equipment and storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116433796A (en)* | 2023-03-14 | 2023-07-14 | 东南大学 | Indoor map road network automatic generation method based on Mi-shaped grid |
| Publication | Publication Date | Title |
|---|---|---|
| CN103996089B (en) | Based on the transmission line of electricity optimal path generation method of GIS | |
| US9212917B2 (en) | Method and device for matching public transportation route with road network | |
| CN112381937A (en) | Multi-source geological data coupling modeling method based on drilling and complex geological profile | |
| CN112149217B (en) | Three-dimensional indoor navigation scene generation method and device, electronic equipment and storage medium | |
| US20140081614A1 (en) | Geological Exploration Method for Making Plan and Elevation Drawings Directly by Rotational Tin Network and Non-Profiling Method | |
| CN110532602A (en) | A kind of indoor autodraft and modeling method based on plan view image | |
| CN106845108B (en) | A kind of line simplifying method for taking spatial relation constraint into account | |
| CN102155942A (en) | Global path planning method based on fuzzy topological map under large-scale environment | |
| US10192004B2 (en) | Estimation of three-dimensional models of roofs from spatial two-dimensional graphs | |
| CN114581620B (en) | Virtual elevation generating method, device, computer equipment and storage medium of road | |
| CN112395794B (en) | Automatic parameterized slope model construction method based on subdivision technology | |
| JP3372910B2 (en) | Apparatus and method for creating polygon road network data | |
| CN114359440A (en) | Method, computer equipment and storage medium for automatically generating road route indoors | |
| CN113989826B (en) | Building CAD drawing segmentation recognition method based on graph theory algorithm | |
| CN114659525A (en) | A scalable real-time fast emergency path planning method for 3D ship scene | |
| CN109389668B (en) | A method for constructing a three-dimensional vector model of plant root system | |
| CN117787516A (en) | Mine water inrush escape multistage planning method combining physical parameters and GIS analysis | |
| CN109255467A (en) | A kind of A* pathfinding optimization method of Virtual reality | |
| CN106982438B (en) | It is a kind of to seek simultaneously confirmation method for more satellite sensor earth observation overlay areas | |
| CN112417579B (en) | A semantically constrained planar primitive topological relationship rule detection and recovery method | |
| Sugihara et al. | Roof report from automatically generated 3D building models by straight skeleton computation | |
| CN114880849A (en) | Automatic three-dimensional geological model merging method for block modeling | |
| CN109459024B (en) | Indoor navigation data model construction and path planning method under different behavior modes | |
| CN105894580A (en) | Method for processing curved surface extension data in three-dimensional geological surface model | |
| CN106651936B (en) | An adaptive method for determining the occurrence of exposed rock formations on the surface |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |