Map region to-be-rendered boundary line determination method and device, equipment and medium

By determining the vertex pixel coordinates of the target area and judging the boundary lines, the problem of rendering irregularities and gaps caused by the target area spanning multiple map sheets in map rendering is solved, achieving higher quality rendering and user experience.

CN116580046BActive Publication Date: 2025-11-07AUTONAVI SOFTWARE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310552369.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-16
Publication Date
2025-11-07
Estimated Expiration
2043-05-16

AI Technical Summary

Technical Problem

In existing technologies, when a target area spans multiple map sheets during map rendering, the rendering boundaries become irregular or there are gaps in the area, affecting rendering quality and user experience.

Method used

By identifying the target sub-region within the current map area, obtaining its vertex pixel coordinates, and traversing the vertices in a preset order, it is determined whether the boundary line starting from a certain vertex is the boundary line to be rendered, ensuring that the target area is rendered together in different map areas.

Benefits of technology

This avoids irregular rendering boundaries and gaps in the rendering area, improving the rendering quality of map data and the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116580046B_ABST
    Figure CN116580046B_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose a map region to-be-rendered boundary line determination method, device, equipment and medium, the method comprises: determining a target sub-region of a target region located in a current map range; determining the vertex of the target sub-region, and obtaining the target sub-region vertex pixel coordinates relative to the current map; according to the preset order, traversing the target sub-region vertex, and determining whether the boundary line starting from a certain target sub-region vertex and ending at the next vertex of the vertex is a to-be-rendered boundary line according to the target sub-region vertex pixel coordinates. The subsequent technical scheme can realize the rendering of the part of the target region located in different maps and the corresponding map together, avoiding the situation that when the target region crosses one or more maps, the rendering boundary of a certain map is irregular, or part of the rendering region of a certain map is missing, thereby facilitating the improvement of the rendering quality of the map data and the improvement of the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of map rendering technology, specifically to a method, apparatus, device, and medium for determining the boundary line of a map area to be rendered. Background Technology

[0002] Currently, map rendering is typically performed using map sheets of different levels. However, since map sheets are rectangular areas of a certain size, and their division is not based on map data, situations may arise where geometric shapes representing areas such as parks and schools span one or more map sheets. Figure 1A As shown, in Figure 1A In the image, the shaded area represents a target region spanning three map sheets: map sheet 1, map sheet 2, and map sheet 3. In such cases, existing techniques typically determine one map sheet from the three spanned by the target region. For example, map sheet 1, which covers the largest area of ​​the target region, can be selected as the map sheet to be rendered along with the target region. That is, when rendering the map data corresponding to map sheet 1, the map data corresponding to the target region is rendered along with it. However, when rendering the map data corresponding to the other two map sheets, the map data corresponding to the portion of the target region within each map sheet will not be rendered. Due to the presence of the target region, this processing method may result in the rendering boundary of a certain map sheet being prominent and irregular, such as... Figure 1B As shown, or in cases where a certain rendering area of ​​a map is missing, such as... Figure 1C and Figure 1D As shown, it is clear that this processing method is detrimental to improving map data rendering quality and user experience. Therefore, a map area rendering solution that can improve map data rendering quality and enhance user experience is needed. Summary of the Invention

[0003] This disclosure provides a method, apparatus, device, and medium for determining the boundary line of a map area to be rendered.

[0004] In a first aspect, this disclosure provides a method for determining the boundary line of a map area to be rendered.

[0005] Specifically, the method for determining the boundary line of the map area to be rendered includes:

[0006] Identify the target sub-region within the current map area;

[0007] Determine the vertices of the target sub-region and obtain the pixel coordinates of the target sub-region vertices relative to the current map area;

[0008] According to the preset order, the target sub-region vertices are traversed, and whether a boundary line starting from a target sub-region vertex and ending at a next target sub-region vertex of the target sub-region vertex is a boundary line to be rendered is determined according to the pixel coordinates of the target sub-region vertex, wherein the next target sub-region vertex of the target sub-region vertex is determined according to the preset order.

[0009] In a second aspect, a map rendering method is provided in the embodiments of the present disclosure, wherein the map contains a part of a target region.

[0010] Specifically, the map rendering method comprises:

[0011] determining a target sub-region in which the target region is located within a range of a current map;

[0012] determining a boundary line to be rendered of the target sub-region based on the above method for determining a boundary line to be rendered of a map region;

[0013] performing map rendering based on map data corresponding to the current map and the boundary line to be rendered of the target sub-region.

[0014] In a third aspect, a device for determining a boundary line to be rendered of a map region is provided in the embodiments of the present disclosure.

[0015] Specifically, the device for determining a boundary line to be rendered of a map region comprises:

[0016] a first determining module configured to determine a target sub-region in which a target region is located within a range of a current map;

[0017] a obtaining module configured to determine vertices of the target sub-region and obtain pixel coordinates of the target sub-region vertices relative to target sub-region vertices of the current map;

[0018] a second determining module configured to traverse the target sub-region vertices according to a preset order, and determine whether a boundary line starting from a target sub-region vertex and ending at a next target sub-region vertex of the target sub-region vertex is a boundary line to be rendered according to the pixel coordinates of the target sub-region vertex, wherein the next target sub-region vertex of the target sub-region vertex is determined according to the preset order.

[0019] In a fourth aspect, a map rendering device is provided in the embodiments of the present disclosure, wherein the map contains a part of a target region.

[0020] Specifically, the map rendering device comprises:

[0021] a third determining module configured to determine a target sub-region in which a target region is located within a range of a current map;

[0022] A fourth determining module is configured to determine the to-be-rendered boundary line of the target sub-region based on the above-mentioned map region to-be-rendered boundary line determining apparatus.

[0023] A sheet rendering module is configured to perform sheet rendering based on the sheet data corresponding to the current sheet and the to-be-rendered boundary line of the target sub-region.

[0024] In a fifth aspect, an electronic device is provided, which includes a memory and at least one processor, wherein the memory is configured to store one or more computer instructions, and the one or more computer instructions are executed by the at least one processor to implement the above-mentioned map region to-be-rendered boundary line determining / sheet rendering method.

[0025] In a sixth aspect, a computer readable storage medium is provided, which is configured to store computer instructions for a map region to-be-rendered boundary line determining / sheet rendering apparatus, and the computer instructions are related to the map region to-be-rendered boundary line determining / sheet rendering apparatus for implementing the above-mentioned map region to-be-rendered boundary line determining / sheet rendering method.

[0026] In a seventh aspect, a computer program product is provided, which includes computer programs / instructions, and the computer programs / instructions are executed by a processor to implement the above-mentioned map region to-be-rendered boundary line determining / sheet rendering method.

[0027] The technical solution provided by the embodiments of the present disclosure can have the following beneficial effects:

[0028] The technical solution separates the target sub-region in the target region within the range of the current sheet, and then determines whether the boundary line starting from a vertex of a target sub-region and ending at the next vertex of the vertex is a to-be-rendered boundary line. Based on this, the technical solution can implement rendering of the part of the target region in different sheets together with the corresponding sheet, which avoids the case that the rendering boundary of a sheet is irregular or the part of the rendering region of a sheet is missing when the target region spans one or more sheets, and thus is beneficial to improving the rendering quality of map data and the user experience.

[0029] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0030] Other features, objects and advantages of the present disclosure will become more apparent from the following detailed description of the non-limiting embodiments, taken in conjunction with the accompanying drawings. In the drawings:

[0031] Figure 1AFig. 1 shows a schematic diagram of a target region across three map sheets according to an embodiment of the present disclosure;

[0032] Figure 1B Fig. 2 shows a schematic diagram of map sheet 1 after rendering the target region together with map sheet 1 according to an embodiment of the present disclosure;

[0033] Figure 1C Fig. 3 shows a schematic diagram of map sheet 2 after rendering the target region together with map sheet 1 according to an embodiment of the present disclosure;

[0034] Figure 1D Fig. 4 shows a schematic diagram of map sheet 3 after rendering the target region together with map sheet 1 according to an embodiment of the present disclosure;

[0035] Figure 2 Fig. 5 shows a flow chart of a method for determining a boundary line to be rendered for a map region according to an embodiment of the present disclosure;

[0036] Figure 3A Fig. 6 shows a schematic diagram of map sheet 1 after cutting a target region according to an embodiment of the present disclosure;

[0037] Figure 3B Fig. 7 shows a schematic diagram of a map sheet coordinate system established on a map sheet interface displayed by a first level world map according to an embodiment of the present disclosure;

[0038] Figure 3C Fig. 8 shows a schematic diagram of a calculation of a relative map sheet coordinate of a target region pixel according to an embodiment of the present disclosure;

[0039] Figure 3D Fig. 9 shows a schematic diagram of a judgment of a target region sub-region vertex according to an embodiment of the present disclosure;

[0040] Figure 3E Fig. 10 shows a schematic diagram of a judgment flow of a boundary line to be rendered according to an embodiment of the present disclosure;

[0041] Figure 3F Fig. 11 shows a schematic diagram of a rendered boundary line of a target region sub-region according to an embodiment of the present disclosure;

[0042] Figure 4 Fig. 12 shows a flow chart of a map sheet rendering method according to an embodiment of the present disclosure;

[0043] Figure 5 Fig. 13 shows a structure block diagram of a device for determining a boundary line to be rendered for a map region according to an embodiment of the present disclosure;

[0044] Figure 6 Fig. 14 shows a structure block diagram of a map sheet rendering device according to an embodiment of the present disclosure;

[0045] Figure 7A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown;

[0046] Figure 8 is a structural schematic diagram of a computer system suitable for implementing a map region to-be-rendered boundary line determination / sheet rendering method according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0047] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so as to be easily carried out by one of ordinary skill in the art. Also, portions unrelated to the description of the exemplary embodiments are omitted in the drawings for the sake of clarity.

[0048] In the present disclosure, it should be understood that terms such as "include" or "have" are intended to indicate that there are features, numbers, steps, actions, parts, or combinations thereof disclosed in the specification, and do not exclude the possibility that one or more other features, numbers, steps, actions, parts, or combinations thereof exist or are added.

[0049] The user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.

[0050] In addition, it should be further noted that the embodiments in the present disclosure and the features in the embodiments can be combined with each other without conflict. The present disclosure will be described in detail below with reference to the drawings and in combination with the embodiments.

[0051] The technical solution provided by the embodiments of the present disclosure separates the target sub-regions of the target region located within the current sheet range, and then determines in turn whether the boundary line starting from a vertex of a certain target sub-region and ending at the next vertex of the vertex is a to-be-rendered boundary line. Based on this, the technical solution can subsequently implement rendering of the part of the target region located in different sheets together with the corresponding sheets, which avoids the situation that the rendering boundary of a certain sheet is irregular or the part of the rendering region of a certain sheet is missing when the target region spans one or more sheets, and thus is conducive to improving the rendering quality of map data and the improvement of user experience.

[0052] Figure 2 A flowchart of a map region to-be-rendered boundary line determination method according to an embodiment of the present disclosure is shown as follows, Figure 2 As shown in the figure, the map region to-be-rendered boundary line determination method includes the following steps S201-S203:

[0053] In step S201, a target sub-region of the target region located in the current map range is determined;

[0054] In step S202, the vertices of the target sub-region are determined, and the pixel coordinates of the target sub-region vertices relative to the target sub-region vertices of the current map are obtained;

[0055] In step S203, the target sub-region vertices are traversed in a preset order, and it is determined according to the pixel coordinates of the target sub-region vertices whether a boundary line starting from a certain target sub-region vertex and ending at the next vertex of the certain target sub-region vertex is a boundary line to be rendered, wherein the next vertex of the certain target sub-region vertex is determined according to the preset order.

[0056] As mentioned above, currently, when rendering a map, it is usually rendered in units of different levels of maps. However, since a map is a square region with a certain size range, and the division of the map is not based on map data, there may be a situation that a geometric figure representing a region with a certain shape, such as a park or a school, crosses one or more maps, for example, Figure 1A As shown in Figure 1A , the shaded part represents a target region that crosses three maps: map 1, map 2, and map 3. For this case, the prior art usually determines a map among the three maps crossed by the target region, for example, map 1 covering the largest area of the target region can be selected as the map to be rendered together with the target region, that is, when rendering the map data corresponding to the map, the map data corresponding to the target region is also rendered, while when rendering the map data corresponding to the other two maps, the map data corresponding to the part of the target region in the corresponding map will not be rendered. Due to the existence of the target region, this processing method may result in a rendering boundary of a certain map that is likely to be prominent and irregular, as shown in Figure 1B , or a situation that the rendering region of a certain map is empty, as shown in Figure 1C and Figure 1D Obviously, this processing method is not conducive to improving the rendering quality of map data and is not conducive to improving the user experience. Therefore, it is necessary to provide a map region rendering scheme that can improve the rendering quality of map data and improve the user experience.

[0057] In view of the above defects, the present disclosure aims to provide a scheme capable of rendering the part of the target region located in different sheets together with the corresponding sheet, and in the implementation of the scheme, the boundary line of the part of the target region located in the current sheet range needs to be processed in different cases, for example, the boundary line located inside the sheet needs to be rendered to identify the contour of the target region, but the boundary line located on the edge of the sheet does not need to be rendered because it is not the real boundary line of the target region. Therefore, before rendering the sheet, it is necessary to determine whether the boundary line of the part of the target region located in the current sheet range needs to be rendered.

[0058] In an embodiment of the present disclosure, a map region to-be-rendered boundary line determination method is provided, which separates a target sub-region of a target region located in a current sheet range, and then determines in sequence whether the boundary line starting from a vertex of a certain target sub-region and ending at the next vertex of the vertex is a to-be-rendered boundary line. Based on this, the subsequent technical scheme can realize the rendering of the part of the target region located in different sheets together with the corresponding sheet, thereby avoiding the irregular rendering boundary of a certain sheet or the vacancy of the part of the rendering region of a certain sheet when the target region spans one or more sheets, and thus being beneficial to improving the rendering quality of the map data and the improvement of the user experience.

[0059] In an embodiment of the present disclosure, the map region to-be-rendered boundary line determination method can be applied to a computer, a computing device, an electronic device, a server, a server cluster, etc. for determining the map region to-be-rendered boundary line.

[0060] In an embodiment of the present disclosure, the target region refers to a region spanning one or more sheets, used to represent the region range of a park, a campus, a facility, etc., and needs to determine whether the boundary line of the part of the target region located in different sheets needs to be rendered. The target region has one or more boundary lines, but since the target region spans one or more sheets, the boundary lines of the target region are distributed in different sheets spanning the target region. For each corresponding sheet, the to-be-rendered boundary line of the part of the target region falling within the sheet can be determined according to the method of the present disclosure, so that after rendering each sheet, the target region and its boundary lines can be completely displayed, and when rendering a single sheet, the irregular rendering boundary of a certain sheet or the vacancy of the part of the rendering region of a certain sheet will not occur.

[0061] In an embodiment of the present disclosure, the sheet refers to a processing unit when displaying and rendering a map with a certain range. The map is usually rendered in units of sheets at different levels. The shapes and sizes of different sheets at the same level are the same. Different sheets correspond to different map data. That is, the storage of map data is also in units of sheets. This way of displaying and rendering in units of sheets can effectively improve the loading speed of map data and realize the decoupling of map rendering and map data distribution. The size of the sheet and the corresponding stored map data are related to the current level, and the current level is related to the scale of sheet display and rendering. The smaller the scale, the smaller the level, the fewer the number of sheets displayed and rendered at this level, and the larger the area, the more concise the data content displayed and rendered. Conversely, the larger the scale, the larger the level, the more the number of sheets displayed and rendered at this level, and the smaller the area, the more detailed the data content displayed and rendered. When the scale of sheet display and rendering is determined, the current level can be determined, and the corresponding sheet size is also determined accordingly. For example, for a world map, the sheet size at a certain level is equal to the unfolded area of the earth divided by the number of sheets at this level. For example, at the first level of the world map, four sheets can be included, and the sheet size is equal to the unfolded area of the earth divided by four. At the second level of the world map, each sheet can be divided into four sheets, a total of 16 sheets, and the sheet size is equal to the unfolded area of the earth divided by 16. And so on.

[0062] In an embodiment of the present disclosure, the target sub-region refers to a part of the target region that remains in the current sheet range after cutting from the target region. Figure 1A For example, as shown in the target region spanning three sheets, assuming that the current sheet is sheet 1, after cutting the target region, the sheet 1 with the target sub-region can be numbered as shown in the figure. Figure 3A For convenience of calculation, the vertices of the target sub-region can be numbered in a preset order. The preset order can be set according to actual application needs. For example, for a region with only an outer boundary line, the preset order can be set as counterclockwise order. For a region with not only an outer boundary line but also an inner boundary line, the preset order corresponding to the outer boundary line can be set as counterclockwise order, and the preset order corresponding to the inner boundary line can be set as clockwise order. For example, assuming that the preset order is counterclockwise order, in Figure 3A , the vertex at the top left corner of the target sub-region can be taken as the starting vertex, and the vertices of the target sub-region can be numbered in counterclockwise order to obtain target sub-region vertex 0, target sub-region vertex 1, target sub-region vertex 2, target sub-region vertex 3, target sub-region vertex 4, target sub-region vertex 5, target sub-region vertex 6, and target sub-region vertex 7 in turn.

[0063] In the above embodiment, when determining the to-be-rendered boundary line of a certain map region, the target region can be first determined to be located in a target sub-region within the current map sheet range; then the vertices of the target sub-region are determined, and the target sub-region vertex pixel coordinates of the target sub-region vertices relative to the current map sheet are obtained; then, in a preset order, all the target sub-region vertices are traversed, and it is determined in sequence whether a boundary line starting from a certain target sub-region vertex and ending at the next vertex of the target sub-region vertex is a real boundary line of the target sub-region, that is, a to-be-rendered boundary line, according to the target sub-region vertex pixel coordinates, wherein the preset order is consistent with the above-mentioned numbering order of the target sub-region vertices, that is, also set as counterclockwise order. Wherein, the next vertex of a certain target sub-region vertex refers to the next target sub-region vertex obtained along the preset order with the target sub-region vertex as the starting point. In an embodiment of the present disclosure, the preset order is consistent with the above-mentioned numbering order of the target sub-region vertices and the order of vertex traversal. For example, taking the target sub-region shown in the above-mentioned figure as an example, the preset order is counterclockwise order, and according to the counterclockwise order, the next vertex of the target sub-region vertex 0 is the target sub-region vertex 1, the next vertex of the target sub-region vertex 1 is the target sub-region vertex 2, and so on. The next vertex of the target sub-region vertex 6 is the target sub-region vertex 7. Based on this, the subsequent technical scheme can realize rendering of the part of the target region located in different map sheets together with the corresponding map sheet, so as to avoid the situation that when the target region crosses one or more map sheets, the rendering boundary of a certain map sheet is irregular, or part of the rendering region of a certain map sheet is missing, thereby being beneficial to improving the rendering quality of the map data and the improvement of the user experience. Figure 3A

[0064] In an embodiment of the present disclosure, the step S201, that is, the step of determining the target sub-region in which the target region is located within the current map sheet range, can include the following steps:

[0065] Determining the pixel point pixel coordinates of the pixel points in the target region relative to the target region pixel points of the current map sheet;

[0066] According to the target region pixel point pixel coordinates, the target region is cut to obtain the target sub-region in which the target region is located within the current map sheet range.

[0067] ​In an embodiment of the present disclosure, the pixel point in the target region relative to the target region pixel point pixel coordinate of the current map refers to the pixel expression of the relative position relationship between the pixel point in the target region and the current map after the total pixels of the map are preset. The pixel coordinate can not only represent the relative position relationship between the pixel point in the target region and the current map, but also protect the real geographical position coordinate of the pixel point in the target region to prevent exposure of the real geographical position coordinate.

[0068] In this embodiment, when the target region is determined to be located in the target sub-region within the range of the current map, the pixel point in the target region relative to the target region pixel point pixel coordinate of the current map can be determined first to represent the relative position relationship between the pixel point in the target region and the current map; then the target region is cut according to the target region pixel point pixel coordinate, and when cutting, the target region part located outside the range of the current map is screened out, and the target region part located within the range of the current map is retained, so that the target region located within the range of the current map, i.e. the target sub-region, is obtained.

[0069] In an embodiment of the present disclosure, the step of determining the pixel point in the target region relative to the target region pixel point pixel coordinate of the current map can include the following steps:

[0070] establishing a map coordinate system;

[0071] determining the map coordinate of the pixel point in the target region under the map coordinate system according to the geographical position coordinate of the pixel point in the target region and the coordinate origin of the map coordinate system;

[0072] determining the relative map coordinate of the pixel point in the target region relative to the current map according to the map coordinate of the pixel point in the target region;

[0073] converting the relative map coordinate into the pixel coordinate of the pixel point in the target region relative to the current map according to the preset pixel range of the current map.

[0074] In this embodiment, the pixel coordinates relative to the current map frame can be determined based on the geographical coordinates of the pixels in the target area. Specifically: First, a map frame coordinate system is established. In one embodiment of this disclosure, when establishing the map frame coordinate system, the lower left corner of the current level map frame interface can be used as the origin, the direction of map frames arranged from left to right can be used as the positive X-axis, and the direction of map frames arranged from bottom to top can be used as the positive Y-axis. The current level map frame interface refers to the interface displaying all map frames at the current level. For example, for a first-level world map, the current level map frame interface refers to a display and rendering interface including 4 map frames; for a second-level world map, the current level map frame interface refers to a display and rendering interface including 16 map frames. The map frame coordinate system established on the map frame interface displayed on the first-level world map can be as follows: Figure 3B As shown, other methods can also be used to establish the map coordinate system. This disclosure does not impose any particular limitation on the method of establishing the map coordinate system. Then, based on the origin of the map coordinate system and the geographical coordinates of the pixels in the target area, the map coordinates of the pixels in the target area under the map coordinate system are determined. Specifically, the geographical coordinates of the pixels in the target area can be transformed based on the origin of the map coordinate system and the geographical coordinates of the pixels in the target area to obtain the map coordinates of the pixels in the target area under the map coordinate system. Then, based on the map coordinates of the pixels in the target area, the relative map coordinates of the pixels in the target area relative to the current map are determined. The relative map coordinates of the pixels in the target area are used to characterize the relative positional relationship between the pixels in the target area and the current map. Finally, based on the preset pixel range of the current map, the relative map coordinates are converted into the pixel coordinates of the pixels in the target area relative to the current map. The preset pixel range of the current map can be set according to the needs of actual application, for example, it can be set to 1024*1024.

[0075] Furthermore, in one embodiment of this disclosure, the step of determining the map coordinates of pixels in the target area under the map coordinate system based on the origin of the map coordinate system and the geographical coordinates of pixels in the target area may include the following steps:

[0076] Obtain the geographical coordinates of the origin of the map coordinate system and the pixels in the target area;

[0077] Subtracting the geographic coordinates of the origin of the map coordinate system from the geographic coordinates of the pixels in the target area yields the relative geographic coordinates of the pixels in the target area with respect to the origin of the map coordinate system.

[0078] The relative geographic location coordinates are transformed into the map coordinate system to obtain the map coordinates of the pixels in the target area in the map coordinate system.

[0079] In this embodiment, in order to obtain the map coordinates of the pixels in the target area under the map coordinate system, it is necessary to first obtain the origin of the map coordinate system and the geographical coordinates of the pixels in the target area; then, subtract the geographical coordinates of the origin of the map coordinate system from the geographical coordinates of the pixels in the target area to obtain the relative geographical coordinates of the pixels in the target area relative to the origin of the map coordinate system; finally, convert the relative geographical coordinates to the map coordinate system to obtain the map coordinates of the pixels in the target area under the map coordinate system. The coordinate conversion is a technique that should be mastered by those skilled in the art, and will not be elaborated here.

[0080] Furthermore, in one embodiment of this disclosure, the step of determining the relative map coordinates of pixels in the target region relative to the current map region based on the map coordinates of pixels in the target region may include the following steps:

[0081] Determine the map coordinates of the lower left corner of the current map sheet in the map sheet coordinate system;

[0082] Subtract the map coordinates of the lower left corner of the current map from the map coordinates of the pixels in the target area, and then divide by the map coordinates of the lower left corner of the current map to obtain the relative map coordinates of the pixels in the target area relative to the current map.

[0083] In this embodiment, after obtaining the map coordinates of the pixels in the target area in the map coordinate system, the relative map coordinates of the pixels in the target area relative to the current map can be determined based on the map coordinates of the pixels in the target area. Specifically: first, the map coordinates of the lower left corner of the current map in the map coordinate system are determined; then, the map coordinates of the pixels in the target area are subtracted from the map coordinates of the lower left corner of the current map, and then divided by the map coordinates of the lower left corner of the current map to obtain the relative map coordinates of the pixels in the target area relative to the current map. Figure 3C As shown, assuming the map coordinates of a pixel in a target area are (8,7) in the corresponding map coordinate system, and the map coordinates of the lower left corner of the current map are (5,5), subtracting the map coordinates of the lower left corner of the current map from the map coordinates of the pixel in the target area yields (3,2). Dividing this by the map coordinates of the lower left corner of the current map gives the relative map coordinates of the pixel in the target area relative to the current map as (3 / 5,2 / 5), or (0.6,0.4).

[0084] Further, in an embodiment of the present disclosure, the step of converting the relative map coordinates into pixel coordinates of the pixel point in the target region relative to the current map according to the preset pixel range of the current map can include the following steps:

[0085] multiplying the relative map coordinates by the preset pixel range value of the current map to obtain the pixel coordinates of the pixel point in the target region relative to the current map.

[0086] In this embodiment, after obtaining the relative map coordinates of the pixel point in the target region relative to the current map, the relative map coordinates of the pixel point in the target region relative to the current map are multiplied by the preset pixel range value of the current map to obtain the pixel coordinates of the pixel point in the target region relative to the current map, wherein the preset pixel range value of the current map is set in advance. For example, taking the example shown in FIG. 6 as an example, the relative map coordinates of the pixel point in the target region relative to the current map are (0.6, 0.4), and assuming that the preset pixel range value of the current map is 1024*1024, then the pixel coordinates of the pixel point in the target region relative to the current map are (0.6*1024, 0.4*1024), and after rounding, (614, 410) is obtained. Figure 3C

[0087] In an embodiment of the present disclosure, the step S202, i.e., determining the vertex of the target sub-region and obtaining the target sub-region vertex pixel coordinates of the target sub-region vertex relative to the current map, includes:

[0088] obtaining the target sub-region pixel point pixel coordinates of the pixel point in the target sub-region relative to the current map according to the target region pixel point pixel coordinates;

[0089] determining the pixel point having the extreme value of the pixel coordinates in the preset range as the vertex of the target sub-region, wherein the preset range partially overlaps with the target sub-region and has an area smaller than that of the target sub-region;

[0090] obtaining the target sub-region vertex pixel coordinates of the target sub-region vertex relative to the current map.

[0091] ​In this embodiment, when determining the vertex of the target sub-region and obtaining the target sub-region vertex pixel coordinates of the vertex of the target sub-region relative to the current map, first, the target sub-region pixel point pixel coordinates relative to the current map are obtained according to the target region pixel point pixel coordinates, wherein the target sub-region pixel point pixel coordinates relative to the current map can be obtained according to the target region pixel point pixel coordinates according to the method described above, and the present disclosure will not be described here; then the pixel point in the target sub-region pixel point having a pixel coordinate extreme value in a preset range is determined as the vertex of the target sub-region, wherein the preset range partially overlaps with the target sub-region and has an area smaller than that of the target sub-region, for example, as shown in FIG. 8, point 0 has a maximum value of the longitudinal pixel coordinate in the preset range shown in the box, and thus point 0 can be determined as a vertex of the target sub-region; since the target sub-region pixel point pixel coordinates relative to the current map have been determined, the target sub-region vertex pixel coordinates of the vertex of the target sub-region relative to the current map can be obtained after the vertex of the target sub-region is determined. Figure 3D

[0092] In an embodiment of the present disclosure, the step of determining whether the boundary line starting at a certain target sub-region vertex and ending at the next vertex of the target sub-region vertex is a boundary line to be rendered according to the target sub-region vertex pixel coordinates can include the following steps:

[0093] when it is determined according to the target sub-region vertex pixel coordinates that the target sub-region vertex is not a boundary point of the current map, it is determined that the boundary line starting at the vertex and ending at the next vertex of the vertex is a boundary line to be rendered; or,

[0094] when it is determined according to the target sub-region vertex pixel coordinates that the target sub-region vertex is a boundary point of the current map, but the next vertex of the target sub-region vertex is not a boundary point of the current map, it is determined that the boundary line starting at the vertex and ending at the next vertex of the vertex is a boundary line to be rendered; or,

[0095] when it is determined according to the target sub-region vertex pixel coordinates that the target sub-region vertex and the next vertex of the target sub-region vertex are both boundary points of the current map, the shortest distances from the target sub-region vertex and the next vertex of the target sub-region vertex to the boundary line of the target region are both less than 1 pixel point, and there is a target region boundary point collinear with the two vertices between the target sub-region vertex and the next vertex of the target sub-region vertex, it is determined that the boundary line starting at the vertex and ending at the next vertex of the vertex is a boundary line to be rendered. ​

[0096] In this embodiment, according to the target sub-region vertex pixel coordinates, the judgment flow of whether the boundary line starting from a certain target sub-region vertex and ending at the next vertex of the target sub-region vertex is a boundary line to be rendered can be as shown in the following table, specifically: Figure 3E

[0097] First, a target sub-region vertex to be judged, i.e., a current vertex, is determined.

[0098] Then, according to the pixel coordinates of the current vertex, it is judged whether the current vertex is a boundary point of the current map. For example, assuming that the pixel range of the current map is 1024*1024, if the pixel coordinates of the current vertex satisfy x / y≠1023&&x / y≠0, i.e., the x value or the y value in the pixel coordinates of the current vertex is not equal to 1023, and the x value or the y value is not equal to 0, it is indicated that the current vertex is not a boundary point of the current map. Obviously, the non-boundary point is to be rendered, and thus the boundary line starting from the current vertex and ending at the next vertex of the current vertex is a boundary line to be rendered.

[0099] If the pixel coordinates of the current vertex satisfy x / y=1023or x / y=0, i.e., the x value or the y value in the pixel coordinates of the current vertex is equal to 1023, or the x value or the y value is equal to 0, it is indicated that the current vertex is a boundary point of the current map, but the current vertex can be a boundary point of the current map or can be a boundary point generated due to the cutting of the target sub-region.

[0100] Next, it is judged whether the next vertex of the current vertex is a boundary point of the current map. If it is judged according to the pixel coordinates of the next vertex of the current vertex that the next vertex of the current vertex is not a boundary point of the current map, it is indicated that the edge connecting the current vertex and the next vertex of the current vertex is located in the interior of the current map, and thus the edge is not an edge generated due to the cutting of the target sub-region, i.e., the edge is to be rendered, and thus the boundary line starting from the current vertex and ending at the next vertex of the current vertex is a boundary line to be rendered.

[0101] If it is judged according to the pixel coordinates of the next vertex of the current vertex that the next vertex of the current vertex is also a boundary point of the current map, the edge connecting the current vertex and the next vertex of the current vertex can be a boundary line of the target region, and thus the edge is to be rendered, or the edge can be a boundary line generated due to the cutting of the target sub-region, and thus the edge is to be hidden and not to be rendered.

[0102] ​Next, according to the positional relationship between the next vertex of the current vertex and the target region, it is judged whether the edge connected by the current vertex and its next vertex is the boundary line of the target region or is generated due to the cutting of the target sub-region, that is, whether the shortest distance from the next vertex of the current vertex to the boundary line of the target region is greater than or equal to 1 pixel point.

[0103] If the shortest distance from the next vertex of the current vertex to the boundary line of the target region is greater than or equal to 1 pixel point, it is indicated that the edge connected by the current vertex and its next vertex does not exist in the target region, that is, the edge is generated due to the cutting of the target sub-region and needs to be hidden and not rendered, that is, the boundary line with the current vertex as the starting point and the next vertex of the current vertex as the ending point is not the boundary line to be rendered.

[0104] If the shortest distance from the next vertex of the current vertex to the boundary line of the target region is less than 1 pixel point, it is indicated that the next vertex is the boundary point of the target region, and at this time, the shortest distance from the current vertex to the boundary line of the target region is calculated. If the shortest distance from the current vertex to the boundary line of the target region is greater than or equal to 1 pixel point, it is indicated, by analogy, that the edge connected by the current vertex and its next vertex does not exist in the target region and is generated due to the cutting of the target sub-region, and therefore, the boundary line is needed to be hidden and not rendered, that is, the boundary line with the current vertex as the starting point and the next vertex of the current vertex as the ending point is not the boundary line to be rendered.

[0105] If the shortest distance from the current vertex to the boundary line of the target region is also less than 1 pixel point, it is further judged whether there is a point collinear with the two vertices in the boundary point set of the target region, that is, whether there is a target region boundary point collinear with the two vertices between the two vertices. If there is, it is indicated that the edge connected by the current vertex and its next vertex is originally the boundary line of the target region, that is, the boundary line needs to be rendered, that is, the boundary line with the current vertex as the starting point and the next vertex of the current vertex as the ending point is the boundary line to be rendered. If there is not, it is indicated that the target region exits and re-enters the boundary of the current map, that is, the edge connected by the current vertex and its next vertex is generated due to the cutting of the target sub-region, and therefore, the boundary line needs to be hidden and not rendered, that is, the boundary line with the current vertex as the starting point and the next vertex of the current vertex as the ending point is not the boundary line to be rendered.

[0106] Next, the target sub-region and its corresponding vertex shown in Figure 3A are taken as examples to illustrate how to judge whether the boundary line with a vertex of a target sub-region as the starting point and the next vertex of the vertex as the ending point is the boundary line to be rendered. As described above, in Figure 3AIn the middle, with the target sub-region vertex 0 as the starting current vertex, in turn determine whether the boundary line starting from the current vertex and ending at the next vertex of the current vertex is the boundary line to be rendered in anticlockwise order:

[0107] According to the pixel coordinates of the target sub-region vertex 0, it can be determined that it is not a boundary point of the current map and needs to be rendered, so the boundary line starting from the target sub-region vertex 0 and ending at the next vertex of the target sub-region vertex 0, that is, the target sub-region vertex 1, is the boundary line to be rendered.

[0108] In anticlockwise order, the next current vertex is the target sub-region vertex 1, similar to the target sub-region vertex 0, the target sub-region vertex 1 is also not a boundary point of the current map, so the boundary line starting from the target sub-region vertex 1 and ending at the next vertex of the target sub-region vertex 1, that is, the target sub-region vertex 2, is also the boundary line to be rendered.

[0109] In anticlockwise order, the next current vertex is the target sub-region vertex 2, similar to the target sub-region vertex 0 and the target sub-region vertex 1, the target sub-region vertex 2 is also not a boundary point of the current map, so the boundary line starting from the target sub-region vertex 2 and ending at the next vertex of the target sub-region vertex 2, that is, the target sub-region vertex 3, is also the boundary line to be rendered.

[0110] In anticlockwise order, the next current vertex is the target sub-region vertex 3, according to the pixel coordinates of the target sub-region vertex 3, it is determined that it is a boundary point of the current map, and then it is judged whether the next vertex of the target sub-region vertex 3, that is, the target sub-region vertex 4, is a boundary point of the current map. According to the pixel coordinates of the target sub-region vertex 4, it can be determined that the target sub-region vertex 4 is also a boundary point of the current map. Next, it is judged whether the target sub-region vertex 4 and the target region are in a position relationship, from Figure 3A It can be known that the shortest distance from the target sub-region vertex 4 to the boundary line of the target region is less than 1 pixel point, that is, the target sub-region vertex 4 is a boundary point of the target region, at this time, it is necessary to calculate the shortest distance from the current vertex, that is, the target sub-region vertex 3, to the boundary line of the target region. From Figure 3A It can be known that the shortest distance from the target sub-region vertex 3 to the boundary line of the target region is also less than 1 pixel point, then it is necessary to further calculate whether there is a point collinear with the two vertices in the boundary point set of the target region, from Figure 3AIt can be seen that there is no point collinear with the two vertices in the boundary point set of the target region, which means that the target region goes out of the boundary of the current map and then enters again, that is, the edge connected by the target sub-region vertex 3 and the target sub-region vertex 4 is generated due to the cutting of the target sub-region, and therefore, the boundary line is needed to be hidden and not rendered, that is, the boundary line starting from the target sub-region vertex 3 and ending at the next vertex of the target sub-region vertex 3, that is, the target sub-region vertex 4, is not the boundary line to be rendered.

[0111] In counterclockwise order, the next current vertex is the target sub-region vertex 4. It is mentioned above that according to the pixel coordinates of the target sub-region vertex 4, it can be determined that the target sub-region vertex 4 is a boundary point of the current map, and then it is judged whether the next vertex of the target sub-region vertex 4, that is, the target sub-region vertex 5, is a boundary point of the current map. According to the pixel coordinates of the target sub-region vertex 5, it can be determined that the target sub-region vertex 5 is also a boundary point of the current map. Next, the positional relationship between the target sub-region vertex 5 and the target region is judged by Figure 3A It can be seen that the shortest distance from the target sub-region vertex 5 to the boundary line of the target region is less than 1 pixel point, that is, the target sub-region vertex 5 is a boundary point of the target region, and at this time, it is needed to calculate the shortest distance from the current vertex, that is, the target sub-region vertex 4, to the boundary line of the target region. By Figure 3A It can be seen that the shortest distance from the target sub-region vertex 4 to the boundary line of the target region is also less than 1 pixel point, and then it is needed to further calculate whether there is a point collinear with the two vertices in the boundary point set of the target region. By Figure 3A It can be seen that there is a point collinear with the two vertices in the boundary point set of the target region, which means that the edge connected by the target sub-region vertex 3 and the target sub-region vertex 4 is originally the boundary line of the target region, that is, the boundary line is needed to be rendered, that is, the boundary line starting from the target sub-region vertex 4 and ending at the next vertex of the target sub-region vertex 4, that is, the target sub-region vertex 5, is the boundary line to be rendered.

[0112] In counterclockwise order, the next current vertex is the target sub-region vertex 5. It is mentioned above that according to the pixel coordinates of the target sub-region vertex 5, it can be determined that the target sub-region vertex 5 is a boundary point of the current map, and then it is judged whether the next vertex of the target sub-region vertex 5, that is, the target sub-region vertex 6, is a boundary point of the current map. According to the pixel coordinates of the target sub-region vertex 6, it can be determined that the target sub-region vertex 6 is also a boundary point of the current map. Next, the positional relationship between the target sub-region vertex 6 and the target region is judged by Figure 3AIt can be seen that the shortest distance from the target sub-region vertex 6 to the target region boundary line is less than 1 pixel point, that is, the target sub-region vertex 6 is a boundary point of the target region, at this time, it is necessary to further calculate the shortest distance from the current vertex, that is, the target sub-region vertex 5, to the target region boundary line. According to the above analysis, it can be obtained that the shortest distance from the target sub-region vertex 5 to the target region boundary line is less than 1 pixel point, and it is necessary to further calculate whether there is a point collinear with the two vertices in the boundary point set of the target region, that is, the target sub-region vertex 5 and the target sub-region vertex 6. Figure 3A It can be seen that the shortest distance from the target sub-region vertex 5 to the target region boundary line is less than 1 pixel point, and it is necessary to further calculate whether there is a point collinear with the two vertices in the boundary point set of the target region, that is, the target sub-region vertex 5 and the target sub-region vertex 6. Figure 3A It can be seen that there is no point collinear with the two vertices in the boundary point set of the target region, which means that the target region has gone out of the boundary of the current map and then entered again, that is, the edge connected by the target sub-region vertex 5 and the target sub-region vertex 6 is generated due to the cutting of the target sub-region, and therefore, the boundary line is needed to be hidden and not rendered, that is, the boundary line with the target sub-region vertex 5 as the starting point and the target sub-region vertex 6 as the ending point is not the boundary line to be rendered.

[0113] In the counterclockwise order, the next current vertex is the target sub-region vertex 6, and according to the pixel coordinates of the target sub-region vertex 6, it can be determined that the target sub-region vertex 6 is a boundary point of the current map, and then it is necessary to judge whether the next vertex of the target sub-region vertex 6, that is, the target sub-region vertex 7, is a boundary point of the current map. According to the pixel coordinates of the target sub-region vertex 7, it can be determined that the target sub-region vertex 7 is not a boundary point of the current map, which means that the edge connected by the target sub-region vertex 6 and the target sub-region vertex 7 is located in the interior of the current map, and therefore, it is not an edge generated due to the cutting of the target sub-region, that is, the edge is needed to be rendered, that is, the boundary line with the target sub-region vertex 6 as the starting point and the target sub-region vertex 6 as the ending point is the boundary line to be rendered.

[0114] In the counterclockwise order, the next current vertex is the last target sub-region vertex, that is, the target sub-region vertex 7, and according to the pixel coordinates of the target sub-region vertex 7, it can be determined that the target sub-region vertex 7 is not a boundary point of the current map, and obviously, the non-boundary point is needed to be rendered, and therefore, the boundary line with the target sub-region vertex 7 as the starting point and the target sub-region vertex 0 as the ending point is also the boundary line to be rendered.

[0115] Based on the above analysis, it can be obtained that in the counterclockwise order, the target sub-region vertex 0 is the first vertex of the target sub-region, and the target sub-region vertex 7 is the last vertex of the target sub-region. Figure 3AIn the illustrated target sub-region, the edges between target sub-region vertex 0 and its next vertex target sub-region vertex 1, between target sub-region vertex 1 and its next vertex target sub-region vertex 2, between target sub-region vertex 2 and its next vertex target sub-region vertex 3, between target sub-region vertex 4 and its next vertex target sub-region vertex 5, between target sub-region vertex 6 and its next vertex target sub-region vertex 7, and between target sub-region vertex 7 and its next vertex target sub-region vertex 0 are to be rendered, while the edges between target sub-region vertex 3 and its next vertex target sub-region vertex 4, and between target sub-region vertex 5 and its next vertex target sub-region vertex 6 are to be hidden and not rendered. For Figure 3F The boundary lines of the illustrated target sub-region that are to be rendered can be as shown in Figure 4

[0116] Figure 4 A flow chart of a map rendering method according to an embodiment of the present disclosure is shown in Figure 1A The map rendering method includes the following steps S401-S403:

[0117] In step S401, a target sub-region of a target region located within a current map range is determined.

[0118] In step S402, the boundary lines to be rendered of the target sub-region are determined based on the above-mentioned method of determining the boundary lines to be rendered of a map region.

[0119] In step S403, map rendering is performed based on the map data corresponding to the current map and the boundary lines to be rendered of the target sub-region.

[0120] As mentioned above, currently, map rendering is usually performed in units of maps at different levels. However, since a map is a square region with a certain size range, and the division of a map is not based on map data, there will be cases where a geometric figure representing a region with a certain shape, such as a park or a school, spans one or more maps, as shown in Figure 1A Figure 1B ​​In the above-mentioned case, the target area referred to by the shaded part spans three map sheets: map sheet 1, map sheet 2 and map sheet 3. For this case, the prior art usually determines one map sheet among the three map sheets in which the target area spans, for example, map sheet 1 covering the largest area of the target area can be selected as the map sheet to be rendered together with the target area, that is, when rendering the map data corresponding to the map sheet, the map data corresponding to the target area is rendered together, while when rendering the map data corresponding to the other two map sheets, the map data corresponding to the part of the target area in the corresponding map sheet will not be rendered. Due to the existence of the target area, this processing manner can cause the rendering boundary of a certain map sheet to be possibly prominent and irregular, as shown in Figure 1C , or the rendering area of a certain map sheet to be empty, as shown in Figure 1D and Figure 5 It is obvious that this processing manner is not conducive to improving the rendering quality of map data and the user experience. Therefore, it is necessary to provide a map area rendering scheme capable of improving the rendering quality of map data and the user experience.

[0121] In view of the above-mentioned defects, the present disclosure provides a map sheet rendering method, which performs map sheet rendering based on the map sheet data corresponding to a current map sheet and the to-be-rendered boundary line of a target sub-area of a target area located inside the current map sheet. This technical solution can cause the part of the target area located in different map sheets to be rendered together with the corresponding map sheet, thus avoiding the case that when the target area spans one or more map sheets, the rendering boundary of a certain map sheet is irregular, or the part of the rendering area of a certain map sheet is empty, thereby being conducive to improving the rendering quality of map data and the user experience.

[0122] In an embodiment of the present disclosure, the map sheet rendering method can be applied to a computer, a computing device, an electronic device, a server, a server cluster, etc. for rendering map sheets.

[0123] In the above-mentioned embodiment, first, a target sub-area of a target area located in the range of a current map sheet is determined; then, the to-be-rendered boundary line of the target sub-area is determined based on the method for determining the to-be-rendered boundary line of a target area described above; finally, map sheet rendering is performed based on the map sheet data corresponding to the current map sheet and the to-be-rendered boundary line of the target sub-area, so that the part of the target area located in different map sheets can be rendered together with the corresponding map sheet.

[0124] The following is an apparatus embodiment of the present disclosure, which can be used to execute the method embodiment of the present disclosure.

[0125] Figure 5This diagram illustrates a structural block diagram of a map region boundary line determination device according to an embodiment of the present disclosure. This device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 1A As shown, the device for determining the boundary line of the map area to be rendered includes:

[0126] The first determining module 501 is configured to determine a target sub-region within the current map area;

[0127] The acquisition module 502 is configured to determine the vertices of the target sub-region and acquire the pixel coordinates of the target sub-region vertices relative to the current map area.

[0128] The second determining module 503 is configured to traverse the vertices of the target sub-region in a preset order, and determine whether the boundary line starting from a certain target sub-region vertex and ending at the next vertex of that vertex is the boundary line to be rendered based on the pixel coordinates of the target sub-region vertex. The next vertex of a certain target sub-region vertex is determined in a preset order.

[0129] As mentioned above, map rendering is currently typically performed using map sheets of different levels. However, since map sheets are rectangular areas of a certain size, and their division is not based on map data, situations may arise where geometric shapes representing areas such as parks and schools span one or more map sheets. Figure 1A As shown, in Figure 1B In the image, the shaded area represents a target region spanning three map sheets: map sheet 1, map sheet 2, and map sheet 3. In such cases, existing techniques typically determine one map sheet from the three spanned by the target region. For example, map sheet 1, which covers the largest area of ​​the target region, can be selected as the map sheet to be rendered along with the target region. That is, when rendering the map data corresponding to map sheet 1, the map data corresponding to the target region is rendered along with it. However, when rendering the map data corresponding to the other two map sheets, the map data corresponding to the portion of the target region within each map sheet will not be rendered. Due to the presence of the target region, this processing method may result in the rendering boundary of a certain map sheet being prominent and irregular, such as... Figure 1C As shown, or in cases where a certain rendering area of ​​a map is missing, such as... Figure 1D and Figure 1A As shown, it is clear that this processing method is detrimental to improving map data rendering quality and user experience. Therefore, a map area rendering solution that can improve map data rendering quality and enhance user experience is needed.

[0130] In view of the above defects, the present disclosure aims to provide a scheme capable of rendering the part of the target region located in different sheets together with the corresponding sheet, and in the implementation of the scheme, the boundary line of the part of the target region located in the current sheet range needs to be processed in different cases, for example, the boundary line located inside the sheet needs to be rendered to identify the contour of the target region, but the boundary line located on the edge of the sheet does not need to be rendered because it is not the real boundary line of the target region. Therefore, before rendering the sheet, it is necessary to determine whether the boundary line of the part of the target region located in the current sheet range needs to be rendered.

[0131] In an embodiment of the present disclosure, a map region to-be-rendered boundary line determination device is provided, which separates a target sub-region of a target region located in a current sheet range, and then determines in sequence whether the boundary line starting from a vertex of a certain target sub-region and ending at the next vertex of the vertex is a to-be-rendered boundary line. Based on this, the subsequent technical scheme can realize the rendering of the part of the target region located in different sheets together with the corresponding sheet, so as to avoid the irregular rendering boundary of a certain sheet or the vacancy of the part of the rendering region of a certain sheet when the target region crosses one or more sheets, thereby facilitating the improvement of the rendering quality of the map data and the improvement of the user experience.

[0132] In an embodiment of the present disclosure, the map region to-be-rendered boundary line determination device can be implemented as a computer, a computing device, an electronic device, a server, a server cluster, etc. for determining the map region to-be-rendered boundary line.

[0133] In an embodiment of the present disclosure, the target region refers to a region crossing one or more sheets, used to represent the region range of a place such as a park, a campus, a facility, etc., and the determination of whether the boundary line of the part of the target region located in different sheets needs to be rendered is needed. The target region has one or more boundary lines, but since the target region crosses one or more sheets, the boundary lines of the target region are also distributed in different sheets crossing each other. For each corresponding sheet, the to-be-rendered boundary line of the part of the target region falling within the sheet can be determined according to the method of the present disclosure, so that after rendering each sheet, the target region and its boundary lines can be completely displayed, and when rendering a single sheet, the irregular rendering boundary of a certain sheet or the vacancy of the part of the rendering region of a certain sheet will not occur.

[0134] In an embodiment of the present disclosure, the sheet refers to a processing unit when displaying and rendering a map with a certain range. The map is usually rendered in units of sheets at different levels. The shapes and sizes of different sheets at the same level are the same. Different sheets correspond to different map data. That is, the storage of map data is also in units of sheets. This way of displaying and rendering in units of sheets can effectively improve the loading speed of map data and realize the decoupling of map rendering and map data distribution. The size of the sheet and the corresponding stored map data are related to the current level, and the current level is related to the scale of sheet display and rendering. The smaller the scale, the smaller the level, the fewer the number of sheets displayed and rendered at this level, and the larger the area, the more concise the data content displayed and rendered. Conversely, the larger the scale, the larger the level, the more the number of sheets displayed and rendered at this level, and the smaller the area, the more detailed the data content displayed and rendered. When the scale of sheet display and rendering is determined, the current level can be determined, and the corresponding sheet size is also determined accordingly. For example, for a world map, the sheet size at a certain level is equal to the unfolded area of the earth divided by the number of sheets at this level. For example, at the first level of the world map, four sheets can be included, and the sheet size is equal to the unfolded area of the earth divided by four. At the second level of the world map, each sheet can be divided into four sheets, a total of 16 sheets, and the sheet size is equal to the unfolded area of the earth divided by 16. And so on.

[0135] In an embodiment of the present disclosure, the target sub-region refers to a part of the target region that remains in the current sheet range after cutting from the target region. Figure 3A For example, as shown in the target region spanning three sheets, assuming that the current sheet is sheet 1, after cutting the target region, the sheet 1 with the target sub-region can be numbered as shown in the figure. Figure 3A For convenience of calculation, the vertices of the target sub-region can be numbered in a preset order. The preset order can be set according to actual application needs. For example, for a region with only an outer boundary line, the preset order can be set as counterclockwise order. For a region with not only an outer boundary line but also an inner boundary line, the preset order corresponding to the outer boundary line can be set as counterclockwise order, and the preset order corresponding to the inner boundary line can be set as clockwise order. For example, assuming that the preset order is counterclockwise order, in Figure 3A , the vertex at the top left corner of the target sub-region can be taken as the starting vertex, and the vertices of the target sub-region can be numbered in counterclockwise order to obtain target sub-region vertex 0, target sub-region vertex 1, target sub-region vertex 2, target sub-region vertex 3, target sub-region vertex 4, target sub-region vertex 5, target sub-region vertex 6, and target sub-region vertex 7 in turn.

[0136] In the above embodiments, when determining the boundary line to be rendered for a certain map region, the target region can first be determined to be a target sub-region within the current map area; then, the vertices of the target sub-region are determined, and the pixel coordinates of the target sub-region vertices relative to the current map area are obtained; then, according to a preset order, all target sub-region vertices are traversed, and based on the pixel coordinates of the target sub-region vertices, it is sequentially determined whether the boundary line starting from a certain target sub-region vertex and ending at the next vertex of that vertex is the true boundary line of the target sub-region, i.e., the boundary line to be rendered. The preset order is consistent with the numbering order of the target sub-region vertices mentioned above, i.e., it is also set to a counter-clockwise order. The next vertex of a certain target sub-region vertex refers to the next target sub-region vertex obtained from that target sub-region vertex along the preset order. In one embodiment of this disclosure, the preset order is consistent with the numbering order of the target sub-region vertices and the vertex traversal order mentioned above. For example, with... Figure 3B Taking the target sub-region shown as an example, the preset order is counter-clockwise. Following this counter-clockwise order, the next vertex after vertex 0 of the target sub-region is vertex 1, the next vertex after vertex 1 is vertex 2, and so on. The next vertex after vertex 6 is vertex 7. Based on this, this technical solution can subsequently render the portion of the target region located within different map sheets along with the corresponding map sheet. This avoids situations where the rendering boundary of a map sheet is irregular or a portion of the rendering area of ​​a map sheet is missing when the target region spans one or more map sheets, thereby improving the rendering quality of map data and enhancing the user experience.

[0137] In one embodiment of this disclosure, the first determining module may be configured as follows:

[0138] Determine the pixel coordinates of the target region pixels relative to the current map area pixels;

[0139] Based on the pixel coordinates of the target region's pixels, the target region is segmented to obtain target sub-regions within the current map area.

[0140] In one embodiment of this disclosure, the pixel coordinates of a pixel in the target area relative to a pixel in the current image frame refer to the pixel representation of the relative position of the pixel in the target area within the pixel range of the current image frame, after the total number of pixels in the image frame has been pre-set. These pixel coordinates not only characterize the relative position of the pixel in the target area to the current image frame, but also protect the actual geographic location coordinates of the pixel in the target area, preventing their exposure.

[0141] In this embodiment, when the target region is determined to be in the target sub-region within the current map range, the pixel point in the target region can be determined relative to the target region pixel point pixel coordinate of the current map to represent the relative position relationship between the pixel point in the target region and the current map; then the target region is cut according to the target region pixel point pixel coordinate, and when cutting, the target region part outside the current map range can be screened out, and the target region part within the current map range is retained, so that the target region within the current map range, that is, the target sub-region, can be obtained.

[0142] In an embodiment of the present disclosure, the part of determining the pixel point in the target region relative to the target region pixel point pixel coordinate of the current map can be configured as:

[0143] establishing a map coordinate system;

[0144] determining the map coordinate of the pixel point in the target region under the map coordinate system according to the geographical position coordinate of the pixel point in the target region and the coordinate origin of the map coordinate system;

[0145] determining the relative map coordinate of the pixel point in the target region relative to the current map according to the map coordinate of the pixel point in the target region;

[0146] converting the relative map coordinate into the pixel coordinate of the pixel point in the target region relative to the current map according to the preset pixel range of the current map.

[0147] In this embodiment, the pixel coordinate of the pixel point in the target region relative to the current map can be determined according to the geographical position coordinate of the pixel point in the target region. Specifically: first, a map coordinate system is established, and in an embodiment of the present disclosure, when the map coordinate system is established, the lower left corner point of the current level map interface can be taken as the coordinate origin, the direction of the map from left to right is taken as the positive direction of the X axis, and the direction of the map from bottom to top is taken as the positive direction of the Y axis to establish the map coordinate system, wherein the current level map interface refers to the interface that displays all maps under the current level, for example, for the first level world map, the current level map interface refers to the display and rendering interface including 4 maps, and for the second level world map, the current level map interface refers to the display and rendering interface including 16 maps, and the map coordinate system established on the map interface of the first level world map can be as follows: Figure 3CAs shown, of course, other methods can also be used to establish the sheet coordinate system, and the present disclosure does not particularly limit the method of establishing the sheet coordinate system; then, according to the geographical position coordinates of the sheet coordinate system coordinate origin and the pixel points in the target region, the sheet coordinates of the pixel points in the target region under the sheet coordinate system are determined, wherein the geographical position coordinates of the pixel points in the target region can be converted according to the geographical position coordinates of the sheet coordinate system coordinate origin and the pixel points in the target region, to obtain the sheet coordinates of the pixel points in the target region under the sheet coordinate system; then, according to the sheet coordinates of the pixel points in the target region, the relative sheet coordinates of the pixel points in the target region relative to the current sheet are determined, wherein the relative sheet coordinates of the pixel points in the target region are used to represent the relative positional relationship between the pixel points in the target region and the current sheet; finally, according to the preset pixel range of the current sheet, the relative sheet coordinates are converted into the pixel coordinates of the pixel points in the target region relative to the current sheet, wherein the preset pixel range of the current sheet can be set according to the actual application needs, such as 1024*1024.

[0148] Further, in an embodiment of the present disclosure, the part of determining the sheet coordinates of the pixel points in the target region under the sheet coordinate system according to the geographical position coordinates of the sheet coordinate system coordinate origin and the pixel points in the target region can be configured as:

[0149] Obtaining the geographical position coordinates of the sheet coordinate system coordinate origin and the pixel points in the target region;

[0150] Subtracting the geographical position coordinates of the pixel points in the target region from the geographical position coordinates of the sheet coordinate system coordinate origin to obtain the relative geographical position coordinates of the pixel points in the target region relative to the sheet coordinate system coordinate origin;

[0151] Converting the relative geographical position coordinates into the sheet coordinate system to obtain the sheet coordinates of the pixel points in the target region under the sheet coordinate system.

[0152] In this embodiment, in order to obtain the sheet coordinates of the pixel points in the target region under the sheet coordinate system, the geographical position coordinates of the sheet coordinate system coordinate origin and the pixel points in the target region need to be obtained first; then, the geographical position coordinates of the pixel points in the target region are subtracted from the geographical position coordinates of the sheet coordinate system coordinate origin, to obtain the relative geographical position coordinates of the pixel points in the target region relative to the sheet coordinate system coordinate origin; finally, the relative geographical position coordinates are converted into the sheet coordinate system, to obtain the sheet coordinates of the pixel points in the target region under the sheet coordinate system, wherein the coordinate conversion is a technology that should be mastered by those skilled in the art, and the present disclosure will not be repeated here.

[0153] Furthermore, in one embodiment of this disclosure, the step of determining the relative map coordinates of pixels in the target region relative to the current map region based on the map coordinates of pixels in the target region can be configured as follows:

[0154] Determine the map coordinates of the lower left corner of the current map sheet in the map sheet coordinate system;

[0155] Subtract the map coordinates of the lower left corner of the current map from the map coordinates of the pixels in the target area, and then divide by the map coordinates of the lower left corner of the current map to obtain the relative map coordinates of the pixels in the target area relative to the current map.

[0156] In this embodiment, after obtaining the map coordinates of the pixels in the target area in the map coordinate system, the relative map coordinates of the pixels in the target area relative to the current map can be determined based on the map coordinates of the pixels in the target area. Specifically: first, the map coordinates of the lower left corner of the current map in the map coordinate system are determined; then, the map coordinates of the pixels in the target area are subtracted from the map coordinates of the lower left corner of the current map, and then divided by the map coordinates of the lower left corner of the current map to obtain the relative map coordinates of the pixels in the target area relative to the current map. Figure 3C As shown, assuming the map coordinates of a pixel in a target area are (8,7) in the corresponding map coordinate system, and the map coordinates of the lower left corner of the current map are (5,5), subtracting the map coordinates of the lower left corner of the current map from the map coordinates of the pixel in the target area yields (3,2). Dividing this by the map coordinates of the lower left corner of the current map gives the relative map coordinates of the pixel in the target area relative to the current map as (3 / 5,2 / 5), or (0.6,0.4).

[0157] Furthermore, in one embodiment of this disclosure, the step of converting the relative map coordinates into the portion of the pixel coordinates of the pixel point in the target region relative to the current map size based on a preset pixel range of the current map size can be configured as follows:

[0158] Multiply the relative map coordinates by the preset pixel range value of the current map to obtain the pixel coordinates of the pixel in the target area relative to the current map.

[0159] In this embodiment, after obtaining the relative map coordinates of the pixels in the target area relative to the current map size, the relative map coordinates of the pixels in the target area relative to the current map size are multiplied by a preset pixel range value of the current map size to obtain the pixel coordinates of the pixels in the target area relative to the current map size. The preset pixel range value of the current map size is pre-set. For example, using...Figure 3D Taking the example shown, the relative coordinates of the pixel in the target area with respect to the current image size are (0.6, 0.4). Assuming that the preset pixel range of the current image size is 1024*1024, the pixel coordinates of the pixel in the target area with respect to the current image size are (0.6*1024, 0.4*1024), which are rounded to (614, 410).

[0160] In one embodiment of this disclosure, the acquisition module may be configured as follows:

[0161] Based on the pixel coordinates of the target region pixels, the pixel coordinates of the target sub-region pixels relative to the current map area are obtained;

[0162] Pixels with extreme pixel coordinates within a preset range are identified as vertices of the target sub-region, wherein the preset range partially overlaps with the target sub-region and its area is smaller than the area of ​​the target sub-region;

[0163] Obtain the pixel coordinates of the target sub-region vertex relative to the current map area.

[0164] In this embodiment, when determining the vertices of the target sub-region and obtaining the pixel coordinates of the target sub-region vertices relative to the current image area, firstly, based on the pixel coordinates of the target region pixels, the pixel coordinates of the target sub-region pixels relative to the current image area are obtained. This can be achieved using the method described above, which will not be elaborated further here. Then, pixels within the target sub-region whose pixel coordinates have extreme values ​​within a preset range are determined as the vertices of the target sub-region. The preset range partially overlaps with the target sub-region, and its area is smaller than the area of ​​the target sub-region. For example, ... Figure 3E As shown in the target sub-region, point 0 has a maximum value of vertical pixel coordinates within the preset range shown in the box. Therefore, point 0 can be determined as a vertex of the target sub-region. Since the pixel coordinates of the pixels in the target sub-region relative to the target sub-region pixels in the current image area have been determined before, the pixel coordinates of the vertex of the target sub-region relative to the vertex of the target sub-region in the current image area can be obtained after determining the vertex of the target sub-region.

[0165] Furthermore, in one embodiment of this disclosure, the second determining module's determination of whether a boundary line starting from a vertex of a target sub-region and ending at the next vertex of that vertex is a portion of the boundary line to be rendered, based on the vertex pixel coordinates of the target sub-region vertex, can be configured as follows:

[0166] when it is determined according to the pixel coordinate of the target sub-region vertex that the target sub-region vertex is not a boundary point of the current map sheet, it is determined that a boundary line starting from the target sub-region vertex and ending at the next vertex of the target sub-region vertex is a boundary line to be rendered; or,

[0167] when it is determined according to the pixel coordinate of the target sub-region vertex that the target sub-region vertex is a boundary point of the current map sheet, but the next vertex of the target sub-region vertex is not a boundary point of the current map sheet, it is determined that a boundary line starting from the target sub-region vertex and ending at the next vertex of the target sub-region vertex is a boundary line to be rendered; or,

[0168] when it is determined according to the pixel coordinate of the target sub-region vertex that the target sub-region vertex and the next vertex of the target sub-region vertex are both boundary points of the current map sheet, the shortest distance from the target sub-region vertex and the next vertex of the target sub-region vertex to the boundary line of the target region is less than 1 pixel point, and there is a target region boundary point collinear with the target sub-region vertex and the next vertex of the target sub-region vertex between the target sub-region vertex and the next vertex of the target sub-region vertex, it is determined that a boundary line starting from the target sub-region vertex and ending at the next vertex of the target sub-region vertex is a boundary line to be rendered.

[0169] In this embodiment, the judgment process of whether a boundary line starting from a target sub-region vertex and ending at the next vertex of the target sub-region vertex is a boundary line to be rendered according to the pixel coordinate of the target sub-region vertex can be as shown in Figure 6 , specifically:

[0170] First, a target sub-region vertex to be judged, i.e., a current vertex, is determined;

[0171] Then, whether the current vertex is a boundary point of the current map sheet is judged according to the pixel coordinate of the current vertex. For example, assuming that the pixel range of the current map sheet is 1024*1024, if the pixel coordinate of the current vertex satisfies x / y≠1023&&x / y≠0, i.e., the x value or the y value in the pixel coordinate of the current vertex is not equal to 1023, and the x value or the y value is not equal to 0, it is indicated that the current vertex is not a boundary point of the current map sheet. Obviously, a non-boundary point needs to be rendered, and therefore a boundary line starting from the current vertex and ending at the next vertex of the current vertex is a boundary line to be rendered.

[0172] If the pixel coordinate of the current vertex satisfies x / y=1023or x / y=0, i.e., the x value or the y value in the pixel coordinate of the current vertex is equal to 1023, or the x value or the y value is equal to 0, it is indicated that the current vertex is a boundary point of the current map sheet. However, the current vertex can be a boundary point of the current map sheet, or can be a boundary point generated due to the cutting of the target sub-region.

[0173] Next, it is determined whether the next vertex of the current vertex is a boundary point of the current map. If it is determined according to the pixel coordinates of the next vertex of the current vertex that the next vertex of the current vertex is not a boundary point of the current map, it means that the edge connected by the current vertex and the next vertex thereof is located in the interior of the current map, and thus it is not an edge generated by cutting of the target sub-region, i.e., the edge is an edge to be rendered, and the boundary line with the current vertex as the starting point and the next vertex of the current vertex as the ending point is a boundary line to be rendered.

[0174] If it is determined according to the pixel coordinates of the next vertex of the current vertex that the next vertex of the current vertex is also a boundary point of the current map, the edge connected by the current vertex and the next vertex thereof can be a boundary line of the target region, which is to be rendered, or can be a boundary line generated by cutting of the target sub-region, which is to be hidden and not rendered.

[0175] Next, it is determined according to the positional relationship between the next vertex of the current vertex and the target region whether the edge connected by the current vertex and the next vertex thereof is a boundary line of the target region or is an edge generated by cutting of the target sub-region, i.e., it is determined whether the shortest distance from the next vertex of the current vertex to the boundary line of the target region is greater than or equal to 1 pixel point.

[0176] If the shortest distance from the next vertex of the current vertex to the boundary line of the target region is greater than or equal to 1 pixel point, it means that the edge connected by the current vertex and the next vertex thereof does not exist in the target region, i.e., the edge is generated by cutting of the target sub-region, and thus the boundary line with the current vertex as the starting point and the next vertex of the current vertex as the ending point is not a boundary line to be rendered.

[0177] If the shortest distance from the next vertex of the current vertex to the boundary line of the target region is less than 1 pixel point, it means that the next vertex is a boundary point of the target region, and thus the shortest distance from the current vertex to the boundary line of the target region is calculated. If the shortest distance from the current vertex to the boundary line of the target region is greater than or equal to 1 pixel point, it is determined, by the same principle, that the edge connected by the current vertex and the next vertex thereof does not exist in the target region and is generated by cutting of the target sub-region, and thus the boundary line with the current vertex as the starting point and the next vertex of the current vertex as the ending point is not a boundary line to be rendered.

[0178] If the shortest distance from the current vertex to the boundary line of the target region is also less than 1 pixel point, it is further determined whether there is a point collinear with the two vertices in the boundary point set of the target region, i.e., whether there is a target region boundary point collinear with the two vertices between the two vertices. If there is, it indicates that the edge obtained by connecting the current vertex and the next vertex of the current vertex is originally a boundary line of the target region, i.e., the boundary line is a boundary line to be rendered, i.e., the boundary line with the current vertex as the starting point and the next vertex of the current vertex as the ending point is a boundary line to be rendered. If there is not, it indicates that the target region exits and re-enters the boundary of the current map, i.e., the edge obtained by connecting the current vertex and the next vertex of the current vertex is generated due to the cutting of the target sub-region, and thus the boundary line is a boundary line to be hidden and not rendered, i.e., the boundary line with the current vertex as the starting point and the next vertex of the current vertex as the ending point is not a boundary line to be rendered.

[0179] Figure 6 A structural block diagram of a map rendering device according to an embodiment of the present disclosure is shown, which can be realized as part or all of an electronic device by software, hardware or a combination of both. As shown in Figure 1A the map rendering device includes:

[0180] A third determination module 601 is configured to determine a target sub-region of a target region located in a current map range.

[0181] A fourth determination module 602 is configured to determine a to-be-rendered boundary line of the target sub-region based on the above-described map region to-be-rendered boundary line determination device.

[0182] A map rendering module 603 is configured to perform map rendering based on map data corresponding to the current map and the to-be-rendered boundary line of the target sub-region.

[0183] As mentioned above, currently, map rendering is usually performed in units of different levels of maps. However, since a map is a square region with a certain size range, and the division of a map is not based on map data, a geometric figure representing a region with a certain shape, such as a park or a school, may cross one or more maps, as shown in Figure 1A the map rendering device is configured to perform map rendering based on map data corresponding to the current map and the to-be-rendered boundary line of the target sub-region. Figure 1BIn the above case, the target area referred by the shadowed part spans three map sheets: sheet 1, sheet 2 and sheet 3. For this case, the prior art usually determines one map sheet among the three map sheets in which the target area spans, for example, the map sheet 1 covering the largest area of the target area can be selected as the map sheet to be rendered together with the target area, that is, when rendering the map data corresponding to the map sheet, the map data corresponding to the target area is rendered together, while when rendering the map data corresponding to the other two map sheets, the map data corresponding to the part of the target area in the corresponding map sheet will not be rendered. Due to the existence of the target area, this processing manner will cause the rendering boundary of a certain map sheet to be possibly highlighted and irregular, as shown in Figure 1C , or the rendering area of a certain map sheet to be empty, as shown in Figure 1D and Figure 7 It is obvious that this processing manner is not conducive to the improvement of the rendering quality of the map data and the improvement of the user experience. Therefore, it is necessary to provide a map area rendering scheme capable of improving the rendering quality of the map data and improving the user experience.

[0184] In view of the above defects, the present disclosure provides a map sheet rendering device which performs map sheet rendering based on the map sheet data corresponding to the current map sheet and the to-be-rendered boundary line of the target sub-area of the target area located inside the current map sheet. This technical scheme can cause the part of the target area located in different map sheets to be rendered together with the corresponding map sheet, so as to avoid the case that when the target area spans one or more map sheets, the rendering boundary of a certain map sheet is irregular, or the part of the rendering area of a certain map sheet is empty, thereby being conducive to the improvement of the rendering quality of the map data and the improvement of the user experience.

[0185] In an embodiment of the present disclosure, the map sheet rendering device can be implemented as a computer, a computing device, an electronic device, a server, a server cluster, etc. for rendering map sheets.

[0186] In the above embodiment, first, the target sub-area of the target area located in the range of the current map sheet is determined; then, the to-be-rendered boundary line of the target sub-area is determined based on the method for determining the to-be-rendered boundary line of the target area described above; finally, the map sheet rendering is performed based on the map sheet data corresponding to the current map sheet and the to-be-rendered boundary line of the target sub-area, so as to realize the rendering of the part of the target area located in different map sheets together with the corresponding map sheet.

[0187] The present disclosure also discloses an electronic device, Figure 7 which shows a structural block diagram of an electronic device according to an embodiment of the present disclosure, as shown in Figure 8 The electronic device 700 comprises a memory 701 and a processor 702; wherein,

[0188] The memory 701 is configured to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 702 to implement the above method steps.

[0189] Figure 8 is a structural schematic diagram of a computer system suitable for implementing the map region to be rendered boundary line determination / sheet rendering method according to an embodiment of the present disclosure.

[0190] As shown in ​ , the computer system 800 includes a processing unit 801, which can execute various processes in the above embodiments according to programs stored in a read-only memory (ROM) 802 or loaded from a storage portion 808 into a random access memory (RAM) 803. Various programs and data required for the operation of the computer system 800 are also stored in the RAM 803. The processing unit 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0191] The following components are connected to the I / O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output portion 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a speaker, and the like; a storage portion 808 including a hard disk, and the like; and a communication portion 809 including a network interface card such as a LAN card, a modem, and the like. The communication portion 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is mounted on the drive 810 as needed, so that a computer program read therefrom is installed in the storage portion 808 as needed. The processing unit 801 can be implemented as a CPU, a GPU, a TPU, a FPGA, a NPU, and the like.

[0192] In particular, according to embodiments of the present disclosure, the above-described method can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a computer readable medium, the computer program containing program code for executing the method. In such embodiments, the computer program can be downloaded and installed from a network by the communication portion 809, and / or installed from the removable medium 811.

[0193] The flow and block diagrams in the drawings represent possible architectural, functional, and operational architectures of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block can represent a module, a segment, or a portion of code that comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flowchart illustrations, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.

[0194] The units or modules described in the embodiments of the present disclosure can be implemented by software, or by hardware. The described units or modules can also be arranged in a processor, and the name of the unit or module does not constitute a limitation on the unit or module itself in some cases.

[0195] As another aspect, the present disclosure also provides a computer readable storage medium, which can be the computer readable storage medium included in the apparatus described in the above embodiments, or can exist separately from the apparatus and not be assembled into the apparatus. The computer readable storage medium stores one or more programs for execution by one or more processors to perform the method described in the present disclosure.

[0196] The above description is merely preferred embodiments of the present disclosure and a description of principles of applied technologies. It should be understood by those skilled in the art that the scope of the present disclosure is not limited to the technical solutions formed by the specific combinations of the above technical features, and also includes other technical solutions formed by the combinations of the above technical features or equivalent features without departing from the inventive concept. For example, the technical solutions formed by the mutual replacement of the above features and the technical features disclosed in the present disclosure (but not limited to) having similar functions.

Claims

1. A method for determining a boundary line to be rendered in a map area, the method comprising: determining a target sub-area in the target area within a current map range; determining a vertex of the target sub-area and obtaining a target sub-area vertex pixel coordinate of the vertex relative to the current map; in a preset order, traversing the target sub-area vertex, and determining whether a boundary line starting from a target sub-area vertex and ending at a next vertex of the target sub-area vertex is a boundary line to be rendered according to the target sub-area vertex pixel coordinate, wherein the next vertex of the target sub-area vertex is determined according to the preset order. The method for determining a target sub-area in the target area within a current map range comprises:

2. The method of claim 1, wherein, determining a target area pixel coordinate of a pixel in the target area relative to the current map; cutting the target area according to the target area pixel coordinate to obtain the target sub-area in the target area within the current map range. The method for determining a target area pixel coordinate of a pixel in the target area relative to the current map comprises:

3. The method of claim 2, wherein, establishing a map coordinate system; determining a map coordinate of the pixel in the target area in the map coordinate system according to a coordinate origin of the map coordinate system and a geographic position coordinate of the pixel in the target area; determining a relative map coordinate of the pixel in the target area relative to the current map according to the map coordinate of the pixel in the target area; converting the relative map coordinate into a pixel coordinate of the pixel in the target area relative to the current map according to a preset pixel range of the current map. The method for determining a map coordinate of the pixel in the target area in the map coordinate system according to a coordinate origin of the map coordinate system and a geographic position coordinate of the pixel in the target area comprises:

4. The method of claim 3, wherein, obtaining the coordinate origin of the map coordinate system and the geographic position coordinate of the pixel in the target area; subtracting the geographic position coordinate of the pixel in the target area from the geographic position coordinate of the coordinate origin of the map coordinate system to obtain a relative geographic position coordinate of the pixel in the target area relative to the coordinate origin of the map coordinate system; converting the relative geographic position coordinate into the map coordinate of the pixel in the target area in the map coordinate system. The method for determining a relative map coordinate of the pixel in the target area relative to the current map according to the map coordinate of the pixel in the target area comprises:

5. The method of claim 3, wherein, determining a map coordinate of a lower left corner point of the current map in the map coordinate system; subtracting the map coordinate of the lower left corner point of the current map from the map coordinate of the pixel in the target area and dividing the result by the map coordinate of the lower left corner point of the current map to obtain the relative map coordinate of the pixel in the target area relative to the current map. The method for converting the relative map coordinate into a pixel coordinate of the pixel in the target area relative to the current map according to a preset pixel range of the current map comprises:

6. The method of claim 3, wherein, multiplying the relative map coordinate by a preset pixel range value of the current map to obtain the pixel coordinate of the pixel in the target area relative to the current map. ​ 7. The method of claim 2, wherein, The determining the vertex of the target sub-region and obtaining the target sub-region vertex pixel coordinates of the target sub-region vertex relative to the current map comprises: According to the target region pixel point pixel coordinates, the target sub-region pixel point pixel coordinates of the pixel point in the target sub-region relative to the current map are obtained; The pixel point with the pixel coordinate extreme value in the preset range is determined as the vertex of the target sub-region, wherein the preset range partially overlaps with the target sub-region and the area thereof is smaller than the area of the target sub-region; The target sub-region vertex pixel coordinates of the target sub-region vertex relative to the current map are obtained.

8. The method of claim 1, wherein, According to the target sub-region vertex pixel coordinates, it is determined whether the boundary line starting from a certain target sub-region vertex and ending at the next vertex of the certain target sub-region vertex is a boundary line to be rendered, comprising: When it is determined according to the target sub-region vertex pixel coordinates that the target sub-region vertex is not a boundary point of the current map, it is determined that the boundary line starting from the vertex and ending at the next vertex of the vertex is a boundary line to be rendered; or, When it is determined according to the target sub-region vertex pixel coordinates that the target sub-region vertex is a boundary point of the current map, but the next vertex of the target sub-region vertex is not a boundary point of the current map, it is determined that the boundary line starting from the vertex and ending at the next vertex of the vertex is a boundary line to be rendered; or, When it is determined according to the target sub-region vertex pixel coordinates that the target sub-region vertex and the next vertex of the target sub-region vertex are both boundary points of the current map, the shortest distances from the target sub-region vertex and the next vertex of the target sub-region vertex to the boundary line of the target region are both less than one pixel point, and there is a target region boundary point collinear with the two vertices between the target sub-region vertex and the next vertex of the target sub-region vertex, it is determined that the boundary line starting from the vertex and ending at the next vertex of the vertex is a boundary line to be rendered.

9. A map rendering method, wherein, The map contains a part of the target region, and the method comprises: Determining a target sub-region in which the target region is located within the range of the current map; Based on the method in any one of claims 1-8, determining the boundary line to be rendered of the target sub-region; Based on the map data corresponding to the current map and the boundary line to be rendered of the target sub-region, performing map rendering. 10.A map region boundary line to be rendered determination apparatus, comprising: A first determination module configured to determine a target sub-region in which the target region is located within the range of the current map; An obtaining module configured to determine the vertex of the target sub-region and obtain the target sub-region vertex pixel coordinates of the target sub-region vertex relative to the current map; A second determination module configured to traverse the target sub-region vertex in a preset order and determine whether the boundary line starting from a certain target sub-region vertex and ending at the next vertex of the certain target sub-region vertex is a boundary line to be rendered according to the target sub-region vertex pixel coordinates, wherein the next vertex of the certain target sub-region vertex is determined in the preset order.

11. A map rendering apparatus, wherein, The map sheet contains a part of a target area, and the device comprises: a third determination module configured to determine a target sub-area of the target area located in a current map sheet range; a fourth determination module configured to determine a to-be-rendered boundary line of the target sub-area based on the device of claim 10; a map sheet rendering module configured to perform map sheet rendering based on map sheet data corresponding to the current map sheet and the to-be-rendered boundary line of the target sub-area.

12. An electronic device comprising a memory and at least one processor; wherein, The memory is configured to store one or more computer instructions, and the one or more computer instructions are executed by the at least one processor to implement the method of any one of claims 1-9.

13. A computer readable storage medium having computer instructions stored thereon, and the computer instructions are executed by a processor to implement the method of any one of claims 1-9.

Citation Information

Patent Citations

  • Map rendering method and device, storage medium, and electronic device

    CN109544658A