Method, apparatus, device, and storage medium for generating map point names
By calculating the primary center point of the region in the map and dividing the azimuth coordinate set, and determining the target center point, the problem of inaccurate calculation of the central position of the region in the map is solved, and the effect of accurately generating point names at the real center position is achieved.
Patent Information
- Application Number
- CN202411676800.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2044-11-22
AI Technical Summary
It is difficult for the prior art to accurately generate point names at the true central location of the region in the map, especially due to irregular shapes of the region's edges, which lead to inaccurate calculation of the central location.
The boundary latitude and longitude coordinate set is obtained based on the region boundary in the map, the primary center point is calculated, and multiple azimuth coordinate sets are divided by the primary center point, the azimuth corner point information is determined, and the target center point is finally determined to generate the point name at that point.
Regardless of the edge rules or not of the region's boundary, point names can be generated accurately at the real center position of the region, solving the problem of inaccurate calculation of the center position.
Smart Images

Figure CN119205979B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of map drawing, and in particular to a method, device, equipment and storage medium for generating map point names. Background Art
[0002] Generally, a map includes multiple regions, and the corresponding point names need to be displayed at the central positions of each region. For example, if region B is included in the map of city A, the point name "Region B" needs to be displayed at the central position of region B; therefore, when drawing a map, the corresponding point names need to be generated at the central positions of the regions first.
[0003] Currently, ECharts (Enterprise Charts, commercial-level data charts) etc. can be used for map drawing. However, since the edges of regions in a map are often irregularly shaped, the central position calculated based on the region edges is inaccurate, resulting in difficulty in generating point names at the true central positions of regions in the map. Summary of the Invention
[0004] To facilitate generating point names at the true central positions of regions in a map, this application provides a method, device, equipment and storage medium for generating map point names.
[0005] In a first aspect, this application provides a method for generating map point names, including:
[0006] Obtaining a set of boundary longitude and latitude coordinates based on the region boundaries in the map, and obtaining a primary center point based on the set of boundary longitude and latitude coordinates;
[0007] Determining multiple sets of azimuth coordinates based on the set of boundary longitude and latitude coordinates and the primary center point;
[0008] Determining azimuth quadrilateral corner point information corresponding to the set of azimuth coordinates one by one based on the set of azimuth coordinates and the primary center point;
[0009] Determining a target center point based on multiple pieces of azimuth quadrilateral corner point information, and generating a corresponding point name at the target center point.
[0010] In a second aspect, this application provides a device for generating map point names, including:
[0011] A primary center determination module, configured to obtain a set of boundary longitude and latitude coordinates based on the region boundaries in the map, and obtain a primary center point based on the set of boundary longitude and latitude coordinates;
[0012] A coordinate set determination module, configured to determine multiple sets of azimuth coordinates based on the set of boundary longitude and latitude coordinates and the primary center point;
[0013] A corner point information determination module, configured to determine, based on the set of azimuth coordinates and the primary center point, corner point information of an azimuth quadrilateral corresponding one-to-one to the set of azimuth coordinates;
[0014] A point name generation module, configured to determine a target center point based on the corner point information of multiple azimuth quadrilaterals, and generate a corresponding point name at the target center point.
[0015] In a third aspect, the present application provides a computer device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps in the above method are implemented.
[0016] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method are implemented.
[0017] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0018] For the above map point name generation method, device, equipment and storage medium, by obtaining a set of boundary longitude and latitude coordinates based on the regional boundary in the map, and obtaining a primary center point based on the set of boundary longitude and latitude coordinates; determining multiple sets of azimuth coordinates based on the set of boundary longitude and latitude coordinates and the primary center point; determining, based on the set of azimuth coordinates and the primary center point, corner point information of an azimuth quadrilateral corresponding one-to-one to the set of azimuth coordinates; determining a target center point based on the corner point information of multiple azimuth quadrilaterals, and generating a corresponding point name at the target center point. Through the above implementation, regardless of whether the edge of the regional boundary is regular or not, a preliminary center point, that is, a primary center point, can be generated according to the regional boundary first; then, the longitude and latitude coordinates of each boundary point on the regional boundary (that is, the set of boundary longitude and latitude coordinates) are divided in different azimuths based on the primary center point, so as to obtain sets of azimuth coordinates corresponding to different azimuths, and then a target quadrilateral located at the actual center position of the region is generated according to each set of azimuth coordinates, and then the center point of the target quadrilateral, that is, the target center point, is determined, and finally a point name is generated at the target center point, so that a point name can be generated at the true center position of the region in the map.
[0019] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become easily understood through the following description. Description of the Drawings
[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings required for the embodiments. It should be understood that the following drawings only show some embodiments of the present invention, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.
[0021] Figure 1 It is a flowchart of a method for generating map point names provided in an embodiment of the present application;
[0022] Figure 2 It is a schematic diagram for showing the positions of adjacent points with the same longitude and adjacent points with the same latitude provided in an embodiment of the present application;
[0023] Figure 3 It is a schematic diagram for showing a target quadrilateral provided in an embodiment of the present application;
[0024] Figure 4 It is a schematic structural diagram of a device for generating map point names provided in an embodiment of the present application;
[0025] Figure 5 It is a schematic structural diagram of a computer device provided in an embodiment of the present application;
[0026] Figure 6 It is an internal structural diagram of a computer-readable storage medium provided in an embodiment of the present application. Specific Embodiments
[0027] In order to make the objectives, technical solutions and advantages of the present disclosure clearer, the following further details the present disclosure in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure, and are not used to limit the present disclosure.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of this article and the above accompanying drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product or equipment that includes a series of steps or units does not necessarily need to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or equipment.
[0029] In this text, the term "and / or" is merely a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. Additionally, in this text, the character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0030] Embodiment 1
[0031] Figure 1 It is a flowchart of a method for generating a map point name provided in Embodiment 1 of this application. Refer to Figure 1 , this method can be executed by a device that executes this method, and this device can be implemented in a software and / or hardware manner. This method includes:
[0032] S110. Obtain a set of boundary longitude and latitude coordinates based on the regional boundary in the map, and obtain a primary center point based on the set of boundary longitude and latitude coordinates.
[0033] Among them, in some projects or businesses, there is a need to draw maps. Exemplarily, ECharts (Enterprise Charts, commercial-level data charts) etc. can be used to draw electronic maps; the map in this embodiment includes maps at different levels, and the levels can specifically be administrative levels. Exemplarily, the map includes national-level maps, provincial-level maps, municipal-level maps, district-level maps...; this embodiment takes the municipal-level map as an example to illustrate the map; the municipal-level map includes multiple district-level regions. Exemplarily, the municipal-level map includes Area A, Area B, Area C... Each district in the municipal-level map is also a region; it should be noted that if the map is a provincial-level map, each city in the provincial-level map is also a region, and so on; the boundary of a region in the map is also the regional boundary, and the regional boundary is composed of multiple consecutive boundary points. Each boundary point has its corresponding longitude and latitude coordinates in the map, and the set of boundary longitude and latitude coordinates is also the set of each boundary point in the regional boundary; the primary center point is also the center point of the corresponding region preliminarily determined according to the set of boundary longitude and latitude coordinates. It should be noted that due to the irregularity of the regional boundary, this primary center point is generally not the actual center point of the corresponding region.
[0034] Specifically, determine the boundary of the districts included in the municipal-level map to obtain the regional boundary, and then determine the longitude and latitude coordinates corresponding to each boundary point in the regional boundary. The set of boundary longitude and latitude coordinates includes the longitude and latitude coordinates corresponding to each boundary point in the regional boundary; further, calculate the center point of the corresponding district according to the set of boundary longitude and latitude coordinates, and record this center point as the primary center point.
[0035] S120. Determine a plurality of azimuth coordinate sets based on the set of boundary longitude and latitude coordinates and the primary center point.
[0036] Among them, the set of boundary longitude and latitude coordinates can be divided into multiple azimuth coordinate sets through the primary center point; in this embodiment, the primary center point includes four azimuths: southwest azimuth, northwest azimuth, southeast azimuth, and northeast azimuth; each longitude and latitude coordinate in the set of boundary longitude and latitude coordinates corresponds to the above four azimuths. Exemplarily, if a longitude and latitude coordinate corresponds to the southwest azimuth, it means that the longitude and latitude coordinate is located in the southwest azimuth of the primary center point, and so on; in this embodiment, the multiple azimuth coordinate sets include a southwest azimuth coordinate set, a northwest azimuth coordinate set, a southeast azimuth coordinate set, and a northeast azimuth coordinate set that correspond to the above four azimuths one by one; each azimuth coordinate set is a set of longitude and latitude coordinates in the set of boundary longitude and latitude coordinates corresponding to the corresponding azimuth.
[0037] Specifically, determine the correspondence between each longitude and latitude coordinate in the set of boundary longitude and latitude coordinates and the primary center point in terms of azimuth, determine the azimuth corresponding to each longitude and latitude coordinate according to this correspondence, and then gather the longitude and latitude coordinates in the set of boundary longitude and latitude coordinates that correspond to the same azimuth, so as to obtain the azimuth coordinate sets that correspond to each azimuth one by one.
[0038] S130. Determine the corner point information of the azimuth quadrilateral corresponding one by one to the azimuth coordinate set based on the azimuth coordinate set and the primary center point.
[0039] Among them, through each azimuth coordinate set and the primary center point, a quadrilateral corresponding one by one to each azimuth coordinate set can be determined, and this quadrilateral is denoted as the azimuth quadrilateral. Each azimuth quadrilateral has four corner points. Among them, the primary center point is a common corner point of each azimuth quadrilateral; and the set of the longitude and latitude coordinates of the four corner points of the azimuth quadrilateral is denoted as the corner point information of the azimuth quadrilateral.
[0040] Specifically, taking one of the azimuth coordinate sets as an example, determine the longitude and latitude coordinate in the azimuth coordinate set that has the same longitude as the primary center point but is farthest from the primary center point to obtain the first corner point coordinate, and also determine the longitude and latitude coordinate in the azimuth coordinate set that has the same latitude as the primary center point but is farthest from the primary center point to obtain the second corner point coordinate; then determine the third corner point according to the longitude coordinate of the first corner point and the latitude coordinate of the second corner point; and take the primary center point as the fourth corner point; gather the longitude and latitude coordinates of the first corner point, the longitude and latitude coordinates of the second corner point, the longitude and latitude coordinates of the third corner point, and the longitude and latitude coordinates of the fourth corner point to obtain the corner point information of the azimuth quadrilateral; determine the corner point information of the azimuth quadrilateral corresponding to each azimuth coordinate set in the above manner.
[0041] S140. Determine the target center point based on the corner point information of multiple azimuth quadrilaterals, and generate the corresponding point name at the target center point.
[0042] Among them, the corner point information of each azimuth quadrilateral can construct a corresponding quadrilateral through the longitude and latitude coordinates of the first corner point, the longitude and latitude coordinates of the second corner point, the longitude and latitude coordinates of the third corner point, and the longitude and latitude coordinates of the fourth corner point included therein, and this quadrilateral is denoted as the azimuth quadrilateral; four azimuth quadrilaterals can be constructed through the four azimuth quadrilateral corner point information, and based on these four azimuth quadrilaterals, a quadrilateral located in the true midpoint area of the region can be further determined, and this quadrilateral is denoted as the target quadrilateral, and the center point of the target quadrilateral is denoted as the target center point; further, a point name corresponding to the region can be generated at this target center point.
[0043] Specifically, four azimuth quadrilaterals are constructed according to the four azimuth quadrilateral corner point information corresponding to the four azimuth coordinate sets. The four azimuth quadrilaterals have a common corner point, that is, the primary center point; then, the target quadrilateral located in the true midpoint area of the region is determined through these four azimuth quadrilaterals, and the center point of the target quadrilateral is determined as the target center point; further, a point name corresponding to the region is generated at this target center point.
[0044] It should be noted that in this embodiment, the boundary longitude and latitude coordinate set is obtained based on the region boundary in the map, and the primary center point is obtained based on the boundary longitude and latitude coordinate set; multiple azimuth coordinate sets are determined based on the boundary longitude and latitude coordinate set and the primary center point; the azimuth quadrilateral corner point information corresponding to the azimuth coordinate set one by one is determined based on the azimuth coordinate set and the primary center point; the target center point is determined based on the multiple azimuth quadrilateral corner point information, and a corresponding point name is generated at the target center point. Through the above implementation, regardless of whether the edge of the region boundary is regular or not, a preliminary center point, that is, the primary center point, can be generated first according to the region boundary; then, the longitude and latitude coordinates of each boundary point on the region boundary (that is, the boundary longitude and latitude coordinate set) are divided in different azimuths according to the primary center point, so as to obtain the azimuth coordinate sets corresponding to different azimuths, and then the target quadrilateral located at the actual center position of the region is generated according to each azimuth coordinate set, and then the center point of the target quadrilateral, that is, the target center point, is determined, and finally the point name is generated at the target center point, so that the point name can be generated at the true center position of the region in the map.
[0045] Embodiment 2
[0046] A method for generating a map point name provided in Embodiment 2 of the present application optimizes the "obtaining the primary center point based on the boundary longitude and latitude coordinate set" in Embodiment 1; it should be noted that for the parts not detailed in this embodiment, the descriptions of other embodiments can be referred to. This method includes:
[0047] S211. Obtain a boundary longitude and latitude coordinate set based on the region boundary in the map.
[0048] It should be noted that the set of boundary longitude and latitude coordinates includes the longitude and latitude coordinates of multiple boundary points, and the longitude and latitude coordinates of the boundary points include the longitude coordinates of the boundary points and the latitude coordinates of the boundary points.
[0049] Among them, the map includes multiple regions, and each region has its corresponding regional boundary in the map. The regional boundary is composed of multiple boundary points, and each boundary point has corresponding longitude and latitude coordinates on the map. The longitude and latitude coordinates corresponding to the boundary point are recorded as the longitude and latitude coordinates of the boundary point. , the longitude and latitude coordinates of the boundary point include the longitude coordinate L and the latitude coordinate R, and the longitude coordinate is recorded as the longitude coordinate of the boundary point, and the latitude coordinate is also recorded as the latitude coordinate of the boundary point.
[0050] S212. Determine the longitude coordinate of the boundary point with the smallest value in the set of boundary longitude and latitude coordinates to obtain the valley longitude coordinate, and determine the longitude coordinate of the boundary point with the largest value in the set of boundary longitude and latitude coordinates to obtain the peak longitude coordinate.
[0051] Among them, in this embodiment, there is a preset longitude and latitude container for storing the set of boundary longitude and latitude coordinates. Taking a set of boundary longitude and latitude coordinates stored in the longitude and latitude container as an example, this set of boundary longitude and latitude coordinates includes the longitude and latitude coordinates of multiple boundary points. , where represents the longitude coordinate of the boundary point corresponding to the longitude and latitude coordinates of the boundary point, represents the latitude coordinate of the boundary point corresponding to the longitude and latitude coordinates of the boundary point, and n represents the number of longitude and latitude coordinates of the boundary points in this set of boundary longitude and latitude coordinates; all the longitude coordinates of the boundary points in the set of boundary longitude and latitude coordinates can form a longitude coordinate set , and all the latitude coordinates of the boundary points in the set of boundary longitude and latitude coordinates can form a latitude coordinate set ; through the preset sorting algorithm, the longitude coordinate of the boundary point with the smallest value in the longitude coordinate set can be determined , and this longitude coordinate of the boundary point is recorded as the valley longitude coordinate ; through the preset sorting algorithm, the longitude coordinate of the boundary point with the largest value in the longitude coordinate set can also be determined , and this longitude coordinate of the boundary point is recorded as the peak longitude coordinate .
[0052] Specifically, taking a set of boundary longitude and latitude coordinates stored in the longitude and latitude container as an example, all the longitude coordinates of the boundary points in the set of boundary longitude and latitude coordinates Construct a set of longitude coordinates , and also the set of boundary longitude and latitude coordinates All the latitude coordinates of the boundary points in Construct a set of latitude coordinates ; Determine the set of longitude coordinates through a preset sorting algorithm The longitude coordinate of the boundary point with the smallest value in Get the valley longitude coordinate , and also determine the set of longitude coordinates The longitude coordinate of the boundary point with the largest value in Get the peak longitude coordinate .
[0053] S213. Determine the valley latitude coordinate by obtaining the latitude coordinate of the boundary point with the smallest value in the set of boundary longitude and latitude coordinates, and determine the peak latitude coordinate by obtaining the latitude coordinate of the boundary point with the largest value in the set of boundary longitude and latitude coordinates.
[0054] Among them, the set of latitude coordinates can be determined through the sorting algorithm The latitude coordinate of the boundary point with the smallest value in , and record the longitude coordinate of this boundary point as the valley latitude coordinate , the set of latitude coordinates can be determined through the sorting algorithm The latitude coordinate of the boundary point with the largest value in , and record the longitude coordinate of this boundary point as the peak latitude coordinate .
[0055] Specifically, determine the valley latitude coordinate by obtaining the latitude coordinate of the boundary point with the smallest value in the set of latitude coordinates through a preset sorting algorithm The latitude coordinate of the boundary point with the smallest value in Get the valley latitude coordinate , and also determine the set of latitude coordinates The latitude coordinate of the boundary point with the largest value in Get the peak latitude coordinate .
[0056] S214. Obtain the primary center point based on the valley longitude coordinate, the peak longitude coordinate, the valley latitude coordinate, and the peak latitude coordinate.
[0057] In an alternative embodiment, the longitude coordinate of the primary center point is the mean of the valley longitude coordinate and the peak longitude coordinate , and the latitude coordinate of the primary center point is the mean of the valley latitude coordinate and the peak latitude coordinate The mean value.
[0058] Specifically, calculate the mean value of the valley longitude coordinate and the peak longitude coordinate to obtain the longitude coordinate of the primary center point , calculate the valley latitude coordinate and the peak latitude coordinate to obtain the latitude coordinate of the primary center point ; the longitude coordinate of the primary center point and the latitude coordinate of the primary center point together form the primary center point .
[0059] In another alternative embodiment, for the valley longitude coordinate a first weight is preset , for the peak longitude coordinate a second weight is preset ; for the valley latitude coordinate a third weight is preset , for the peak latitude coordinate a fourth weight is preset ; the longitude coordinate of the primary center point is the weighted sum of the valley longitude coordinate and the peak longitude coordinate , ; the latitude coordinate of the primary center point is the weighted sum of the valley latitude coordinate and the peak latitude coordinate , .
[0060] Specifically, calculate the weighted sum of the valley longitude coordinate and the peak longitude coordinate to obtain the longitude coordinate of the primary center point , calculate the weighted sum of the valley latitude coordinate and the peak latitude coordinate to obtain the latitude coordinate of the primary center point ; the longitude coordinate of the primary center point and the latitude coordinate of the primary center point together form the primary center point .
[0061] It should be noted that the actual center point of the area is near the primary center point. Calculating the primary center point can prepare for subsequent calculation of the actual center point.
[0062] S220. Determine a plurality of azimuth coordinate sets based on the boundary longitude and latitude coordinate set and the primary center point.
[0063] S230. Determine the corner point information of the azimuth quadrilateral corresponding one-to-one to the azimuth coordinate set based on the azimuth coordinate set and the primary center point.
[0064] S240. Determine the target center point based on the corner point information of multiple azimuth quadrilaterals, and generate the corresponding point name at the target center point.
[0065] Embodiment III
[0066] A method for generating a map point name provided in Embodiment III of the present application optimizes the step of "determining multiple azimuth coordinate sets based on the boundary longitude and latitude coordinate set and the primary center point" in Embodiment I. It should be noted that for the parts not described in detail in this embodiment, reference can be made to the descriptions of other embodiments. The method includes:
[0067] S310. Obtain the boundary longitude and latitude coordinate set based on the regional boundary in the map, and obtain the primary center point based on the boundary longitude and latitude coordinate set.
[0068] It should be noted that the primary center point includes the primary point longitude coordinate and the primary point latitude coordinate .
[0069] S321. Compare the primary point longitude coordinate with the boundary point longitude coordinate of the boundary point longitude and latitude coordinate in the boundary longitude and latitude coordinate set to obtain the first comparison result.
[0070] Among them, taking one boundary longitude and latitude coordinate set as an example, and denoting the boundary point longitude coordinate of the boundary point longitude and latitude coordinate in the boundary longitude and latitude coordinate set as , comparing this boundary point longitude coordinate denoted as with the primary point longitude coordinate , the obtained comparison result is also the first comparison result.
[0071] S322. Compare the primary point latitude coordinate with the boundary point latitude coordinate of the boundary point longitude and latitude coordinate in the boundary longitude and latitude coordinate set to obtain the second comparison result.
[0072] Among them, and denoting the boundary point latitude coordinate of the boundary point longitude and latitude coordinate in the boundary longitude and latitude coordinate set as , comparing this boundary point latitude coordinate denoted as with the primary point latitude coordinate , the obtained comparison result is also the second comparison result.
[0073] S323. Divide the boundary longitude and latitude coordinate set into multiple azimuth coordinate sets based on the first comparison result and the second comparison result.
[0074] Among them, for each longitude and latitude coordinate of the boundary points in the boundary longitude and latitude coordinate set , there are corresponding first comparison results and second comparison results; through the first comparison results and second comparison results corresponding to each longitude and latitude coordinate of the boundary points , the division of the boundary longitude and latitude coordinate set can be realized, that is, the boundary longitude and latitude coordinate set is divided into multiple azimuth coordinate sets. In this embodiment, the multiple azimuth coordinate sets specifically include a southwest azimuth coordinate set, a northwest azimuth coordinate set, a southeast azimuth coordinate set, and a northeast azimuth coordinate set.
[0075] Exemplarily, taking a longitude and latitude coordinate of a boundary point in the boundary longitude and latitude coordinate set as an example, if the first comparison result corresponding to the longitude and latitude coordinate of this boundary point is less than , and the second comparison result is less than , then the longitude and latitude coordinate of this boundary point is used as a longitude and latitude coordinate in the southwest azimuth coordinate set; if the first comparison result corresponding to the longitude and latitude coordinate of this boundary point is less than , and the second comparison result is greater than , then the longitude and latitude coordinate of this boundary point is used as a longitude and latitude coordinate in the northwest azimuth coordinate set; if the first comparison result corresponding to the longitude and latitude coordinate of this boundary point is greater than , and the second comparison result is less than , then the longitude and latitude coordinate of this boundary point is used as a longitude and latitude coordinate in the southeast azimuth coordinate set; if the first comparison result corresponding to the longitude and latitude coordinate of this boundary point is greater than , and the second comparison result is greater than , then the longitude and latitude coordinate of this boundary point is used as a longitude and latitude coordinate in the northeast azimuth coordinate set.
[0076] In addition, if the first comparison result corresponding to the longitude and latitude coordinate of this boundary point is equal to , and the second comparison result is less than , then the longitude and latitude coordinate of this boundary point Simultaneously divided into the southwest azimuth coordinate set and the southeast azimuth coordinate set; if the longitude and latitude coordinates of the boundary point The corresponding first comparison result is Equal to , the second comparison result is Greater than , then the longitude and latitude coordinates of the boundary point Simultaneously divided into the northwest azimuth coordinate set and the northeast azimuth coordinate set; if the longitude and latitude coordinates of the boundary point The corresponding first comparison result is Less than , the second comparison result is Equal to , then the longitude and latitude coordinates of the boundary point Simultaneously divided into the southwest azimuth coordinate set and the northwest azimuth coordinate set; if the longitude and latitude coordinates of the boundary point The corresponding first comparison result is Greater than , the second comparison result is Equal to , then the longitude and latitude coordinates of the boundary point Simultaneously divided into the southeast azimuth coordinate set and the northeast azimuth coordinate set.
[0077] It should be noted that the longitude and latitude coordinates of the boundary point correspond to a boundary point on the regional boundary in the map. The primary center point is a preliminary imaginary center point in the region of the map. Based on this primary center point, the boundary points corresponding to the longitude and latitude coordinates in the southwest azimuth coordinate set are all located in the southwest azimuth of the primary center point, that is, the regional boundary corresponding to the longitude and latitude coordinates of each boundary point in the southwest azimuth coordinate set is the regional boundary in the southwest azimuth of the corresponding region; similarly, the northwest azimuth coordinate set corresponds to the regional boundary in the northwest azimuth of the region, the southeast azimuth coordinate set corresponds to the regional boundary in the southeast azimuth of the region, and the northeast azimuth coordinate set corresponds to the regional boundary in the northeast azimuth of the region. By generating the above four azimuth coordinate sets, the division of the boundary points corresponding to the regional boundaries in the four azimuths of the region can be realized.
[0078] S330. Determine the corner point information of the azimuth quadrilateral corresponding one-to-one with the azimuth coordinate set based on the azimuth coordinate set and the primary center point.
[0079] S340. Determine the target center point based on the corner point information of multiple azimuth quadrilaterals, and generate the corresponding point name at the target center point.
[0080] Embodiment 4
[0081] A method for generating a map point name provided in Embodiment 4 of the present application optimizes the step of "determining the corner point information of the azimuth quadrilateral corresponding to the azimuth coordinate set based on the azimuth coordinate set and the primary center point" in Embodiment 1. It should be noted that for parts not described in detail in this embodiment, reference can be made to the descriptions of other embodiments. The method includes:
[0082] S410. Obtain a boundary longitude and latitude coordinate set based on the regional boundary in the map, and obtain a primary center point based on the boundary longitude and latitude coordinate set.
[0083] S420. Determine a plurality of azimuth coordinate sets based on the boundary longitude and latitude coordinate set and the primary center point.
[0084] S431. Determine the co-longitude adjacent points and co-latitude adjacent points based on the azimuth coordinate set and the primary center point.
[0085] Among them, the co-longitude adjacent point A is the longitude and latitude coordinate of the boundary point in the azimuth coordinate set that has the same longitude coordinate as the primary center point and the largest difference from the latitude coordinate of the primary point ; the co-latitude adjacent point B is the longitude and latitude coordinate of the boundary point in the azimuth coordinate set that has the same latitude coordinate as the primary center point and the largest difference from the longitude coordinate of the primary point ; each azimuth coordinate set can determine the corresponding co-longitude adjacent point A and co-latitude adjacent point B according to the primary center. and the largest difference from the longitude coordinate of the primary point ; each azimuth coordinate set can determine the corresponding co-longitude adjacent point A and co-latitude adjacent point B according to the primary center.
[0086] Specifically, taking the southwest azimuth coordinate set as an example, referring to Figure 2 , determine the longitude and latitude coordinate of the boundary point in the southwest azimuth coordinate set that has the same longitude coordinate as the primary center point and the largest difference from the latitude coordinate of the primary point to obtain the co-longitude adjacent point corresponding to the southwest azimuth coordinate set ; further, also determine the longitude and latitude coordinate of the boundary point in the southwest azimuth coordinate set that has the same latitude coordinate as the primary center point and the largest difference from the longitude coordinate of the primary point to obtain the co-latitude adjacent point corresponding to the southwest azimuth coordinate set and the largest difference from the longitude coordinate of the primary point to obtain the co-latitude adjacent point corresponding to the southwest azimuth coordinate set ; similarly, referring to Figure 2 , the co-longitude adjacent point and co-latitude adjacent point corresponding to the northwest azimuth coordinate set can also be determined, and the co-longitude adjacent point and co-latitude adjacent point corresponding to the southeast azimuth coordinate set , the adjacent points with the same longitude corresponding to the northeast azimuth coordinate set and the adjacent points with the same latitude .
[0087] S432. Obtain the central diagonal point based on the adjacent points with the same longitude and the adjacent points with the same latitude.
[0088] Among them, taking one azimuth coordinate set as an example, record the longitude and latitude coordinates of the adjacent points with the same longitude corresponding to this azimuth coordinate set as , and record the longitude and latitude coordinates of the adjacent points with the same latitude corresponding to it as ; the longitude coordinate of the central diagonal point is the longitude coordinate of the adjacent point with the same latitude , and the latitude coordinate of the central diagonal point C is the latitude coordinate of the adjacent point with the same longitude , that is, the longitude and latitude coordinates of the central diagonal point are .
[0089] Specifically, taking the southwest azimuth coordinate set as an example, refer to Figure 2 , the adjacent points with the same longitude corresponding to the southwest azimuth coordinate set have longitude and latitude coordinates of , and the adjacent points with the same latitude have longitude and latitude coordinates recorded as ; obtain the longitude coordinate of the adjacent point with the same latitude , and also obtain the latitude coordinate of the adjacent point with the same longitude , take as the longitude coordinate of the central diagonal point, and take as the latitude coordinate of the central diagonal point, so as to obtain the central diagonal point ; and record the primary center point as O. From the primary center point O, the adjacent points with the same longitude and the adjacent points with the same latitude corresponding to the southwest azimuth coordinate set, as well as the central diagonal point can form a quadrilateral, denoted as the southwest azimuth quadrilateral. Among them, the central diagonal point has a diagonal relationship with the primary center point O. Similarly, determine the adjacent points with the same longitude and the adjacent points with the same latitude corresponding to the northwest azimuth coordinate set, as well as the central diagonal point . From the primary center point O, the adjacent points with the same longitude , the adjacent points with the same latitude and the central diagonal point can form a northwest azimuth quadrilateral. Determine the adjacent points with the same longitude and the adjacent points with the same latitude corresponding to the southeast azimuth coordinate set, as well as the central diagonal point , from the primary center point O, adjacent points of the same longitude , adjacent points of the same latitude and the central diagonal point , a quadrilateral in the southeast direction can be formed. Also determine the adjacent points of the same longitude corresponding to the coordinate set in the northeast direction , adjacent points of the same latitude and the central diagonal point . From the primary center point O, adjacent points of the same longitude , adjacent points of the same latitude and the central diagonal point , a quadrilateral in the northeast direction can be formed.
[0090] S433. Obtain the corner point information of the azimuth quadrilateral based on the primary center point, the adjacent points of the same longitude, the adjacent points of the same latitude, and the central diagonal point.
[0091] Among them, taking one azimuth coordinate set as an example, the primary center point O, the adjacent point A of the same longitude, the adjacent point B of the same latitude, and the central diagonal point C corresponding to this azimuth coordinate set can form the four corner points of a quadrilateral. The corner point information of the azimuth quadrilateral is also the coordinates of these four corner points.
[0092] S440. Determine the target center point based on the corner point information of multiple azimuth quadrilaterals, and generate the corresponding point name at the target center point.
[0093] Embodiment 5
[0094] A method for generating a map point name provided in Embodiment 5 of this application optimizes the "determine the target center point based on the corner point information of multiple azimuth quadrilaterals and generate the corresponding point name at the target center point" in Embodiment 1. It should be noted that for the parts not detailed in this embodiment, the descriptions of other embodiments can be referred to. This method includes:
[0095] S510. Obtain the boundary longitude and latitude coordinate set based on the regional boundary in the map, and obtain the primary center point based on the boundary longitude and latitude coordinate set.
[0096] S520. Determine multiple azimuth coordinate sets based on the boundary longitude and latitude coordinate set and the primary center point.
[0097] S530. Determine the corner point information of the azimuth quadrilateral corresponding to the azimuth coordinate set based on the azimuth coordinate set and the primary center point.
[0098] S541. Determine the target quadrilateral corner point information based on the corner point information of multiple azimuth quadrilaterals, and obtain the target center point based on the target quadrilateral corner point information.
[0099] Among them,Figure 2 The origin of the longitude and latitude coordinate axes shown is the primary center point , and each adjacent point with the same longitude is located on the longitude coordinate axis of the longitude and latitude coordinate axes, and each adjacent point with the same latitude is located on the latitude coordinate axis of the longitude and latitude coordinate axes.
[0100] Among them, adjacent points with the same latitude whose longitude coordinates are less than can be determined from each adjacent point with the same latitude to obtain a left adjacent point group with the same latitude. In this embodiment, the left adjacent point group with the same latitude is also and ; Adjacent points with the same latitude whose longitude coordinates are greater than can also be determined from each adjacent point with the same latitude to obtain a right adjacent point group with the same latitude. In this embodiment, the right adjacent point group with the same latitude is also and ; In addition, adjacent points with the same longitude whose latitude coordinates are less than can be determined from each adjacent point with the same longitude to obtain a lower adjacent point group with the same longitude. In this embodiment, the lower adjacent point group with the same longitude is also and ; Adjacent points with the same longitude whose latitude coordinates are greater than can also be determined from each adjacent point with the same longitude to obtain an upper adjacent point group with the same longitude. In this embodiment, the upper adjacent point group with the same longitude is also and . Then, the adjacent point with the same latitude having the largest longitude coordinate can be determined from the left adjacent point group with the same latitude and denoted as the left target point , and the adjacent point with the same latitude having the smallest longitude coordinate can be determined from the right adjacent point group with the same latitude and denoted as the right target point ; The adjacent point with the same longitude having the smallest latitude can be determined from the lower adjacent point group with the same longitude and denoted as the lower target point , and the adjacent point with the same longitude having the largest latitude can be determined from the upper adjacent point group with the same longitude and denoted as the upper target point . Further, a first straight line can be obtained by drawing a straight line passing through the left target point and perpendicular to the longitude coordinate axis , a second straight line can be obtained by drawing a straight line passing through the right target point and perpendicular to the longitude coordinate axis , a third straight line can be obtained by drawing a straight line passing through the lower target point and perpendicular to the latitude coordinate axis , and a fourth straight line can be obtained by drawing a straight line passing through the upper target point and perpendicular to the latitude coordinate axis . The first straight line , the second straight line , the third straight line and the fourth straight line A quadrilateral can be formed, such as Figure 3 shown, and this quadrilateral is denoted as the target quadrilateral; The intersection point of the first straight line and the third straight line is the first target corner point of the target quadrilateral , the intersection point of the first straight line and the fourth straight line is the second target corner point of the target quadrilateral , the intersection point of the second straight line and the third straight line is the third target corner point of the target quadrilateral , the intersection point of the second straight line and the fourth straight line is the fourth target corner point of the target quadrilateral ; The corner point information of the target quadrilateral is the set of the longitude and latitude coordinates of the above four target corner points; The connection line between the first target corner point and the fourth target corner point can form the first target diagonal line, and the connection line between the second target corner point and the third target corner point can form the second target diagonal line; The target center point is the intersection point of the first target diagonal line and the second target diagonal line.
[0101] S542. Calculate the longitude and latitude span of the map based on the corner point information of the displayed map.
[0102] Among them, the map is displayed on the display screen, and the corner point information of the displayed map includes the longitude and latitude coordinates of the map displayed on the display screen at the lower left corner of the display screen, denoted as the lower left coordinate , the longitude and latitude coordinates of the map displayed on the display screen at the upper left corner of the display screen, denoted as the upper left coordinate , the longitude and latitude coordinates of the map displayed on the display screen at the lower right corner of the display screen, denoted as the lower right coordinate , the longitude and latitude coordinates of the map displayed on the display screen at the upper right corner of the display screen, denoted as the upper right coordinate .
[0103] S543. Obtain the size of the target quadrilateral based on the display screen size, the longitude and latitude span of the map, and the corner point information of the target quadrilateral.
[0104] Among them, the display screen size is also the width of the display screen and the height ; The longitude and latitude span of the map includes the longitude span and the latitude span , the longitude span can be the difference between and , or the difference between and , the latitude span can be the difference between and , or the difference between and The difference between. Width And the longitude span The ratio between them is the width ratio , Height And the latitude span The ratio between them is the height ratio ; Through the first target corner point of the target quadrilateral And the third target corner point The longitude span of the target quadrilateral can be calculated, denoted as the target longitude span , And it can also be passed through the second target corner point And the fourth target corner point Calculate this target longitude span ; Through the first target corner point of the target quadrilateral passed through And the second target corner point The latitude span of the target quadrilateral can be calculated, denoted as the target latitude span , And it can also be passed through the third target corner point And the fourth target corner point Calculate this target latitude span ; The target quadrilateral size includes the actual width of the target quadrilateral on the display screen And the actual height , Among them, the actual width Is the product of the target longitude span And the width ratio , The actual height Is the product of the target latitude span And the height ratio .
[0105] S544. Generate a point name at the target center point based on the target quadrilateral size and the point name size.
[0106] Among them, the point name is the name of the corresponding area in the map; the point name size is the character line width corresponding to the point name And the character line height ; By comparing the target quadrilateral size and the point name size, it can be judged whether the point name with the point name size can be included in the target quadrilateral with the target quadrilateral size; if so, generate the point name at the target center point of the target quadrilateral.
[0107] Specifically, judge whether the point name with the point name size can be included in the target quadrilateral with the target quadrilateral size; if so, generate the point name at the target center point of the target quadrilateral.
[0108] Example Six
[0109] A method for generating a map point name provided in Embodiment 6 of the present application optimizes "obtaining the target quadrilateral size based on the display screen size, the map longitude and latitude span, and the target quadrilateral corner point information" in Embodiment 5; it should be noted that for parts not detailed in this embodiment, reference can be made to the descriptions of other embodiments. The method includes:
[0110] S610. Obtain a set of boundary longitude and latitude coordinates based on the regional boundary in the map, and obtain a primary center point based on the set of boundary longitude and latitude coordinates.
[0111] S620. Determine multiple sets of azimuth coordinates based on the set of boundary longitude and latitude coordinates and the primary center point.
[0112] S630. Determine the target quadrilateral corner point information corresponding to the set of azimuth coordinates one by one based on the set of azimuth coordinates and the primary center point.
[0113] S641. Determine the target quadrilateral corner point information based on multiple sets of the target quadrilateral corner point information, and obtain a target center point based on the target quadrilateral corner point information.
[0114] S642. Calculate the map longitude and latitude span based on the display map corner point information.
[0115] S643A. Calculate the width-to-height ratio information based on the display screen size and the map longitude and latitude span.
[0116] Among them, the width-to-height ratio information includes the width ratio and the height ratio , where , is the width in the display screen size, the height in the display screen size, is the longitude span in the map longitude and latitude span corresponding to the map displayed on the display screen, is the latitude span in the map longitude and latitude span corresponding to the map displayed on the display screen.
[0117] S643B. Calculate the target quadrilateral size based on the target quadrilateral corner point information and the width-to-height ratio information.
[0118] Among them, the target longitude span and the target latitude span can be calculated according to the target quadrilateral corner point information; the quadrilateral size includes the actual width and the actual height of the target quadrilateral on the display screen, where .
[0119] S644. Generate a point name at the target center point based on the target quadrilateral size and the point name size.
[0120] Embodiment Seven
[0121] A method for generating a map point name provided in Embodiment Seven of the present application optimizes the "generating a point name at the target center point based on the target quadrilateral size and the point name size" in Embodiment Five. It should be noted that for parts not detailed in this embodiment, reference can be made to the descriptions of other embodiments. The method includes:
[0122] S710. Obtain a set of boundary longitude and latitude coordinates based on the regional boundary in the map, and obtain a primary center point based on the set of boundary longitude and latitude coordinates.
[0123] S720. Determine a plurality of azimuth coordinate sets based on the set of boundary longitude and latitude coordinates and the primary center point.
[0124] S730. Determine the corner point information of the azimuth quadrilateral corresponding to the azimuth coordinate set one by one based on the azimuth coordinate set and the primary center point.
[0125] S741. Determine the target quadrilateral corner point information based on the corner point information of multiple azimuth quadrilaterals, and obtain the target center point based on the target quadrilateral corner point information.
[0126] S742. Calculate the map longitude and latitude span based on the display map corner point information.
[0127] S743. Obtain the target quadrilateral size based on the display screen size, the map longitude and latitude span, and the target quadrilateral corner point information.
[0128] S744A. Determine whether the point name size exceeds the target quadrilateral size.
[0129] Among them, the point name size includes the character line width and the character line height , and the target quadrilateral size includes the actual width and the actual height of the target quadrilateral on the display screen.
[0130] In an optional embodiment, if the character line width is greater than the actual width and / or the character line height is greater than the actual height , it is determined that the point name size exceeds the target quadrilateral size.
[0131] In another optional implementation, if it is determined that the character line width is greater than the actual width and the character line width is greater than the actual height and / or the character line height is greater than the actual width , then the size of the fixed-point name exceeds the size of the target quadrilateral. It should be noted that the judgment method in this embodiment is to judge whether the characters of the point name can be located within the target quadrilateral when the overall length of the characters of the point name is horizontal and the overall length of the shape of the target quadrilateral is vertical.
[0132] S744B. If so, reduce the size of the point name to obtain a new size of the point name.
[0133] Among them, the initial size of the point name size is 16px. If it is judged that the point name size exceeds the size of the target quadrilateral, the point name size is reduced. Each time it is decreased by 2px; for example, if it is judged that the point name size exceeds the size of the target quadrilateral, the point name size is reduced from 16px to 14px, and 14px is the new point name size.
[0134] Specifically, if it is judged that the point name size exceeds the size of the target quadrilateral, it means that the characters of the point name will exceed the target quadrilateral at this time. At this time, the point name size of the point name is reduced, so as to obtain a new point name size, and then return to execute step S744A.
[0135] S744C. Otherwise, generate a point name corresponding to the point name size at the target center point.
[0136] Among them, if it is judged that the point name size does not exceed the size of the target quadrilateral, it means that the characters of the point name do not exceed the target quadrilateral at this time, that is to say, at this time, it is suitable to generate a point name corresponding to the point name size at the target center point of the target quadrilateral.
[0137] Specifically, if it is judged that the point name size does not exceed the size of the target quadrilateral, a point name corresponding to the point name size is generated at the target center point of the target quadrilateral.
[0138] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown according to the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0139] Embodiment VIII
[0140] Based on the same inventive concept, this embodiment also provides a map point name generation device for implementing the map point name generation method described above. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more map point name generation device embodiments provided below can refer to the limitations on the map point name generation method in the above text, and will not be repeated here.
[0141] In this embodiment, as Figure 4 shown, a map point name generation device is provided, including:
[0142] A primary center determination module, configured to obtain a set of boundary longitude and latitude coordinates based on the regional boundary in the map, and obtain a primary center point based on the set of boundary longitude and latitude coordinates;
[0143] A coordinate set determination module, configured to determine multiple azimuth coordinate sets based on the set of boundary longitude and latitude coordinates and the primary center point;
[0144] A corner point information determination module, configured to determine azimuth quadrilateral corner point information corresponding to the azimuth coordinate sets based on the azimuth coordinate sets and the primary center point;
[0145] A point name generation module, configured to determine a target center point based on multiple pieces of the azimuth quadrilateral corner point information, and generate a corresponding point name at the target center point.
[0146] Each module in the above map point name generation device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.
[0147] It should be noted that in this embodiment, a set of boundary longitude and latitude coordinates is obtained based on the regional boundary in the map, and a primary center point is obtained based on the set of boundary longitude and latitude coordinates; a plurality of azimuth coordinate sets are determined based on the set of boundary longitude and latitude coordinates and the primary center point; azimuth quadrilateral corner point information corresponding to the azimuth coordinate sets one by one is determined based on the azimuth coordinate sets and the primary center point; a target center point is determined based on the plurality of azimuth quadrilateral corner point information, and a corresponding point name is generated at the target center point. Through the above implementation, regardless of whether the edge of the regional boundary is regular or not, a preliminary center point, that is, a primary center point, can be generated according to the regional boundary first; then, the longitude and latitude coordinates of each boundary point on the regional boundary (that is, the set of boundary longitude and latitude coordinates) are divided in different azimuths based on the primary center point, so as to obtain azimuth coordinate sets corresponding to different azimuths. Then, a target quadrilateral located at the actual center position of the region is generated according to each azimuth coordinate set. Next, the center point of the target quadrilateral, that is, the target center point, is determined, and finally, a point name is generated at the target center point. In this way, a point name can be generated at the true center position of the region in the map.
[0148] Embodiment Nine
[0149] In this embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as Figure 5 shown. The computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a method for generating a map point name.
[0150] Those skilled in the art can understand that Figure 5 the structure shown in
[0151] is only a block diagram of some structures related to the solution of the present disclosure, and does not constitute a limitation on the computer device to which the solution of the present disclosure is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0152] In this embodiment, a computer-readable storage medium is provided, as Figure 6 shown, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps in the above method embodiments.
[0153] Example XI
[0154] In this embodiment, a computer program product is provided, including a computer program which, when executed by a processor, implements the steps in the above method embodiments.
[0155] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0156] Those of ordinary skill in the art can understand that all or part of the processes of implementing the above method embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above method embodiments. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this disclosure can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. 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. The databases involved in the embodiments provided in this disclosure can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., and are not limited thereto. The processors involved in the embodiments provided in this disclosure can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., and are not limited thereto.
[0157] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, 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, it should be considered as the scope recorded in this specification.
[0158] The above-described embodiments merely represent several implementation manners of the present disclosure. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the patent of the present disclosure. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present disclosure, several variations and improvements can still be made, and these all belong to the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the appended claims.
Claims
1. A method for generating a map point name, characterized in that: include: Obtaining a boundary longitude and latitude coordinate set based on the regional boundary in the map, and obtaining a primary center point based on the boundary longitude and latitude coordinate set; Determine a plurality of orientation coordinate sets based on the boundary longitude and latitude coordinate sets and the primary center point; Determine, based on the orientation coordinate set and the primary center point, orientation quadrilateral corner point information corresponding one-to-one to the orientation coordinate set; Determine the target center point based on the information of the plurality of azimuth quadrilateral corner points, and generate a corresponding point name at the target center point; The primary center point includes a primary point longitude coordinate and a primary point latitude coordinate; and the step of determining a plurality of azimuth coordinate sets based on the boundary longitude and latitude coordinate sets and the primary center point includes: Comparing the longitude coordinates of the primary point with the longitude coordinates of the boundary point in the boundary longitude and latitude coordinate set to obtain a first comparison result; Comparing the latitude coordinate of the primary point with the latitude coordinate of the boundary point in the boundary longitude and latitude coordinate set to obtain a second comparison result; Dividing the boundary longitude and latitude coordinate set into a plurality of azimuth coordinate sets based on the first comparison result and the second comparison result; Wherein, determining the orientation quadrilateral corner point information corresponding to the orientation coordinate set one by one based on the orientation coordinate set and the primary center point includes: Determine adjacent points with the same longitude and adjacent points with the same latitude based on the azimuth coordinate set and the primary center point; wherein the adjacent points with the same longitude are the longitude and latitude coordinates of the boundary points in the azimuth coordinate set that have the same longitude coordinates as the primary center point and whose latitude coordinates have the largest difference with the latitude coordinates of the primary point, and the adjacent points with the same latitude are the longitude and latitude coordinates of the boundary points in the azimuth coordinate set that have the same latitude coordinates as the primary center point and whose longitude coordinates have the largest difference with the longitude coordinates of the primary point; The central diagonal point is obtained based on the adjacent points with the same longitude and the adjacent points with the same latitude; wherein the longitude coordinates of the central diagonal point are the longitude coordinates of the adjacent points with the same latitude of the primary central point, and the latitude coordinates of the central diagonal point are the latitude coordinates of the adjacent points with the same longitude of the primary central point; Obtaining azimuth quadrilateral corner point information based on the primary center point, the adjacent points at the same longitude, the adjacent points at the same latitude, and the center diagonal point; Wherein, determining the target center point based on the information of the plurality of azimuth quadrilateral corner points and generating a corresponding point name at the target center point comprises: Determine target quadrilateral corner point information based on the plurality of orientation quadrilateral corner point information, and obtain the target center point based on the target quadrilateral corner point information; Calculate the longitude and latitude span of the map based on the displayed map corner information; Obtaining the size of the target quadrilateral based on the display screen size, the longitude and latitude span of the map, and the corner point information of the target quadrilateral; A point name is generated at the target center point based on the target quadrilateral size and the point name size.
2. The method according to claim 1, characterized in that The boundary longitude and latitude coordinate set includes a plurality of boundary point longitude and latitude coordinates, and the boundary point longitude and latitude coordinates include boundary point longitude coordinates and boundary point latitude coordinates; and obtaining a primary center point based on the boundary longitude and latitude coordinate set includes: Determine the longitude coordinates of the boundary point with the smallest value in the boundary longitude and latitude coordinate set to obtain the valley value longitude coordinates, and determine the longitude coordinates of the boundary point with the largest value in the boundary longitude and latitude coordinate set to obtain the peak value longitude coordinates; Determine the latitude coordinates of the boundary point with the smallest value in the boundary longitude and latitude coordinate set to obtain the valley latitude coordinates, and determine the latitude coordinates of the boundary point with the largest value in the boundary longitude and latitude coordinate set to obtain the peak latitude coordinates; A primary center point is obtained based on the valley value longitude coordinate, the peak value longitude coordinate, the valley value latitude coordinate, and the peak value latitude coordinate.
3. The method according to claim 1, characterized in that The step of obtaining the target quadrilateral size based on the display screen size, the longitude and latitude span of the map, and the target quadrilateral corner point information includes: Calculate aspect ratio information based on the display screen size and the longitude and latitude span of the map; The size of the target quadrilateral is calculated based on the target quadrilateral corner point information and the aspect ratio information.
4. The method according to claim 1, characterized in that The generating a point name at the target center point based on the target quadrilateral size and the point name size includes: Determine whether the size of the point name exceeds the size of the target quadrilateral; If so, reducing the size of the point name to obtain a new point name size; Otherwise, a point name corresponding to the point name size is generated at the target center point.
5. A device for generating a map point name, characterized in that: include: A primary center determination module, used to obtain a boundary longitude and latitude coordinate set based on the regional boundary in the map, and obtain a primary center point based on the boundary longitude and latitude coordinate set; A coordinate set determination module, used to determine a plurality of azimuth coordinate sets based on the boundary longitude and latitude coordinate set and the primary center point; A corner point information determination module, configured to determine, based on the orientation coordinate set and the primary center point, the orientation quadrilateral corner point information corresponding to the orientation coordinate set in a one-to-one manner; A point name generating module, used to determine a target center point based on the information of a plurality of said orientation quadrilateral corner points, and to generate a corresponding point name at said target center point; The primary center point includes a primary point longitude coordinate and a primary point latitude coordinate; and the step of determining a plurality of azimuth coordinate sets based on the boundary longitude and latitude coordinate sets and the primary center point includes: Comparing the longitude coordinates of the primary point with the longitude coordinates of the boundary point in the boundary longitude and latitude coordinate set to obtain a first comparison result; Comparing the latitude coordinate of the primary point with the latitude coordinate of the boundary point in the boundary longitude and latitude coordinate set to obtain a second comparison result; Dividing the boundary longitude and latitude coordinate set into a plurality of azimuth coordinate sets based on the first comparison result and the second comparison result; Wherein, determining the orientation quadrilateral corner point information corresponding to the orientation coordinate set one by one based on the orientation coordinate set and the primary center point includes: Determine adjacent points with the same longitude and adjacent points with the same latitude based on the azimuth coordinate set and the primary center point; wherein the adjacent points with the same longitude are the longitude and latitude coordinates of the boundary points in the azimuth coordinate set that have the same longitude coordinates as the primary center point and whose latitude coordinates have the largest difference with the latitude coordinates of the primary point, and the adjacent points with the same latitude are the longitude and latitude coordinates of the boundary points in the azimuth coordinate set that have the same latitude coordinates as the primary center point and whose longitude coordinates have the largest difference with the longitude coordinates of the primary point; The central diagonal point is obtained based on the adjacent points with the same longitude and the adjacent points with the same latitude; wherein the longitude coordinates of the central diagonal point are the longitude coordinates of the adjacent points with the same latitude of the primary central point, and the latitude coordinates of the central diagonal point are the latitude coordinates of the adjacent points with the same longitude of the primary central point; Obtaining azimuth quadrilateral corner point information based on the primary center point, the adjacent points at the same longitude, the adjacent points at the same latitude, and the center diagonal point; Wherein, determining the target center point based on the information of the plurality of azimuth quadrilateral corner points and generating a corresponding point name at the target center point comprises: Determine target quadrilateral corner point information based on the plurality of orientation quadrilateral corner point information, and obtain the target center point based on the target quadrilateral corner point information; Calculate the longitude and latitude span of the map based on the displayed map corner information; Obtaining the size of the target quadrilateral based on the display screen size, the longitude and latitude span of the map, and the corner point information of the target quadrilateral; A point name is generated at the target center point based on the target quadrilateral size and the point name size.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Map area name display method and device
CN108073581A