A method for converging points on a map

By adopting point aggregation method with different processing methods according to the map zoom level in the map application, the problems of browser lag and poor user experience caused by large-scale point information display are solved, and efficient and intuitive point distribution display is achieved.

CN114647708BActive Publication Date: 2025-03-21GUANGXIN INTELLIGENT CONSTR RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210241954.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-11
Publication Date
2025-03-21
Estimated Expiration
2042-03-11

AI Technical Summary

Technical Problem

When existing map applications process large-scale point information, they can easily cause browser stuttering and loading time to time out, poor user experience, and difficult to achieve intuitive point distribution display.

Method used

By implementing point aggregation on the map, different processing methods are adopted according to the map zoom level: display the number of points at the zoom level 11; use the point aggregation algorithm to filter and summarize point data at the 12-16 level; use layer services at the 17-18 level or filter point data based on the center point of the map.

Benefits of technology

It improves the efficiency of point information display, achieves low latency and intuitive point distribution display, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114647708B_ABST
    Figure CN114647708B_ABST
Patent Text Reader

Abstract

A method for aggregating points on a map, comprising the following steps: step 1. obtaining the current map zoom level and the longitude and latitude coordinates of the current center point through a map SDK; step 2. determining that the zoom level is 11, obtaining the total number of points from the original point data set and displaying them on the map; step 3. determining that the zoom level is 12-16, filtering and aggregating the original point data set according to a point aggregation algorithm and displaying them on the map; step 4. determining that the zoom level is 17-18, using a layer service, writing all point data into a new layer, and loading the layer on a map page; or filtering points according to the third decimal place of the longitude and latitude coordinates of the current center point of the map, and displaying the points that meet the conditions on the map. The present invention realizes the display of points on a map, meeting the effects of low latency and strong intuitiveness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of map application and relates to a method for converging points on a map, which is used for converging and displaying points on a map application. Background Art

[0002] The map application development of existing browsers is mainly achieved by using the map front-end SDK of third-party manufacturers or the self-built ArcGIS map front-end SDK service. Drawing points is a common function in map applications, which is used to intuitively display the distribution of points on the map. When the amount of point data is above hundreds of thousands, the client browser has a large amount of calculation to render the point information, which can easily cause the browser to freeze, the loading time to time out, and the experience to be poor, and the effect of intuitively displaying the point distribution cannot be achieved.

[0003] SDK dotting method for map services: The front-end page obtains the latitude and longitude data of all point information through the interface, and uses the SDK dotting method for map services to render the point data on the page. Advantages: Low development complexity; Disadvantages: When the amount of point data is large, the front-end browser has a lot of rendering pressure and may freeze.

[0004] Layer loading method: Use the map layer service to draw all point information on a new layer and publish it to the layer service. The front-end map service calls the layer address to load the layer, so that the point information can be seen on the map page. Advantages: There is no lag in the layer service. Disadvantages: When the map zoom level is low, the display effect is not friendly and the user experience is poor. If you draw layers at different zoom levels, there is a certain amount of development work. Summary of the invention

[0005] In order to overcome the shortcomings of the existing map point method, such as poor user experience and failure to intuitively display the point distribution, the present invention provides a method for aggregating points on a map, which realizes the display of points on the map and meets the effects of low latency and strong intuitiveness.

[0006] The technical solution adopted by the present invention to solve its technical problem is:

[0007] A method for converging points on a map, the method comprising the following steps:

[0008] Step 1. Get the current map zoom level and the longitude and latitude coordinates of the current center point through the map SDK;

[0009] Step 2. Determine that the zoom level is 11, obtain the total number of points from the original point data set and display it on the map;

[0010] Step 3. Determine that the zoom level is 12-16, and filter and aggregate the original point data set according to the point aggregation algorithm and display it on the map;

[0011] Step 4. Determine if the zoom level is 17-18, use the layer service to write all the point data into a new layer, and load the layer on the map page; or filter the points based on the third decimal place of the longitude and latitude coordinates of the current map center point, and display the points that meet the conditions on the map.

[0012] Furthermore, in step 3, the point convergence algorithm process is as follows:

[0013] 3.1) When the map is level 12, the longitude and latitude are truncated to the second decimal place, and grouped and counted. The average longitude and latitude values ​​of each group are calculated as the display position of the aggregation point;

[0014] 3.2) When the map is level 13, the longitude and latitude are truncated to the third decimal place, and grouped and counted. The average longitude and latitude values ​​of each group are calculated as the display position of the aggregation point;

[0015] 3.3) When the map is level 14, the longitude and latitude are cut to the fourth decimal place, and grouped and counted. The average longitude and latitude values ​​of each group are calculated as the display position of the aggregation point;

[0016] 3.4) When the map is level 15 or 16, the longitude and latitude are truncated to the fifth decimal place and grouped and counted. The average longitude and latitude values ​​in each group are calculated as the display position of the aggregation point.

[0017] Furthermore, in step 2, the longitude and latitude are truncated to the first decimal place, and group statistics are performed. The average longitude and latitude values ​​are calculated in each group as the display position of the aggregation point.

[0018] Preferably, in step 4, all point information is drawn onto a new layer using a map layer service and published to the layer service. The front-end map service calls the layer address to load the layer, so that the point information can be seen on the map page.

[0019] The beneficial effects of the present invention are mainly manifested in: solving the problem of displaying a large number of point information on the map, improving the display efficiency of the points, and being more accurate and efficient in point aggregation. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a flow chart of a method for converging points on a map.

[0021] Figure 2 It is a simulation device display effect diagram on the map. DETAILED DESCRIPTION

[0022] The present invention will be further described below in conjunction with the accompanying drawings.

[0023] Reference Figure 1 and Figure 2 , a method for converging points on a map, the method comprising the following steps:

[0024] Step 1. Get the current map zoom level and the longitude and latitude coordinates of the current center point through the map SDK;

[0025] Step 2. Determine that the zoom level is 11, obtain the total number of points from the original point data set and display it on the map;

[0026] Step 3. Determine that the zoom level is 12-16, and filter and aggregate the original point data set according to the point aggregation algorithm and display it on the map;

[0027] Step 4. Determine if the zoom level is 17-18, use the layer service to write all the point data into a new layer, and load the layer on the map page; or filter the points based on the third decimal place of the longitude and latitude coordinates of the current map center point, and display the points that meet the conditions on the map.

[0028] Furthermore, in step 3, the point convergence algorithm process is as follows:

[0029] 3.1) When the map is level 12, the longitude and latitude are truncated to the second decimal place, and grouped and counted. The average longitude and latitude values ​​of each group are calculated as the display position of the aggregation point;

[0030] 3.2) When the map is level 13, the longitude and latitude are truncated to the third decimal place, and grouped and counted. The average longitude and latitude values ​​of each group are calculated as the display position of the aggregation point;

[0031] 3.3) When the map is level 14, the longitude and latitude are cut to the fourth decimal place, and grouped and counted. The average longitude and latitude values ​​of each group are calculated as the display position of the aggregation point;

[0032] 3.4) When the map is level 15 or 16, the longitude and latitude are truncated to the fifth decimal place and grouped and counted. The average longitude and latitude values ​​in each group are calculated as the display position of the aggregation point.

[0033] Furthermore, in step 2, the longitude and latitude are truncated to the first decimal place, and group statistics are performed. The average longitude and latitude values ​​are calculated in each group as the display position of the aggregation point.

[0034] Preferably, in step 4, all point information is drawn onto a new layer using a map layer service and published to the layer service. The front-end map service calls the layer address to load the layer, so that the point information can be seen on the map page.

[0035] In this embodiment, the point information includes the following basic information: (1) longitude and latitude (the decimal precision range of longitude and longitude is meter-level accuracy for the 5th decimal place, ten-meter accuracy for the 4th decimal place, hundred-meter accuracy for the 3rd decimal place, and kilometer-level accuracy for the 2nd decimal place); (2) name; (3) convergence information; (4) other information.

[0036] Map Service SDK: Use the point drawing method to draw the point information on the map.

[0037] Map layer service: provides layer drawing and layer loading services.

[0038] Convergence algorithm: Usually there are kmeans algorithm, direct grid algorithm, etc. This patent will adopt the convergence based on the decimal precision of longitude and latitude data.

[0039] This embodiment comprehensively utilizes large quantities of point data, map service SDK, map layer service, aggregation algorithm, etc. to solve the high latency, jamming, and unresponsiveness problems of displaying a large amount of point data on the map, and improves the user experience. According to different map zoom levels, loading layers, drawing points, and drawing converged points are used to intuitively display point data. For example, all sensor device point information of a prefecture-level city xx is displayed on the map. The amount of sensor device point data is estimated to be 100,000, and the corresponding map zoom level is 11 to 18. At map zoom levels 17 and 18, the point information is displayed by loading layers or drawing points. Other map zoom levels use a point convergence algorithm to display the sum of the converged data on the map. When the map zoom level is 11, the total number of sensor device points displayed at a certain city center is displayed. Among them, levels 12 to 16 need to obtain the converged point information data based on the point convergence algorithm according to the point longitude and latitude information.

[0040] This embodiment uses the SDK dotting method and layer loading method according to the map zoom level to realize the display of a large number of point information on the map. For the map application of XX city, the map zoom level is generally only 11 to 18, among which level 11 shows the whole picture of a city. This level displays all point data, and the browser rendering pressure is large. It is recommended to draw the point aggregation sum data from a certain city center point.

[0041] Among them, map zoom level 17 and level 18 are the maximum levels of map magnification. Generally, the distance between the left and right sides of the map is about 100 meters. You can take the current center point and cut off the third decimal place to filter out all points that meet the conditions; or use the loading layer method to load level 17 and level 18 point device layers (the prerequisite is to use the layer tool to draw the point information).

[0042] For other map zoom levels, the converged data of the points is calculated according to the passed zoom level.

[0043] The performance comparison of kmeans algorithm, direct grid algorithm and the method of the present invention is shown in Table 1:

[0044] Algorithm Name performance Accuracy Complexity kmeans middle high high Direct Grid Algorithm high middle middle Method of the present invention high Upper middle easy

[0045] Table 1

[0046] kmeans algorithm: The kmeans algorithm mainly specifies k cluster centroids initially, then gathers "similar" data points according to "distance", and then recalculates new centroids, and iterates and calculates the centroids of k cluster points, and finally returns to k cluster results. It has the following two main disadvantages: kmeans is a computationally intensive algorithm, and the model needs to be iterated many times before it can be perfected, and a large number of distance calculations consume CPU. The effect is that kmeans cannot solve the problem of overlapping coverage. And the algorithm has a certain complexity that is not conducive to integration.

[0047] Direct grid algorithm: Divide the map into several grids, and aggregate the points that fall in the corresponding grids at the center point of the small grid. Each small grid only displays one center point, and the value is the number of points in the grid. The operation speed is fast, and it does not involve the distance calculation between two points. Only a one-time calculation of whether the point is in the grid can get the result. The disadvantage is that the grid needs to be divided in advance. Two points that are obviously close are forced to be calculated separately at different grid centers because they are divided into different grids. At the same time, the center of the grid is not necessarily the cluster center of the points in the grid, and cannot truly reflect the center point of the cluster.

[0048] The method of the present invention (longitude and latitude convergence): is similar to the direct grid algorithm, does not need to divide the grid data in advance, and completes the point convergence work according to the decimal precision data of the longitude and latitude data.

[0049] The solution of this embodiment comprehensively utilizes large quantities of point data, map service SDK, map layer service, aggregation algorithm, etc. to solve the high latency, freeze, and unresponsiveness problems of displaying a large amount of point data on the map, and improve the user experience; the process is:

[0050] Step 1: Store the original point data in a relational database for query filtering.

[0051] Step 2: Create a layer service and write the original point data into the layer for use at map zoom levels 17 and 18.

[0052] Step 3, combining the point-precision aggregation algorithm with database filtering query to implement the aggregation function, and storing the aggregation information (including the latitude and longitude of the aggregation point and the number of aggregations) at each map zoom level.

[0053] Step 4: In the map service SDK, determine the current map zoom level, and load layers or aggregate data according to the zoom level data.

[0054] The solution of this embodiment is applied to a shared video project in a certain city. This method is used to display the entire map of camera equipment data in the entire city, which is convenient for users to intuitively understand the overall situation of point data and quickly locate point data, greatly improving their work efficiency. In other application scenarios that are not maps but have a coordinate system, this convergence algorithm has reference value.

[0055] The contents described in the embodiments of this specification are merely enumerations of implementation forms of the inventive concept and are for illustrative purposes only. The protection scope of the present invention should not be considered to be limited to the specific forms described in this embodiment, and the protection scope of the present invention also extends to equivalent technical means that can be thought of by ordinary technicians in this field based on the inventive concept.

Claims

1. A method for converging points on a map, characterized in that: The method comprises the following steps: Step 1. Get the current map zoom level and the longitude and latitude coordinates of the current center point through the map SDK; Step 2. Determine that the zoom level is 11, obtain the total number of points from the original point data set and display it on the map; Step 3. Determine that the zoom level is 12-16, and filter and aggregate the original point data set according to the point aggregation algorithm and display it on the map; Step 4. Determine the zoom level is 17-18, use the layer service, write all the data of the point into a new layer, and load the layer on the map page; or filter the points according to the third decimal place of the latitude and longitude coordinates of the current map center point, and display the points that meet the conditions on the map; In step 3, the point convergence algorithm process is as follows: 3.1) When the map is level 12, the longitude and latitude are truncated to the second decimal place, and grouped and counted. The average longitude and latitude values ​​of each group are calculated as the display position of the aggregation point; 3.2) When the map is level 13, the longitude and latitude are truncated to the third decimal place, and grouped and counted. The average longitude and latitude values ​​of each group are calculated as the display position of the aggregation point; 3.3) When the map is level 14, the longitude and latitude are cut to the fourth decimal place, and grouped and counted. The average longitude and latitude values ​​of each group are calculated as the display position of the aggregation point; 3.4) When the map is level 15 or 16, the longitude and latitude are truncated to the fifth decimal place and grouped and counted. The average longitude and latitude values ​​in each group are calculated as the display position of the aggregation point.

2. A method for converging points on a map as claimed in claim 1, characterized in that: In step 2, the longitude and latitude are truncated to the first decimal place, and group statistics are performed. The average longitude and latitude values ​​are calculated in each group as the display position of the aggregation point.

3. A method for converging points on a map as claimed in claim 1, characterized in that: In step 4, all point information is drawn onto a new layer using a map layer service and published to the layer service. The front-end map service calls the layer address to load the layer, so that the point information can be seen on the map page.

Citation Information

Patent Citations

  • A method and apparatus for point polymerization of electronic map

    CN109241213A

  • Method and system for processing and displaying GIS (Geographic Information System) point locations of urban management events

    CN112860831A