CN109741436B - Method and device for rendering vector data - Google Patents

Method and device for rendering vector data Download PDF

Info

Publication number
CN109741436B
CN109741436B CN201811473089.8A CN201811473089A CN109741436B CN 109741436 B CN109741436 B CN 109741436B CN 201811473089 A CN201811473089 A CN 201811473089A CN 109741436 B CN109741436 B CN 109741436B
Authority
CN
China
Prior art keywords
target
vector data
tile
target tile
dimensional coordinates
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.)
Active
Application number
CN201811473089.8A
Other languages
Chinese (zh)
Other versions
CN109741436A (en
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 CN201811473089.8A priority Critical patent/CN109741436B/en
Publication of CN109741436A publication Critical patent/CN109741436A/en
Application granted granted Critical
Publication of CN109741436B publication Critical patent/CN109741436B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Image Generation (AREA)

Abstract

The embodiment of the invention discloses a method and a device for rendering vector data, relates to the field of geographic information, and solves the problems that a large amount of calculation force is consumed and the rendering speed is low in the process of rendering the vector data. The specific scheme is as follows: determining the display range of a current screen, calculating the number of tiles included in the current screen according to the display range, acquiring the two-dimensional coordinates of shape points included in the target tiles according to the number of the target tiles, acquiring the three-dimensional coordinates of the target shape points required when the target tiles are attached to a spherical surface according to the number of the target tiles, drawing the shape points included in the target tiles in a target window according to the two-dimensional coordinates of the shape points included in the target tiles to obtain a drawn texture picture, drawing the target shape points on the spherical surface according to the three-dimensional coordinates of the target shape points to obtain the target tiles drawn on the spherical surface, and filling the texture picture in the target tiles on the spherical surface. The embodiment of the invention is used in the process of rendering vector data.

Description

Method and device for rendering vector data
Technical Field
The embodiment of the invention relates to the field of geographic information, in particular to a method and a device for rendering vector data.
Background
In geographic information systems (Geographic Information System, GIS), vector data has important applications in locating spatial locations, spatial analysis, and the like. Vector data may generally be points, lines, polygons, etc. used to represent geographic entities such as road networks, buildings, vegetation, etc.
At present, when vector data is drawn on a spherical surface, a common three-dimensional map engine can determine the position of each two-dimensional shape point included in the vector data on the spherical surface, calculate the position of the shape point attached to the spherical surface to be added on the spherical surface according to the range occupied by the position of the shape point included in the vector data on the spherical surface, render the shape point included in the vector data and the added shape point on the spherical surface, and connect all the shape points to obtain the shape attached to the spherical surface. As shown in fig. 1, when the vector data includes two shape points, a line attached to a spherical surface is obtained after rendering the vector data.
At least the following technical problems exist in the prior art: since the calculation of the spherical positions of the added shape points is complicated, a large amount of calculation power is consumed, and the number of the added shape points is large, rendering capability of a computer is consumed when the added shape points are drawn on the spherical surface, and rendering speed is slow.
Disclosure of Invention
The invention provides a method and a device for rendering vector data, which solve the problems that a large amount of computation force is consumed and the rendering speed is lower in the process of rendering the vector data.
In order to achieve the above purpose, the invention adopts the following technical scheme:
in a first aspect, the present invention provides a method of rendering vector data, the method may comprise: determining the display range of the current screen, and calculating the number of tiles included in the current screen according to the display range; acquiring two-dimensional coordinates of shape points contained in the target tile according to the number of the target tile; the target tile is any one of tiles included in the current screen; according to the number of the target tile, acquiring the three-dimensional coordinates of the target shape point required when the target tile is attached to the spherical surface; drawing the shape points contained in the target tile in the target window according to the two-dimensional coordinates of the shape points contained in the target tile, and obtaining a drawn texture picture; drawing a target shape point on the spherical surface according to the three-dimensional coordinates of the target shape point to obtain a target tile drawn on the spherical surface; the texture picture is filled in the target tile on the sphere.
With reference to the first aspect, in a possible implementation manner, according to the number of the target tile, acquiring two-dimensional coordinates of a shape point included in the target tile may specifically include: sending a request message to a server, wherein the request message comprises the number of the target tile; and receiving the two-dimensional coordinates of the shape point contained in the target tile sent by the server.
With reference to the first aspect and the foregoing possible implementation manners, in another possible implementation manner, before drawing, in the target window, the shape point included in the target tile according to the two-dimensional coordinate of the shape point included in the target tile, and obtaining a drawn texture picture, the method further includes: determining a target window; determining configuration parameters according to the shape points contained in the target tile and the resolution of the current screen; and configuring the target window by adopting the configuration parameters.
With reference to the first aspect and the foregoing possible implementation manners, in another possible implementation manner, determining the target window may specifically include: if a frame buffer object (Frame Buffer Object, FBO) exists in the current environment, emptying the content in the FBO, and determining the empty FBO as a target window; if there is no FBO in the current environment, the FBO is established and determined as the target window.
With reference to the first aspect and the foregoing possible implementation manners, in another possible implementation manner, the method may further include: and (3) storing the three-dimensional coordinates of the target shape point required when the target tile is attached to the spherical surface.
In a second aspect, the present invention provides an apparatus for rendering vector data, which may include: the device comprises a determining unit, a calculating unit, an acquiring unit, a drawing unit and a filling unit. And a determining unit for determining the display range of the current screen. And a calculating unit for calculating the number of the tile included in the current screen according to the display range determined by the determining unit. The acquisition unit is used for acquiring the two-dimensional coordinates of the shape points contained in the target tile according to the number of the target tile obtained by the calculation unit; the target tile is any one of tiles included in the current screen; and according to the number of the target tile, acquiring the three-dimensional coordinates of the target shape point required when the target tile is attached to the spherical surface. The drawing unit is used for drawing the shape points contained in the target tile in the target window according to the two-dimensional coordinates of the shape points contained in the target tile obtained by the obtaining unit, so as to obtain a drawn texture picture; and drawing the target shape point on the spherical surface according to the three-dimensional coordinates of the target shape point calculated by the calculation unit, so as to obtain the target tile drawn on the spherical surface. And the filling unit is used for filling the texture picture in the target tile on the spherical surface.
With reference to the second aspect, in one possible implementation manner, the acquiring unit is specifically configured to: sending a request message to a server, wherein the request message comprises the number of the target tile; and receiving the two-dimensional coordinates of the shape point contained in the target tile sent by the server.
With reference to the second aspect and the foregoing possible implementation manners, in another possible implementation manner, the apparatus for rendering vector data may further include: and a configuration unit. The determining unit is also used for determining a target window; and determining configuration parameters according to the shape points contained in the target tile and the resolution of the current screen. And the configuration unit is used for configuring the target window by adopting the configuration parameters.
With reference to the second aspect and the foregoing possible implementation manners, in another possible implementation manner, the determining unit is specifically configured to: if the FBO exists in the current environment, the content in the FBO is emptied, and the emptied FBO is determined to be a target window; if there is no FBO in the current environment, the FBO is established and determined as the target window.
With reference to the second aspect and the foregoing possible implementation manners, in another possible implementation manner, the apparatus for rendering vector data may further include: and a memory cell. And the storage unit is used for storing the three-dimensional coordinates of the target shape point required when the target tile is attached to the spherical surface.
Specific implementation manners may refer to the behavior functions of the apparatus for rendering vector data in the method for rendering vector data provided in the first aspect or possible implementation manners of the first aspect.
In a third aspect, there is provided an apparatus for rendering vector data, the apparatus comprising: at least one processor, a memory, a communication interface, and a communication bus. The processor is connected to the memory and the communication interface via a communication bus, the memory being configured to store computer-executable instructions, the processor executing the computer-executable instructions stored in the memory to cause the apparatus for rendering vector data to perform the method for rendering vector data as in the first aspect or any of the possible implementations of the first aspect when the apparatus for rendering vector data is running.
In a fourth aspect, there is provided a computer storage medium having stored thereon computer-executable instructions which, when run on a device for rendering vector data, cause the device for rendering vector data to perform a method of rendering vector data as in the first aspect or any one of the possible implementations of the first aspect.
According to the method for rendering vector data, two-dimensional coordinates of shape points contained in a target tile are obtained according to the number of the target tile, the shape points contained in the target tile are drawn in a target window according to the two-dimensional coordinates of the shape points contained in the target tile, a texture picture is obtained, the target shape points are drawn on a spherical surface according to the three-dimensional coordinates of the target shape points required when the target tile is attached to the spherical surface, the target tile drawn on the spherical surface is obtained, and the texture picture is filled in the target tile on the spherical surface. Therefore, the number of the target shape points required when the target tile is attached to the spherical surface is smaller than the number of the shape points increased when the vector data is rendered in the prior art, so that the calculation force of the three-dimensional coordinates of the shape points is reduced, the cost of the rendering capability of a computer is reduced, and the speed of rendering the vector data is accelerated.
Drawings
FIG. 1 is a schematic diagram of a rendering vector data provided in the prior art;
FIG. 2 is a simplified schematic diagram of a system architecture to which embodiments of the present invention may be applied;
fig. 3 is a schematic diagram of an apparatus for rendering vector data according to an embodiment of the present invention;
FIG. 4 is a flowchart of a method for rendering vector data according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of rendering vector data according to an embodiment of the present invention;
FIG. 6 is a flowchart of a method for rendering vector data according to an embodiment of the present invention;
FIG. 7 is a schematic diagram illustrating another apparatus for rendering vector data according to an embodiment of the present invention;
FIG. 8 is a schematic diagram illustrating another apparatus for rendering vector data according to an embodiment of the present invention;
fig. 9 is a schematic diagram of another apparatus for rendering vector data according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 2 is a simplified schematic diagram of a system architecture to which the embodiment of the present invention may be applied, as shown in fig. 2, where the system architecture may include: a means 11 for rendering vector data and a server 12.
Wherein the means 11 for rendering vector data interact with the server 12.
The device 11 for rendering vector data, which may be a computer in a specific implementation, is configured to calculate, when a user needs to view a map, a number of a tile included in a current screen according to a display range of the current screen, obtain two-dimensional coordinates of a shape point included in each tile from a server 12, draw the shape point included in the tile in a target window to obtain a texture picture, draw the shape point required when the tile is attached to a spherical surface on the spherical surface, and fill the obtained texture picture into the tile of the spherical surface.
A server 12 for storing the number of the tile and the two-dimensional coordinates of the shape points contained in the tile.
Fig. 3 is a schematic diagram of an apparatus for rendering vector data according to an embodiment of the present invention, where, as shown in fig. 3, the apparatus for rendering vector data may include: at least one processor 21, a memory 22, a communication interface 23, and a communication bus 24.
The following describes the respective constituent elements of the apparatus for rendering vector data in detail with reference to fig. 3:
the processor 21 is a control center of the apparatus for rendering vector data, and may be one processor or a collective term of a plurality of processing elements. For example, processor 21 is a central processing unit (Central Processing Unit, CPU), may be an integrated circuit (Application Specific Integrated Circuit, ASlC), or may be one or more integrated circuits configured to implement embodiments of the present invention, such as: one or more digital signal processors (Digital Signal Processor, DSP), or one or more field programmable gate arrays (Field Programmable Gate Array, FPGA).
In a particular implementation, processor 21 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG. 3, as an example. Also, as one embodiment, the means for rendering vector data may include a plurality of processors, such as processor 21 and processor 25 shown in fig. 3. Each of these processors may be a Single-core processor (Single-CPU) or a Multi-core processor (Multi-CPU). A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
The Memory 22 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 (Random Access Memory, RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a compact disc (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 22 may be stand alone and be coupled to the processor 21 via a communication bus 24. The memory 22 may also be integrated with the processor 21.
In a specific implementation, the memory 22 is used to store data in the present invention and to execute software programs of the present invention. The processor 21 may perform various functions of the means for rendering vector data by running or executing a software program stored in the memory 22 and invoking data stored in the memory 22.
The communication interface 23 uses any transceiver-like means for communicating with other devices or communication networks, such as a radio access network (Radio Access Network, RAN), a wireless local area network (Wireless Local Area Networks, WLAN), a server, etc. The communication interface 23 may include a receiving unit implementing a receiving function and a transmitting unit implementing a transmitting function.
The communication bus 24 may be an industry standard architecture (1ndustry Standard Architecture,lSA) bus, an external device interconnect (Peripheral Component Interconnect, PCI) bus, or an extended industry standard architecture (Extended IndustrV Standard Architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in fig. 3, but not only one bus or one type of bus.
In order to solve the problem that a large amount of computation force is consumed and the rendering speed is slow in the process of rendering vector data, an embodiment of the present invention provides a method for rendering vector data, as shown in fig. 4, the method may include:
301. the display range of the current screen is determined.
When the user needs to view the map, the device for rendering the vector data can respond to the operation of the user to display a corresponding interface, and the display range of the current screen is determined according to the vertex of the screen.
302. And calculating the number of the tile included in the current screen according to the display range.
The map may be divided into a plurality of tiles according to a rule, the plurality of tiles are numbered, and the number of each tile and the range of the corresponding tile are pre-stored in the device for rendering vector data.
After determining the display range of the current screen, the device for rendering the vector data can calculate the number of the tiles displayed on the current screen by adopting a preset algorithm according to the display range, so as to know which tiles are displayed on the current screen.
303. And acquiring the two-dimensional coordinates of the shape points contained in the target tile according to the number of the target tile.
Wherein the target tile is any one of tiles included in the current screen.
After calculating the number of the tile included in the current screen, the device for rendering the vector data can acquire the vector data included in the target tile according to the number of any tile, such as the number of the target tile. Specifically, the device for rendering the vector data may send a request message including the number of the target tile to the server, so that the server searches the vector data corresponding to the number of the target tile from the correspondence between the stored number of the tile and the vector data contained in the stored number of the tile, and returns the vector data to the device for rendering the vector data. The means for rendering the vector data may receive vector data contained in the target tile transmitted by the server, the vector data being two-dimensional coordinates of each shape point contained in the target tile.
It should be noted that, in the embodiment of the present invention, the process of determining the correspondence between the number of the tile and the vector data included in the tile by the server is: after the server obtains the vector data of a certain geographic entity, the vector data comprises the two-dimensional coordinates of at least one shape point, the at least one shape point can be sliced according to a preset level to obtain which shape point is positioned in which tile, so that the number of the tile and the two-dimensional coordinates of the shape point contained in the tile are obtained, and the corresponding relation is stored in the server. Similarly, the server may also process vector data of other geographic entities according to the method described above.
In addition, when the server performs slicing processing on at least one shape point, if the at least one shape point is distributed in a plurality of tiles, boundary shape points need to be added in data contained in the tiles. For example, assuming that vector data of a certain geographic entity includes two-dimensional coordinates of two shape points, and after slicing, the two shape points are respectively located in two adjacent tiles, the two tiles include, in addition to one shape point corresponding to each other, an intersection point of a connecting line of the two shape points and a tile boundary, that is, a boundary shape point.
304. And according to the number of the target tile, acquiring the three-dimensional coordinates of the target shape point required when the target tile is attached to the spherical surface.
After calculating the number of the tile included in the current screen in step 302, the device for rendering vector data may obtain the three-dimensional coordinates of the target shape point required when the target tile is attached to the spherical surface according to the number of any one tile, for example, the number of the target tile. Specifically, the device for rendering vector data may determine whether the three-dimensional coordinates of the target shape point, where the target tile is attached to the sphere, are stored by using the number of the target tile as an index. If the target tile is not stored, the target tile is processed for the first time, at this time, the three-dimensional coordinates of the target shape point required when the target tile is attached to the spherical surface can be calculated according to the number of the target tile, and if the target tile is stored, the target tile is processed before, at this time, the target shape point can be searched. For example, as shown in fig. 5, the target shape point to be attached to the spherical surface is determined based on a rectangular tile.
It should be noted that, in the embodiment of the present invention, the device for rendering vector data may process the target tile for the first time, calculate to obtain the three-dimensional coordinate of the target shape point required by the target tile to attach to the spherical surface, store the three-dimensional coordinate of the target shape point, and store the three-dimensional coordinate with the number of the target tile as an index, so that subsequent repeated call is not required, and calculation is not required.
305. And drawing the shape points contained in the target tile in the target window according to the two-dimensional coordinates of the shape points contained in the target tile, and obtaining the drawn texture picture.
After the two-dimensional coordinates of the shape points included in the target tile are obtained in step 303, the device for rendering vector data may call a graphics rendering interface, such as a Web graphics library (Web Graphics Library, webGL) interface, an open graphics library (Open Graphics Library, openGL) interface, or the like, according to the two-dimensional coordinates, and render the shape points included in the target tile in a planar state in the determined target window, so as to obtain a texture picture after rendering, and store the texture picture.
306. And drawing the target shape point on the spherical surface according to the three-dimensional coordinates of the target shape point to obtain the target tile drawn on the spherical surface.
After the device for rendering vector data obtains the three-dimensional coordinates of the target shape points required when the target tile is attached to the sphere in step 304, the device can draw the target shape points on the sphere map one by one according to the three-dimensional coordinates, finally obtain the shape of the target tile drawn on the sphere, as shown in fig. 5, and finally obtain the rectangular tile drawn on the sphere.
307. The texture picture is filled in the target tile on the sphere.
After obtaining the target tile drawn on the sphere, the device for rendering vector data may fill the texture picture obtained in step 305 in the target tile on the sphere, so as to complete the drawing of vector data contained in the target tile on the sphere.
In the embodiment of the present invention, the method for rendering vector data is described by taking the vector data included in the rendering target tile as an example, and steps 303 to 307 may be repeatedly performed to complete the rendering of vector data included in other tiles. And when the user drags the map and the display area changes, the device for rendering the vector data can empty the display area, and execute steps 301-307 again.
Further, in the embodiment of the present invention, before the step 305 is performed, the determination and configuration of the target window may be further included. Specifically, as shown in fig. 6, the following steps 308-310 may be included:
308. a target window is determined.
Wherein the target window may be determined first when the means for rendering the vector data needs to draw the vector data in the target window. Specifically, the device for rendering vector data may determine whether an FBO exists in the current environment, if so, empty the content in the FBO, determine the empty FBO as a target window, and if not, establish a new FBO, and determine the established FBO as the target window. After determining the FBO, the means for rendering vector data may bind the FBO to enter a rendering state.
309. And determining configuration parameters according to the shape points contained in the target tile and the resolution of the current screen.
After determining the target window, the device for rendering the vector data can determine configuration parameters for configuring the target window according to the shape points contained in the target tile and the resolution of the current screen. For example, the configuration parameters may be: square areas, 512 pixels by 512 pixels in size.
310. And configuring the target window by adopting the configuration parameters.
Wherein, after configuring the target window with the configuration parameters, the above step 305 may be performed.
According to the method for rendering vector data, two-dimensional coordinates of shape points contained in a target tile are obtained according to the number of the target tile, the shape points contained in the target tile are drawn in a target window according to the two-dimensional coordinates of the shape points contained in the target tile, a texture picture is obtained, the target shape points are drawn on a spherical surface according to the three-dimensional coordinates of the target shape points required when the target tile is attached to the spherical surface, the target tile drawn on the spherical surface is obtained, and the texture picture is filled in the target tile on the spherical surface. Therefore, the number of the target shape points required when the target tile is attached to the spherical surface is smaller than the number of the shape points increased when the vector data is rendered in the prior art, so that the calculation force of the three-dimensional coordinates of the shape points is reduced, the cost of the rendering capability of a computer is reduced, and the speed of rendering the vector data is accelerated.
The above description of the scheme provided by the embodiment of the invention is mainly from the perspective of the device for rendering vector data. It will be appreciated that the means for rendering vector data, in order to achieve the above-described functions, comprise corresponding hardware structures and/or software modules for performing the respective functions. Those of skill in the art will readily appreciate that the various illustrative algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven 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 invention.
The embodiment of the invention can divide the functional modules of the device for rendering the vector data according to the method example, for example, each functional module can be divided corresponding to each function, and two or more functions can be integrated in one processing module. The integrated modules may be implemented in hardware or in software functional modules. It should be noted that, in the embodiment of the present invention, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
In the case of dividing the respective functional modules with the respective functions, fig. 7 shows another possible composition diagram of the apparatus for rendering vector data involved in the above-described embodiment, and as shown in fig. 7, the apparatus for rendering vector data may include: a determination unit 41, a calculation unit 42, an acquisition unit 43, a drawing unit 44, and a filling unit 45.
The determining unit 41, the device for supporting rendering vector data, executes step 301 in the method for rendering vector data shown in fig. 4, and steps 308 and 309 in the method for rendering vector data shown in fig. 6.
The means for supporting rendering vector data performs step 302 of the method of rendering vector data shown in fig. 4.
The obtaining unit 43, the means for supporting rendering vector data performs steps 303, 304 in the method of rendering vector data shown in fig. 4.
The drawing unit 44, the means for supporting rendering vector data, performs steps 305, 306 in the method of rendering vector data shown in fig. 4.
The filling unit 45, the means for supporting rendering vector data performs step 307 in the method of rendering vector data shown in fig. 4.
Further, in an embodiment of the present invention, as shown in fig. 8, the apparatus for rendering vector data may further include: a configuration unit 46 and a storage unit 47.
The configuration unit 46, the means for supporting rendering vector data performs step 310 in the method of rendering vector data shown in fig. 6.
The storage unit 47 is used for supporting the means for rendering vector data to execute the three-dimensional coordinates of the target shape point required for holding the target tile when it is attached to the spherical surface in the method for rendering vector data shown in fig. 4.
It should be noted that, all relevant contents of each step related to the above method embodiment may be cited to the functional description of the corresponding functional module, which is not described herein.
The device for rendering the vector data provided by the embodiment of the invention is used for executing the method for rendering the vector data, so that the same effect as the method for rendering the vector data can be achieved.
In case of using an integrated unit, fig. 9 shows another possible composition diagram of the apparatus for rendering vector data involved in the above-described embodiment. As shown in fig. 9, the apparatus for rendering vector data includes: a processing module 51, a communication module 52 and a storage module 53.
The processing module 51 is configured to control and manage actions of the device that renders the vector data, e.g., the processing module 51 is configured to perform steps 301, 302, 303, 304, 305, 306, 307 in fig. 4, steps 308, 309, 310 in fig. 6, and/or other processes for the techniques described herein. The communication module 52 is for supporting communication of the means for rendering vector data with other network entities, such as servers. The memory module 53 is used for storing program codes and data of the means for rendering vector data.
Wherein the processing module 51 may be the processor in fig. 3. Which may implement or perform the various exemplary logic blocks, modules and circuits described in connection with this disclosure. A processor may also be a combination that performs computing functions, e.g., including one or more microprocessors, a combination of a DSP and a microprocessor, and so forth. The communication module 52 may be the communication interface of fig. 3. The memory module 53 may be the memory of fig. 3.
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of functional modules is illustrated, and in practical application, the above-described functional allocation may be implemented by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to implement all or part of the functions described above.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present invention may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the method described in the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
The foregoing is merely illustrative of specific embodiments of the present invention, and the scope of the present invention is not limited thereto, but any changes or substitutions within the technical scope of the present invention should be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (12)

1. A method of rendering vector data, the method comprising:
determining the display range of a current screen, and calculating the number of tiles included in the current screen according to the display range;
acquiring two-dimensional coordinates of shape points contained in a target tile according to the number of the target tile; the target tile is any one of tiles included in the current screen;
according to the serial number of the target tile, acquiring the three-dimensional coordinates of a target shape point required when the target tile is attached to a spherical surface;
drawing the shape points contained in the target tile in a target window according to the two-dimensional coordinates of the shape points contained in the target tile, and obtaining a drawn texture picture;
drawing the target shape point on the spherical surface according to the three-dimensional coordinates of the target shape point to obtain a target tile drawn on the spherical surface;
filling the texture picture in a target tile on the sphere;
after calculating the number of the tile included in the current screen, according to the number of the target tile, acquiring the three-dimensional coordinates of the target shape point required when the target tile is attached to the spherical surface, wherein the method specifically comprises the following steps:
judging whether the three-dimensional coordinates of a target shape point of the target tile attached to the spherical surface are stored or not by taking the number of the target tile as an index; if the three-dimensional coordinates of the target shape point are not stored, indicating that the target tile is processed for the first time, and calculating the three-dimensional coordinates of the target shape point required when the target tile is attached to the spherical surface according to the number of the target tile; if stored, indicating that the target tile was previously processed, the target shape point is found.
2. The method for rendering vector data according to claim 1, wherein the obtaining, according to the number of the target tile, the two-dimensional coordinates of the shape point included in the target tile includes:
sending a request message to a server, wherein the request message comprises the serial number of the target tile;
and receiving the two-dimensional coordinates of the shape point contained in the target tile sent by the server.
3. The method for rendering vector data according to claim 1 or 2, wherein before the drawing the shape point contained in the target tile in the target window according to the two-dimensional coordinates of the shape point contained in the target tile, obtaining the drawn texture picture, the method further comprises:
determining the target window;
determining configuration parameters according to the shape points contained in the target tile and the resolution of the current screen;
and configuring the target window by adopting the configuration parameters.
4. A method of rendering vector data according to claim 3, wherein said determining said target window comprises:
if a Frame Buffer Object (FBO) exists in the current environment, emptying the content in the FBO, and determining the emptied FBO as the target window;
if the FBO does not exist in the current environment, establishing the FBO and determining the FBO as the target window.
5. The method of rendering vector data according to claim 1, further comprising:
and storing the three-dimensional coordinates of the target shape point required when the target tile is attached to the spherical surface.
6. An apparatus for rendering vector data, the apparatus for rendering vector data comprising: the device comprises a determining unit, a calculating unit, an acquiring unit, a drawing unit and a filling unit;
the determining unit is used for determining the display range of the current screen;
the calculating unit is used for calculating the number of the tile included in the current screen according to the display range determined by the determining unit;
the acquisition unit is used for acquiring the two-dimensional coordinates of the shape points contained in the target tile according to the number of the target tile obtained by the calculation unit; the target tile is any one of tiles included in the current screen; according to the serial number of the target tile, acquiring the three-dimensional coordinates of a target shape point required when the target tile is attached to a spherical surface;
the drawing unit is used for drawing the shape points contained in the target tile in the target window according to the two-dimensional coordinates of the shape points contained in the target tile and obtained by the obtaining unit, so as to obtain a drawn texture picture; drawing the target shape point on the spherical surface according to the three-dimensional coordinates of the target shape point calculated by the calculation unit to obtain a target tile drawn on the spherical surface;
the filling unit is used for filling the texture picture in a target tile on the spherical surface;
the acquisition unit is further used for judging whether the three-dimensional coordinates of the target shape point, attached to the spherical surface, of the target tile are stored by taking the number of the target tile as an index; if the three-dimensional coordinates of the target shape point are not stored, indicating that the target tile is processed for the first time, and calculating the three-dimensional coordinates of the target shape point required when the target tile is attached to the spherical surface according to the number of the target tile; if stored, indicating that the target tile was previously processed, the target shape point is found.
7. The apparatus for rendering vector data according to claim 6, wherein the obtaining unit is specifically configured to:
sending a request message to a server, wherein the request message comprises the serial number of the target tile;
and receiving the two-dimensional coordinates of the shape point contained in the target tile sent by the server.
8. The apparatus for rendering vector data according to claim 6 or 7, wherein the apparatus for rendering vector data further comprises: a configuration unit;
the determining unit is further used for determining the target window; determining configuration parameters according to the shape points contained in the target tile and the resolution of the current screen;
the configuration unit is used for configuring the target window by adopting the configuration parameters.
9. The apparatus for rendering vector data according to claim 8, wherein the determining unit is specifically configured to:
if a Frame Buffer Object (FBO) exists in the current environment, emptying the content in the FBO, and determining the emptied FBO as the target window;
if the FBO does not exist in the current environment, establishing the FBO and determining the FBO as the target window.
10. The apparatus for rendering vector data according to claim 6, wherein the apparatus for rendering vector data further comprises: a storage unit;
and the storage unit is used for storing the three-dimensional coordinates of the target shape point required when the target tile is attached to the spherical surface.
11. An apparatus for rendering vector data, the apparatus for rendering vector data comprising: a processor, a memory, a communication interface, and a communication bus;
the processor is connected to the memory and the communication interface through the communication bus, the memory is used for storing computer-executable instructions, and when the device for rendering vector data is operated, the processor executes the computer-executable instructions stored in the memory, so that the device for rendering vector data performs the method for rendering vector data according to any one of claims 1-5.
12. A computer storage medium comprising computer-executable instructions that, when run on a device for rendering vector data, cause the device for rendering vector data to perform the method for rendering vector data according to any one of claims 1-5.
CN201811473089.8A 2018-12-04 2018-12-04 Method and device for rendering vector data Active CN109741436B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811473089.8A CN109741436B (en) 2018-12-04 2018-12-04 Method and device for rendering vector data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811473089.8A CN109741436B (en) 2018-12-04 2018-12-04 Method and device for rendering vector data

Publications (2)

Publication Number Publication Date
CN109741436A CN109741436A (en) 2019-05-10
CN109741436B true CN109741436B (en) 2023-06-06

Family

ID=66359155

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811473089.8A Active CN109741436B (en) 2018-12-04 2018-12-04 Method and device for rendering vector data

Country Status (1)

Country Link
CN (1) CN109741436B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110570491B (en) * 2019-09-06 2020-08-28 广东省城乡规划设计研究院 Thermodynamic diagram generation method and device
CN110597941B (en) * 2019-09-11 2023-12-29 广州力挚网络科技有限公司 Map display method and system
CN110990510B (en) * 2019-11-28 2024-04-09 北京世纪高通科技有限公司 Three-dimensional map generation method, terminal and server
CN111429542A (en) * 2020-02-27 2020-07-17 深圳震有科技股份有限公司 Vector contour line speckle pattern generation method and device and storage medium
CN112435335A (en) * 2020-11-06 2021-03-02 北京飞渡科技有限公司 Three-dimensional vector tile data generation method and system
CN112750190B (en) * 2021-01-28 2023-02-10 腾讯科技(深圳)有限公司 Three-dimensional thermodynamic diagram generation method, device, equipment and storage medium
CN116881384B (en) * 2023-09-06 2023-11-17 武汉大势智慧科技有限公司 Multi-time-phase three-dimensional model data storage method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101887595B (en) * 2009-05-14 2014-05-28 武汉如临其境科技创意有限公司 Three-dimensional digital earth-space data organizing and rendering method based on quad-tree index
CN104966312B (en) * 2014-06-10 2017-07-21 腾讯科技(深圳)有限公司 A kind of rendering intent, device and the terminal device of 3D models
CN104318605B (en) * 2014-10-23 2017-03-22 南京大学 Parallel lamination rendering method of vector solid line and three-dimensional terrain
CN107895048B (en) * 2017-12-04 2021-05-11 南宁市勘察测绘地理信息院 Rapid drawing method based on live-action three-dimension
CN108665524B (en) * 2018-04-28 2021-09-24 武汉大学 Large-range discrete flow field volume rendering method based on GPU

Also Published As

Publication number Publication date
CN109741436A (en) 2019-05-10

Similar Documents

Publication Publication Date Title
CN109741436B (en) Method and device for rendering vector data
US9052199B2 (en) System and method for indicating user location and facing direction on a digital map
KR100956416B1 (en) 3 dimensional geographical information client apparatus, server apparatus and 3 dimensional geographical information system having the same
US7551176B2 (en) Systems and methods for providing shared attribute evaluation circuits in a graphics processing unit
US9684947B2 (en) Indicating availability of indoor content on a digital map
CN110990510B (en) Three-dimensional map generation method, terminal and server
US8730264B1 (en) Determining when image elements intersect
CN110990516A (en) Map data processing method and device and server
CN108159693B (en) Game scene construction method and device
EP3754501A1 (en) System and method to operate 3d applications through positional virtualization technology
EP3102911A1 (en) System and method for dynamically optimizing map destination routing performance
CN115880133B (en) Graphics processing unit and terminal device
CN116628123B (en) Dynamic slice generation method and system based on spatial database
CN111862204A (en) Method for extracting visual feature points of image and related device
CN117058288A (en) Graphics processor, multi-core graphics processing system, electronic device, and apparatus
CN111127590A (en) Second-order Bezier curve drawing method and device
CN114742931A (en) Method and device for rendering image, electronic equipment and storage medium
CN110647597B (en) Rendering method and device of electronic map
CN106445445B (en) Vector data processing method and device
CN114170365A (en) System and method for accelerated ray tracing using asynchronous operations and ray transformation
CN116433862A (en) Model construction method and device for 3D global terrain
CN111381967A (en) Virtual object processing method and device
CN103675763B (en) A kind of based on hardware-accelerated vector quantization VTS radar video rendering method
CN114596195A (en) Topographic data processing method, system, device and computer storage medium
CN112802143A (en) Spherical map drawing method, spherical map drawing device and storage medium

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
GR01 Patent grant
GR01 Patent grant