Methods for eliminating overlay of electronic map elements and storage media
Patent Information
- Application Number
- CN202211112297.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-13
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2042-09-13
AI Technical Summary
然而,在电子地图的生产和绘制过程中,由于不同地物要素之间的生产存在不同步性、生产作业人员技术水平参差不齐、不同期参考影像存在定位偏移与投影差等,容易造成不同地物要素之间相互压盖的现象
[0073]上述电子地图要素的压盖消除方法、存储介质,通过确定存在相互压盖情况的第一矢量图形与第二矢量图形,确定第一矢量图形与第二矢量图形之间的相互压盖情况所属的压盖类型,根据相互压盖情况所属的压盖类型,执行对应的压盖消除策略,无需人工手动来消除压盖,从而提高了压盖现象的消除效率以及准确度。
Smart Images

Figure CN117745865B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic map technology, specifically to a method for eliminating overlay of electronic map elements and a storage medium. Background Technology
[0002] Geographic features are fundamental elements in electronic maps, reflecting the actual location, shape, length, and area of different features in the physical world. These features need to be displayed correctly, accurately, and regularly on the electronic map surface. However, during the production and creation of electronic maps, factors such as asynchronous production of different features, varying skill levels of production personnel, and positioning and projection differences between reference images from different periods can easily lead to overlapping of different features.
[0003] Currently, the mutual overlap between different land features is mainly eliminated through manual inspection and removal. However, due to the wide variety of land features and the significant increase in the number of overlapping features as the coverage area of electronic maps increases, the efficiency of manually eliminating overlap is low. Summary of the Invention
[0004] Therefore, it is necessary to provide a method and storage medium for eliminating the overlay of electronic map elements to address the above-mentioned technical problems, thereby improving the efficiency and accuracy of eliminating the overlay phenomenon.
[0005] In a first aspect, this application provides a method for eliminating the overlay of electronic map elements, including:
[0006] Obtain the preset vector graphics of each feature in the electronic map of the target area to obtain a preset vector graphics set;
[0007] In the preset set of vector graphics, a first vector graphic and a second vector graphic that overlap each other are identified;
[0008] Determine the type of overlap between the first vector graphic and the second vector graphic;
[0009] Determine the cap removal strategy for the cap type;
[0010] The overlay elimination strategy is executed to eliminate the mutual overlay between the first vector graphic and the second vector graphic.
[0011] In some embodiments of this application, determining the overlap type of the mutual overlap between the first vector graphic and the second vector graphic includes:
[0012] Determine the end line segment in the outline of the first vector graphic, wherein the outline of the first vector graphic includes the end line segment and the side line segment;
[0013] Determine the overlapping area between the first vector graphic and the second vector graphic;
[0014] If the end segment intersects with the mutually overlapping area, the overlapping type is determined to be either the end segment being fully covered or the end segment being partially covered, based on the length of the intersecting segment between the mutually overlapping area and the end segment.
[0015] If the end segment does not intersect with the mutually overlapping area, the overlapping type is determined to be that the end segment is not covered.
[0016] In some embodiments of this application, the execution of the overlay elimination strategy to eliminate the mutual overlay between the first vector graphic and the second vector graphic includes:
[0017] If the overlay type is that the end line segment is not overlaid, determine the overlay depth between the first vector graphic and the second vector graphic;
[0018] If the overlapping depth is shallow, the second vector graphic is determined to be inaccurate, and the outline of the second vector graphic is adjusted according to the overlapping area to eliminate the overlapping area.
[0019] If the overlapping depth is a deep overlapping, it is determined that both the first vector graphic and the second vector graphic are inaccurate, and the outlines of the first vector graphic and the second vector graphic are adjusted according to the overlapping area to eliminate the overlapping area.
[0020] In some embodiments of this application, determining the overlap depth between the first vector graphic and the second vector graphic includes:
[0021] Determine the central region of the first vector graphic;
[0022] If the central region and the mutually overlapping region at least partially overlap, the overlapping depth between the first vector graphic and the second vector graphic is determined as a depth overlap.
[0023] If the central region does not overlap with the mutually overlapping region, the overlapping depth between the first vector graphic and the second vector graphic is determined to be shallow overlapping.
[0024] In some embodiments of this application, adjusting the outline of the second vector graphic includes:
[0025] Among the multiple line segments contained in the outline of the second vector graphic, determine the line segment that intersects with the first vector graphic;
[0026] Among the line segments that intersect with the first vector graphic, determine the line segments that need to be translated;
[0027] Translate the line segment to be translated along the orthogonal direction of the line segment to be translated until the overlapping area is eliminated.
[0028] In some embodiments of this application, the first vector graphic represents a road feature, and the first vector graphic includes a road centerline, which is formed by splicing multiple line segments. Adjusting the outline of the first vector graphic includes:
[0029] Determine the intersection point of the outline of the first vector graphic and the outline of the second vector graphic;
[0030] Among the multiple line segments contained in the road centerline, determine the target line segment closest to the intersection point;
[0031] Determine the point symmetrical to the intersection point relative to the target line segment;
[0032] Based on the symmetry point, a new line segment is generated to replace the target line segment, and the new line segment includes the symmetry point.
[0033] The target line segment is replaced with the new line segment to obtain the adjusted road centerline.
[0034] Based on the adjusted road centerline, adjust the outline of the first vector graphic.
[0035] In some embodiments of this application, after implementing the overlay elimination strategy to eliminate the mutual overlay between the first vector graphic and the second vector graphic, the method further includes:
[0036] Obtain the first area of the second vector graphic after the overprinting elimination strategy is executed, and the second area of the second vector graphic before the overprinting elimination strategy is executed;
[0037] Determine the area ratio between the first area and the second area;
[0038] If the area ratio is greater than the preset ratio, the execution of the overprinting elimination strategy is deemed qualified.
[0039] In some embodiments of this application, the execution of the overlay elimination strategy to eliminate the mutual overlay between the first vector graphic and the second vector graphic includes:
[0040] If the overlapping type is that the end line segment is completely covered, the first vector graphic is determined to be inaccurate, and the outline of the first vector graphic is adjusted according to the overlapping area to eliminate the overlapping area.
[0041] In some embodiments of this application, the execution of the overlay elimination strategy to eliminate the mutual overlay between the first vector graphic and the second vector graphic includes:
[0042] If the type of overlay is that the end line segment is partially overlaid, determine the depth of overlay between the first vector graphic and the second vector graphic;
[0043] If the overlapping depth is shallow, the second vector graphic is determined to be inaccurate, and the outline of the second vector graphic is adjusted according to the overlapping area to eliminate the overlapping area.
[0044] If the overlapping depth is considered to be deep overlapping, the first vector graphic is determined to be inaccurate, and the outline of the first vector graphic is adjusted according to the overlapping areas to eliminate the overlapping areas.
[0045] In some embodiments of this application, adjusting the outline of the first vector graphic to eliminate the overlapping areas includes:
[0046] Delete the portion of the first vector graphic that belongs to the overlapping area to eliminate the overlapping area.
[0047] In some embodiments of this application, determining the first vector graphic and the second vector graphic that overlap in the preset vector graphic set includes:
[0048] Determine the feature category to which the feature elements of each preset vector graphic in the preset vector graphic set belong;
[0049] According to the aforementioned feature categories, the preset vector graphic set is divided into multiple preset vector graphic subsets, wherein the feature features of the preset vector graphics in different preset vector graphic subsets belong to different feature categories;
[0050] Based on whether the preset vector graphics in different vector graphic subsets at least partially overlap, the first vector graphic and the second vector graphic that have mutual overlap are determined;
[0051] The first vector graphic and the second vector graphic belong to different preset vector graphic subsets.
[0052] Secondly, this application provides an overlay removal device for electronic map elements, comprising:
[0053] The graphics acquisition module is used to acquire preset vector graphics of various features in the electronic map of the target area, and obtain a set of preset vector graphics.
[0054] The overlapping detection module is used to determine, from the preset vector graphic set, a first vector graphic and a second vector graphic that overlap each other.
[0055] The capping classification module is used to determine the capping type of the mutual capping situation between the first vector graphic and the second vector graphic;
[0056] The capping elimination module is used to determine the capping elimination strategy of the capping type and execute the capping elimination strategy to eliminate the mutual capping between the first vector graphic and the second vector graphic.
[0057] In some embodiments of this application, the overlay classification module is specifically used to determine the end line segments in the outline of the first vector graphic, wherein the outline of the first vector graphic includes the end line segments and side line segments; determine the mutual overlay areas of the first vector graphic and the second vector graphic; if the end line segment intersects with the mutual overlay area, determine the overlay type as either the end line segment being fully overlaid or the end line segment being partially overlaid based on the length of the intersecting line segment between the mutual overlay area and the end line segment; if the end line segment does not intersect with the mutual overlay area, determine the overlay type as the end line segment not being overlaid.
[0058] In some embodiments of this application, the overprint elimination module is further configured to: determine the degree of overprinting between the first vector graphic and the second vector graphic if the overprinting type is that the end line segment is not overprinted; if the degree of overprinting is shallow overprinting, determine that the second vector graphic is inaccurate, and adjust the outline of the second vector graphic according to the mutual overprinting area to eliminate the mutual overprinting area; if the degree of overprinting is deep overprinting, determine that both the first vector graphic and the second vector graphic are inaccurate, and adjust the outlines of the first vector graphic and the second vector graphic according to the mutual overprinting area to eliminate the mutual overprinting area.
[0059] In some embodiments of this application, the overprint elimination module is further configured to determine the central region of the first vector graphic; if the central region at least partially overlaps with the mutually overlapping regions, the overprint depth between the first vector graphic and the second vector graphic is determined to be a deep overprint; if the central region does not overlap with the mutually overlapping regions, the overprint depth between the first vector graphic and the second vector graphic is determined to be a shallow overprint.
[0060] In some embodiments of this application, the overlap elimination module is further configured to: determine, among the multiple line segments included in the outline of the second vector graphic, the line segment edge intersecting with the first vector graphic; determine, among the line segment edges intersecting with the first vector graphic, the line segment edge to be translated; and translate the line segment edge to be translated along the orthogonal direction of the line segment edge to be translated until the mutually overlapping areas are eliminated.
[0061] In some embodiments of this application, the overlay removal module is further configured to: determine the intersection point of the outline of the first vector graphic and the outline of the second vector graphic; determine the target line segment closest to the intersection point among multiple line segments included in the road centerline; determine the symmetrical point of the intersection point relative to the target line segment; generate a new line segment to replace the target line segment based on the symmetrical point, the new line segment including the symmetrical point; replace the target line segment with the new line segment to obtain an adjusted road centerline; and adjust the outline of the first vector graphic based on the adjusted road centerline.
[0062] In some embodiments of this application, the device for removing overlays of electronic map elements further includes an inspection module. The inspection module is used to obtain a first area of the second vector graphic after the overlay removal strategy is executed, and a second area of the second vector graphic before the overlay removal strategy is executed; determine the area ratio between the first area and the second area; and if the area ratio is greater than a preset ratio, determine that the overlay removal strategy is executed successfully.
[0063] In some embodiments of this application, the overlay elimination module is further configured to determine that the first vector graphic is inaccurate if the overlay type is that the end line segment is fully overlaid, and adjust the outline of the first vector graphic according to the mutual overlay area to eliminate the mutual overlay area.
[0064] In some embodiments of this application, the overprint elimination module is further configured to: determine the degree of overprinting between the first vector graphic and the second vector graphic if the overprinting type is that the end line segment is partially overprinted; if the degree of overprinting is shallow overprinting, determine that the second vector graphic is inaccurate, and adjust the outline of the second vector graphic according to the mutual overprinting area to eliminate the mutual overprinting area; if the degree of overprinting is deep overprinting, determine that the first vector graphic is inaccurate, and adjust the outline of the first vector graphic according to the mutual overprinting area to eliminate the mutual overprinting area.
[0065] In some embodiments of this application, the overlap elimination module is further configured to delete the portion of the first vector graphic that belongs to the mutually overlapping area, so as to eliminate the mutually overlapping area.
[0066] In some embodiments of this application, the overlay detection module is specifically used to determine the feature category to which the feature elements of each preset vector graphic in the preset vector graphic set belong; to divide the preset vector graphic set according to the feature category, thereby obtaining multiple preset vector graphic subsets, wherein the feature elements of the preset vector graphics in different preset vector graphic subsets belong to different feature categories; and to determine a first vector graphic and a second vector graphic that have mutual overlay based on whether the preset vector graphics in different vector graphic subsets at least partially overlap; wherein the first vector graphic and the second vector graphic belong to different preset vector graphic subsets.
[0067] Thirdly, this application also provides a computer device, the computer device comprising:
[0068] One or more processors;
[0069] Memory; and
[0070] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the steps in the above-described method for removing overlays of electronic map elements.
[0071] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, the computer program being loaded by a processor to perform the steps in the above-described method for removing overlays of electronic map elements.
[0072] Fifthly, embodiments of this application provide a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in the above-described method for removing overlays of electronic map features.
[0073] The aforementioned method and storage medium for eliminating overlap of electronic map elements, by identifying a first vector graphic and a second vector graphic that overlap each other, determining the overlap type of the overlap between the first and second vector graphics, and executing the corresponding overlap elimination strategy according to the overlap type, eliminates the need for manual elimination of overlap, thereby improving the efficiency and accuracy of overlap elimination. Attached Figure Description
[0074] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0075] Figure 1 This is a flowchart illustrating the method for eliminating overlay of electronic map elements in an embodiment of this application;
[0076] Figure 2 This is a flowchart illustrating the process of determining the cap type in an embodiment of this application;
[0077] Figure 3 This is a flowchart illustrating the capping elimination strategy in an embodiment of this application;
[0078] Figure 4 This is a schematic diagram of the capping detection process in an embodiment of this application;
[0079] Figure 5 This is a schematic diagram of the overlay removal device for electronic map elements in the embodiments of this application;
[0080] Figure 6 This is a schematic diagram of the structure of the computer device in the embodiments of this application;
[0081] Figure 7 This is a schematic diagram of the interface of an electronic map in an embodiment of this application;
[0082] Figure 8 This is a schematic diagram showing the positional relationship of various cap assembly types in the embodiments of this application;
[0083] Figure 9 This is a schematic diagram showing the positional relationship between the second vector graphic and the first vector graphic in the embodiments of this application;
[0084] Figure 10 This is a schematic diagram showing the positional relationship of the first vector graphic completely passing through the second vector graphic in an embodiment of this application;
[0085] Figure 11 This is a schematic diagram showing the positional relationship of various cap types in the embodiments of this application;
[0086] Figure 12 This is a schematic diagram of the positional relationship of points with zero endpoints in an embodiment of this application;
[0087] Figure 13 This is a schematic diagram of the positional relationship of a point with one endpoint in an embodiment of this application;
[0088] Figure 14This is a schematic diagram of the positional relationship of two endpoints in an embodiment of this application;
[0089] Figure 15 This is a schematic diagram showing the positional relationship of three endpoints in an embodiment of this application;
[0090] Figure 16 This is a schematic diagram showing the positional relationship between the first and second vector graphics before and after adjustment in the embodiments of this application;
[0091] Figure 17 This is a schematic diagram showing another positional relationship between the first and second vector graphics before and after adjustment in the embodiments of this application;
[0092] Figure 18 This is another schematic diagram showing the positional relationship between the first and second vector graphics before and after adjustment in the embodiments of this application. Detailed Implementation
[0093] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0094] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0095] In the description of this application, the word "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.
[0096] See Figure 1This application provides a method for eliminating the overlay of electronic map features, which includes steps S101 to S105, as follows:
[0097] S101, Obtain the preset vector graphics of each feature in the electronic map of the target area, and obtain the preset vector graphics set.
[0098] The target area refers to the area requiring cover removal. An electronic map, or digital map, is a map stored and accessed digitally using computer technology. Electronic maps are obtained through on-site measurements by map production personnel. Geographical features refer to buildings, roads and their ancillary facilities, public facilities, pipelines and fences, water systems and their ancillary facilities, etc. The electronic map of the target area includes a large number of preset vector graphics. Each preset vector graphic represents a geographic feature in the target area, and the set of preset vector graphics includes multiple preset vector graphics in the electronic map. Preset vector graphics have attributes such as shape, outline, size, and geographical location to depict the corresponding geographic features on the electronic map. These attributes of the preset vector graphics are obtained through prior on-site measurements of the geographic features in the target area, and the preset vector graphics in the electronic map are generated based on these attributes. (See reference...) Figure 7 , Figure 7 A portion of the content from the electronic map is displayed, showing that... Figure 7 The electronic map includes preset vector graphics of the buildings and preset vector graphics of the roads.
[0099] In some embodiments, the preset vector graphic can be a planar vector graphic or a line vector graphic. Taking a road as an example, since a road generally includes two lanes separated by a road centerline, the preset vector graphic of the road is generally a line vector graphic, which coincides with the road centerline. To facilitate the overlay elimination method of this embodiment, a preset road width value can be obtained, and the line vector graphic can be expanded into a planar vector graphic according to the preset road width value, with the width of the planar vector graphic being the preset road width value.
[0100] S102, in the preset vector graphic set, determine the first vector graphic and the second vector graphic that have a mutual overlapping situation.
[0101] Specifically, within the set of preset vector graphics, it is determined whether any two preset vector graphics at least partially overlap. If they do, it indicates that there is mutual overlap between the two preset vector graphics, and one of these two preset vector graphics is designated as the first vector graphic, and the other as the second vector graphic. Specifically, the detection of at least partial overlap between two preset vector graphics involves acquiring the areas occupied by each preset vector graphic on the electronic map, and determining whether there is at least partial overlap based on a comparison of the occupied areas.
[0102] In some embodiments, before step S102, the area of each preset vector graphic in the preset vector graphic set is obtained. If the area of a preset vector graphic is less than an area threshold, it indicates that the covering effect of the preset vector graphic is small, and the preset vector graphic is deleted from the preset vector graphic set. If the area of a preset vector graphic is greater than or equal to the area threshold, the preset vector graphic is retained in the preset vector graphic set. The area threshold is generally 5 square meters.
[0103] In some embodiments, after step S102, the areas occupied by the first vector graphic and the second vector graphic in the electronic map are obtained respectively. The overlapping portion between the areas occupied by the first vector graphic and the second vector graphic in the electronic map is taken as the mutual overlap area. Then, the ratio of the area of the mutual overlap area to the area of the first vector graphic and the ratio of the area of the mutual overlap area to the area of the second vector graphic are calculated respectively. If both ratios are less than or equal to a first preset threshold, step S103 is executed. If either ratio is greater than the first preset threshold, it indicates that the degree of mutual overlap is too large (e.g., Figure 9 As shown, if the error between the first vector graphic or the second vector graphic and the actual situation is too large, the production operator needs to remeasure and redraw the first vector graphic or the second vector graphic. Therefore, step S103 is not executed for the first vector graphic or the second vector graphic, and a prompt message is output for the production operator to confirm the first vector graphic and the second vector graphic. The first preset threshold is generally 95%.
[0104] In some embodiments, after step S102, a region difference operation is performed on the second vector graphic using the first vector graphic. If the second vector graphic obtains multiple spaced regions after the region difference operation, it indicates that the first vector graphic completely passes through the second vector graphic, and the feature elements of the first vector graphic also completely pass through the feature elements of the second vector graphic (e.g., Figure 10As shown), therefore, step S103 is not performed on the first vector graphic and the second vector graphic. Similarly, a region difference operation is performed on the first vector graphic using the second vector graphic. If the first vector graphic obtains multiple spaced regions after the region difference operation, it indicates that the second vector graphic completely passes through the first vector graphic, and the feature elements of the second vector graphic also completely pass through the feature elements of the first vector graphic. Therefore, step S103 is not performed on the first vector graphic and the second vector graphic.
[0105] S103, determine the type of overlap between the first vector graphic and the second vector graphic.
[0106] Specifically, using the first vector graphic as a reference, the overlapping area between the second and first vector graphics is determined. Based on this overlapping area, the overlapping type between the first and second vector graphics is determined. The overlapping type can include deep overlapping, shallow overlapping, and can also include fully overlapping, partially overlapping, or unoverlapping end segments. The outline of the first vector graphic includes end segments and side segments, with the length of the end segments being shorter than the length of the side segments. It can be understood that the outline of the first vector graphic is composed of multiple line segments, and the end containing the end segment is considered the end of the outline of the first vector graphic. When determining the end segments and side segments, at least one of the shorter line segments among the multiple line segments of the outline of the first vector graphic is taken as the end segment, and the other line segments among the multiple line segments of the outline of the first vector graphic, excluding the end segments, are taken as side segments. For example, the shortest line segment among the multiple line segments of the outline of the first vector graphic is taken as the end segment. Taking the overlapping type, including deep overlapping and shallow overlapping, as an example, determining the overlapping type between the first and second vector graphics based on the overlapping area can be done by: obtaining the area of the overlapping area and the area of the first vector graphic, and determining the ratio between the area of the overlapping area and the area of the first vector graphic. If the ratio is greater than a second preset threshold, the overlapping type is determined to be deep overlapping. If the ratio is less than or equal to the second preset threshold, the overlapping type is determined to be shallow overlapping. The second preset threshold is less than the first preset threshold. For overlapping types including fully overlapping, partially overlapping, and not overlapping end segments, the specific steps for determining the overlapping type between the first and second vector graphics based on the overlapping area are as follows: Figure 2 The illustrated embodiment.
[0107] S104, determine the cap removal strategy for the cap type;
[0108] Specifically, for different capping types, corresponding capping elimination strategies are pre-set. By executing the capping elimination strategy corresponding to the capping type, mutually overlapping areas are eliminated, thereby eliminating the mutual overlap between the first vector graphic and the second vector graphic. The capping elimination strategy may include adjusting the outline of the first vector graphic and / or the second vector graphic; different capping elimination strategies include different outline adjustment methods. It can be understood that after executing the capping elimination strategy corresponding to the capping type, it is sufficient to ensure that the mutually overlapping areas between the first vector graphic and the second vector graphic are eliminated. The mutual overlapping areas are eliminated because the outlines of the first vector graphic and / or the second vector graphic are adjusted so that there is no overlap between the first vector graphic and the second vector graphic.
[0109] S105, execute the overlay elimination strategy to eliminate the mutual overlay between the first vector graphic and the second vector graphic.
[0110] Taking capping types including deep capping and shallow capping as examples, if the capping type between the first and second vector graphics is shallow capping, since the overlapping area is small and the capping type is determined based on the first vector graphic, the accuracy of the first vector graphic is assumed to be higher than that of the second vector graphic. Therefore, the first vector graphic is judged to be completely accurate, while the second vector graphic is inaccurate. When executing the capping elimination strategy corresponding to the capping type, only the outline of the second vector graphic is adjusted to achieve capping elimination. Taking the capping type between the first and second vector graphics as deep capping as an example, since the overlapping area is large, it indicates that the vector graphic error causing this situation is also large. However, the error existing in a single vector graphic is limited. Therefore, it is determined that the error exists in both the first and second vector graphics, and both the first and second vector graphics are inaccurate. When executing the capping elimination strategy corresponding to the capping type, the outlines of both the first and second vector graphics are adjusted to avoid excessive adjustment of the second vector graphic due to adjusting only its outline. Taking the adjustment of the outline of the first vector graphic as an example, the area containing the first vector graphic can be reduced by deleting overlapping areas, thus changing the outline of the first vector graphic. For other methods of adjusting the outlines of the first and second vector graphics, please refer to [link to relevant documentation]. Figure 3 The specific implementation methods will not be described in detail here.
[0111] Furthermore, after executing step S105, the process returns to executing step S102 until there are no preset vector graphics overlapping each other in the preset vector graphic set.
[0112] In one embodiment, such as Figure 2 As shown, step S103 includes:
[0113] S201, determine the end line segment in the outline of the first vector graphic, wherein the outline of the first vector graphic includes the end line segment and the side line segment;
[0114] Specifically, as described in the aforementioned embodiments, at least one of the shorter line segments among the multiple line segments of the first vector graphic's outline is designated as the end line segment, and the other line segments among the multiple line segments of the first vector graphic's outline, excluding the end line segment, are designated as side line segments. Multiple end line segments and side line segments can exist. Taking a preset vector graphic where the first vector graphic represents a building as an example, the outline of the preset vector graphic where the building is located is generally a rectangle, consisting of two long sides and two short sides. Both short sides are end line segments, and both long sides are side line segments. Taking a preset vector graphic where the first vector graphic represents a road as an example, the outline of the preset vector graphic where the road is located is generally a long strip outline, where the short sides of the long strip outline are end line segments, and the other sides of the long strip outline, excluding the end line segments, are side line segments.
[0115] Because long roads in reality are often divided into multiple segments and measured separately, each road can correspond to multiple pre-defined vector graphics connected end to end. If the road is one of the pre-defined vector graphics, when determining the end segment in the outline of the first vector graphic, the determined end segment might be located in the middle of the road, rather than at the beginning or end. Therefore, if the feature corresponding to the first vector graphic is a road, after determining the end segment in the outline of the first vector graphic, it can be checked whether the end segment coincides with the end segments in the outlines of other pre-defined vector graphics in the set of pre-defined vector graphics. If the end segment in the outline of the first vector graphic coincides with the end segments in the outlines of other pre-defined vector graphics, and the feature corresponding to the other pre-defined vector graphics is also a road, it indicates that these two roads are actually one road. The first vector graphic and the other pre-defined vector graphics are then merged into a single pre-defined vector graphic, which is used as the updated first vector graphic. Based on the updated first vector graphic, the end segments in the outline of the first vector graphic are then re-determined.
[0116] S202, determine the overlapping area between the first vector graphic and the second vector graphic;
[0117] The method for determining the overlapping area between the first vector graphic and the second vector graphic can be as follows: obtain the areas occupied by the first vector graphic and the second vector graphic in the electronic map respectively, and take the overlapping part between the areas occupied by the first vector graphic and the second vector graphic in the electronic map as the overlapping area.
[0118] S203, if the end segment intersects with the mutually overlapping area, the overlapping type is determined to be either the end segment being fully covered or the end segment being partially covered, based on the length of the intersecting segment between the mutually overlapping area and the end segment.
[0119] Specifically, using the end line segment in the outline of the first vector graphic as a reference, the overlapping type is determined based on whether the end line segment intersects with the overlapping area. If the end line segment does not intersect with the overlapping area, the overlapping type is determined to be that the end line segment is not covered, meaning the overlapping area is concentrated on the side of the first vector graphic. If the end line segment intersects with the overlapping area, the overlapping type between the first and second vector graphics can be further determined based on the length of the intersecting line segment between the overlapping area and the end line segment. Specifically, the ratio of the length of the intersecting line segment to the total length of the end line segment is calculated. If the ratio is greater than a third preset threshold, the overlapping type is determined to be that the end line segment is fully covered. If the ratio is less than the third preset threshold, the overlapping type is determined to be that the end line segment is partially covered. Taking the third preset threshold of 99% as an example, if the ratio of the length of the intersecting line segment to the total length of the end line segment is greater than 99%, the overlay type is that the end line segment is fully overlaid; if the ratio of the length of the intersecting line segment to the total length of the end line segment is less than 99%, the overlay type is that the end line segment is partially overlaid.
[0120] Reference Figure 11 , Figure 11 It includes a first vector graphic of the road and a second vector graphic of the building. The first vector graphic of the road includes the road centerline. Figure 11 (The dotted lines in the text). It can be seen that... Figure 11 The three images represent the types of overlay from left to right: the end segment is not overlaid, the end segment is fully overlaid, and the end segment is partially overlaid.
[0121] Taking the capping type as an example, including the end segment being fully capped, the end segment being partially capped, and the end segment not being capped, in one embodiment, such as Figure 3 As shown, step S104 includes:
[0122] S301, if the type of overlay is that the end line segment is not overlaid, determine the degree of overlay depth between the first vector graphic and the second vector graphic;
[0123] Specifically, if the overlap between the first and second vector graphics falls under the overlap type where the end line segment is not overlapped, the overlap depth between the first and second vector graphics is determined based on the overlap area, using the first vector graphic as a reference. Determining the overlap depth based on the overlap area can be as follows: Determine the central region of the first vector graphic. The central region refers to the area within a specified distance centered on the incenter of the first vector graphic. For example, the central region could be a circular area with the incenter of the first vector graphic as its center and a specified distance as its radius. The incenter of the first vector graphic is the center of its inscribed circle, and the specified distance is less than or equal to the radius of the inscribed circle. If the central region at least partially overlaps with the overlap area, it indicates that the first vector graphic is overlapped to a relatively deep degree, and the overlap depth is determined as deep overlap. If the central region does not overlap with the overlap area, it indicates that the first vector graphic is overlapped to a relatively shallow degree, and the overlap depth is determined as shallow overlap. The central region of the first vector graphic can be the area within a certain distance of the center point of the first vector graphic. Taking the first vector graphic as the vector graphic of the road as an example, the central region of the first vector graphic refers to the center line of the road.
[0124] S302, if the degree of overlap is shallow overlap, the second vector graphic is determined to be inaccurate, and the second vector graphic is adjusted according to the mutual overlap area to eliminate the mutual overlap area;
[0125] Since the overlay type is determined based on the first vector graphic, the second vector graphic is inaccurate when the end line segment is not overlaid and the overlay depth is shallow. Based on the mutual overlay area, the outline of the second vector graphic is adjusted until there is no mutual overlay area between the first vector graphic and the second vector graphic.
[0126] S303, if the degree of overlap is a deep overlap, it is determined that both the first vector graphic and the second vector graphic are inaccurate, and the outlines of the first vector graphic and the second vector graphic are adjusted according to the mutual overlap area to eliminate the mutual overlap area.
[0127] Specifically, if the depth of the overlay is described as deep overlay, a deeper overlay is due to inaccuracies in both the first and second vector graphics. Therefore, the outlines of both the first and second vector graphics are adjusted until there are no overlapping areas between them.
[0128] An example of adjusting the outlines of the first vector graphic and / or the second vector graphic is as follows: When the overlay type is that the end line segments are not overlaid, the number of endpoints in the outline of the second vector graphic contained in the mutually overlaid area is obtained based on the first vector graphic. The outline of the second vector graphic is formed by splicing multiple line segments, and the endpoints of the line segments in the second vector graphic outline are the endpoints in the second vector graphic outline. If the overlay depth is deep overlay, the outlines of the first and second vector graphics are adjusted according to the number of endpoints in the outline of the second vector graphic contained in the mutually overlaid area. If the overlay depth is shallow overlay, the outline of the second vector graphic is adjusted according to the number of endpoints in the outline of the second vector graphic contained in the mutually overlaid area. The number of endpoints in the outline of the second vector graphic contained in the mutually overlaid area can be categorized as follows: 0 endpoints, 1 endpoint, 2 endpoints, 3 endpoints or more. Figure 12-15 As shown, Figure 12 The number of endpoints in the second vector graphic outline contained in the overlapping areas is 0. Figure 13 The number of endpoints in the second vector graphic outline contained in the overlapping areas is 1. Figure 14 The number of endpoints in the second vector graphic outline contained in the overlapping areas is 2. Figure 15 The number of endpoints in the second vector graphic outline contained in the overlapping areas is 3.
[0129] If the overlap depth is a deep overlap, then the outlines of the first vector graphic and the second vector graphic are adjusted based on the number of endpoints in the outline of the second vector graphic contained in the overlapping areas. This adjustment may include:
[0130] (1) If the number of endpoints is 0, such as Figure 12 As shown, adjustments to the first and second vector graphics are skipped to avoid distortion due to over-adjustment.
[0131] (2) If the number of endpoints is 1, such as Figure 13As shown, since the road centerline is not necessarily a perfectly straight line, but rather formed by splicing together multiple line segments, adjusting the outline of the first vector graphic includes: determining the intersection point of the first and second vector graphic outlines; traversing and searching each line segment in the road centerline to determine at least one line segment closest to the intersection point, and using each of these as the target line segment. If only one target line segment exists, then the symmetrical point of the intersection point relative to the target line segment is determined. Since both the first and second vector graphic outlines are adjusted simultaneously during depth overlay, the distance between the symmetrical point and the target line segment is generally half the distance between the intersection point and the target line segment. That is, the symmetrical point of the intersection point relative to the target line segment is determined at a preset specific distance (half the distance between the intersection point and the target line segment). The symmetrical point is connected to the two endpoints of the target line segment to form a new line segment used to replace the target line segment. The new line segment replaces the target line segment, resulting in the adjusted road centerline. If there are at least two target line segments that are spliced sequentially, then determine the symmetrical point of the intersection point relative to each target line segment, and connect each symmetrical point sequentially to form a new line segment to replace the target line segment. Then, in the endpoints of the other line segments in the road centerline, except for the target line segment, connect the endpoints used to connect the target line segment to the endpoints of the new line segment to replace the target line segment with the new line segment, thereby forming an adjusted road centerline. When replacing the target line segment with the new line segment, it is necessary to ensure that there are no two intersecting line segments in the adjusted road centerline. The adjusted road centerline undergoes an anomaly angle check. Specifically, using each symmetrical point as an initial angle point, the azimuth angle between the initial angle point and the preceding endpoint connected to it, and the azimuth angle between the initial angle point and the following endpoint connected to it, are calculated. The larger azimuth angle is subtracted from the smaller azimuth angle to obtain the included angle. If this included angle is greater than an extreme angle threshold (which can be 135°), it indicates that the change between the adjusted road centerline and the original road centerline is not excessive, and the adjusted road centerline is deemed acceptable. After the adjusted road centerline is deemed acceptable, it is expanded into a planar vector graphic according to the preset road width value. The planar vector graphic obtained by expanding the adjusted road centerline is the first adjusted vector graphic.The adjustment of the outline of the second vector graphic includes: traversing and searching the multiple line segments contained in the outline of the second vector graphic to determine the two line segments that intersect with the outline of the first vector graphic; then traversing and searching each line segment in the road centerline to determine the target line segment closest to the intersection point; calculating the angle between the target line segment and the two line segments respectively; filtering the two line segments based on the distribution of the two angles: when either angle is less than 30° or either angle is greater than 60°, retaining the line segment with the smallest angle to the target line segment; otherwise, retaining both line segments simultaneously; using the retained line segments as the line segments to be translated; orthogonally translating the line segments to be translated away from the first vector graphic along the orthogonal direction of the line segments to be translated until the line segments to be translated no longer intersect the outline of the first vector graphic, thus obtaining the adjusted second vector graphic.
[0132] (3) If the number of endpoints is 2, such as Figure 14 As shown, the adjustment method for the outline of the first vector graphic is the same as that for the first vector graphic with only one endpoint. The adjustment of the outline of the second vector graphic includes: traversing and searching the multiple line segments contained in the outline of the second vector graphic to determine the three line segments that intersect with the outline of the first vector graphic; among these three line segments, retaining the point between the two endpoints of the second vector graphic inside the first vector graphic that is closer to the road centerline, and then determining the two line segments that intersect with that point; traversing and searching each line segment in the road centerline to determine the target line segment closest to the intersection point; and calculating the angle between the target line segment and the two line segments. The two line segments are filtered based on the distribution of the included angles: if either included angle is less than 30° or either included angle is greater than 60°, the line segment with the smaller included angle to the target line segment is retained; otherwise, both line segments are retained. The retained line segment is used as the line segment to be translated. The line segment to be translated is orthogonally translated away from the first vector graphic along the orthogonal direction of the line segment to be translated until the line segment to be translated does not intersect the outline of the first vector graphic, thus obtaining the adjusted second vector graphic.
[0133] (4) If the number of endpoints is 3 or more, such as Figure 15As shown, the adjustment method for the outline of the first vector graphic is the same as the adjustment method for the first vector graphic when the number of endpoints is 1. The adjustment of the outline of the second vector graphic includes: calculating the farthest vertical distance from each endpoint of the second vector graphic outline in the first vector graphic to the center line of the road, adding the farthest vertical distance to the preset road width value of the road as the translation distance; taking the straight line formed by the two points where the second vector graphic outline intersects with the first vector graphic outline as a reference, and along the direction perpendicular to the straight line, translating all points in the second vector graphic that fall within the first vector graphic in a direction away from the first vector graphic according to the translation distance, to obtain the adjusted second vector graphic.
[0134] If the overlap depth is shallow, the outline of the second vector graphic is adjusted based on the number of endpoints in the outline of the second vector graphic contained in the overlapping areas. This adjustment may include:
[0135] (1) If the number of endpoints is 0, the adjustment of the outline of the second vector graphic includes: Figure 16 As shown, the two endpoints of the line segments in the second vector graphic contour that are overlapped by the first vector graphic are determined, and the maximum length of each line segment in the overlapping area contour that is less than the preset road width value is determined. The overlapping line segments in the second vector graphic contour are orthogonally translated away from the first vector graphic to obtain the adjusted second vector graphic. The translation distance is the maximum length calculated above. Figure 16 As shown, the left side shows the first and second vector graphics before adjustment, and the right side shows the first and second vector graphics after adjustment.
[0136] (2) If the number of endpoints is 1, the adjustment method of the outline of the second vector graphic is the same as the adjustment method of the outline of the second vector graphic when the coverage depth is deep coverage and the number of endpoints is 1.
[0137] (3) If the number of endpoints is 2, the adjustment method of the outline of the second vector graphic is the same as the adjustment method of the outline of the second vector graphic when the coverage depth is deep coverage and the number of endpoints is 2.
[0138] (4) If the number of endpoints is 3 or more, the adjustment method of the outline of the second vector graphic is the same as the adjustment method of the outline of the second vector graphic when the coverage depth is deep coverage and the number of endpoints is 3.
[0139] Furthermore, after implementing the overlap removal strategy to eliminate the overlap between the first and second vector graphics, the execution of the overlap removal strategy can be checked to determine if it is successful. Specifically, the first area of the second vector graphic after implementing the overlap removal strategy and the second area of the second vector graphic before implementing the overlap removal strategy are obtained, and the area ratio between the first and second areas is determined. If the area ratio is greater than a preset ratio, it indicates that the adjustment range of the second vector graphic is small, the overlap removal strategy is deemed successful, and the second vector graphic obtained after implementing the overlap removal strategy is used to return to step S101. If the area ratio is less than or equal to the preset ratio, it indicates that the adjustment range of the second vector graphic is large, and the difference between the adjusted second vector graphic and the actual ground features is large, the overlap removal strategy is deemed unsuccessful, and the adjustment of the outline of the second vector graphic is canceled and skipped.
[0140] In some embodiments, if the overlap type is that the end segment is fully overlapped, indicating that the overlap is caused by inaccuracy at the end of the first vector graphic, the first vector graphic is determined to be inaccurate. Based on the overlap area, the outline of the first vector graphic is adjusted until there is no overlap area between the first and second vector graphics. Taking a preset vector graphic where the road is located as an example, the steps for adjusting the outline of the first vector graphic include: Figure 17 As shown, the road centerline in the first vector graphic is obtained, and the length of the road centerline in the overlapping areas is determined. If this length is less than a preset length, at least the portion of the first vector graphic belonging to the overlapping areas is deleted. Figure 17 As shown, the left side shows the first and second vector graphics before adjustment, and the right side shows the first and second vector graphics after adjustment. When the length is greater than or equal to the preset length, deleting the overlapping areas in the first vector graphic would cause the adjustment of the first vector graphic to be too large, which would not match the actual ground features. Therefore, the adjustment of the first vector graphic is skipped, and the overlapping between the first and second vector graphics is retained.
[0141] In some embodiments, if the overlap type is partial overlap of the end segment, the overlap may be caused by inaccuracy of the end portion of the first vector graphic or by inaccuracy of the second vector graphic. Therefore, the overlap depth between the first and second vector graphics is determined. If the overlap depth is deep, indicating a large overlap, the overlap is determined to be caused by inaccuracy of the end portion of the first vector graphic, and the first vector graphic is determined to be inaccurate. Based on the overlap area, the outline of the first vector graphic is adjusted until there is no overlap area between the first and second vector graphics. The adjustment method for the first vector graphic is the same as the adjustment method for the first vector graphic when the overlap type is full overlap of the end segment. If the overlap depth is shallow, indicating a small overlap, the overlap is determined to be caused by inaccuracy of the second vector graphic, and the second vector graphic is determined to be inaccurate. Based on the overlap area, the outline of the second vector graphic is adjusted until there is no overlap area between the first and second vector graphics. Taking the first vector graphic as an example, which represents the road, the steps for adjusting the outline of the second vector graphic include: Figure 18 As shown, the process iterates through each segment of the road centerline to determine the target segment closest to the intersection point; it identifies the two edges in the second vector graphic that intersect the outline of the first vector graphic, obtaining the azimuth angles of these two edges; it subtracts the azimuth angle of the target segment from the azimuth angles of these two edges to obtain the angles between the target segment and each edge, retaining the edge with the smaller angle as the translation edge of the second vector graphic; it determines the maximum length of each segment in the overlapping area outline that is less than the preset road width. The segment corresponding to the translation edge of the second vector graphic is orthogonally translated away from the first vector graphic to obtain the adjusted second vector graphic, with the translation distance being the previously calculated maximum length. Figure 18 As shown, the left side shows the first and second vector graphics before adjustment, and the right side shows the first and second vector graphics after adjustment.
[0142] It should be noted that the specific adjustment methods for the outlines of the first and second vector graphics described above are applied under the premise that the first vector graphic is the vector graphic containing roads and the second vector graphic is the vector graphic containing buildings. For the outline adjustment methods of other preset vector graphics besides the preset vector graphics containing roads and buildings, adjustments can be made adaptively according to the actual situation. After the outline adjustment, overlapping areas can be eliminated.
[0143] In one embodiment, such as Figure 4 As shown, step S102 includes:
[0144] S401, determine the feature category to which the feature elements of each preset vector graphic in the preset vector graphic set belong;
[0145] The feature elements belong to multiple categories, including buildings, roads and their ancillary facilities, public facilities, pipelines and fences, water systems and their ancillary facilities, etc.
[0146] S402, the preset vector graphic set is divided according to the element category to obtain multiple preset vector graphic subsets, wherein the feature elements of the preset vector graphics in different preset vector graphic subsets belong to different element categories;
[0147] Specifically, the preset vector graphics sets containing features of the same feature category are grouped into the same preset vector graphics subset, while preset vector graphics containing features of different feature categories are grouped into different preset vector graphics subsets, thus obtaining multiple preset vector graphics subsets. For example, after dividing the preset vector graphics set, preset vector graphics subsets corresponding to buildings and preset vector graphics subsets corresponding to roads are obtained.
[0148] S403, based on whether the preset vector graphics in different vector graphic subsets at least partially overlap, determine the first vector graphic and the second vector graphic that have mutual overlap, wherein the first vector graphic and the second vector graphic belong to different preset vector graphic subsets.
[0149] It is understandable that when conducting field measurements of ground features, different feature categories are measured using different methods. Therefore, overlap often occurs between preset vector graphics containing features of different categories. Thus, overlap detection is performed on preset vector graphics within different subsets of vector graphics. This involves determining the first and second vector graphics that overlap based on whether the preset vector graphics in different subsets at least partially overlap.
[0150] In one embodiment, a topology checking technique commonly used in Geographic Information Systems (GIS) is employed to detect whether preset vector graphics in different vector graphics subsets at least partially overlap. Topology checking refers to checking the topology of point, line, and polygon datasets themselves and their interactions for objects that do not conform to topological rules. By setting the topology rules to prevent overlap and applying them to different vector graphics subsets, a first vector graphic and a second vector graphic that overlap are obtained after topology checking.
[0151] The specific logic of topology checking is as follows: Taking the vector graphic subsets of feature type "building" and feature type "road" as examples, the vector graphic subset of feature type "building" is used as the building dictionary, and the vector graphic subset of feature type "road" is used as the road dictionary. A preset overlay unit dictionary is initialized. The preset overlay unit dictionary includes multiple overlay groups. Each overlay group includes one (or more) buildings and one (or more) roads that overlap. The current overlay count and an array for recording the road numbers that overlap. The preset vector graphics of each building in the building dictionary and the preset vector graphics of each road in the road dictionary are traversed to determine whether the preset vector graphics of each building and each road at least partially overlap. If they at least partially overlap, the road number of the current road is recorded, and the current overlay count is updated. After traversing the preset vector graphics of the current building and all roads, the array of recorded road numbers is checked to see if each road number already exists in the overlay unit dictionary. Specifically, the road number in the array is determined, and the overlay unit dictionary is searched for. If the road number is found, the building number of the current building's preset vector graphics is recorded in the overlay group containing that road number. Then, the traversal of the preset vector graphics of the next building and all roads is performed. If the road number is not found in the overlay unit dictionary, a new overlay group is created, recording both the building number and the road number of the current building's preset vector graphics. After traversing all preset vector graphics of all buildings and all roads, an overlay unit dictionary containing multiple overlay groups is obtained. Based on the number of building and road numbers in a single overlay group, the multiple overlay groups in the overlay unit dictionary are divided as follows: Figure 8 The diagram shows four types of overlapping groups: one-to-one, one-to-many, many-to-one, and many-to-many. One-to-one refers to a situation where the preset vector graphic of a single building overlaps with the preset vector graphic of a single road. For situations like one-to-many, many-to-one, and many-to-many where multiple preset vector graphics overlap with at least one, these situations are divided into multiple one-to-one overlapping groups. The preset vector graphic corresponding to the road number in the same overlapping group is designated as the first vector graphic, and the preset vector graphic corresponding to the building number in the same overlapping group is designated as the second vector graphic, thus obtaining the first and second vector graphics that overlap.
[0152] like Figure 5 As shown, this application embodiment provides an overlay removal device 500 for electronic map elements, including:
[0153] The graphic acquisition module 510 is used to acquire preset vector graphics of various features in the electronic map of the target area, and obtain a preset vector graphic set.
[0154] The overlapping detection module 520 is used to determine, from a preset set of vector graphics, a first vector graphic and a second vector graphic that overlap each other.
[0155] The capping classification module 530 is used to determine the capping type to which the mutual capping situation between the first vector graphic and the second vector graphic belongs;
[0156] The capping elimination module 540 is used to determine the capping elimination strategy of the capping type and execute the capping elimination strategy to eliminate the mutual capping between the first vector graphic and the second vector graphic.
[0157] In this embodiment, the graphic acquisition module 510 of the electronic map feature overlay removal device 500 acquires preset vector graphics of various features in the electronic map of the target area, obtaining a preset vector graphic set. The overlay detection module 520 identifies a first vector graphic and a second vector graphic that are mutually overlaying in the preset vector graphic set. The overlay classification module 530 determines the overlay type of the mutual overlay between the first vector graphic and the second vector graphic. The overlay removal module 540 determines the overlay removal strategy for the overlay type and executes the overlay removal strategy to eliminate the mutual overlay between the first vector graphic and the second vector graphic. This eliminates the need for manual overlay removal, thereby improving the efficiency and accuracy of overlay removal.
[0158] In some embodiments of this application, the overlay classification module 530 is specifically used to determine the end line segments in the outline of the first vector graphic, wherein the outline of the first vector graphic includes end line segments and side line segments; determine the mutual overlay areas of the first vector graphic and the second vector graphic; if the end line segment intersects with the mutual overlay area, determine the overlay type as the end line segment being fully overlaid or the end line segment being partially overlaid based on the length of the intersecting line segment between the mutual overlay area and the end line segment; if the end line segment does not intersect with the mutual overlay area, determine the overlay type as the end line segment not being overlaid.
[0159] In some embodiments of this application, the overprint elimination module 540 is further configured to: determine the degree of overprinting between the first vector graphic and the second vector graphic if the overprinting type is that the end line segment is not overprinted; if the degree of overprinting is shallow overprinting, determine that the second vector graphic is inaccurate, and adjust the outline of the second vector graphic according to the mutual overprinting area to eliminate the mutual overprinting area; if the degree of overprinting is deep overprinting, determine that both the first vector graphic and the second vector graphic are inaccurate, and adjust the outline of the first vector graphic and the outline of the second vector graphic according to the mutual overprinting area to eliminate the mutual overprinting area.
[0160] In some embodiments of this application, the overlay elimination module 540 is further configured to determine the central region of the first vector graphic; if the central region and the mutually overlapping regions at least partially overlap, the degree of overlay between the first vector graphic and the second vector graphic is determined to be a deep overlay; if the central region and the mutually overlapping regions do not overlap, the degree of overlay between the first vector graphic and the second vector graphic is determined to be a shallow overlay.
[0161] In some embodiments of this application, the overlap elimination module 540 is further configured to: determine, among the multiple line segments included in the outline of the second vector graphic, the line segment edges intersecting with the first vector graphic; determine, among the line segments intersecting with the first vector graphic, the line segment edges that need to be translated; and translate the line segment edges that need to be translated along the orthogonal direction of the line segment edges that need to be translated, until the overlapping areas are eliminated.
[0162] In some embodiments of this application, the overlay removal module 540 is further configured to: determine the intersection point of the outline of the first vector graphic and the outline of the second vector graphic; determine the target line segment closest to the intersection point among the multiple line segments included in the road centerline; determine the symmetrical point of the intersection point relative to the target line segment; generate a new line segment to replace the target line segment based on the symmetrical point, the new line segment including the symmetrical point; replace the target line segment with the new line segment to obtain the adjusted road centerline; and adjust the outline of the first vector graphic based on the adjusted road centerline.
[0163] In some embodiments of this application, the device for removing overlays of electronic map elements further includes an inspection module. The inspection module is used to obtain the first area of the second vector graphic after the overlay removal strategy is executed, and the second area of the second vector graphic before the overlay removal strategy is executed; determine the area ratio between the first area and the second area; and if the area ratio is greater than a preset ratio, determine that the overlay removal strategy is executed successfully.
[0164] In some embodiments of this application, the overlay elimination module 540 is further configured to determine that the first vector graphic is inaccurate if the overlay type is that the end line segment is fully overlaid, and adjust the outline of the first vector graphic according to the mutual overlay area to eliminate the mutual overlay area.
[0165] In some embodiments of this application, the overprint elimination module 540 is further configured to: determine the degree of overprinting between the first vector graphic and the second vector graphic if the overprinting type is that the end line segment is partially overprinted; if the degree of overprinting is shallow overprinting, determine that the second vector graphic is inaccurate, and adjust the outline of the second vector graphic according to the mutual overprinting area to eliminate the mutual overprinting area; if the degree of overprinting is deep overprinting, determine that the first vector graphic is inaccurate, and adjust the outline of the first vector graphic according to the mutual overprinting area to eliminate the mutual overprinting area.
[0166] In some embodiments of this application, the overlap elimination module 540 is further configured to delete portions of the first vector graphic that belong to the mutually overlapping areas, so as to eliminate the mutually overlapping areas.
[0167] In some embodiments of this application, the overlay detection module 520 is specifically used to determine the feature category to which the feature elements of each preset vector graphic in the preset vector graphic set belong; divide the preset vector graphic set according to the feature category to obtain multiple preset vector graphic subsets, wherein the feature elements of the preset vector graphics in different preset vector graphic subsets belong to different feature categories; determine the first vector graphic and the second vector graphic that have mutual overlay based on whether the preset vector graphics in different vector graphic subsets at least partially overlap; wherein the first vector graphic and the second vector graphic belong to different preset vector graphic subsets.
[0168] In some embodiments of this application, the electronic map feature overlay removal device 500 can be implemented as a computer program, which can be implemented in, for example... Figure 6 The computer device shown runs on this computer. The computer device's memory can store the various program modules of the overlay removal 500 that make up the electronic map elements, for example, Figure 5 The diagram shows a graphic acquisition module 510, a capping detection module 520, a capping classification module 530, and a capping removal module 540. The computer program comprised of these modules causes the processor to execute the steps in the capping removal methods for electronic map elements of the various embodiments of this application described in this specification.
[0169] For example, Figure 6 The computer equipment shown can be used as follows Figure 5 The image acquisition module 510 in the electronic map feature overlay removal device 500 executes step S101. The computer device can execute step S102 via the overlay detection module 520. The computer device can execute step S103 via the overlay classification module 530. The computer device can execute steps S104 and S105 via the overlay removal module 540. The computer device includes a processor, memory, and a network interface connected via a system bus. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communication with external computer devices via a network connection. When the computer program is executed by the processor, it implements an electronic map feature overlay removal method.
[0170] Those skilled in the art will understand that Figure 6The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0171] In some embodiments of this application, a computer device is provided, including one or more processors; a memory; and one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor as steps of the above-described method for removing overlays of electronic map features. The steps of the method for removing overlays of electronic map features here may be steps from the methods for removing overlays of electronic map features in the various embodiments described above.
[0172] In some embodiments of this application, a computer-readable storage medium is provided, storing a computer program that is loaded by a processor, causing the processor to execute the steps of the above-described method for removing overlays of electronic map elements. The steps of the method for removing overlays of electronic map elements here can be the steps in the methods for removing overlays of electronic map elements described in the various embodiments above.
[0173] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0174] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0175] The above provides a detailed description of the method for eliminating overlay of electronic map elements and the storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for eliminating overlay of electronic map elements, characterized in that, The method includes: Obtain the preset vector graphics of each feature in the electronic map of the target area to obtain a preset vector graphics set; In the preset set of vector graphics, a first vector graphic and a second vector graphic that overlap each other are identified; Determine the overlap type of the mutual overlap between the first vector graphic and the second vector graphic. The outline of the first vector graphic includes end segments. The overlap type is determined based on the relationship between the end segments and the mutual overlap areas of the first vector graphic and the second vector graphic. The overlap type includes the end segments being fully overlapped, the end segments being partially overlapped, or the end segments not being overlapped. Determine the cap removal strategy for the cap type; The overlay elimination strategy is executed to eliminate the mutual overlay between the first vector graphic and the second vector graphic.
2. The method for eliminating overlay of electronic map elements as described in claim 1, characterized in that, Determining the overlap type of the mutual overlap between the first vector graphic and the second vector graphic includes: The end line segment in the outline of the first vector graphic is determined, wherein the outline of the first vector graphic includes the end line segment and the side line segment; Determine the overlapping area between the first vector graphic and the second vector graphic; If the end segment intersects with the mutually overlapping area, the overlapping type is determined to be either the end segment being fully covered or the end segment being partially covered, based on the length of the intersecting segment between the mutually overlapping area and the end segment. If the end segment does not intersect with the mutually overlapping area, the overlapping type is determined to be that the end segment is not covered.
3. The method for eliminating overlay of electronic map elements as described in claim 2, characterized in that, The execution of the overlay elimination strategy to eliminate the mutual overlay between the first vector graphic and the second vector graphic includes: If the overlay type is that the end line segment is not overlaid, determine the overlay depth between the first vector graphic and the second vector graphic; If the overlapping depth is shallow, the second vector graphic is determined to be inaccurate, and the outline of the second vector graphic is adjusted according to the overlapping area to eliminate the overlapping area. If the overlapping depth is a deep overlapping, it is determined that both the first vector graphic and the second vector graphic are inaccurate, and the outlines of the first vector graphic and the second vector graphic are adjusted according to the overlapping area to eliminate the overlapping area.
4. The method for eliminating overlay of electronic map elements as described in claim 3, characterized in that, Determining the overlap depth between the first vector graphic and the second vector graphic includes: Determine the central region of the first vector graphic; If the central region and the mutually overlapping region at least partially overlap, the overlapping depth between the first vector graphic and the second vector graphic is determined as a depth overlap. If the central region does not overlap with the mutually overlapping region, the overlapping depth between the first vector graphic and the second vector graphic is determined to be shallow overlapping.
5. The method for eliminating overlay of electronic map elements as described in claim 3, characterized in that, The adjustment of the outline of the second vector graphic includes: Among the multiple line segments contained in the outline of the second vector graphic, determine the line segment that intersects with the first vector graphic; Among the line segments that intersect with the first vector graphic, determine the line segments that need to be translated; Translate the line segment to be translated along the orthogonal direction of the line segment to be translated until the overlapping area is eliminated.
6. The method for eliminating overlay of electronic map elements as described in claim 3, characterized in that, The first vector graphic represents a road feature. The first vector graphic includes the road centerline, which is formed by splicing multiple line segments. Adjusting the outline of the first vector graphic includes: Determine the intersection point of the outline of the first vector graphic and the outline of the second vector graphic; Among the multiple line segments contained in the road centerline, determine the target line segment closest to the intersection point; Determine the point symmetrical to the intersection point relative to the target line segment; Based on the symmetry point, a new line segment is generated to replace the target line segment, and the new line segment includes the symmetry point. The target line segment is replaced with the new line segment to obtain the adjusted road centerline. Based on the adjusted road centerline, adjust the outline of the first vector graphic.
7. The method for eliminating overlay of electronic map elements as described in claim 3, characterized in that, After implementing the overlay elimination strategy to eliminate the mutual overlay between the first vector graphic and the second vector graphic, the method further includes: Obtain the first area of the second vector graphic after the overprinting elimination strategy is executed, and the second area of the second vector graphic before the overprinting elimination strategy is executed; Determine the area ratio between the first area and the second area; If the area ratio is greater than the preset ratio, the execution of the overprinting elimination strategy is deemed qualified.
8. The method for eliminating overlay of electronic map elements as described in claim 2, characterized in that, The execution of the overlay elimination strategy to eliminate the mutual overlay between the first vector graphic and the second vector graphic includes: If the overlapping type is that the end line segment is completely covered, the first vector graphic is determined to be inaccurate, and the outline of the first vector graphic is adjusted according to the overlapping area to eliminate the overlapping area.
9. The method for eliminating overlay of electronic map elements as described in claim 2, characterized in that, The execution of the overlay elimination strategy to eliminate the mutual overlay between the first vector graphic and the second vector graphic includes: If the type of overlay is that the end line segment is partially overlaid, determine the depth of overlay between the first vector graphic and the second vector graphic; If the overlapping depth is shallow, the second vector graphic is determined to be inaccurate, and the outline of the second vector graphic is adjusted according to the overlapping area to eliminate the overlapping area. If the overlapping depth is considered to be deep overlapping, the first vector graphic is determined to be inaccurate, and the outline of the first vector graphic is adjusted according to the overlapping areas to eliminate the overlapping areas.
10. The method for eliminating overlay of electronic map elements as described in claim 8 or 9, characterized in that, Adjusting the outline of the first vector graphic to eliminate the overlapping areas includes: Delete the portion of the first vector graphic that belongs to the overlapping area to eliminate the overlapping area.
11. The method for eliminating overlay of electronic map elements as described in claim 1, characterized in that, The step of determining, within the preset set of vector graphics, a first vector graphic and a second vector graphic that overlap each other includes: Determine the feature category to which the feature elements of each preset vector graphic in the preset vector graphic set belong; According to the aforementioned feature categories, the preset vector graphic set is divided into multiple preset vector graphic subsets, wherein the feature features of the preset vector graphics in different preset vector graphic subsets belong to different feature categories; Based on whether the preset vector graphics in different vector graphic subsets at least partially overlap, the first vector graphic and the second vector graphic that have mutual overlap are determined; The first vector graphic and the second vector graphic belong to different preset vector graphic subsets.
12. A computer-readable storage medium, characterized in that, It stores a computer program, which is loaded by a processor to perform the steps in the method for removing overlays of electronic map features according to any one of claims 1 to 11.
Citation Information
Patent Citations
Topological check-based map annotation capping automatic identification method and device, and medium
CN113704313A
Base map generation method and device of electronic map
CN113989413A