Spherical map drawing method, device and storage medium

By dividing spherical map tiles into sub-map tiles that are approximately flat and processed as graphics processor data, the problem of lines passing through the sphere in spherical map is solved, and more accurate map drawing is achieved.

CN112802143BActive Publication Date: 2025-04-25CENNAVI TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110106692.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-26
Publication Date
2025-04-25
Estimated Expiration
2041-01-26

AI Technical Summary

Technical Problem

Under the high scale of the spherical map, lines may pass through the sphere, causing some data to be unseen by human eyes, resulting in inaccurate map data.

Method used

By obtaining the Earth-based spherical map tiles and mapping them to a preset coordinate system, they are divided into multiple sub-map tiles. The ratio of the maximum number of pixel points belonging to the same plane in each sub-map tiles to the number of other pixel points is greater than the threshold, and then processed as graphics processor data to draw a more accurate map.

Benefits of technology

By dividing spherical map tiles into sub-map tiles with approximate planes, the problem of lines passing through the sphere is solved, and the accuracy of map data is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112802143B_ABST
    Figure CN112802143B_ABST
Patent Text Reader

Abstract

The present application discloses a spherical map drawing method, device and storage medium, which are helpful to draw maps on a sphere more accurately. The method includes: obtaining a spherical map tile based on the earth; mapping the spherical map tile to a preset coordinate system to obtain a map tile to be processed; the coordinates of each pixel point in the map tile to be processed are the coordinates in the preset coordinate system; obtaining a to-be-displayed area; the to-be-displayed area is a partial area in the map tile to be processed; dividing the map tile to be processed into a plurality of sub-map tiles according to the map scale corresponding to the to-be-displayed area, the ratio of the maximum number of pixel points belonging to the same plane in each sub-map tile to the number of other pixel points is greater than a threshold; the other pixel points are the pixel points in each sub-map tile except the pixel points belonging to the same plane; organizing the to-be-displayed area into graphics processor data based on each sub-map tile; and drawing a map of the to-be-displayed area based on the graphics processor data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a spherical map drawing method, device and storage medium. Background Art

[0002] As a carrier of data information visualization, maps play an increasingly important role in people's lives. At present, when drawing lines on spherical maps at a large scale, directly connecting two points will cause the drawn lines to pass through the sphere (also known as "stringing the sphere"). In this way, part of the data cannot be seen by the human eye, resulting in inaccurate map data. Summary of the invention

[0003] The present application provides a spherical map drawing method, device and storage medium, which help to draw maps on a sphere more accurately.

[0004] In a first aspect, a spherical map drawing method is provided, the method comprising: obtaining a spherical map tile based on the earth; mapping the spherical map tile to a preset coordinate system to obtain a map tile to be processed; the coordinates of each point in the map tile to be processed are the coordinates in the preset coordinate system; obtaining an area to be displayed; the area to be displayed is a partial area in the map tile to be processed; dividing the map tile to be processed into a plurality of sub-map tiles according to a map scale corresponding to the area to be displayed, the ratio of the maximum number of pixel points belonging to the same plane in each sub-map tile to the number of other pixel points is greater than a threshold; the other pixel points are the pixel points in each sub-map tile except the pixel points belonging to the same plane; processing the area to be displayed into graphics processor data based on each sub-map tile; and drawing a map of the area to be displayed based on the graphics processor data.

[0005] In an embodiment of the present application, the map tile to be processed is divided into multiple sub-map tiles according to the map scale corresponding to the area to be displayed, so that the ratio of the number of pixels in each sub-map tile that are in the same plane to the number of other pixels is greater than a threshold value, and the area to be displayed is processed based on each sub-map tile to obtain graphics processor data. In this way, since most of the pixels in each sub-map tile are in the same plane (that is, each sub-map tile is approximately a plane), most of the data in the graphics processor data obtained based on the sub-map tiles are theoretically in the same plane, thereby making the map of the area to be displayed drawn based on the data more accurate.

[0006] In a possible implementation, the above-mentioned processing of the area to be displayed into graphics processor data based on each sub-map tile includes: obtaining the intersection coordinates of the intersection of the boundary line of the area to be displayed and the sub-map tile in a preset coordinate system; triangulating the area to be displayed based on the intersection coordinates, and obtaining graphics processor data based on the intersection coordinates.

[0007] In another possible implementation, the above-mentioned dividing the map tile to be processed into multiple sub-map tiles according to the map scale corresponding to the area to be displayed includes: reading the number of divisions corresponding to the map scale of the area to be displayed from the corresponding relationship between the preset map scale and the number of divisions, and dividing the map tile to be processed into multiple sub-map tiles according to the number of divisions corresponding to the map scale of the area to be displayed.

[0008] In another possible implementation, the above-mentioned triangulation of the area to be displayed based on the intersection coordinates to obtain the graphics processor data based on the intersection coordinates includes: when the area to be displayed is a line, performing operations on every two adjacent intersection coordinates in the intersection coordinates: obtaining two moving coordinates of the first intersection coordinate and two moving coordinates of the second intersection coordinate; the first intersection coordinate is adjacent to the second intersection coordinate; the two moving coordinates of the first intersection coordinate include the first moving coordinate and the second moving coordinate; the two moving coordinates of the second intersection coordinate include the third moving coordinate and the fourth moving coordinate; the distance between the first moving coordinate and the first intersection coordinate is the first distance; the distance between the second moving coordinate and the first intersection coordinate is the second distance; the distance between the third moving coordinate and the second intersection coordinate is the third distance; the distance between the fourth moving coordinate and the second intersection coordinate is the third distance; The distance of the intersection coordinates is the fourth distance; the first distance, the second distance, the third distance and the fourth distance are all equal; the line connecting the first moving coordinate and the first intersection coordinate, the line connecting the second moving coordinate and the first intersection coordinate, the line connecting the third moving coordinate and the second intersection coordinate, and the line connecting the fourth moving coordinate and the second intersection coordinate are all perpendicular to the line connecting the second intersection coordinate and the first intersection coordinate; the first moving coordinate, the third moving coordinate and the second moving coordinate form a triangle, and the first moving coordinate, the second moving coordinate and the fourth moving coordinate form a triangle; the graphics processor data is obtained according to the first moving coordinate, the second moving coordinate, the third moving coordinate and the fourth moving coordinate that form the triangle; when the area to be displayed is an area area, the area to be displayed is processed into graphics processor data based on the intersection coordinates according to the triangulation algorithm.

[0009] In a second aspect, a spherical map drawing device is provided, which can be used to execute any method provided in any possible implementation of the first aspect mentioned above.

[0010] According to the second aspect, in a first possible implementation manner of the second aspect, the device includes a plurality of functional modules, and the plurality of functional modules are respectively used to execute corresponding steps in any one of the methods provided in the first aspect.

[0011] According to the second aspect, in a second possible implementation manner of the second aspect, the device may include a processor, the processor being used to execute any of the methods provided in any of the possible implementation manners of the first aspect to the first aspect. The device may also include a memory, the memory being used to store a computer program, so that the processor can call the computer program to execute any of the methods provided in any of the possible implementation manners of the first aspect to the first aspect.

[0012] In a third aspect, the present application provides a chip system, which is applied to a computer device, and the chip system includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by a line; the interface circuit is used to receive a signal from the memory of the computer device and send the signal to the processor, and the signal includes a computer instruction stored in the memory. When the processor executes the computer instruction, the computer device executes the method described in any possible implementation of the first aspect to the first aspect.

[0013] In a fourth aspect, the present application provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on a computer device, the computer device executes the method described in the first aspect to any possible implementation method of the first aspect.

[0014] In a fifth aspect, the present application provides a computer program product, which includes computer instructions. When the computer instructions are executed on a computer device, the computer device executes the method described in the first aspect to any possible implementation method of the first aspect.

[0015] It can be understood that any of the spherical map drawing devices, chip systems, computer-readable storage media or computer program products provided above can be applied to the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods and will not be repeated here.

[0016] These and other aspects of the present application will become more apparent from the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A schematic diagram of the structure of a computer device to which the technical solution provided in the embodiments of the present application is applicable;

[0018] Figure 2 A schematic diagram of a process for drawing a spherical map provided in an embodiment of the present application;

[0019] Figure 3A schematic diagram of a polyline in a map tile to be processed provided in an embodiment of the present application;

[0020] Figure 4 A schematic diagram of an area to be displayed input by a user in a map tile to be processed provided in an embodiment of the present application;

[0021] Figure 5 A schematic diagram of triangulating a line-type area to be displayed;

[0022] Figure 6 A schematic structural diagram of a spherical map drawing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0024] For ease of understanding, the nouns involved in the embodiments of the present disclosure are explained below.

[0025] 1) Map tiles

[0026] In the embodiment of the present application, a three-dimensional sphere is regarded as the earth, and the spherical surface is divided into a spherical surface composed of grids using its latitude and longitude grid lines and the difference in each level of scale. Each unit cell grid is called a map tile.

[0027] 2) Others

[0028] In the embodiments of the present application, "at least one" means one or more, and "plurality" means two or more.

[0029] In the embodiments of the present application, "and / or" is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0030] In the embodiment of the present application, a combination includes one or more objects.

[0031] like Figure 1 As shown, it is a schematic diagram of the structure of a computer device to which the technical solution provided in the embodiment of the present application is applicable. Figure 1The computer device 20 shown may include at least one processor 201 , a communication line 202 , a memory 203 , at least one communication interface 204 , an output device 205 , and an input device 206 .

[0032] The processor 201 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.

[0033] The communication line 202 may include at least one path, such as a data bus, and / or a control bus, for transmitting information between the above components (such as at least one processor 201, the communication line 202, the memory 203 and at least one communication interface 204).

[0034] The communication interface 204 uses any transceiver or other device for communicating with other devices or communication networks, such as wide area networks (WAN), local area networks (LAN), etc. For example, it can receive Figure 1 Data sent by sensors in the parallel circuit shown.

[0035] The memory 203 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 203 may be independent and connected to the processor 201 via a communication line 202. The memory 203 may also be integrated with the processor 201. The memory 203 provided in the embodiment of the present application generally includes a non-volatile memory. The memory 203 is used to store computer instructions for executing the solution of the present application, and the execution is controlled by the processor 201. The processor 201 is used to execute the computer instructions stored in the memory 203, thereby implementing the method provided in the following embodiments of the present application.

[0036] The storage 203 includes a memory and a hard disk.

[0037] The output device 205 communicates with the processor 201 and can display information in a variety of ways. For example, the output device 205 can be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector.

[0038] The input device 206 communicates with the processor 201 and can receive user input in a variety of ways. For example, the input device 206 can be a mouse, a keyboard, a touch screen device, or a sensor device.

[0039] Optionally, the computer instructions in the embodiments of the present application may also be referred to as application code or system, which is not specifically limited in the embodiments of the present application.

[0040] In a specific implementation, as an embodiment, the computer device 20 may include multiple processors, each of which may be a single-CPU processor or a multi-CPU processor. The processor here may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0041] It should be noted that Figure 1 The computer device shown is only an example and does not limit the computer devices applicable to the embodiments of the present application. In actual implementation, the computer device may include Figure 1 More or fewer devices or components than those shown.

[0042] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0043] Figure 2 FIG. 1 is a flow chart of a spherical map drawing method provided by an embodiment of the present application. Figure 2 As shown, the method may include the following steps:

[0044] S100: The computer device obtains a spherical map tile based on the earth.

[0045] Specifically, the computer device obtains a three-dimensional sphere, takes the three-dimensional sphere as the earth, and divides the three-dimensional sphere into a plurality of grids, each grid being a map tile.

[0046] In one example, a three-dimensional sphere is obtained and used as the earth. The spherical surface of the three-dimensional sphere is divided into a spherical surface consisting of grids according to latitude and longitude grid lines and each level of scale. Each cell grid is called a map tile.

[0047] S101: The computer device maps the spherical map tiles to a preset coordinate system to obtain the map tiles to be processed; the coordinates of each pixel point in the map tiles to be processed are the coordinates in the preset coordinate system.

[0048] In one possible implementation, a computer device maps spherical map tiles to a preset coordinate system so that each tile has a z coordinate to represent its map scale, and an x ​​coordinate and a y coordinate to represent the position of the tile in the grid at the current map scale, such as: z / x / y, to obtain the map tile to be processed.

[0049] In one example, the coordinates of the first tile are 0 / 0 / 0, and the map scale is 0. There is only one tile and it covers the entire world. Different map scales correspond to different map scales. When the map scale is 1, the map tile with a map scale of 0 is divided into four equal squares, of which the two map tiles with coordinates of 1 / 0 / 0 and 1 / 1 / 0 cover the northern hemisphere, and the two map tiles with coordinates of 1 / 0 / 1 and 1 / 1 / 1 cover the southern hemisphere. For each map tile, the preset coordinate system is used as the coordinate system of the map tile.

[0050] In another possible implementation, the computer device maps the spherical map tiles to a geodetic coordinate system to obtain map tiles to be processed.

[0051] S102: The computer device obtains the area to be displayed; the area to be displayed is a partial area in the map tile to be processed.

[0052] In one possible case, the computer device obtains the area to be displayed as a polyline in response to the user's input operation in the map tile to be processed.

[0053] For example, Figure 3 The figure shows a schematic diagram of a polyline in a map tile to be processed. Figure 3 The dotted part is the map tile to be processed.

[0054] In another possible case, the computer device responds to the user's input operation in the map tile to be processed and obtains that the area to be displayed is a region. Figure 4 The figure shows a schematic diagram of the area to be displayed input by the user in the map tile to be processed. Figure 4 The dotted part is the map tile to be processed.

[0055] S103: The computer device divides the map tile to be processed into multiple sub-map tiles according to the map scale corresponding to the area to be displayed, and the ratio of the maximum number of pixel points belonging to the same plane in each sub-map tile to the number of other pixel points is greater than a threshold; the other pixel points are the pixel points in each sub-map tile except the pixel points belonging to the same plane.

[0056] In a possible implementation, the computer device reads the division number corresponding to the map scale corresponding to the to-be-displayed area from the preset correspondence between the map scale and the division number, and divides the to-be-processed map tile into a plurality of sub-map tiles using the read division number. In this way, it can be ensured that the ratio of the maximum number of pixel points in the same plane to the number of other pixel points in each sub-map tile obtained by division is greater than a threshold value.

[0057] In one example, when the map scale is level 1, the map tile to be processed is divided 7 times, and each map tile in the map tile to be processed is divided into 2 7 When the map scale is 2, the map tile to be processed is divided into 6 times, decreasing in sequence. When the number of divisions is less than or equal to 1, the default value is 1.

[0058] S104: The computer device organizes the area to be displayed into graphics processor data based on each sub-map tile.

[0059] Specifically, the computer device organizes the area to be displayed into graphics processor data through the following steps:

[0060] Step 1: The computer device obtains the coordinates of the intersection of the boundary line of the area to be displayed and the sub-map tile in a preset coordinate system.

[0061] In one example, assuming that the area to be displayed is a polyline, then the polyline is the boundary line of the area to be displayed. The intersection coordinates of the polyline and the submap tile in the preset coordinate system are {"type":"Line","data":[[x'1,y'1],[x"1,y"1],...,[x' n ,y' n ],[x” n ,y” n ],...]}. Among them, [x'1,y'1] is the coordinate of an intersection point.

[0062] In another example, assuming that the area to be displayed is a polygonal area, then the boundary line of the polygonal area is the boundary line of the area to be displayed. The intersection coordinates of the intersection of the boundary line and the submap tile in the preset coordinate system are {"type":"Line","data":[[x'1,y'1],[x"1,y"1],...,[x'1,y'1]]}. Among them, [x'1,y'1] is an intersection coordinate.

[0063] Step 2: The computer device triangulates the display area based on the intersection coordinates to obtain graphics processor data based on the intersection coordinates.

[0064] In the case where the area to be displayed is a line, an operation is performed for every two adjacent intersection coordinates in the intersection coordinates: two moving coordinates of the first intersection coordinate and two moving coordinates of the second intersection coordinate are obtained; the first intersection coordinate is adjacent to the second intersection coordinate; the two moving coordinates of the first intersection coordinate include the first moving coordinate and the second moving coordinate; the two moving coordinates of the second intersection coordinate include the third moving coordinate and the fourth moving coordinate; the distance between the first moving coordinate and the first intersection coordinate is the first distance; the distance between the second moving coordinate and the first intersection coordinate is the second distance; the distance between the third moving coordinate and the second intersection coordinate is the third distance; the fourth moving coordinate The distance between the first moving coordinate and the second intersection coordinate is the fourth distance; the first distance, the second distance, the third distance and the fourth distance are all equal; the line connecting the first moving coordinate and the first intersection coordinate, the line connecting the second moving coordinate and the first intersection coordinate, the line connecting the third moving coordinate and the second intersection coordinate and the line connecting the fourth moving coordinate and the second intersection coordinate are all perpendicular to the line connecting the second intersection coordinate and the first intersection coordinate; the first moving coordinate, the third moving coordinate and the second moving coordinate form a triangle, and the first moving coordinate, the second moving coordinate and the fourth moving coordinate form a triangle; the graphics processor data is obtained according to the first moving coordinate, the second moving coordinate, the third moving coordinate and the fourth moving coordinate that form the triangle.

[0065] In an example, Figure 5 The figure shows a schematic diagram of triangulating the line-shaped area to be displayed. The area to be displayed is Figure 5 The polyline m in , which intersects with two map tiles at three intersection points (intersection point A, intersection point B and intersection point C). Figure 5 A1 and A2 are the moving coordinates of the intersection A, B1 and B2 are the moving coordinates of the intersection B, and C1 and C2 are the moving coordinates of the intersection C. Connecting A1, A2 and B1 gives a triangular area, connecting B1, B2 and A2 gives another triangular area, and the rest is similar and will not be repeated.

[0066] In the case where the area to be displayed is an area region, a triangulation algorithm is used to process the area to be displayed into graphics processor data based on the intersection coordinates according to the intersection coordinates.

[0067] S105: The computer device draws a map of the area to be displayed based on the graphics processor data.

[0068] In one example, the computer device uses a javascript 3D drawing engine of WebGL to draw a map of the area to be displayed based on the graphics processor data.

[0069] In an embodiment of the present application, the map tile to be processed is divided into multiple sub-map tiles according to the map scale corresponding to the area to be displayed, so that the ratio of the number of pixels in each sub-map tile that are in the same plane to the number of other pixels is greater than a threshold value (that is, each sub-map tile is approximately a plane), and the area to be displayed is processed based on each sub-map tile to obtain graphics processor data. In this way, since most of the pixels in each sub-map tile are in the same plane, most of the data in the graphics processor data obtained based on the sub-map tiles are theoretically in the same plane, thereby making the map of the area to be displayed drawn based on the data more accurate.

[0070] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to achieve the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily appreciate that, in combination with the method steps of each example described in the embodiment disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0071] The embodiment of the present application can divide the functional modules of the computer device according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0072] like Figure 6 As shown, it is a schematic diagram of the structure of a spherical map drawing device provided in an embodiment of the present application. The spherical map drawing device 60 can be used to execute any of the above embodiments (such as Figure 2The spherical map drawing device 60 includes: an acquisition module 601, a mapping module 602, a division module 603, a sorting module 604 and a drawing module 605. Among them, the acquisition module 601 is used to acquire spherical map tiles based on the earth; the mapping module 602 is used to map the spherical map tiles to a preset coordinate system to obtain map tiles to be processed; the coordinates of each point in the map tiles to be processed are the coordinates in the preset coordinate system; the acquisition module 601 is also used to acquire the area to be displayed; the area to be displayed is a partial area in the map tiles to be processed; the division module 603 is used to divide the map tiles to be processed into multiple sub-map tiles according to the map scale corresponding to the area to be displayed, and the ratio of the maximum number of pixel points belonging to the same plane in each sub-map tile to the number of other pixel points is greater than a threshold; other pixel points are pixel points in each sub-map tile except the maximum number of pixel points belonging to the same plane; the sorting module 604 is used to sort the area to be displayed into graphics processor data based on each sub-map tile; the drawing module 605 is used to draw a map of the area to be displayed based on the graphics processor data. For example, combined with Figure 2 The acquisition module 601 can be used to execute S100 and S102, the mapping module 602 can be used to execute S101, the division module 603 can be used to execute S103, the sorting module 604 can be used to execute S104, and the drawing module 605 can be used to execute S105.

[0073] Optionally, the acquisition module 601 is also used to: obtain the intersection coordinates of the intersection between the boundary line of the area to be displayed and the sub-map tile in a preset coordinate system; the division module 603 is also used to: triangulate the area to be displayed based on the intersection coordinates to obtain graphics processor data based on the intersection coordinates.

[0074] Optionally, the division module 603 is specifically used to: read the division number corresponding to the map scale corresponding to the area to be displayed from the preset correspondence between the map scale and the division number, and divide the map tile to be processed into multiple sub-map tiles according to the division number corresponding to the map scale corresponding to the area to be displayed.

[0075] Optionally, the sorting module 604 is specifically used for: when the area to be displayed is a line, performing operations on every two adjacent intersection coordinates in the intersection coordinates: obtaining two moving coordinates of the first intersection coordinate and two moving coordinates of the second intersection coordinate; the first intersection coordinate is adjacent to the second intersection coordinate; the two moving coordinates of the first intersection coordinate include the first moving coordinate and the second moving coordinate; the two moving coordinates of the second intersection coordinate include the third moving coordinate and the fourth moving coordinate; the distance between the first moving coordinate and the first intersection coordinate is the first distance; the distance between the second moving coordinate and the first intersection coordinate is the second distance; the distance between the third moving coordinate and the second intersection coordinate is the third distance; the distance between the fourth moving coordinate and the second intersection coordinate is the fourth distance; the first distance, the second distance , the third distance and the fourth distance are all equal; the line connecting the first moving coordinate and the first intersection coordinate, the line connecting the second moving coordinate and the first intersection coordinate, the line connecting the third moving coordinate and the second intersection coordinate, and the line connecting the fourth moving coordinate and the second intersection coordinate are all perpendicular to the line connecting the second intersection coordinate and the first intersection coordinate; the first moving coordinate, the third moving coordinate and the second moving coordinate form a triangle, and the first moving coordinate, the second moving coordinate and the fourth moving coordinate form a triangle; the graphics processor data is obtained according to the first moving coordinate, the second moving coordinate, the third moving coordinate and the fourth moving coordinate that form the triangle; when the area to be displayed is an area area, the triangulation algorithm is used to process the area to be displayed into graphics processor data based on the intersection coordinates according to the intersection coordinates.

[0076] In one example, see Figure 1 The receiving function of the acquisition module 601 can be Figure 1 The processing functions of the acquisition module 601, the mapping module 602, the division module 603, the sorting module 604 and the drawing module 605 can all be implemented by Figure 2 The processor 201 in the embodiment calls the computer program stored in the memory 203 for implementation.

[0077] For the detailed description of the above optional methods, please refer to the above method embodiments, which will not be repeated here. In addition, the explanation and description of the beneficial effects of any of the spherical map drawing devices 60 provided above can refer to the above corresponding method embodiments, which will not be repeated here.

[0078] It should be noted that the actions performed by the above modules are only specific examples. The actions actually performed by each unit refer to the above-mentioned Figure 2 The actions or steps mentioned in the description of the embodiments are described.

[0079] An embodiment of the present application also provides a computer device, including: a memory and a processor; the memory is used to store a computer program, and the processor is used to call the computer program to execute the actions or steps mentioned in any of the embodiments provided above.

[0080] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed on a computer, the computer is enabled to execute the actions or steps mentioned in any of the embodiments provided above.

[0081] The present application also provides a chip. The chip integrates a circuit and one or more interfaces for implementing the functions of the spherical map drawing device 60. Optionally, the functions supported by the chip may include: Figure 2 The processing actions in the embodiments are not described in detail here. A person of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by instructing the relevant hardware through a program. The program can be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a random access memory, etc. The processing unit or processor can be a central processing unit, a general-purpose processor, an application specific integrated circuit (ASIC), a microprocessor (digital signal processor, DSP), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof.

[0082] The embodiment of the present application also provides a computer program product including instructions, when the instructions are run on a computer, the computer executes any one of the methods in the above embodiments. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that may be integrated with one or more available media. The available media may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.

[0083] It should be noted that the above-mentioned devices for storing computer instructions or computer programs provided in the embodiments of the present application, such as but not limited to the above-mentioned memories, computer-readable storage media and communication chips, etc., are all non-transitory.

[0084] In the process of implementing the claimed application, those skilled in the art may understand and implement other changes to the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit can implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.

[0085] Although the present application has been described in conjunction with specific features and embodiments thereof, various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the accompanying drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application.

Claims

1. A method for drawing a spherical map, characterized in that: The method comprises: Get the spherical map tile based on the earth; Mapping the spherical map tile to a preset coordinate system to obtain a map tile to be processed; the coordinates of each pixel point in the map tile to be processed are the coordinates in the preset coordinate system; Acquire the area to be displayed; the area to be displayed is a partial area in the map tile to be processed, including a polyline and a polygonal area; Dividing the map tile to be processed into a plurality of sub-map tiles according to the map scale corresponding to the area to be displayed, wherein the ratio of the maximum number of pixel points belonging to the same plane in each sub-map tile to the number of other pixel points is greater than a threshold value; the other pixel points are the pixel points in each sub-map tile except the pixel points belonging to the same plane; Arranging the area to be displayed into graphics processor data based on each sub-map tile; Drawing a map of the area to be displayed based on the graphics processor data; The step of arranging the to-be-displayed area into graphics processor data based on each sub-map tile includes: Obtaining the coordinates of the intersection of the boundary line of the area to be displayed and the sub-map tile in the preset coordinate system; triangulate the area to be displayed based on the intersection coordinates to obtain graphics processor data based on the intersection coordinates; The triangulating the area to be displayed based on the intersection coordinates to obtain graphics processor data based on the intersection coordinates includes: When the area to be displayed is a line, the graphics processor data is obtained according to the first moving coordinates, the second moving coordinates, the third moving coordinates and the fourth moving coordinates constituting a triangle; wherein the first moving coordinates and the second moving coordinates are coordinates in the first intersection coordinates, the third moving coordinates and the fourth moving coordinates are coordinates in the second intersection coordinates, and the first intersection coordinates and the second intersection coordinates are any two adjacent intersection coordinates in the intersection coordinates; In the case that the area to be displayed is an area region, a triangulation algorithm is used to process the area to be displayed into graphics processor data based on the intersection coordinates according to the intersection coordinates.

2. The method according to claim 1, characterized in that The step of dividing the map tile to be processed into a plurality of sub-map tiles according to the map scale corresponding to the area to be displayed includes: The number of divisions corresponding to the map scale corresponding to the area to be displayed is read from the correspondence between the preset map scale and the number of divisions, and the map tile to be processed is divided into a plurality of sub-map tiles according to the number of divisions corresponding to the map scale corresponding to the area to be displayed.

3. The method according to claim 1, characterized in that The distance between the first moving coordinate and the first intersection coordinate is the first distance; the distance between the second moving coordinate and the first intersection coordinate is the second distance; the distance between the third moving coordinate and the second intersection coordinate is the third distance; the distance between the fourth moving coordinate and the second intersection coordinate is the fourth distance; the first distance, the second distance, the third distance and the fourth distance are all equal; the line connecting the first moving coordinate and the first intersection coordinate, the line connecting the second moving coordinate and the first intersection coordinate, the line connecting the third moving coordinate and the second intersection coordinate, and the line connecting the fourth moving coordinate and the second intersection coordinate are all perpendicular to the line connecting the second intersection coordinate and the first intersection coordinate; the first moving coordinate, the third moving coordinate and the second moving coordinate form a triangle, and the first moving coordinate, the second moving coordinate and the fourth moving coordinate form a triangle.

4. A spherical map drawing device, characterized in that: include: An acquisition module is used to obtain spherical map tiles based on the earth; A mapping module, used for mapping the spherical map tile to a preset coordinate system to obtain a map tile to be processed; The coordinates of each point in the map tile to be processed are the coordinates in the preset coordinate system; The acquisition module is further used to acquire the area to be displayed; The area to be displayed is a partial area in the map tile to be processed, including a polyline and a polygonal area; A division module, used for dividing the to-be-processed map tile into a plurality of sub-map tiles according to the map scale corresponding to the to-be-displayed area, wherein the ratio of the maximum number of pixel points belonging to the same plane in each sub-map tile to the number of other pixel points is greater than a threshold value; The other pixel points are the pixel points in each sub-map tile except the pixel points belonging to the same plane; A sorting module, used for sorting the to-be-displayed area into graphics processor data based on each sub-map tile; A drawing module, used for drawing a map of the area to be displayed based on the graphics processor data; The acquisition module is further used to: acquire the intersection coordinates of the intersection of the boundary line of the to-be-displayed area and the sub-map tile in the preset coordinate system; The division module is further used to: perform triangulation on the to-be-displayed area based on the intersection coordinates to obtain graphics processor data based on the intersection coordinates; The sorting module is specifically used for: when the area to be displayed is a line, obtaining the graphics processor data according to the first moving coordinates, the second moving coordinates, the third moving coordinates and the fourth moving coordinates that form a triangle; wherein the first moving coordinates and the second moving coordinates are coordinates in the first intersection coordinates, the third moving coordinates and the fourth moving coordinates are coordinates in the second intersection coordinates, and the first intersection coordinates and the second intersection coordinates are any two adjacent intersection coordinates in the intersection coordinates; In the case that the area to be displayed is an area region, a triangulation algorithm is used to process the area to be displayed into graphics processor data based on the intersection coordinates according to the intersection coordinates.

5. The device according to claim 4, characterized in that The division module is specifically used for: The number of divisions corresponding to the map scale corresponding to the area to be displayed is read from the correspondence between the preset map scale and the number of divisions, and the map tile to be processed is divided into a plurality of sub-map tiles according to the number of divisions corresponding to the map scale corresponding to the area to be displayed.

6. The device according to claim 4, characterized in that The distance between the first moving coordinate and the first intersection coordinate is the first distance; the distance between the second moving coordinate and the first intersection coordinate is the second distance; the distance between the third moving coordinate and the second intersection coordinate is the third distance; the distance between the fourth moving coordinate and the second intersection coordinate is the fourth distance; the first distance, the second distance, the third distance and the fourth distance are all equal; the line connecting the first moving coordinate and the first intersection coordinate, the line connecting the second moving coordinate and the first intersection coordinate, the line connecting the third moving coordinate and the second intersection coordinate, and the line connecting the fourth moving coordinate and the second intersection coordinate are all perpendicular to the line connecting the second intersection coordinate and the first intersection coordinate; the first moving coordinate, the third moving coordinate and the second moving coordinate form a triangle, and the first moving coordinate, the second moving coordinate and the fourth moving coordinate form a triangle.

7. A computer device, characterized in that: include: A memory and a processor, the memory being used to store a computer program, and the processor being used to execute the computer program to perform the method according to any one of claims 1 to 3.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 3.