A method, apparatus, and storage medium for map display

By performing projection inverse transformation and multi-conical projection positive transformation in the programmable world map, converting it into multi-conical projection coordinates and rendering, the problem of map area error in the prior art is solved and the user's visual experience is improved.

CN114119830BActive Publication Date: 2025-06-13BEIJING PERFECT KNOWLEDGE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111415024.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-25
Publication Date
2025-06-13
Estimated Expiration
2041-11-25

AI Technical Summary

Technical Problem

The programmatic world maps in the prior art have area errors, resulting in a deviation in users' perception of the terrain and area of ​​the Arctic region from a global perspective, and the user experience is poor.

Method used

By obtaining the source coordinates of each pixel point on the source map, the inverse projection transformation and multi-cone projection positive transformation are used to convert it into multi-cone projection coordinates, and rendered by the cell shader to display the multi-cone projection map to avoid area errors.

Benefits of technology

It effectively avoids visual errors on the terrain and area, improves the user's visual effects, and provides a more accurate map display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114119830B_ABST
    Figure CN114119830B_ABST
Patent Text Reader

Abstract

The present invention discloses a map display method, device and storage medium, including: obtaining the source coordinates of each pixel point on the source map; based on the inverse projection transformation of the source map and the polyconic projection forward transformation, performing coordinate transformation on each source coordinate through a graphics processor to obtain the polyconic projection coordinates corresponding to each source coordinate; rendering the polyconic projection coordinates corresponding to each source coordinate through a fragment shader to obtain a rendered polyconic projection map, and displaying the polyconic projection map on a display screen. The above solution can effectively avoid the visual errors in terrain and area caused to users and improve the visual effect of users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and particularly to a map display method, device and storage medium. Background Art

[0002] In the prior art, the programmed world maps displayed on electronic devices usually have area errors, such as Mercator projection maps, equidistant cylindrical projection maps, etc. Taking the Mercator projection map as an example, since the Mercator projection is not an equal-area projection, the terrain and area in the polar regions will be quite different from the actual situation under the global view, which will bring geographical cognitive errors to users due to the area error of the picture. Therefore, there are large errors between the programmed world maps in the prior art and the actual situation, resulting in a poor user experience. Summary of the Invention

[0003] Embodiments of the present application provide a map display method, device and storage medium to solve the technical problem that there are large errors between the programmed world maps in the prior art and the actual situation, resulting in a poor user experience.

[0004] In a first aspect, the present application provides a map display method, which includes:

[0005] Obtain the source coordinates of each pixel point on the source map, where the source map is a non-polyconic projection map;

[0006] Based on the inverse projection transformation of the source map and the polyconic projection forward transformation, perform coordinate transformation on each source coordinate through a graphics processor to obtain the polyconic projection coordinates corresponding to each source coordinate;

[0007] Render the polyconic projection coordinates corresponding to each source coordinate through a fragment shader to obtain a rendered polyconic projection map, and display the polyconic projection map on a display screen.

[0008] Optionally, the performing coordinate transformation on each source coordinate to obtain the polyconic projection coordinates corresponding to each source coordinate includes:

[0009] Perform the inverse projection transformation of the source map on each source coordinate to obtain the longitude and latitude coordinates corresponding to each source coordinate;

[0010] Perform the polyconic projection forward transformation on each longitude and latitude coordinate to obtain the polyconic projection coordinates corresponding to each longitude and latitude coordinate.

[0011] Optionally, the rendering the polyconic projection coordinates corresponding to each source coordinate through a fragment shader to obtain a rendered polyconic projection map includes:

[0012] Obtain the color value at each source coordinate on the source map through the fragment shader; and

[0013] Fill the color value at each source coordinate into the corresponding polyconic projection coordinate to obtain the rendered polyconic projection map.

[0014] Optionally, the polyconic projection map is displayed on the target canvas. After the polyconic projection map is displayed on the display screen, the method further includes:

[0015] Determine the target screen coordinates corresponding to the target position in the target canvas;

[0016] Based on the target screen coordinates, the size of the target canvas, and the size of the polyconic projection map, determine the first relative coordinates of the target screen coordinates mapped to the polyconic projection map;

[0017] Based on the polyconic projection inverse transformation, determine the longitude and latitude coordinates corresponding to the first relative coordinates as the longitude and latitude coordinates corresponding to the target position.

[0018] Optionally, the polyconic projection map is displayed on the target canvas. After the polyconic projection map is displayed on the display screen, the method further includes:

[0019] Obtain the target longitude and latitude coordinates input by the user;

[0020] Based on the polyconic projection forward transformation, determine the second relative coordinates of the target longitude and latitude coordinates mapped to the polyconic projection map;

[0021] Based on the second relative coordinates, the size of the target canvas, and the size of the polyconic projection map, determine the screen coordinates corresponding to the target longitude and latitude coordinates.

[0022] Optionally, after the polyconic projection map is displayed on the display screen, the method further includes:

[0023] When detecting a map sliding operation along the latitude direction, determine the longitude offset corresponding to the map sliding operation;

[0024] Based on the longitude offset, calculate the corrected polyconic projection coordinates corresponding to each source coordinate through the graphics processor;

[0025] Render each corrected polyconic projection coordinate through the fragment shader to obtain the polyconic projection map after the map sliding operation.

[0026] Optionally, the polyconic projection map is displayed on a first layer, and the source map is displayed on a second layer. After the polyconic projection map is displayed on the display screen, the method further includes:

[0027] When a map zoom operation is detected, determining a target zoom level corresponding to the zoom operation;

[0028] Based on the correspondence between the zoom level and the layer transparency, determining a first transparency of the first layer and a second transparency of the second layer corresponding to the target zoom level;

[0029] Displaying the first layer with the first transparency and displaying the second layer with the second transparency.

[0030] Optionally, after determining the target zoom level corresponding to the zoom operation, the method further includes:

[0031] When the target zoom level meets a preset zoom range, hiding the polyconic projection map and the source map, and displaying a multi-level zoom local map based on the target zoom level;

[0032] Wherein, when the multi-level zoom local map is at the minimum zoom-out level, the multi-level zoom local map displayed at the minimum zoom-out level is aligned with the source map.

[0033] Optionally, the source map is a Mercator projection map.

[0034] In a second aspect, the present application further provides a map display device, including:

[0035] An acquisition module, configured to acquire the source coordinates of each pixel point on the source map;

[0036] A first processing module, configured to perform coordinate conversion on each source coordinate through a graphics processor based on the inverse projection transformation of the source map and the polyconic projection forward transformation, to obtain the polyconic projection coordinates corresponding to each source coordinate;

[0037] A second processing module, configured to render the polyconic projection coordinates corresponding to each source coordinate through a fragment shader to obtain a rendered polyconic projection map, and display the polyconic projection map on the display screen.

[0038] In a third aspect, an embodiment of the present invention provides a map display device, including a memory, and one or more programs, wherein one or more programs are stored in the memory and are configured to be executed by one or more processors with operation instructions included in the one or more programs for performing the operations corresponding to the map display method provided in the first aspect.

[0039] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps corresponding to the map display method provided in the first aspect are implemented.

[0040] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0041] In the solution of the embodiment of the present application, the source coordinates of each pixel point on the source map are mapped to the polyconic projection map through the graphics processor based on the inverse projection transformation of the source map and the direct polyconic projection transformation, and the polyconic projection coordinates corresponding to each source coordinate are obtained; each polyconic projection coordinate is rendered through the fragment shader to obtain the rendered polyconic projection map, and the polyconic projection map is displayed on the display screen. Since the polyconic projection can accurately depict the terrain and area, it can effectively avoid the visual errors in terrain and area caused to users and improve the visual effect of users. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0043] Figure 1 It is a flowchart of a map display method in an embodiment of the present application;

[0044] Figure 2 It is a structural diagram of a map display device in an embodiment of the present application;

[0045] Figure 3 It is a structural diagram of a map display device in an embodiment of the present application;

[0046] Figure 4 It is a structural diagram of a map display device as a server in an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0047] The embodiments of the present application provide a map display method, device and storage medium to solve the technical problem that there is a large error between the programmed world map in the prior art and the actual situation, resulting in a poor user experience.

[0048] The general idea of the technical solution in the embodiments of this application is as follows: Obtain the source coordinates of each pixel point on the source map, where the source map is a non-polyconic projection map; Based on the inverse projection of the source map and the direct polyconic projection, use the graphics processor to perform coordinate conversion on each source coordinate to obtain the polyconic projection coordinates corresponding to each source coordinate; Render the polyconic projection coordinates corresponding to each source coordinate through a fragment shader to obtain the rendered polyconic projection map, and display the polyconic projection map on the display screen. In the solution of this application, since the polyconic projection can accurately depict the terrain and area, it can effectively avoid the visual errors in terrain and area caused to users and improve the visual effect of users.

[0049] To better understand the above technical solution, the above technical solution will be described in detail below in combination with the accompanying drawings of the specification and specific implementation manners.

[0050] First, it should be noted that the term "and / or" appearing in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after.

[0051] The embodiments of this specification provide a map display method, as Figure 1 shown, the method includes the following steps:

[0052] Step S101: Obtain the source coordinates of each pixel point on the source map, where the source map is a non-polyconic projection map;

[0053] Step S102: Based on the inverse projection of the source map and the direct polyconic projection, use the graphics processor to perform coordinate conversion on each source coordinate to obtain the polyconic projection coordinates corresponding to each source coordinate;

[0054] Step S103: Render the polyconic projection coordinates corresponding to each source coordinate through a fragment shader to obtain the rendered polyconic projection map, and display the polyconic projection map on the display screen.

[0055] In the embodiments of this specification, a target application for displaying maps can be installed in the user's terminal device. The method provided in the embodiments of this specification can be applied to the user's terminal device, can also be applied to the server corresponding to the target application, and can also be applied to a system composed of a terminal device and a server, which is not limited here.

[0056] It should be noted that a target application for the user to display a map can be installed in the user's terminal device. By running the target application, at least one map can be displayed on the display screen of the terminal device. For example, the latest version of the world map can be displayed through the target application, or the world maps of different periods can be displayed through the target application, so as to facilitate the user to view the differences in the map layouts of each period. If a Mercator projection map, an equidistant cylindrical projection map, etc. are used as the display map of the target application, since the map is a non-equiareal projection, the area of some regions will differ greatly from the actual area under the global view (for example, in the Mercator projection map, the area of Greenland is larger than that of Africa, while in fact the area of Africa is much larger than that of Greenland), resulting in a deviation in the user's perception of the map.

[0057] In the embodiments of this specification, for the sake of convenience of description, taking the Mercator projection map as an example, in order to avoid the error caused by using the Mercator projection map for global view display, the Mercator projection map can be converted into a polyconic projection map. The polyconic projection map can accurately depict the actual geographical area, which is beneficial to the user's visual experience.

[0058] In step S101, the source map can be one or more maps that need to be transformed. Still taking the above target application as an example, the target application can display the world maps of different periods. For example, the target application can display the world maps of all years from 1000 to 1900. For each year, there is a corresponding source map. The source map can be a map with area errors such as a Mercator projection map or an equidistant cylindrical projection map, and the source map is not a polyconic projection map. Then the source map in step S101 can be one or more of the source maps corresponding to all years in the target application. For each obtained source map, the position coordinates of each pixel point on the source map are obtained as the source coordinates of each pixel point. Further, based on step S102, the source coordinates of each pixel point are transformed to re-project the source map onto the polyconic projection map.

[0059] For example, taking the source map as a Mercator projection map, the source coordinates are the position coordinates on the Mercator projection map, that is, the Mercator projection coordinates. The Mercator projection coordinates of each pixel point on the Mercator projection map are coordinate-transformed to project the Mercator projection map onto the polyconic projection map.

[0060] In step S102, for the source coordinates of each pixel on the source, it is necessary to perform an inverse projection transformation of the source map and a forward polyconic projection transformation to obtain the corresponding polyconic projection coordinates. Among them, the polyconic projection coordinates are the position coordinates on the polyconic projection map. Considering the data volume of the source pixel points, if the CPU (Central Processing Unit) is used for calculation, the huge calculation amount will not only consume memory, but also its calculation speed will be very slow. In addition, if there is a sliding operation on the map during the process of displaying the polyconic projection map, the map also needs to be refreshed in real time according to the sliding operation. If the CPU is used for calculation, due to the too slow calculation speed of the polyconic projection map, the frame rate will be reduced, resulting in an inability to achieve a continuous sliding interaction experience. Based on this, in the embodiments of this specification, in order to quickly realize the transformation from the source map to the polyconic projection map, considering that the transformation process of each pixel point is independent and does not affect each other, the GPU (Graphics Processing Unit) is used to process each pixel point, so as to realize the fast mapping of the source coordinates to the polyconic projection map.

[0061] In the specific implementation process, step S102 can be implemented in the following way: the graphics processing unit performs an inverse projection transformation of the source map on each of the source coordinates to obtain the longitude and latitude coordinates corresponding to each of the source coordinates; and performs a forward polyconic projection transformation on each of the longitude and latitude coordinates to obtain the polyconic projection coordinates corresponding to each of the longitude and latitude coordinates.

[0062] Specifically, still taking the source map as a Mercator map as an example, if the abscissa corresponding to the left boundary of the Mercator projection map is 0 and the abscissa corresponding to the right boundary is 1 (that is, there are no negative coordinate points in the picture), in this way, a Mercator projection map can be described according to the ratio. For the convenience of calculation, the Mercator projection coordinates can be transformed first. For example, the range of the Mercator projection coordinates is transformed from [0, 1] to the interval [-1, 1], that is, it is equivalent to dividing the Mercator projection map into left and right parts along the central axis. For example, for the Mercator projection coordinates (x 1 , y 1 ) of pixel point A, the coordinates are first transformed into the interval [-1, 1] to obtain the transformed (x 1 ', y 1'). Further, perform an inverse projection transformation on the transformed Mercator coordinates to obtain the corresponding radian values (lon_rad, lat_rad), where lon_rad is the radian value corresponding to the longitude, and its range is [-π, π], and lat_rad is the radian value corresponding to the latitude, and its range is [-π / 2, π / 2]. Based on the transformation relationship between radians and degrees, convert the radian values to degree values (lon, lat), where lon is the degree value corresponding to the longitude, and lat is the degree value corresponding to the latitude. Through the above steps, obtain the longitude and latitude coordinates (lon, lat) corresponding to the Mercator projection coordinates (x 1 , y 1 ) at pixel point A.

[0063] Next, perform a forward polyconic projection transformation. Still taking the above-mentioned pixel point A as an example, after obtaining the corresponding longitude and latitude coordinates (lon, lat), map the longitude and latitude coordinates to the polyconic projection map through the forward polyconic projection transformation to obtain the corresponding polyconic projection coordinates (x 2 , y 2 ). Further, corresponding to the coordinate range of the Mercator projection map, the polyconic projection coordinates can be converted to the range [0, 1] as needed to obtain the transformed polyconic projection coordinates (x 2 ', y 2 ').

[0064] Through the above process, the Mercator projection coordinates can be converted to polyconic projection coordinates. Of course, the conversion of the coordinate range in the above process can be set according to actual needs, or the conversion of the coordinate range can be not performed, which is not limited here.

[0065] Further, for each polyconic projection coordinate, coloring and rendering can be performed through step S103. Specifically, when rendering the polyconic projection map using the fragment shader, the color filled at each polyconic projection coordinate can be set according to actual needs. For example, fill each polyconic projection coordinate with a color according to a pre-configured color, or render the polyconic projection map based on the color of the source map.

[0066] Taking the rendering of the polyconic projection map based on the color of the source map as an example, the specific implementation method is as follows: obtain the color value at each source coordinate on the source map through the fragment shader; and fill the color value at each source coordinate onto the corresponding polyconic projection coordinate to obtain the rendered polyconic projection map.

[0067] Specifically, still taking pixel point A on the above-mentioned Mercator projection map as an example, since the coordinates of pixel point A on the Mercator projection map are (x 1 , y 1), the coordinates mapped on the polyconic projection map are (x 2 ', y 2 '), then obtain the color value at (x 1 , y 1 ) on the Mercator projection map, and fill the color value at the position of (x 2 ', y 2 ') on the polyconic projection map.

[0068] In the embodiments of this specification, the transparency of the polyconic projection map, the size of the polyconic projection map, the background color of the polyconic projection map (except for other areas filled with the corresponding color values taken from the Mercator projection map), etc. can also be modified by initializing the fragment shader.

[0069] It can be seen that the solution provided by the embodiments of this specification can convert the source map into a polyconic projection map and display it. Since the polyconic projection map can more accurately depict the terrain and area, it effectively avoids the visual error caused to users and improves the visual effect of users.

[0070] After obtaining the rendered polyconic projection map, the polyconic projection map is displayed. To facilitate users to view the longitude and latitude corresponding to any screen coordinate, or to view the display position corresponding to any longitude and latitude, the longitude and latitude and the screen coordinate can be mutually converted. Next, the conversion of the screen coordinate to the longitude and latitude coordinate, and the conversion of the longitude and latitude coordinate to the screen coordinate will be described respectively.

[0071] I. Convert the screen coordinate to the longitude and latitude coordinate

[0072] It should be noted that after obtaining the rendered polyconic projection map, the polyconic projection map can be displayed on the target canvas, and the size of the target canvas can be set according to actual needs and is not limited here. The specific implementation method for converting the screen coordinate to the longitude and latitude coordinate can be: determine the target screen coordinate corresponding to the target position in the target canvas; based on the target screen coordinate, the size of the target canvas, and the size of the polyconic projection map, determine the first relative coordinate of the target screen coordinate mapped to the polyconic projection map; based on the inverse polyconic projection transformation, determine the longitude and latitude coordinate corresponding to the first relative coordinate as the longitude and latitude coordinate corresponding to the target position.

[0073] Specifically, still taking the display of the map in the target application as an example, the target canvas can be the area for displaying the map in the target application. When the terminal device runs the target application, the polyconic projection map can be displayed on the target canvas. In order to facilitate users to view the longitude and latitude of any position on the map, in the embodiments of this specification, the screen coordinate can be converted to the longitude and latitude coordinate.

[0074] In the specific implementation process, the target position can be any position on the target canvas, and the target screen coordinates of the target position can be achieved in various ways. In one embodiment, the target screen coordinates can be the coordinates manually input by the user, and the position corresponding to the input coordinates is the target position. In another embodiment, when detecting the click operation of the user on the target canvas, the canvas position clicked by the user can be used as the target position, and the coordinates at the user click position are used as the target screen coordinates.

[0075] After determining the target screen coordinates, the first relative coordinates of the target screen coordinates mapped to the polyconic projection map can be determined according to the size of the target canvas, the target screen coordinates, and the size of the polyconic projection map. Specifically, the ratio between the horizontal distance of the target screen coordinates on the target canvas and the horizontal distance of the first relative coordinates on the polyconic projection map can be utilized; the ratio between the vertical distance of the target screen coordinates on the target canvas and the vertical distance of the first relative coordinates on the polyconic projection map; and the ratio between the canvas size and the polyconic projection map size, and the first relative coordinates can be calculated through the similarity ratio. After obtaining the first relative coordinates, the first relative coordinates are inversely transformed through the polyconic projection to obtain the longitude and latitude coordinates corresponding to the first relative coordinates, and the longitude and latitude coordinates are the longitude and latitude coordinates corresponding to the target position.

[0076] Through the above steps, after the user inputs coordinates or clicks on the target canvas, the corresponding longitude and latitude can be obtained and fed back to the user.

[0077] II. Convert longitude and latitude coordinates to screen coordinates

[0078] In the embodiments of this specification, the conversion of longitude and latitude coordinates to screen coordinates can be achieved through the following method: obtaining the target longitude and latitude coordinates input by the user; determining the second relative coordinates of the target longitude and latitude coordinates mapped to the polyconic projection map based on the direct polyconic projection; and determining the screen coordinates corresponding to the target longitude and latitude coordinates based on the second relative coordinates, the size of the target canvas, and the size of the polyconic projection map.

[0079] Specifically, when receiving the target longitude and latitude coordinates input by the user, the target latitude coordinates can be first transformed from the angle value to the radian value, and through the direct polyconic projection, the longitude and latitude radian values are mapped to the polyconic projection to obtain the second relative coordinates. Further, since the polyconic projection is displayed on the target canvas, therefore, based on the second relative coordinates, the target canvas size, and the size of the polyconic projection map, the screen coordinates corresponding to the target longitude and latitude coordinates can be calculated through the similarity ratio. In this way, after the user inputs the target longitude and latitude coordinates, the corresponding position can be found on the polyconic projection map, and at the same time, this position can be highlighted.

[0080] Furthermore, when displaying a polyconic projection map, if a sliding operation on the polyconic projection map is received, the polyconic projection map needs to be updated in real time. In the specific implementation process, it can be achieved through the following steps: when a map sliding operation along the latitude direction is detected, determine the longitude offset corresponding to the map sliding operation; based on the longitude offset, calculate the corrected polyconic projection coordinates corresponding to each source coordinate through the graphics processor; render each corrected polyconic projection coordinate through a fragment shader to obtain the polyconic projection map after the map sliding operation.

[0081] It should be noted that since polyconic projection maps are usually used for map display from a global perspective, the map sliding operation for a polyconic projection map is usually an operation along the latitude direction. That is, during the map sliding operation, the latitude does not change, but the longitude changes.

[0082] Specifically, when sliding the map along the latitude, the corresponding longitude offset can be determined according to the map sliding operation. The longitude offset can be an angular value, or a sliding displacement along the latitude direction corresponding to the map sliding operation, or other parameters used to represent the longitude change, which are not limited here.

[0083] In the embodiments of this specification, the longitude offset can be the offset of the central meridian. Among them, the central meridian can be one or more meridians in the polyconic projection map. The setting of the central meridian can be selected according to actual needs. For example, the 30° east longitude can be used as the central meridian, or the 90° west longitude can be used as the central meridian, or the central meridian of each time zone can be used as the central meridian, etc., which are not limited here. After the user performs a map sliding operation, the position of the central meridian before the sliding operation and the position of the central meridian after the sliding operation can be recorded, and the offset between the two is used as the longitude offset.

[0084] Since the state of the polyconic projection map changes with the map sliding operation, the polyconic projection map after the map sliding operation can be re-rendered based on the longitude offset. Specifically, taking the source map as a Mercator projection map as an example, when converting and mapping the Mercator projection coordinates to the polyconic projection map, first perform an inverse transformation on the Mercator projection coordinates to obtain the corresponding longitude and latitude coordinates. Secondly, perform a forward transformation of the polyconic projection on the longitude and latitude coordinates to obtain the corresponding polyconic projection coordinates. At this time, the obtained polyconic projection coordinates are the coordinates before the map sliding operation. Further, correct the polyconic projection coordinates through the longitude offset (for example, the abscissa in the polyconic projection coordinates can be summed with the longitude offset) to obtain the polyconic projection coordinates corresponding to the Mercator projection coordinates after the map sliding operation, that is, the corrected polyconic projection coordinates. Then, based on the color value at the Mercator projection coordinates, fill the color at the corrected polyconic projection coordinates to render the polyconic projection map after the map sliding operation.

[0085] In the embodiments of this specification, the longitude offset and the corrected polyconic projection coordinates can be defined in the fragment shader. After detecting the map sliding operation, by changing the value of the longitude offset in the fragment shader, the color filling of the corrected polyconic transparent coordinates can be achieved, so as to realize the re-rendering of the polyconic projection map.

[0086] It should be noted that the map sliding operation can also be to slide the map along the meridian direction, or it can be to slide the map in other directions, which is not limited here. When sliding the map in different directions, the rendering process of the polyconic projection map is similar to the map rendering process when sliding the map along the latitude direction, which will not be elaborated here.

[0087] In the embodiments of this specification, the user can also perform a zoom operation on the displayed map. Since the source map (such as the Mercator projection map) has a good effect in the local display of the map, the polyconic projection map can be used under the global view, that is, when the map is minimized, the polyconic projection map is displayed. When the map is zoomed in, the polyconic projection map can be gradually switched to the source map (such as the Mercator projection map).

[0088] In the specific implementation process, to achieve the switching between the polyconic projection map and the source map, the polycylindrical projection map and the source map can be both displayed on the target canvas, with the polyconic projection map displayed on the first layer and the source map displayed on the second layer. When a map zoom operation is detected, determine the target zoom level corresponding to the zoom operation; based on the corresponding relationship between the zoom level and the layer transparency, determine the first transparency of the first layer and the second transparency of the second layer corresponding to the target zoom level; display the first layer with the first transparency and display the second layer with the second transparency.

[0089] Specifically, still taking the source map as a Mercator projection map as an example, the corresponding relationship between the zoom level and the layer transparency can be pre-set. For example, when the zoom level is the first zoom ratio, the first zoom ratio can be the minimum reduction ratio of the map. At this time, for viewing the polyconic projection map in the global view, the Mercator projection map is not displayed. Therefore, the transparency of the first layer can be 0%, and the transparency of the second layer can be 100%; when the zoom level is the second zoom level at which the Mercator projection is fully displayed, the transparency of the first layer can be 100%, and the transparency of the second layer can be 0%. At this time, the polyconic projection map is not displayed, and only the Mercator projection map is displayed. The ratio between the first zoom ratio and the second zoom ratio can be used to determine the corresponding first layer transparency and second layer transparency through interpolation. In this way, the corresponding relationship between the zoom level and the layer transparency can be established.

[0090] When a user's map zoom operation is detected, by looking up the corresponding relationship between the zoom level and the layer transparency, the first transparency of the first layer and the second transparency of the second layer can be determined, and the first layer and the second layer can be respectively displayed according to the first transparency and the second transparency, which can effectively and naturally complete the switching between the polyconic projection map and the Mercator projection map.

[0091] Furthermore, in the embodiments of this specification, after the map is enlarged to display the Mercator projection map, the map can be further enlarged. At this time, a more detailed multi-level zoom local map, such as a Mapbox map, can be displayed. Specifically, when the target zoom level meets the preset zoom range, the polyconic projection map and the Mercator projection map are hidden, and the multi-level zoom local map is displayed based on the target zoom level; among them, when the multi-level zoom local map is at the minimum reduction level, the multi-level zoom local map displayed at the minimum reduction level is aligned with the Mercator projection map.

[0092] Continuing with the above example, when the Mercator projection map is displayed at the second scaling ratio, the preset scaling range can be the scaling range between the second scaling ratio and the maximum zoom ratio. That is, when the target scaling ratio continues to zoom in based on the second scaling ratio, a multi-level zoom local map is displayed, and the polyconic projection map and the Mercator projection map are hidden. Specifically, hiding the polyconic projection map and the Mercator projection map can be achieved by adjusting the transparency of the polyconic projection map and the Mercator projection map to the maximum, or by covering the polyconic projection map and the Mercator projection map with a mapbox map. There is no limitation here.

[0093] It should be noted that the mapbox map can be set with multiple zoom levels. For example, the zoom levels of the mapbox map include levels 1 - 10, where level 1 is the minimum zoom out ratio and level 10 is the maximum zoom in ratio. When the zoom level of the mapbox map is level 1, it corresponds to the global state. To ensure that there is no geographical jump when switching from the Mercator projection map to the mapbox map, the mapbox in the global state is aligned with the Mercator projection map. In one embodiment, the four vertices and the center point of the Mercator projection map are corresponding to the four vertices and the center point of the mapbox at the first zoom level, so that the mapbox in the global state and the Mercator projection map are basically coincident, ensuring no jump when switching maps.

[0094] It can be seen that through the above process, a smooth switch can be achieved from the polyconic projection map from a global perspective to the Mercator projection map, and then to the mapbox map from a local perspective. Of course, the process of switching from a local perspective to a global perspective is the reverse process of the above process, which will not be elaborated here.

[0095] In summary, the solution in the embodiments of this specification displays the map from a global perspective through a polyconic projection map, avoiding visual errors in terrain and area for users and improving the visual effect of users. At the same time, the GPU solution is used to render the polyconic map, improving the rendering speed. In addition, through the switch between the polyconic projection map, the Mercator projection map, and the mapbox map, the switch between the global perspective and the local perspective is achieved, improving the user experience.

[0096] Based on the same inventive concept, the embodiments of this specification also provide a map display device, as Figure 2 shown. The device includes:

[0097] An acquisition module 401, configured to acquire the source coordinates of each pixel point on the source map;

[0098] The first processing module 402 is configured to perform coordinate conversion on each source coordinate through a graphics processor based on the inverse projection of the source map and the forward polyconic projection, so as to obtain the polyconic projection coordinates corresponding to each source coordinate;

[0099] The second processing module 403 is configured to render the polyconic projection coordinates corresponding to each source coordinate through a fragment shader to obtain a rendered polyconic projection map, and display the polyconic projection map on a display screen.

[0100] Optionally, the first processing module 402 is configured to:

[0101] Perform inverse projection transformation of the source map on each source coordinate to obtain the longitude and latitude coordinates corresponding to each source coordinate;

[0102] Perform forward polyconic projection transformation on each longitude and latitude coordinate to obtain the polyconic projection coordinates corresponding to each longitude and latitude coordinate.

[0103] Optionally, the second processing module 403 is configured to:

[0104] Obtain the color value at each source coordinate on the source map through the fragment shader; and

[0105] Fill the color value at each source coordinate onto the corresponding polyconic projection coordinate to obtain a rendered polyconic projection map.

[0106] Optionally, the polyconic projection map is displayed on a target canvas, and the device further includes:

[0107] The first screen coordinate determination module is configured to determine the target screen coordinates corresponding to a target position in the target canvas;

[0108] The first relative coordinate determination module is configured to determine the first relative coordinate of the target screen coordinates mapped to the polyconic projection map based on the target screen coordinates, the size of the target canvas, and the size of the polyconic projection map;

[0109] The coordinate conversion module is configured to determine the longitude and latitude coordinates corresponding to the first relative coordinate based on the inverse polyconic projection as the longitude and latitude coordinates corresponding to the target position.

[0110] Optionally, the polyconic projection map is displayed on a target canvas, and the device further includes:

[0111] The input module is configured to obtain the target longitude and latitude coordinates input by a user;

[0112] A second relative coordinate determination module, configured to determine a second relative coordinate on the polyconic projection map obtained by mapping the target longitude and latitude coordinates based on the forward polyconic projection transformation;

[0113] A second screen coordinate determination module, configured to determine screen coordinates corresponding to the target longitude and latitude coordinates based on the second relative coordinate, the size of the target canvas, and the size of the polyconic projection map.

[0114] Optionally, the apparatus further includes:

[0115] A longitude offset module, configured to determine a longitude offset corresponding to the map sliding operation when detecting a map sliding operation along the latitude direction;

[0116] A correction module, configured to calculate corrected polyconic projection coordinates corresponding to each source coordinate through the graphics processor based on the longitude offset;

[0117] A rendering module, configured to render each corrected polyconic projection coordinate through a fragment shader to obtain a polyconic projection map after the map sliding operation.

[0118] Optionally, the polyconic projection map is displayed on a first layer, and the source map is displayed on a second layer. The apparatus further includes:

[0119] A zoom detection module, configured to determine a target zoom level corresponding to the zoom operation when detecting a map zoom operation;

[0120] A third processing module, configured to determine a first transparency of the first layer and a second transparency of the second layer corresponding to the target zoom level based on the correspondence between the zoom level and the layer transparency;

[0121] A display module, configured to display the first layer with the first transparency and display the second layer with the second transparency.

[0122] Optionally, the apparatus further includes:

[0123] A fourth processing module, configured to hide the polyconic projection map and the source map when the target zoom level meets a preset zoom range, and display a multi-level zoom local map based on the target zoom level;

[0124] Wherein, when the multi-level zoom local map is at the minimum zoom-out level, the multi-level zoom local map displayed at the minimum zoom-out level is aligned with the source map.

[0125] Optionally, the source map is a Mercator projection map.

[0126] Regarding the device in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method, and will not be elaborated here.

[0127] Figure 3 It is a structural diagram of a map display device shown according to an exemplary embodiment. For example, the device 1800 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0128] Refer to Figure 3 , the device 1800 may include one or more of the following components: a processing component 1802, a memory 1804, a power supply component 1806, a multimedia component 1808, an audio component 1810, an input / output (I / O) interface 1812, a sensor component 1814, and a communication component 1816.

[0129] The processing component 1802 generally controls the overall operation of the device 1800, such as operations associated with display, telephone calls, data communication, camera operations, and recording operations. The processing element 802 may include one or more processors 1820 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 1802 may include one or more modules to facilitate the interaction between the processing component 1802 and other components. For example, the processing unit 1802 may include a multimedia module to facilitate the interaction between the multimedia component 1808 and the processing component 1802.

[0130] The memory 1804 is configured to store various types of data to support the operation of the device 1800. Examples of such data include instructions for any application or method operating on the device 1800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.

[0131] The power component 1806 provides power to various components of the device 1800. The power component 1806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 1800.

[0132] The multimedia component 1808 includes a screen that provides an output interface between the device 1800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of a touch or swipe action but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 1808 includes a front camera and / or a rear camera. When the device 1800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.

[0133] The audio component 1810 is configured to output and / or input audio signals. For example, the audio component 1810 includes a microphone (MIC) that is configured to receive external audio signals when the device 1800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 1804 or transmitted via the communication component 1816. In some embodiments, the audio component 810 further includes a speaker for outputting audio signals.

[0134] The I / O interface 1812 provides an interface between the processing component 802 and a peripheral interface module, which can be a keyboard, a click wheel, buttons, etc. These buttons can include but are not limited to: a home button, a volume button, a power button, and a lock button.

[0135] The sensor component 1814 includes one or more sensors for providing an assessment of various aspects of the state of the device 1800. For example, the sensor component 1814 can detect the on / off state of the device 1800, the relative positioning of components, such as the display and the keypad of the device 1800. The sensor component 1814 can also detect a change in the position of the device 1800 or a component of the device 1800, the presence or absence of user contact with the device 1800, the orientation or acceleration / deceleration of the device 1800, and the temperature change of the device 1800. The sensor component 1814 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 1814 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 814 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0136] The communication component 1816 is configured to facilitate communication between the device 1800 and other devices in a wired or wireless manner. The device 1800 can access a communication standard-based wireless network, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1816 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0137] In an exemplary embodiment, the device 1800 can be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above method.

[0138] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1804 including instructions, and the above instructions can be executed by a processor 1820 of the device 1800 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, Random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0139] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a device (server or terminal), enables the device to execute the data processing method of the foregoing embodiments.

[0140] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a device (server or terminal), enables the device to execute a map display method, the method including: obtaining source coordinates of each pixel point on a source map, the source map being a non-polyconic projection map; based on the inverse projection of the source map and the polyconic projection forward transformation, performing coordinate transformation on each source coordinate by a graphics processor to obtain polyconic projection coordinates corresponding to each source coordinate; rendering the polyconic projection coordinates corresponding to each source coordinate through a fragment shader to obtain a rendered polyconic projection map, and displaying the polyconic projection map on a display screen.

[0141] Figure 4This is a structural diagram of a map display device in an embodiment of the present invention when it serves as a server. The server 1900 may vary significantly due to different configurations or performances. It may include one or more central processing units (CPUs) 1922 (for example, one or more processors) and a memory 1932, and one or more storage media 1930 (for example, one or more mass storage devices) that store application programs 1942 or data 1944. Among them, the memory 1932 and the storage media 1930 can be transient storage or persistent storage. The program stored in the storage media 1930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Further, the central processing unit 1922 can be configured to communicate with the storage media 1930 and execute a series of instruction operations in the storage media 1930 on the server 1900.

[0142] The server 1900 may further include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input / output interfaces 1958, one or more keyboards 1956, and / or one or more operating systems 1941, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and so on.

[0143] Those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include known common knowledge or conventional technical means in the technical field not disclosed in this disclosure. The specification and embodiments are only to be regarded as exemplary, and the true scope and spirit of the present invention are pointed out by the following claims.

[0144] It should be understood that the present invention is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present invention is only limited by the appended claims. The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims

1. A map display method, characterized in that, it includes: Obtain the source coordinates of each pixel point on the source map, where the source map is a non-polyconic projection map; Based on the inverse projection transformation of the source map and the polyconic projection forward transformation, perform coordinate transformation on each source coordinate through a graphics processor to obtain the polyconic projection coordinates corresponding to each source coordinate; Render the polyconic projection coordinates corresponding to each source coordinate through a fragment shader to obtain a rendered polyconic projection map, and display the polyconic projection map on a display screen, where the polyconic projection map is displayed on a first layer; When a map zoom operation is detected, determine the target zoom level corresponding to the zoom operation; Based on the correspondence between the zoom level and the layer transparency, determine the first transparency of the first layer and the second transparency of the second layer corresponding to the target zoom level; Display the first layer with the first transparency and display the second layer with the second transparency.

2. The method according to claim 1, characterized in that, The performing coordinate transformation on each source coordinate to obtain the polyconic projection coordinates corresponding to each source coordinate includes: Perform the inverse projection transformation of the source map on each source coordinate to obtain the longitude and latitude coordinates corresponding to each source coordinate; Perform the polyconic projection forward transformation on each longitude and latitude coordinate to obtain the polyconic projection coordinates corresponding to each longitude and latitude coordinate.

3. The method according to claim 1, characterized in that, The rendering the polyconic projection coordinates corresponding to each source coordinate through a fragment shader to obtain a rendered polyconic projection map includes: Obtain the color value at each source coordinate on the source map through the fragment shader; and Fill the color value at each source coordinate onto the corresponding polyconic projection coordinate to obtain a rendered polyconic projection map.

4. The method according to claim 1, characterized in that, The polyconic projection map is displayed on a target canvas. After displaying the polyconic projection map on the display screen, the method further includes: Determine the target screen coordinates corresponding to a target position in the target canvas; Based on the target screen coordinates, the size of the target canvas, and the size of the polyconic projection map, determine the first relative coordinates of the target screen coordinates mapped onto the polyconic projection map; Based on the polyconic projection inverse transformation, determine the longitude and latitude coordinates corresponding to the first relative coordinates as the longitude and latitude coordinates corresponding to the target position.

5. The method according to claim 1, characterized in that, The polyconic projection map is displayed on a target canvas. After displaying the polyconic projection map on the display screen, the method further includes: Obtain the target longitude and latitude coordinates input by a user; Based on the polyconic projection forward transformation, determine the second relative coordinates of the target longitude and latitude coordinates mapped onto the polyconic projection map; Based on the second relative coordinates, the size of the target canvas, and the size of the polyconic projection map, determine the screen coordinates corresponding to the target longitude and latitude coordinates.

6. The method according to claim 1, wherein, after the polyconic projection map is displayed on the display screen, the method further includes: when detecting a map sliding operation along the latitude direction, determining a longitude offset amount corresponding to the map sliding operation; based on the longitude offset amount, calculating, by the graphics processor, corrected polyconic projection coordinates corresponding to each source coordinate; rendering each corrected polyconic projection coordinate through a fragment shader to obtain the polyconic projection map after the map sliding operation.

7. The method according to claim 1, wherein, after determining the target zoom level corresponding to the zoom operation, the method further includes: when the target zoom level meets a preset zoom range, hiding the polyconic projection map and the source map, and displaying a multi-level zoom local map based on the target zoom level; wherein, when the multi-level zoom local map is at the minimum zoom-out level, the multi-level zoom local map displayed at the minimum zoom-out level is aligned with the source map.

8. The method according to any one of claims 1-7, wherein, the source map is a Mercator projection map.

9. A map display device, wherein, it includes: an acquisition module, configured to acquire source coordinates of each pixel point on a source map; a first processing module, configured to perform coordinate conversion on each source coordinate through a graphics processor based on the inverse projection transformation of the source map and the forward polyconic projection transformation to obtain polyconic projection coordinates corresponding to each source coordinate; a second processing module, configured to render the polyconic projection coordinates corresponding to each source coordinate through a fragment shader to obtain a rendered polyconic projection map, and display the polyconic projection map on a display screen, and the polyconic projection map is displayed on a first layer; a zoom detection module, configured to determine a target zoom level corresponding to the zoom operation when detecting a map zoom operation; a third processing module, configured to determine a first transparency of the first layer and a second transparency of a second layer corresponding to the target zoom level based on the corresponding relationship between the zoom level and the layer transparency; a display module, configured to display the first layer with the first transparency and display the second layer with the second transparency.

10. A map display device, wherein, it includes a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors to perform operation instructions included in the one or more programs corresponding to the method according to any one of claims 1-8.

11. A computer-readable storage medium, on which a computer program is stored, wherein, when the program is executed by a processor, it implements the method steps according to any one of claims 1-8.

Citation Information

Patent Citations

  • Method for carrying out data analysis by combining map

    CN102819671A