High-precision map generation method for bus route

文档序号:1876832 发布日期:2021-11-23 浏览:7次 中文

阅读说明:本技术 公交线路高精度地图生成方法 (High-precision map generation method for bus route ) 是由 魏芬龙 游建泳 郭艺斌 林德辉 陈明亮 王俊议 于 2021-08-03 设计创作,主要内容包括:本发明公开了一种公交线路高精度地图生成方法、介质及设备,其中方法包括:获取公交线路轨迹信息以确定公交线路最小覆盖区域;获取地图显示比例,并根据地图显示比例进行调整,以确定公交线路最终覆盖区域;获取预设切分数量,并对公交线路最终覆盖区域进行切割,以得到多个切片子区域;遍历切片子区域,并根据地图的经纬度信息和切片子区域的经纬度信息对地图进行平移和放大,以将地图与公交线路最终覆盖区域对齐;对每个切片子区域进行截图,以得到高精度切分地图,并对所有高精度切分地图进行拼接,以生成最终公交线路高精度地图;能够自动生成公交线路高精度地图;使得公交线路的预览可以在完整显示线路走势的同时,显示其周边情况。(The invention discloses a method, a medium and equipment for generating a high-precision map of a bus route, wherein the method comprises the following steps: acquiring bus route track information to determine a minimum coverage area of a bus route; obtaining a map display scale, and adjusting according to the map display scale to determine a final coverage area of the bus route; acquiring a preset segmentation quantity, and segmenting a final coverage area of the bus line to obtain a plurality of segmentation sub-areas; traversing the sub-area of the section, and translating and amplifying the map according to the longitude and latitude information of the map and the longitude and latitude information of the sub-area of the section so as to align the map with the final coverage area of the bus route; screenshot is conducted on each section subarea to obtain a high-precision segmentation map, and all the high-precision segmentation maps are spliced to generate a final high-precision bus route map; the high-precision map of the bus route can be automatically generated; the preview of the bus line can display the peripheral situation of the bus line while completely displaying the line trend.)

1. A bus route high-precision map generation method is characterized by comprising the following steps:

acquiring bus route track information, and determining a minimum coverage area of a bus route according to the bus route track information;

obtaining a map display scale, and adjusting the minimum coverage area of the bus route according to the map display scale so as to determine the final coverage area of the bus route;

acquiring a preset segmentation quantity, and cutting the final coverage area of the bus route according to the preset segmentation quantity to obtain a plurality of section sub-areas;

traversing the sub-area of the section, and translating and amplifying the map according to the longitude and latitude information of the map and the longitude and latitude information of the sub-area of the section so as to align the map with the final coverage area of the bus route;

and screenshot is carried out on each section subarea to obtain a high-precision segmentation map corresponding to each section subarea, and all the high-precision segmentation maps are spliced to generate a final high-precision bus route map.

2. The method for generating a high-precision map of a bus route according to claim 1, wherein determining a minimum coverage area of the bus route according to the bus route track information comprises:

calculating the maximum latitude, the minimum latitude, the maximum longitude and the minimum longitude of a bus route according to the bus route track information, and determining the minimum coverage area of the bus route according to the maximum latitude, the minimum latitude, the maximum longitude and the minimum longitude.

3. The method for generating a high-precision map of a bus route according to claim 1, wherein the step of adjusting the minimum coverage area of the bus route according to the map display scale comprises the following steps:

comparing the width-height ratio of the minimum coverage area of the bus route with the map display ratio;

if the width-height ratio of the minimum coverage area of the bus route is larger than the map display ratio, increasing the height of the minimum coverage area of the bus route until the width-height ratio of the minimum coverage area of the bus route is equal to the map display ratio so as to determine the final coverage area of the bus route;

and if the width-height ratio of the minimum coverage area of the bus route is smaller than the map display ratio, increasing the width of the minimum coverage area of the bus route until the width-height ratio of the minimum coverage area of the bus route is equal to the map display ratio so as to determine the final coverage area of the bus route.

4. The method for generating high-precision map of bus route according to claim 1, wherein the preset segmentation number is n2

5. A computer-readable storage medium, characterized in that a bus route high-precision map generation program is stored thereon, which when executed by a processor implements the bus route high-precision map generation method according to any one of claims 1 to 4.

6. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor, when executing the program, implements a bus route high accuracy map generating method as claimed in any one of claims 1 to 4.

Technical Field

The invention relates to the technical field of map making, in particular to a high-precision map generation method for a bus route, a computer-readable storage medium and computer equipment.

Background

In the related art, when a map of a bus line is checked, if the complete line trend of the bus line needs to be checked. A certain degree of zooming of the map is required. However, due to the span of the line, the map is required to be zoomed to a certain level to fully display the line trend. When the route trend is completely displayed, data such as landmarks, POI points and the like cannot be displayed on the map, so that the situation around the route is not clear.

Disclosure of Invention

The present invention is directed to solving, at least to some extent, one of the technical problems in the art described above. Therefore, one purpose of the invention is to provide a method for generating a high-precision map of a bus route, which can automatically generate the high-precision map of the bus route; the preview of the bus line can display the peripheral situation of the bus line while completely displaying the line trend.

A second object of the invention is to propose a computer-readable storage medium.

A third object of the invention is to propose a computer device.

In order to achieve the above object, an embodiment of a first aspect of the present invention provides a method for generating a high-precision map of a bus route, including the steps of obtaining bus route track information, and determining a minimum coverage area of the bus route according to the bus route track information; obtaining a map display scale, and adjusting the minimum coverage area of the bus route according to the map display scale so as to determine the final coverage area of the bus route; acquiring a preset segmentation quantity, and cutting the final coverage area of the bus route according to the preset segmentation quantity to obtain a plurality of section sub-areas; traversing the sub-area of the section, and translating and amplifying the map according to the longitude and latitude information of the map and the longitude and latitude information of the sub-area of the section so as to align the map with the final coverage area of the bus route; and screenshot is carried out on each section subarea to obtain a high-precision segmentation map corresponding to each section subarea, and all the high-precision segmentation maps are spliced to generate a final high-precision bus route map.

According to the method for generating the bus route high-precision map, firstly, bus route track information is obtained, and the minimum coverage area of the bus route is determined according to the bus route track information; secondly, obtaining a map display scale, and adjusting the minimum coverage area of the bus route according to the map display scale to determine the final coverage area of the bus route; then, acquiring a preset segmentation quantity, and cutting the final coverage area of the bus route according to the preset segmentation quantity to obtain a plurality of section sub-areas; traversing the sub-area of the section, and translating and amplifying the map according to the longitude and latitude information of the map and the longitude and latitude information of the sub-area of the section so as to align the map with the final coverage area of the bus route; then, screenshot is carried out on each section subarea to obtain a high-precision segmentation map corresponding to each section subarea, and all the high-precision segmentation maps are spliced to generate a final high-precision bus route map; therefore, the automatic generation of the high-precision map of the bus route is realized; the preview of the bus line can display the peripheral situation of the bus line while completely displaying the line trend.

In addition, the method for generating a high-precision map of a bus route provided by the embodiment of the invention can also have the following additional technical characteristics:

optionally, determining the minimum coverage area of the bus route according to the bus route track information includes: calculating the maximum latitude, the minimum latitude, the maximum longitude and the minimum longitude of a bus route according to the bus route track information, and determining the minimum coverage area of the bus route according to the maximum latitude, the minimum latitude, the maximum longitude and the minimum longitude.

Optionally, adjusting the minimum coverage area of the bus route according to the map display scale includes:

comparing the width-height ratio of the minimum coverage area of the bus route with the map display ratio; if the width-height ratio of the minimum coverage area of the bus route is larger than the map display ratio, increasing the height of the minimum coverage area of the bus route until the width-height ratio of the minimum coverage area of the bus route is equal to the map display ratio so as to determine the final coverage area of the bus route; and if the width-height ratio of the minimum coverage area of the bus route is smaller than the map display ratio, increasing the width of the minimum coverage area of the bus route until the width-height ratio of the minimum coverage area of the bus route is equal to the map display ratio so as to determine the final coverage area of the bus route.

Optionally, the preset segmentation number is n2

In order to achieve the above object, a second embodiment of the present invention provides a computer-readable storage medium, on which a high-precision bus route map generation program is stored, which, when executed by a processor, implements the high-precision bus route map generation method as described above.

According to the computer-readable storage medium of the embodiment of the invention, the bus route high-precision map generation program is stored, so that when the processor executes the bus route high-precision map generation program, the bus route high-precision map generation method is realized, and the automatic generation of the bus route high-precision map is realized; the preview of the bus line can display the peripheral situation of the bus line while completely displaying the line trend.

In order to achieve the above object, a third embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the method for generating a high-precision map of a bus route as described above is implemented.

According to the computer equipment provided by the embodiment of the invention, the high-precision map generation program of the bus route is stored by the memory, so that the processor can realize the high-precision map generation method of the bus route when executing the high-precision map generation program of the bus route, and further can automatically generate the high-precision map of the bus route; the preview of the bus line can display the peripheral situation of the bus line while completely displaying the line trend.

Drawings

Fig. 1 is a schematic flow chart of a method for generating a high-precision map of a bus route according to an embodiment of the invention.

Detailed Description

Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.

In the related art, in the process of previewing the bus map, when the route trend is completely displayed, data such as landmarks and POI points cannot be displayed on the map, so that the situation around the route is not clear. According to the method for generating the bus route high-precision map, firstly, bus route track information is obtained, and the minimum coverage area of the bus route is determined according to the bus route track information; secondly, obtaining a map display scale, and adjusting the minimum coverage area of the bus route according to the map display scale to determine the final coverage area of the bus route; then, acquiring a preset segmentation quantity, and cutting the final coverage area of the bus route according to the preset segmentation quantity to obtain a plurality of section sub-areas; traversing the sub-area of the section, and translating and amplifying the map according to the longitude and latitude information of the map and the longitude and latitude information of the sub-area of the section so as to align the map with the final coverage area of the bus route; then, screenshot is carried out on each section subarea to obtain a high-precision segmentation map corresponding to each section subarea, and all the high-precision segmentation maps are spliced to generate a final high-precision bus route map; therefore, the automatic generation of the high-precision map of the bus route is realized; the preview of the bus line can display the peripheral situation of the bus line while completely displaying the line trend.

In order to better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.

In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.

Fig. 1 is a schematic flow chart of a method for generating a high-precision map of a bus route according to an embodiment of the present invention, and as shown in fig. 1, the method for generating a high-precision map of a bus route includes the following steps:

s101, obtaining bus route track information, and determining the minimum coverage area of the bus route according to the bus route track information.

That is to say, the bus running track information corresponding to the bus route is acquired, so that the minimum coverage area corresponding to the bus route is determined according to the bus route track information.

In some embodiments, determining the minimum coverage area of the bus route according to the bus route track information includes: and calculating the maximum latitude, the minimum latitude, the maximum longitude and the minimum longitude of the bus route according to the bus route track information, and determining the minimum coverage area of the bus route according to the maximum latitude, the minimum latitude, the maximum longitude and the minimum longitude.

That is, first, the maximum latitude, the maximum longitude, the minimum latitude and the minimum longitude corresponding to the bus route are calculated; thus, a minimum rectangle completely containing the bus route can be determined according to the maximum latitude, the maximum longitude, the minimum latitude and the minimum longitude; it is understood that the smallest rectangle is the smallest coverage area of the bus route. Specifically, appropriate redundancy may be performed after the minimum rectangle is determined to generate the minimum coverage area of the bus route.

And S102, obtaining a map display scale, and adjusting the minimum coverage area of the bus route according to the map display scale so as to determine the final coverage area of the bus route.

In some embodiments, adjusting the minimum coverage area of the bus route according to the map display scale includes: comparing the width-height ratio of the minimum coverage area of the bus route with the map display ratio; if the width-height ratio of the minimum coverage area of the bus route is greater than the map display ratio, increasing the height of the minimum coverage area of the bus route until the width-height ratio of the minimum coverage area of the bus route is equal to the map display ratio so as to determine the final coverage area of the bus route; and if the width-height ratio of the minimum coverage area of the bus route is smaller than the map display ratio, increasing the width of the minimum coverage area of the bus route until the width-height ratio of the minimum coverage area of the bus route is equal to the map display ratio so as to determine the final coverage area of the bus route.

It can be understood that if the width-height ratio of the final coverage area of the bus line is inconsistent with the map display ratio, the display of the bus line is deformed and the ratio is disordered; alternatively, the map display area information is not sufficiently displayed. Therefore, the width-height ratio of the minimum coverage area of the bus route is firstly compared with the map display ratio. Adjusting the minimum coverage area of the bus route according to the comparison result; on the premise that the display result can completely preview the bus route, the proportion is consistent with the map display proportion; ensuring that the final map display is not biased.

S103, acquiring the preset segmentation quantity, and cutting the final coverage area of the bus line according to the preset segmentation quantity to obtain a plurality of section sub-areas.

In some embodiments, the preset number of splits is n2

That is, it is preferable to preset the number of divisions to n2. Thus, according to n2The preset segmentation quantity is used for segmenting the map, and the display scale of the map cannot be damaged.

And S104, traversing the sub-area of the section, and translating and amplifying the map according to the longitude and latitude information of the map and the longitude and latitude information of the sub-area of the section so as to align the map with the final coverage area of the bus route.

And S105, screenshot is conducted on each section sub-area to obtain a high-precision segmentation map corresponding to each section sub-area, and all the high-precision segmentation maps are spliced to generate the final high-precision bus route map.

As an example, the size of each slice sub-region coincides with the size of the map display area; and the map content displayed by each slice subarea is corresponding; amplifying the map according to the map content displayed in the sub-area of the slice; and translating it so that they are aligned; then, after alignment, screenshot is carried out on the section sub-area, and a high-precision segmentation map corresponding to the section sub-area can be obtained; then, after completing the screenshot for each slice sub-region; and splicing all the high-precision split maps to obtain the final high-precision map of the bus route.

In summary, according to the method for generating the high-precision map of the bus route in the embodiment of the invention, firstly, the track information of the bus route is obtained, and the minimum coverage area of the bus route is determined according to the track information of the bus route; secondly, obtaining a map display scale, and adjusting the minimum coverage area of the bus route according to the map display scale to determine the final coverage area of the bus route; then, acquiring a preset segmentation quantity, and cutting the final coverage area of the bus route according to the preset segmentation quantity to obtain a plurality of section sub-areas; traversing the sub-area of the section, and translating and amplifying the map according to the longitude and latitude information of the map and the longitude and latitude information of the sub-area of the section so as to align the map with the final coverage area of the bus route; then, screenshot is carried out on each section subarea to obtain a high-precision segmentation map corresponding to each section subarea, and all the high-precision segmentation maps are spliced to generate a final high-precision bus route map; therefore, the automatic generation of the high-precision map of the bus route is realized; the preview of the bus line can display the peripheral situation of the bus line while completely displaying the line trend.

In order to implement the above embodiments, an embodiment of the present invention proposes a computer-readable storage medium on which a bus route high-precision map generation program is stored, which, when executed by a processor, implements the bus route high-precision map generation method as described above.

According to the computer-readable storage medium of the embodiment of the invention, the bus route high-precision map generation program is stored, so that when the processor executes the bus route high-precision map generation program, the bus route high-precision map generation method is realized, and the automatic generation of the bus route high-precision map is realized; the preview of the bus line can display the peripheral situation of the bus line while completely displaying the line trend.

In order to implement the foregoing embodiments, an embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where when the processor executes the computer program, the method for generating a high-precision map of a bus route as described above is implemented.

According to the computer equipment provided by the embodiment of the invention, the high-precision map generation program of the bus route is stored by the memory, so that the processor can realize the high-precision map generation method of the bus route when executing the high-precision map generation program of the bus route, and further can automatically generate the high-precision map of the bus route; the preview of the bus line can display the peripheral situation of the bus line while completely displaying the line trend.

As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.

While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.

It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

In the description of the present invention, it is to be understood that the terms "first", "second" and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.

In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; either directly or indirectly through intervening media, either internally or in any other relationship. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.

In the present invention, unless otherwise expressly stated or limited, the first feature "on" or "under" the second feature may be directly contacting the first and second features or indirectly contacting the first and second features through an intermediate. Also, a first feature "on," "over," and "above" a second feature may be directly or diagonally above the second feature, or may simply indicate that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature may be directly under or obliquely under the first feature, or may simply mean that the first feature is at a lesser elevation than the second feature.

In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above should not be understood to necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.

Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:房屋建筑施工管理用安全警示装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!