CN112802143A - Spherical map drawing method, spherical map drawing device and storage medium - Google Patents

Spherical map drawing method, spherical map drawing device and storage medium Download PDF

Info

Publication number
CN112802143A
CN112802143A CN202110106692.8A CN202110106692A CN112802143A CN 112802143 A CN112802143 A CN 112802143A CN 202110106692 A CN202110106692 A CN 202110106692A CN 112802143 A CN112802143 A CN 112802143A
Authority
CN
China
Prior art keywords
coordinate
map
moving
intersection point
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110106692.8A
Other languages
Chinese (zh)
Inventor
周明瑞
吴浩原
唐萌
韩娜
石清华
温宇浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Cennavi Technologies Co Ltd
Original Assignee
Beijing Cennavi Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Cennavi Technologies Co Ltd filed Critical Beijing Cennavi Technologies Co Ltd
Priority to CN202110106692.8A priority Critical patent/CN112802143A/en
Publication of CN112802143A publication Critical patent/CN112802143A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Remote Sensing (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application discloses a spherical map drawing method, a spherical map drawing device and a storage medium, which are beneficial to drawing a map on a spherical surface more accurately. The method comprises the following steps: acquiring a spherical map tile based on the earth; mapping the spherical map tiles to a preset coordinate system to obtain map tiles to be processed; the coordinates of each pixel point in the map tiles to be processed are coordinates in a preset coordinate system; acquiring a region 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, 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; a map of the area to be displayed is rendered based on the graphics processor data.

Description

Spherical map drawing method, spherical map drawing device and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method and an apparatus for spherical mapping and a storage medium.
Background
Maps are playing an increasingly important role in the life of people as carriers for data information visualization. Currently, when a line is drawn, a situation that the drawn line passes through a sphere (also called as a string of spheres) exists in the process of directly drawing a two-point connecting line under a large scale in the drawing of a spherical map, so that part of data cannot be seen by human eyes, and the drawn map data is inaccurate.
Disclosure of Invention
The application provides a spherical map drawing method, a spherical map drawing device and a storage medium, which are beneficial to more accurately drawing a map on a spherical surface.
In a first aspect, a spherical mapping method is provided, the method comprising: acquiring 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 tiles to be processed are coordinates in a preset coordinate system; acquiring a region 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, 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; processing the area to be displayed into graphics processor data based on each sub-map tile; a map of the area to be displayed is rendered based on the graphics processor data.
In the embodiment of the application, the map tile to be processed is divided into a plurality of sub-map tiles according to the map scale corresponding to the area to be displayed, so that the ratio of the number of the pixel points in each sub-map tile in the same plane to the number of other pixel points is larger than a threshold value, the area to be displayed is processed based on each sub-map tile, and the data of the graphic processor is obtained.
In one possible implementation, the processing the area to be displayed into the graphics processor data on a per sub-map tile basis includes: acquiring intersection point coordinates of intersection points of boundary lines of the area to be displayed and the sub-map tiles in a preset coordinate system; and triangulating the area to be displayed based on the intersection point coordinates to obtain the graphics processor data based on the intersection point coordinates.
In another possible implementation manner, the 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: and reading the division times corresponding to the map scale corresponding to the area to be displayed from the corresponding relation between the preset map scale and the division times, and dividing the map tile to be processed into a plurality of sub-map tiles according to the division times corresponding to the map scale corresponding to the area to be displayed.
In another possible implementation manner, the triangulating the to-be-displayed area based on the intersection point coordinate to obtain the graphics processor data based on the intersection point coordinate includes: and under the condition that the area to be displayed is a line, performing operation on every two adjacent intersection point coordinates in the intersection point coordinates: acquiring two moving coordinates of the first intersection point coordinate and two moving coordinates of the second intersection point coordinate; the first intersection point coordinate is adjacent to the second intersection point coordinate; the two moving coordinates of the first intersection point coordinate comprise a first moving coordinate and a second moving coordinate; the two moving coordinates of the second intersection point coordinate comprise a third moving coordinate and a fourth moving coordinate; the distance between the first moving coordinate and the first intersection point coordinate is a first distance; the distance between the second moving coordinate and the first intersection point coordinate is a second distance; the distance between the third moving coordinate and the second intersection point coordinate is a third distance; the distance between the fourth moving coordinate and the second intersection point coordinate is a fourth distance; the first distance, the second distance, the third distance and the fourth distance are equal; a connecting line of the first moving coordinate and the first intersection point coordinate, a connecting line of the second moving coordinate and the first intersection point coordinate, a connecting line of the third moving coordinate and the second intersection point coordinate, and a connecting line of the fourth moving coordinate and the second intersection point coordinate are all perpendicular to a connecting line of the second intersection point coordinate and the first intersection point 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; obtaining the data of the graphic processor according to the first moving coordinate, the second moving coordinate, the third moving coordinate and the fourth moving coordinate which form the triangle; and under the condition that the area to be displayed is an area, processing the area to be displayed into graphic processor data based on intersection point coordinates according to a triangulation algorithm.
In a second aspect, there is provided a spherical mapping apparatus, which is operable to perform any of the methods provided in any of the possible implementations of the first aspect.
According to the second aspect, in a first possible implementation manner of the second aspect, the apparatus includes several functional modules, which are respectively configured to perform corresponding steps in any one of the methods provided by the first aspect.
According to a second aspect, in a second possible implementation manner of the second aspect, the apparatus may include a processor configured to perform any one of the methods provided in any one of the possible implementation manners of the first aspect to the first aspect. The apparatus may also include a memory for storing the computer program. To enable the processor to invoke the computer program for performing any of the methods provided in any of the possible implementations of the first aspect described above.
In a third aspect, the present application provides a chip system applied to a computer device, the chip system including one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected through a line; the interface circuit is to receive signals from a memory of the computer device and to send the signals to the processor, the signals including computer instructions stored in the memory. When the processor executes the computer instructions, the computer device performs the method according to any one of the possible implementations of the first aspect to the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium comprising computer instructions that, when executed on a computer device, cause the computer device to perform the method according to any one of the possible implementations of the first aspect to the first aspect.
In a fifth aspect, the present application provides a computer program product comprising computer instructions that, when run on a computer device, cause the computer device to perform the method according to any one of the possible implementations of the first aspect to the first aspect.
It is understood that any one of the spherical mapping devices, chip systems, computer-readable storage media or computer program products provided above may be applied to the corresponding methods provided above, and therefore, the beneficial effects achieved by the spherical mapping devices may refer to the beneficial effects in the corresponding methods, and are not described herein again.
These and other aspects of the present application will be more readily apparent from the following description.
Drawings
Fig. 1 is a schematic structural diagram of a computer device to which the technical solution provided by the embodiment of the present application is applied;
fig. 2 is a schematic flowchart of a spherical mapping method according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a polyline in a map tile to be processed as provided by an embodiment of the present application;
FIG. 4 is a schematic diagram of a to-be-displayed area for user input in a to-be-processed map tile according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a linear type area to be displayed being triangulated;
fig. 6 is a schematic structural diagram of a spherical mapping device according to an embodiment of the present application.
Detailed Description
In the embodiments of the present application, words such as "exemplary" or "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
For convenience of understanding, terms referred to in the embodiments of the present disclosure are explained below.
1) Map tile
In the embodiment of the application, a three-dimensional sphere is regarded as the earth, the sphere is divided into the spheres formed by grids by utilizing the difference of longitude and latitude grid lines and each scale, and each unit grid is called as a map tile.
2) Others
In the embodiments of the present application, "at least one" means one or more. "plurality" means two or more.
In the embodiment of the present application, "and/or" is only one kind of association relationship describing an association object, and indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
In an embodiment of the application, a combination comprises one or more objects.
Fig. 1 is a schematic structural diagram of a computer device to which the technical solution provided by the embodiment of the present application is applied. The computer device 20 shown in fig. 1 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.
The processor 201 may be a general processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more ics for controlling the execution of programs in accordance with the present invention.
The communication link 202 may include at least one path, such as a data bus, and/or a control bus, for communicating information between the aforementioned components (e.g., the at least one processor 201, the communication link 202, the memory 203, and the at least one communication interface 204).
The communication interface 204 may be any device, such as a transceiver, for communicating with other devices or communication networks, such as Wide Area Networks (WAN), Local Area Networks (LAN), and the like. For example, data transmitted by sensors in the parallel circuit shown in fig. 1 may be received.
The memory 203 may be, but is not limited to, a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, optical disk storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory 203 may be separate and coupled to the processor 201 via the communication line 202. The memory 203 may also be integrated with the processor 201. The memory 203 provided by the embodiment of the present application generally includes a nonvolatile memory. The memory 203 is used for storing computer instructions for executing the scheme of the application, and is controlled by the processor 201 to execute. The processor 201 is configured to execute the computer instructions stored in the memory 203, thereby implementing the methods provided by the embodiments described below.
The storage 203 includes a memory and a hard disk.
The output device 205 is in communication with the processor 201 and may display information in a variety of ways. For example, the output device 205 may be a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display device, a Cathode Ray Tube (CRT) display device, a projector (projector), or the like.
The input device 206 is in communication with the processor 201 and may receive user input in a variety of ways. For example, the input device 206 may be a mouse, a keyboard, a touch screen device, or a sensing device, among others.
Optionally, the computer instructions in the embodiments of the present application may also be referred to as application program code or system, which is not specifically limited in the embodiments of the present application.
In one embodiment, the computer device 20 may include a plurality of processors, and each of the processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
It should be noted that the computer device shown in fig. 1 is only an example, and does not limit the computer device to which the embodiments of the present application are applicable. In actual implementation, the computer device may include more or fewer devices or components than those shown in FIG. 1.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 2 shows a flowchart of a spherical mapping method provided in an embodiment of the present application. As shown in fig. 2, the method may include the steps of:
s100: a computer device obtains an earth-based spherical map tile.
Specifically, the computer device obtains a three-dimensional sphere, uses the three-dimensional sphere as the earth, and divides the three-dimensional sphere into a plurality of grids, each grid being a map tile.
In one example, a three-dimensional sphere is obtained, the three-dimensional sphere is taken as the earth, the spherical surface of the three-dimensional sphere is divided into spherical surfaces formed by grids according to longitude and latitude grid lines and each scale, and each unit grid is called a map tile.
S101: the method comprises the steps that computer equipment maps spherical map tiles to a preset coordinate system to obtain map tiles to be processed; and the coordinates of each pixel point in the map tile to be processed are coordinates in a preset coordinate system.
In one possible implementation, the computer device maps the spherical map tiles to a preset coordinate system such that each tile has a z-coordinate to represent its map scale, and an x-coordinate and a y-coordinate to represent the tile's position within the grid under the current map scale, such as: and z/x/y, obtaining the map tile to be processed.
In one example, the first tile has coordinates 0/0/0, where the time scale is 0, and only one tile covers the entire world. Different map scales correspond to different map scales. When the map scale is 1, the map tile when the map scale is 0 is divided into four equal squares, wherein two map tiles with coordinates 1/0/0 and 1/1/0 cover the northern hemisphere, and two map tiles with coordinates 1/0/1 and 1/1/1 cover the southern hemisphere. And taking a preset coordinate system as the coordinate system of each map tile.
In another possible implementation, the computer device maps the spherical map tiles to a geodetic coordinate system to obtain map tiles to be processed.
S102: the computer equipment acquires a region to be displayed; the area to be displayed is a partial area in the map tile to be processed.
In one possible case, the computer device responds to the input operation of the user in the map tile to be processed to obtain that the area to be displayed is a broken line.
Illustratively, as shown in FIG. 3, which is a schematic diagram of polylines in a map tile to be processed, the dashed portion of FIG. 3 is the map tile to be processed.
In another possible case, the computer device obtains the area to be displayed as one area in response to an input operation of the user in the map tile to be processed. Illustratively, as shown in fig. 4, the area to be displayed input by the user is a schematic diagram of the map tile to be processed, and the dotted line part in fig. 4 is the map tile to be processed.
S103: dividing a map tile to be processed into a plurality of sub-map tiles by the computer equipment according to a map scale corresponding to a region 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; and the other pixel points are the pixel points in each sub-map tile except the pixel points belonging to the same plane.
In one possible implementation manner, the computer device reads the division times corresponding to the map scale corresponding to the area to be displayed from the corresponding relationship between the preset map scale and the division times, and divides the map tile to be processed into a plurality of sub-map tiles by using the read division times. Therefore, the ratio of the maximum number of the pixel points on the same plane in each sub-map tile obtained by division to the number of other pixel points can be ensured to be larger than the threshold value.
In one example, when the map scale is level 1, the map tiles to be processed are divided 7 times, and each of the map tiles to be processed is divided into 27A sub-map tile. And under the condition that the map scale is 2 levels, dividing the map tiles to be processed for 6 times, sequentially decreasing the division times, and taking 1 time by default when the division times are less than or equal to 1.
S104: the computer device marshals the area to be displayed into graphics processor data on a per sub-map tile basis.
Specifically, the computer device arranges the area to be displayed into the data of the graphic processor by the following steps:
the method comprises the following steps: and the computer equipment acquires intersection point coordinates of the intersection points of the boundary lines of the area to be displayed and the sub-map tiles in a preset coordinate system.
In one example, it is assumed that the region to be displayed is a broken line, and the broken line is a boundary line of the region to be displayed. Obtaining the intersection point coordinates of the intersection point of the broken Line and the sub-map tiles in a preset coordinate system as { "type": Line "," data ": x'1,y’1],[x”1,y”1],...,[x’n,y’n],[x”n,y”n],...]}. Wherein, [ x'1,y’1]Is an intersection coordinate.
In another example, assuming that the area to be displayed is a polygon area, the boundary line of the polygon area is the boundary line of the area to be displayed. Obtaining the intersection point coordinates of the intersection point of the boundary Line and the sub-map tiles in a preset coordinate system as { "type": Line "," data ": x'1,y’1],[x”1,y”1],...,[x’1,y’1]]}. Wherein, [ x'1,y’1]Is an intersection coordinate.
Step two: and the computer equipment triangulates the area to be displayed based on the intersection point coordinates to obtain the graphics processor data based on the intersection point coordinates.
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: acquiring two moving coordinates of the first intersection point coordinate and two moving coordinates of the second intersection point coordinate; the first intersection point coordinate is adjacent to the second intersection point coordinate; the two moving coordinates of the first intersection point coordinate comprise a first moving coordinate and a second moving coordinate; the two moving coordinates of the second intersection point coordinate comprise a third moving coordinate and a fourth moving coordinate; the distance between the first moving coordinate and the first intersection point coordinate is a first distance; the distance between the second moving coordinate and the first intersection point coordinate is a second distance; the distance between the third moving coordinate and the second intersection point coordinate is a third distance; the distance between the fourth moving coordinate and the second intersection point coordinate is a fourth distance; the first distance, the second distance, the third distance and the fourth distance are equal; a connecting line of the first moving coordinate and the first intersection point coordinate, a connecting line of the second moving coordinate and the first intersection point coordinate, a connecting line of the third moving coordinate and the second intersection point coordinate, and a connecting line of the fourth moving coordinate and the second intersection point coordinate are all perpendicular to a connecting line of the second intersection point coordinate and the first intersection point 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; and obtaining the data of the graphic processor according to the first moving coordinate, the second moving coordinate, the third moving coordinate and the fourth moving coordinate which form the triangle.
In one example, as shown in fig. 5, a schematic diagram of triangulating a line-shaped area to be displayed is a broken line m in fig. 5, and the broken line m intersects two map tiles at three intersection points (intersection point a, intersection point B, and intersection point C). In fig. 5, a1 and a2 are the movement coordinates of the intersection a, B1 and B2 are the movement coordinates of the intersection B, and C1 and C2 are the movement coordinates of the intersection C. The connections a1, a2 and B1 obtain a triangular region, and the connections B1, B2 and a2 obtain another triangular region, and the rest of the processes are similar and will not be described again.
And under the condition that the area to be displayed is an area, processing the area to be displayed into the data of the graphic processor based on the intersection point coordinate by adopting a triangulation algorithm according to the intersection point coordinate.
S105: the computer device renders a map of the area to be displayed based on the graphics processor data.
In one example, a computer device draws a map of an area to be displayed based on graphics processor data using a javascript 3D drawing engine of WebGL.
In the embodiment of the application, the map tile to be processed is divided into a plurality of sub-map tiles according to the map scale corresponding to the area to be displayed, so that the ratio of the number of the pixel points in each sub-map tile in the same plane to the number of the other pixel points is larger than a threshold value (namely, each sub-map tile is approximate to a plane), the area to be displayed is processed based on each sub-map tile, and the data of the graphic processor is obtained.
The scheme provided by the embodiment of the application is mainly introduced from the perspective of a method. To implement the above functions, it includes hardware structures and/or software modules for performing the respective functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the exemplary method steps described in connection with the embodiments disclosed herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the computer device may be divided into the functional modules according to the method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, in the embodiment of the present application, the division of the module is schematic, and is only one logic function division, and there may be another division manner in actual implementation.
Fig. 6 is a schematic structural diagram of a spherical mapping device according to an embodiment of the present application. The spherical mapping apparatus 60 may be used to perform the functions performed by the computer device in any of the above embodiments (such as the embodiment shown in fig. 2). The spherical mapping device 60 includes: an acquisition module 601, a mapping module 602, a partitioning module 603, a sorting module 604, and a rendering module 605. The obtaining module 601 is configured to obtain a spherical map tile based on the earth; the mapping module 602 is configured 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 coordinates in a preset coordinate system; the obtaining module 601 is further configured to obtain a region to be displayed; the area to be displayed is a partial area in the map tile to be processed; a dividing module 603, configured to divide the map tile to be processed into multiple sub-map tiles according to a map scale corresponding to the region to be displayed, where a 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 except the pixel point with the maximum number of the pixel points belonging to the same plane in each sub-map tile; a sorting module 604 for sorting the area to be displayed into graphics processor data based on each sub-map tile; a drawing module 605 for drawing a map of the area to be displayed based on the graphics processor data. For example, with reference to fig. 2, the obtaining module 601 may be configured to perform S100 and S102, and the mapping module 602 may be configured to perform S101; the dividing module 603 may be configured to perform S103. The finishing module 604 may be configured to perform S104; the rendering module 605 may be configured to perform S105.
Optionally, the obtaining module 601 is further configured to: acquiring intersection point coordinates of intersection points of boundary lines of the area to be displayed and the sub-map tiles in a preset coordinate system; the dividing module 603 is further configured to: and triangulating the area to be displayed based on the intersection point coordinates to obtain the graphics processor data based on the intersection point coordinates.
Optionally, the dividing module 603 is specifically configured to: and reading the division times corresponding to the map scale corresponding to the area to be displayed from the corresponding relation between the preset map scale and the division times, and dividing the map tile to be processed into a plurality of sub-map tiles according to the division times corresponding to the map scale corresponding to the area to be displayed.
Optionally, the sorting module 604 is specifically configured to: and under the condition that the area to be displayed is a line, performing operation on every two adjacent intersection point coordinates in the intersection point coordinates: acquiring two moving coordinates of the first intersection point coordinate and two moving coordinates of the second intersection point coordinate; the first intersection point coordinate is adjacent to the second intersection point coordinate; the two moving coordinates of the first intersection point coordinate comprise a first moving coordinate and a second moving coordinate; the two moving coordinates of the second intersection point coordinate comprise a third moving coordinate and a fourth moving coordinate; the distance between the first moving coordinate and the first intersection point coordinate is a first distance; the distance between the second moving coordinate and the first intersection point coordinate is a second distance; the distance between the third moving coordinate and the second intersection point coordinate is a third distance; the distance between the fourth moving coordinate and the second intersection point coordinate is a fourth distance; the first distance, the second distance, the third distance and the fourth distance are equal; a connecting line of the first moving coordinate and the first intersection point coordinate, a connecting line of the second moving coordinate and the first intersection point coordinate, a connecting line of the third moving coordinate and the second intersection point coordinate, and a connecting line of the fourth moving coordinate and the second intersection point coordinate are all perpendicular to a connecting line of the second intersection point coordinate and the first intersection point 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; obtaining the data of the graphic processor according to the first moving coordinate, the second moving coordinate, the third moving coordinate and the fourth moving coordinate which form the triangle; and under the condition that the area to be displayed is an area, processing the area to be displayed into the data of the graphic processor based on the intersection point coordinate by adopting a triangulation algorithm according to the intersection point coordinate.
In one example, referring to fig. 1, the receiving function of the obtaining module 601 may be implemented by the communication interface 204 in fig. 1. The processing function of the acquiring module 601, the mapping module 602, the dividing module 603, the sorting module 604 and the drawing module 605 may all be implemented by the processor 201 in fig. 2 calling a computer program stored in the memory 203.
For the detailed description of the above alternative modes, reference is made to the foregoing method embodiments, which are not described herein again. In addition, for the explanation and the description of the beneficial effects of any of the spherical mapping devices 60 provided above, reference may be made to the corresponding method embodiments described above, and details are not repeated.
It should be noted that the actions performed by the modules are only specific examples, and the actions actually performed by the units refer to the actions or steps mentioned in the description of the embodiment based on fig. 2.
An embodiment of the present application further provides a computer device, including: a memory and a processor; the memory is for storing a computer program, and the processor is for invoking the computer program to perform the actions or steps mentioned in any of the embodiments provided above.
Embodiments of the present application also provide a computer-readable storage medium, which stores a computer program, and when the computer program runs on a computer, the computer program causes the computer to execute the actions or steps mentioned in any of the embodiments provided above.
The embodiment of the application also provides a chip. Integrated in this chip are the circuitry and one or more interfaces for implementing the functions of the spherical mapping device 60 described above. Optionally, the functions supported by the chip may include processing actions in the embodiment described based on fig. 2, which is not described herein again. Those skilled in the art will appreciate that all or part of the steps for implementing the above embodiments may be implemented by a program instructing the associated hardware to perform the steps. The program may be stored in a computer-readable storage medium. The above-mentioned storage medium may be a read-only memory, a random access memory, or the like. The processing unit or processor may be a central processing unit, a general purpose processor, an Application Specific Integrated Circuit (ASIC), a microprocessor (DSP), a Field Programmable Gate Array (FPGA) or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof.
The embodiments of the present application also provide a computer program product containing instructions, which when executed on a computer, cause the computer to execute any one of the methods in the above embodiments. The computer program product includes one or more computer instructions. The procedures or functions described in accordance with the embodiments of the present application are all or partially generated upon loading and execution of computer program instructions on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on 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 one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). Computer-readable storage media can be any available media that can be accessed by a computer or can comprise one or more data storage devices, such as servers, data centers, and the like, that can be integrated with the media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It should be noted that the above devices for storing computer instructions or computer programs provided in the embodiments of the present application, such as, but not limited to, the above memories, computer readable storage media, communication chips, and the like, are all nonvolatile (non-volatile).
Other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed application, from a review of the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other elements or steps, and the word "a" or "an" does not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.
Although the present application has been described in conjunction with specific features and embodiments thereof, various modifications and combinations can be made thereto without departing from the spirit and scope of the application. Accordingly, the specification and figures are merely exemplary of the present application as defined in the appended claims and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of the present application.

Claims (10)

1. A spherical mapping method, the method comprising:
acquiring a spherical map tile based on the earth;
mapping the spherical map tiles to a preset coordinate system to obtain map tiles to be processed; the coordinates of each pixel point in the map tile to be processed are coordinates in the preset coordinate system;
acquiring a region 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 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 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.
2. The method of claim 1, wherein processing the area to be displayed as graphics processor data based on the each sub-map tile comprises:
acquiring intersection point coordinates of intersection points of boundary lines of the area to be displayed and sub-map tiles in the preset coordinate system;
and triangulating the area to be displayed based on the intersection point coordinates to obtain graphics processor data based on the intersection point coordinates.
3. The method according to claim 1 or 2, wherein the 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 comprises:
and reading the division times corresponding to the map scale corresponding to the area to be displayed from the corresponding relation between the preset map scale and the division times, and dividing the map tile to be processed into a plurality of sub-map tiles according to the division times corresponding to the map scale corresponding to the area to be displayed.
4. The method of claim 2, wherein triangulating the area to be displayed based on the intersection coordinates to obtain graphics processor data based on the intersection coordinates comprises:
under the condition that the area to be displayed is a line, executing operation on every two adjacent intersection point coordinates in the intersection point coordinates: acquiring two moving coordinates of the first intersection point coordinate and two moving coordinates of the second intersection point coordinate; the first intersection point coordinate is adjacent to the second intersection point coordinate; the two moving coordinates of the first intersection point coordinate comprise a first moving coordinate and a second moving coordinate; the two moving coordinates of the second intersection point coordinate comprise a third moving coordinate and a fourth moving coordinate; the distance between the first moving coordinate and the first intersection point coordinate is a first distance; the distance between the second moving coordinate and the first intersection point coordinate is a second distance; the distance between the third moving coordinate and the second intersection point coordinate is a third distance; the distance between the fourth moving coordinate and the second intersection point coordinate is a fourth distance; the first distance, the second distance, the third distance and the fourth distance are equal; a connecting line of the first moving coordinate and the first intersection coordinate, a connecting line of the second moving coordinate and the first intersection coordinate, a connecting line of the third moving coordinate and the second intersection coordinate, and a connecting line of the fourth moving coordinate and the second intersection coordinate are all perpendicular to a connecting line of 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; obtaining graphics processor data according to the first moving coordinate, the second moving coordinate, the third moving coordinate and the fourth moving coordinate which form a triangle;
and processing the area to be displayed into graphic processor data based on the intersection point coordinate by adopting a triangulation algorithm according to the intersection point coordinate under the condition that the area to be displayed is an area.
5. A spherical mapping apparatus, comprising:
the acquisition module is used for acquiring spherical map tiles based on the earth;
the mapping module is used for mapping 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 coordinates in the preset coordinate system;
the acquisition module is also used for acquiring a region to be displayed; the area to be displayed is a partial area in the map tile to be processed;
the dividing module is used for 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, 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 larger than a threshold value; the other pixel points are pixel points in each sub-map tile except the pixel points belonging to the same plane;
a sorting module for sorting the area to be displayed into graphics processor data based on each sub-map tile;
and the drawing module is used for drawing the map of the area to be displayed based on the data of the graphic processor.
6. The apparatus of claim 5,
the acquisition module is further configured to: acquiring intersection point coordinates of intersection points of boundary lines of the area to be displayed and sub-map tiles in the preset coordinate system;
the partitioning module is further configured to: and triangulating the area to be displayed based on the intersection point coordinates to obtain graphics processor data based on the intersection point coordinates.
7. The apparatus according to claim 5 or 6, wherein the partitioning module is specifically configured to:
and reading the division times corresponding to the map scale corresponding to the area to be displayed from the corresponding relation between the preset map scale and the division times, and dividing the map tile to be processed into a plurality of sub-map tiles according to the division times corresponding to the map scale corresponding to the area to be displayed.
8. The apparatus of claim 6,
the sorting module is specifically configured to: under the condition that the area to be displayed is a line, executing operation on every two adjacent intersection point coordinates in the intersection point coordinates: acquiring two moving coordinates of the first intersection point coordinate and two moving coordinates of the second intersection point coordinate; the first intersection point coordinate is adjacent to the second intersection point coordinate; the two moving coordinates of the first intersection point coordinate comprise a first moving coordinate and a second moving coordinate; the two moving coordinates of the second intersection point coordinate comprise a third moving coordinate and a fourth moving coordinate; the distance between the first moving coordinate and the first intersection point coordinate is a first distance; the distance between the second moving coordinate and the first intersection point coordinate is a second distance; the distance between the third moving coordinate and the second intersection point coordinate is a third distance; the distance between the fourth moving coordinate and the second intersection point coordinate is a fourth distance; the first distance, the second distance, the third distance and the fourth distance are equal; a connecting line of the first moving coordinate and the first intersection coordinate, a connecting line of the second moving coordinate and the first intersection coordinate, a connecting line of the third moving coordinate and the second intersection coordinate, and a connecting line of the fourth moving coordinate and the second intersection coordinate are all perpendicular to a connecting line of 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; obtaining graphics processor data according to the first moving coordinate, the second moving coordinate, the third moving coordinate and the fourth moving coordinate which form a triangle;
and processing the area to be displayed into graphic processor data based on the intersection point coordinate by adopting a triangulation algorithm according to the intersection point coordinate under the condition that the area to be displayed is an area.
9. A computer device, comprising: a memory for storing a computer program and a processor for executing the computer program to perform the method of any one of claims 1-4.
10. A computer-readable storage medium, having stored thereon a computer program which, when run on a computer, causes the computer to perform the method of any one of claims 1-4.
CN202110106692.8A 2021-01-26 2021-01-26 Spherical map drawing method, spherical map drawing device and storage medium Pending CN112802143A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110106692.8A CN112802143A (en) 2021-01-26 2021-01-26 Spherical map drawing method, spherical map drawing device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110106692.8A CN112802143A (en) 2021-01-26 2021-01-26 Spherical map drawing method, spherical map drawing device and storage medium

Publications (1)

Publication Number Publication Date
CN112802143A true CN112802143A (en) 2021-05-14

Family

ID=75811937

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110106692.8A Pending CN112802143A (en) 2021-01-26 2021-01-26 Spherical map drawing method, spherical map drawing device and storage medium

Country Status (1)

Country Link
CN (1) CN112802143A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114840288A (en) * 2022-03-29 2022-08-02 北京旷视科技有限公司 Rendering method of distribution diagram, electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016131390A1 (en) * 2015-02-16 2016-08-25 高德软件有限公司 Electronic map display method, apparatus and electronic device
CN108038249A (en) * 2017-12-28 2018-05-15 北京星球时空科技有限公司 A kind of one diagram data storage organization method in whole world and call method
CN110704057A (en) * 2019-10-09 2020-01-17 腾讯科技(深圳)有限公司 Service processing method based on map service and related device
CN110956673A (en) * 2018-09-26 2020-04-03 北京高德云图科技有限公司 Map drawing method and device
CN112233240A (en) * 2020-10-29 2021-01-15 湖北亿咖通科技有限公司 Three-dimensional vector data slicing method and device of three-dimensional vector map and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016131390A1 (en) * 2015-02-16 2016-08-25 高德软件有限公司 Electronic map display method, apparatus and electronic device
CN108038249A (en) * 2017-12-28 2018-05-15 北京星球时空科技有限公司 A kind of one diagram data storage organization method in whole world and call method
CN110956673A (en) * 2018-09-26 2020-04-03 北京高德云图科技有限公司 Map drawing method and device
CN110704057A (en) * 2019-10-09 2020-01-17 腾讯科技(深圳)有限公司 Service processing method based on map service and related device
CN112233240A (en) * 2020-10-29 2021-01-15 湖北亿咖通科技有限公司 Three-dimensional vector data slicing method and device of three-dimensional vector map and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
杨志高;易衡: "基于Web地图瓦片服务(WMTS)的林区三维场景构建", 中南林业科技大学学报, 30 June 2013 (2013-06-30), pages 33 - 36 *
赵永辉等: "谷歌地图关键技术剖析与应用", 海洋测绘, 25 May 2019 (2019-05-25), pages 67 - 70 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114840288A (en) * 2022-03-29 2022-08-02 北京旷视科技有限公司 Rendering method of distribution diagram, electronic device and storage medium

Similar Documents

Publication Publication Date Title
TWI706375B (en) Method, update method and device for generating tile map in virtual map
EP3506212B1 (en) Method and apparatus for generating raster map
US20200151932A1 (en) Ground plane detection for placement of augmented reality objects
KR102003655B1 (en) Determining the Start Node for Tree Traversal for Shadow Lays in Graphics Processing
CN109741436B (en) Method and device for rendering vector data
CN105164500A (en) System and method for indicating user location and facing direction on digital map
US20230042968A1 (en) High-definition map creation method and device, and electronic device
US9245366B1 (en) Label placement for complex geographic polygons
CN113077548A (en) Collision detection method, device, equipment and storage medium for object
CN112802143A (en) Spherical map drawing method, spherical map drawing device and storage medium
CN115014328A (en) Dynamic loading method, device, equipment and medium for grid map
US10930072B1 (en) Multi-resolution mesh real-time contouring
JP7278195B2 (en) Computer graphics method for ground rendering
US10062193B2 (en) Attribute based map marker clustering
CN115511701A (en) Method and device for converting geographic information
CN115761119A (en) Neighborhood voxel storage method and device, computer equipment and storage medium
CN114153587A (en) Task allocation method, device, equipment and medium for high-precision mapping
US10262631B1 (en) Large scale highly detailed model review using augmented reality
CN108305329B (en) Model building method and terminal
US20040181373A1 (en) Visual simulation of dynamic moving bodies
JP7368950B2 (en) Method and apparatus for efficient building footprint identification
CN113496550B (en) DSM calculation method and device, computer equipment and storage medium
US20240233251A1 (en) Subsurface scattering for real-time rendering applications
CN106599166B (en) Spatial data edge detection method and device
CN117197408A (en) Automatic avoiding method, device, medium and equipment for tags based on osgEarth3D simulation environment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination