Point annotation sparse method based on importance sorting in WebGIS system
Through the sparse point annotation method based on importance sorting in the WebGIS system, the conflict and glanding problems of point annotation when reducing the scale are solved, the processing efficiency and visualization effect are improved, and the highlighting of important information is achieved.
Patent Information
- Application Number
- CN202510139629.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2025-03-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In WebGIS system, as the map scale shrinks, point notes are prone to conflicts and gauges. The existing technology is difficult to effectively solve this problem, and it is impossible to take into account the practicality and readability of visual results.
A sparse method for point annotation based on importance sorting is proposed. By dividing point features into two categories: must be displayed and non-must display, and sorting them according to importance, sparse processing is performed in combination with map hierarchy and browser window display range to separate point features and annotation sparse logic.
It effectively reduces the amount of data processing, improves processing efficiency, takes into account the aesthetics and practicality of visual results, prevents conflicts and glands between graphics and annotations, and highlights important information.
Smart Images

Figure CN119576906A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of automatic configuration of map annotations, and in particular relates to a point annotation sparse method based on importance sorting in a WebGIS system. Background Art
[0002] Map annotations are an important part of maps. Clear and correct annotations can help readers quickly understand the map content. As the map scale decreases, map annotations will conflict and overlap. In WebGIS systems, maps are often used as base maps. People are more concerned about visualizing the results of some practical application scenarios on the map. The visualization methods usually include points, lines, and surfaces, and are accompanied by text to emphasize and explain. As the scale decreases, these visualization results will also conflict and overlap, but the solution is different from the conflict resolution strategy of ordinary map annotations. It pays more attention to the coverage between the result data and the highlighting of key results, and usually only one analysis result is loaded at a time. Therefore, there is less need to consider overlapping with other layers, and it is impossible to improve the existing map annotation automatic configuration method. The processing speed of point annotations is low, and it is also impossible to take into account the practicality and readability of the visualization results. Summary of the invention
[0003] In view of this, the present invention aims to propose a point annotation sparse method based on importance sorting in a WebGIS system to solve at least one problem existing in the above-mentioned prior art.
[0004] To achieve the above object, the technical solution of the present invention is achieved as follows: A point annotation sparse method based on importance sorting in a WebGIS system includes data preparation and sparse processing. The data preparation includes the following steps: S1. Divide point elements into those that must be displayed and those that are not required to be displayed; S2. Setting the relationship between the display of point elements and the map level; S3, according to the map range displayed in the browser window, extract the point features within the map range, and store the extracted point features into featureList; S4. Define two arrays: allcollisionList and textList; Sparse processing includes the following steps: A1. Traverse all point features in featureList and obtain the outer bounding rectangle of the i-th point feature and annotation; A2, obtain the current map level, and determine whether the i-th point feature is displayed in this map level. If not, return to step A1; if so, proceed to step A3; A3, determine whether the i-th point feature must be displayed. If yes, directly draw this point feature on the map, add the outer rectangle of the i-th point feature to allcollisionList, and jump to step A5; if no, proceed to step A4; A4. Traverse allcollisionList and check whether the outer bounding rectangle of the i-th point element intersects with the outer bounding rectangles in allcollisionList. If there is an intersection, return to step A1; if there is no intersection, draw this point element on the map and add the outer bounding rectangle of the i-th point element to allcollisionList; A5. Traverse textList and determine whether the outer bounding rectangle of the ith annotation intersects with the outer bounding rectangle in textList. If so, return to step A1; if not, draw the annotation on the map and add the outer bounding rectangle of the ith annotation to textList and allcollisionList.
[0005] Furthermore, in step S1, it is necessary to display the point elements for which the graphics are not subjected to sparse processing and the annotations are subjected to sparse processing.
[0006] Furthermore, in step S1, it is not necessary to display point elements that refer to both graphics and annotations that are sparsely processed.
[0007] Furthermore, in step S1, the point elements that are not required to be displayed are sorted in descending order of importance.
[0008] Furthermore, in step S2, the display level of the point element is set according to the map level of 0-18 in the WebGIS system.
[0009] Furthermore, in step S3, featureList is an empty array.
[0010] Furthermore, in step S4, allcollisionList stores the outer bounding rectangles of all point elements and all annotations loaded on the map; textList only stores the outer bounding rectangles of all annotations.
[0011] Compared with the prior art, the point annotation sparse method based on importance sorting in a WebGIS system described in the present invention has the following advantages: (1) The present invention discloses a point annotation sparse method based on importance sorting in a WebGIS system. The present invention extracts point elements and their annotations within the map range displayed in the browser window and performs sparse processing, thereby reducing the amount of data processing and improving processing efficiency.
[0012] (2) The present invention discloses a point annotation sparse method based on importance sorting in a WebGIS system. The present invention separates the sparse logic of point features and annotations, which enables annotations to be sparse without affecting the display of analysis results, thus taking into account both the aesthetics and practicality of the visualization results.
[0013] (3) The present invention discloses a point annotation sparse method based on importance sorting in a WebGIS system. The present invention sets a relationship between the analysis result display and the map level, and can manually set the highlighting of important information.
[0014] (4) The present invention discloses a point annotation sparse method based on importance sorting in a WebGIS system. The present invention divides land features into two categories: necessary and non-essential, and sorts the importance of non-essential land features. This can prevent spatial overlap during thinning while taking into account the semantic features of the land features, making the sparse logic more reasonable. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings: Figure 1 A schematic diagram of the method flow of the embodiment of the present invention; Figure 2 A schematic diagram of a route according to an embodiment of the present invention; Figure 3 A schematic diagram showing all routes according to an embodiment of the present invention; Figure 4 A schematic diagram showing a portion of a route according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the final route described in an embodiment of the present invention. DETAILED DESCRIPTION
[0016] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0017] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and the like are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", and the like may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0018] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood by specific circumstances.
[0019] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0020] like Figure 1 As shown in FIG. 1 , a point annotation sparse method based on importance sorting in a WebGIS system includes two parts: data preparation and sparse processing. The data preparation specifically includes the following steps: 1. Divide point features into two categories: must-display and non-must-display. "Must-display" refers to point features that are not sparsely processed in graphics but sparsely processed in annotations, and "non-must-display" refers to point features that are sparsely processed in both graphics and annotations. For example, when visualizing a ship's route, the ship's turning point is more important and needs to be set as must-display, while other passing points can be set as non-must-display. Then, sort the point features that are not required to be displayed from large to small according to importance. Importance can be set according to actual conditions. For example, when visualizing a port, the importance of the port can be set according to the port level.
[0021] 2. Set the relationship between the display of point features and the map level. The commonly used map levels in WebGIS systems are 0-18. The larger the level, the larger the map scale and the more detailed the map content. The display level of point features can be set according to specific scenarios. For example, ports above level 3 (excluding level 3) are relatively less important and can be set not to be displayed when the map level is less than or equal to level 5.
[0022] 3. According to the map range displayed in the browser window, extract the point features within the map range and store them in featureList. featureList is an empty array.
[0023] 4. Define two arrays: allcollisionList and textList. allcollisionList stores the outer rectangles of all point elements and all annotations loaded on the map. textList only stores the outer rectangles of all annotations. In this embodiment, point elements refer to points on the map, which is a graphic concept; annotations refer to adding text explanations to this point, which are displayed next to the point.
[0024] The specific steps of sparse processing are as follows: 1. Traverse all point features in featureList and obtain the outer rectangle of the i-th point feature and annotation; 2. Get the current map layer and determine whether the i-th point feature is displayed in this layer. If not, return to the first step. If it is displayed, proceed to the third step.
[0025] 3. Determine whether the i-th point feature must be displayed. If so, draw the point directly on the map, add the outer rectangle of the i-th point feature to allcollisionList, and jump to step 5; if not, proceed to step 4; 4. Traverse allcollisionList and check if the outer bounding rectangle of the i-th point element intersects with the outer bounding rectangles in allcollisionList. If there is an intersection, return to the first step; if not, draw the point on the map and add the outer bounding rectangle of the i-th point element to allcollisionList; 5. Traverse textList and determine whether the outer bounding rectangle of the i-th annotation intersects with the outer bounding rectangle in textList. If so, return to the first step; if not, draw the annotation on the map and add the outer bounding rectangle of the i-th annotation to textList and allcollisionList.
[0026] Advantages of the present invention: The present invention extracts point elements and their annotations within the map range displayed in the browser window for sparse processing, thereby reducing the amount of data processing and improving processing efficiency.
[0027] The present invention separates the sparse logic of point elements and annotations, which can make the annotations sparse without affecting the display of analysis results, and takes into account both the aesthetics and practicality of the visualization results.
[0028] The present invention sets the relationship between the analysis result display and the map level, and can artificially set the highlighting of important information.
[0029] The present invention divides the features into two categories: necessary and non-essential, and sorts the non-essential features by importance, which can prevent the spatial overlap phenomenon from occurring during thinning, while taking into account the semantic characteristics of the features, making the sparse logic more reasonable.
[0030] Aiming at the characteristics of WebGIS system, this method improves the existing automatic configuration method of map annotation and proposes a new point feature and annotation sparse method based on the importance of point features, which improves the processing speed of point annotation and takes into account the practicality and readability of visualization results.
[0031] Example 1 Input data: information of all points on a route, including latitude and longitude, whether it is a turning point, weather information, etc. Before sparseness: the map displays the turning points and passing points of the route, as well as the date, weather and other text information corresponding to each node; before sparseness, the nodes and text information will overlap each other, affecting reading. After sparseness: on the map, all turning points are displayed, passing points are partially displayed, and text information corresponding to some nodes is displayed, and all nodes and text information will not overlap each other.
[0032] Point features and their annotation sparse methods mainly include: I. Divide point elements into two categories, those that must be displayed and those that do not have to be displayed. "Must be displayed" refers to point elements for which graphics are not sparsely processed but annotations are sparsely processed, and "non-must be displayed" refers to point elements for which both graphics and annotations are sparsely processed. Next, sort the point elements that do not have to be displayed in order of importance from large to small. The importance can be set according to the actual situation. Assume that Example 1 is a route with 4 turning points (P1-P4), including a starting point and an end point, as well as several waypoints. Turning points are more important and are set to be displayed as must-haves; there are several waypoints between every two turning points, and the importance of waypoints is general and the same, so they are set to be displayed as non-must-haves, and there is no need to sort the waypoints. Example 1 is as follows Figure 2 The specific parameters are shown in Table 1 below.
[0033] Table 1 .
[0034] II. Set the relationship between the display of point features and the map level. The commonly used map levels in WebGIS systems are 0-18. The larger the level, the larger the map scale and the more detailed the map content. The display level of point features can be set according to specific scenarios. For example, ports above level 3 (excluding level 3) are relatively less important and can be set not to be displayed when the map level is less than or equal to level 5. For ship routes, the display of turning points and waypoints has nothing to do with the map level, so no additional settings are required.
[0035] III. Extract point features within the map range displayed in the browser window and store them in featureList. When all routes in Example 1 are displayed in the browser window, all path points will be extracted and calculated; if only part of the route is displayed, only part of the path points will be extracted and calculated, such as Figure 3 to Figure 4 shown.
[0036] IV. Define two arrays: allcollisionList and textList. allcollisionList stores the bounding rectangles of all point features and all annotations loaded on the map. textList only stores the bounding rectangles of all annotations.
[0037] The specific steps of sparse processing are as follows: I. Traverse all point features in featureList and obtain the outer rectangle of the i-th point feature and annotation; II. Get the current map level, determine whether the i-th point element is displayed in the level, if not, return to the first step, if it is displayed, proceed to the third step. In embodiment 1, since all path points are independent of the map level, the third step is directly performed.
[0038] III. Determine whether the i-th point element must be displayed. If so, draw the point directly on the map, add the enclosing rectangle of the i-th point element to allcollisionList, and jump to step 5; if not, proceed to step 4. In Example 1, the judgment starts from the first path point, i.e. P1. P1 is a turning point that must be displayed, so it is drawn directly on the map. If it is a point that does not have to be displayed, such as the second point, no drawing operation will be performed on the map. Therefore, after this step is completed, all the necessary points will be drawn on the map (P1-P4 will be drawn in Example 1). The specific results are shown in Table 2 below.
[0039] Table 2 .
[0040] IV. Traverse allcollisionList and check whether the enclosing rectangle of the i-th point element intersects with the existing enclosing rectangle of allcollisionList. If there is an intersection, return to the first step; if there is no intersection, draw the point on the map, and add the enclosing rectangle of the i-th point element to allcollisionList. This step determines whether non-essential display points are drawn on the map. In Example 1, it is determined in turn whether each waypoint intersects with the enclosing rectangles of the turning points and waypoints already drawn in allcollisionList. If there is an intersection, the waypoint is not drawn; if there is no intersection, it can be drawn. Therefore, after this step is completed, all waypoints that do not have an intersection are drawn. The specific results are shown in Table 3.
[0041] Table 3 .
[0042] V. Traverse textList and determine whether the enclosing rectangle of the ith annotation intersects with the existing enclosing rectangle in textList. If they intersect, return to the first step; if they do not intersect, draw the annotation on the map, and add the enclosing rectangle of the ith annotation to textList and allcollisionList. This step determines whether the annotations of the two types of points are displayed on the map. In Example 1, according to the order of route travel, it is determined in turn whether the annotations of turning points and waypoints intersect with the annotations drawn in textList. If they intersect, the annotation is not drawn; if they do not intersect, it is drawn. Therefore, after this step is completed, the annotations of turning points and waypoints are sparse to a certain extent, and non-intersecting annotation representations are obtained. The final result is as follows. Figure 5 The detailed results are shown in Table 4.
[0043] Table 4 .
[0044] This method can perform sparse processing of point features and their annotations when visualizing analysis results (point features and their annotations) in the WebGIS system to prevent conflicts and overlaps between graphics and annotations and retain relatively important information; it can display different data at different map levels to highlight important information; and it can filter data according to the screen range to improve processing efficiency.
[0045] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A point annotation sparse method based on importance ranking in a WebGIS system, characterized by: Including data preparation and sparse processing, data preparation includes the following steps: S1. Divide point elements into those that must be displayed and those that are not required to be displayed; S2. Setting the relationship between the display of point elements and the map level; S3, according to the map range displayed in the browser window, extract the point features within the map range, and store the extracted point features into featureList; S4. Define two arrays: allcollisionList and textList; Sparse processing includes the following steps: A1. Traverse all point features in featureList and obtain the outer bounding rectangle of the i-th point feature and annotation; A2, obtain the current map level, and determine whether the i-th point feature is displayed in this map level. If not, return to step A1; if so, proceed to step A3; A3, determine whether the i-th point feature must be displayed. If yes, directly draw this point feature on the map, add the outer rectangle of the i-th point feature to allcollisionList, and jump to step A5; if no, proceed to step A4; A4. Traverse allcollisionList and check whether the outer bounding rectangle of the i-th point element intersects with the outer bounding rectangles in allcollisionList. If there is an intersection, return to step A1; if there is no intersection, draw this point element on the map and add the outer bounding rectangle of the i-th point element to allcollisionList; A5. Traverse textList and determine whether the outer bounding rectangle of the ith annotation intersects with the outer bounding rectangle in textList. If so, return to step A1; if not, draw the annotation on the map and add the outer bounding rectangle of the ith annotation to textList and allcollisionList.
2. A point annotation sparse method based on importance ranking in a WebGIS system according to claim 1, characterized in that: In step S1, it is necessary to display the point elements for which the graphics are not subjected to sparse processing and the annotations are subjected to sparse processing.
3. The point annotation sparse method based on importance ranking in a WebGIS system according to claim 1, characterized in that: In step S1, it is not necessary to display point elements that are subjected to sparse processing for both graphics and annotations.
4. The point annotation sparse method based on importance ranking in a WebGIS system according to claim 1, characterized in that: In step S1, point elements that are not required to be displayed are sorted in descending order of importance.
5. The point annotation sparse method based on importance ranking in a WebGIS system according to claim 1, characterized in that: In step S2, the display level of the point element is set according to the map level of 0-18 in the WebGIS system.
6. The point annotation sparse method based on importance ranking in a WebGIS system according to claim 1, characterized in that: In step S3, featureList is an empty array.
7. The point annotation sparse method based on importance ranking in a WebGIS system according to claim 1, characterized in that: In step S4, allcollisionList stores the outer bounding rectangles of all point elements and all annotations loaded on the map; textList only stores the outer bounding rectangles of all annotations.
Citation Information
Patent Citations
Method for drawing synchronously displayed symbols and marks of dot map layers of map
CN102063833A
Map annotation method and device by means of conflict detection mechanism
CN103258007A
Vector data optimization processing method and system
CN114998108A
Map element annotation display method and system based on global grid division
CN115661396A
Airborne vector map data processing method
CN115687675A