A method and system for vector tile display
By dynamically scheduling and batch drawing of vector tile data in a three-dimensional geographic information system, the problem of poor display effect after vector tile data is rasterized is solved, and efficient and smooth vector data display and interaction are achieved.
Patent Information
- Application Number
- CN202010196936.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-19
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2040-03-19
AI Technical Summary
In a three-dimensional geographic information system, vector tile data is displayed after being rasterized, resulting in problems such as unsmooth shapes, texts are pasted on the surface, and objects cannot be clicked to query properties.
By obtaining the required vector tiles based on the next view, determine the newly added and removed vector tiles, and request the vector data of the new vector tiles from the server. The client draws and displays the obtained vector data to realize dynamic scheduling and batch drawing of vector data.
It reduces the scheduling and computing of vector data, realizes efficient vector object drawing of vector data, and improves the smoothness, delicateness and interactivity of the display effect.
Smart Images

Figure CN113495933B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to computer application technology, and particularly to a method and system for vector tile display.
Background Art
[0002] With the increasing penetration of Web GIS into people's lives, people have higher and higher requirements for aspects such as the response efficiency, interactivity, and rendering effect of Web GIS. Aiming at the performance bottlenecks of raster tile maps in high-definition screen display, data update, and interaction with users, the vector tile map technology can well solve the above problems.
[0003] Similar to the raster tile map technology, the vector tile map technology also adopts the LOD pyramid technology, which cuts vector data sources at different scales into corresponding levels of vector tiles. These tiles are stored in the server in the GeoJson or protobuf vector format to publish the tile service function. When the client initiates a tile data request, the server returns these vector tiles. After receiving these vector data, the client directly or indirectly draws them on the graphics display device.
[0004] In recent years, the use of dynamic scheduling vector tile technology in two-dimensional geographic information systems has become mature. Currently, two-dimensional display clients have been very mature in drawing and display, such as typical display components like MapBox and OpenLayers. However, there is still little breakthrough in three-dimensional geographic information systems. A typical usage method is to deploy vector data on the server and cut it into vector tiles. The client sends a tile data request to the server through a scheduling mechanism. At this time, there are two processing methods: one is that the server renders the corresponding vector tile into a picture and transfers it to the client for drawing and display; the other method is that the server directly transfers the vector tile to the client, and the client renders it into a picture for drawing and display. We can see that in either case, the finally displayed vector data is actually not a real vector object, but an unmodifiable semi-transparent picture.
[0005] The vector tile technology is mainly divided into two parts: data deployment and publishing on the server side and display on the client side. Among them, functions such as tile segmentation, storage, fast retrieval, and publishing services on the server side are already very mature, while the display part on the client side, especially the display part on the three-dimensional platform, still appears rough. The main manifestation is that vector data is rasterized and pasted on the three-dimensional earth as a picture, losing the attributes and functions that vector data should have. The display effect shows blurring or jaggedness, without the smoothness and fineness that vector data should have.
[0006] For example, Cesium is a 3D earth engine for geographic information developed based on WebGL. It can run on most browsers and mobile terminals and has been widely used and promoted in recent years. As a visualization software for geospatial data, the amount of data it can carry is limited, especially for the display of vector data. To address the issue of the display efficiency of vector data, the dynamic scheduling of vector tiles technology has been studied and used more and more frequently. The Cesium 3D engine adopts the second way mentioned above. In the 3D rendering client, after the client receives vector data, the vector tiles are drawn into 2D images and then rendered and drawn onto the earth model in the form of raster images. The advantage of this display method is that it can be quickly displayed on the 3D earth without occupying too much computing resources, and in terms of efficiency, it is almost equivalent to the display of image data. However, the disadvantages are also obvious. Since the vector data is rasterized, when displayed on the earth's surface, after the image is stretched, both the shape and display effect of the vector data are greatly reduced. For example, the lines are not smooth, the text is pasted on the ground, and the object cannot be selected to query its properties, etc.
Summary of the Invention
[0007] Multiple aspects of the present application provide a vector tile display method, system, device, and storage medium, which can...
[0008] In one aspect of the present application, a vector tile display method is provided, including the following steps:
[0009] Obtain the required vector tiles according to the next view, and determine the newly added vector tiles and the removed vector tiles compared with the next view;
[0010] Request the vector data corresponding to the newly added vector tiles from the server;
[0011] Draw the vector data corresponding to the newly added vector tiles obtained from the server and display the next view.
[0012] In the above-mentioned aspect and any possible implementation manner, a further implementation manner is provided. The obtaining of the required vector tiles according to the next view includes:
[0013] Obtain the numbers of the vector tiles corresponding to the next view.
[0014] In the above-mentioned aspect and any possible implementation manner, a further implementation manner is provided. The determining of the newly added vector tiles and the removed vector tiles compared with the next view further includes:
[0015] Update the vector tile list of the current view as the vector tile list of the next view.
[0016] For the aspects and any possible implementation manners described above, a further implementation manner is provided. Requesting the vector data corresponding to the newly added vector tile from the server includes:
[0017] Sending the number of the newly added vector tile to the server to request the corresponding vector data.
[0018] For the aspects and any possible implementation manners described above, a further implementation manner is provided. Drawing and displaying the next view for the vector data corresponding to the newly added vector tile obtained from the server includes:
[0019] For the newly added vector tile, creating a corresponding vector drawing object;
[0020] For the removed vector tile, deleting the corresponding vector drawing object.
[0021] For the aspects and any possible implementation manners described above, a further implementation manner is provided. Creating a corresponding vector drawing object for the newly added vector tile includes:
[0022] For the newly added vector tile, querying in the list of currently displayed vector drawing objects according to its ID;
[0023] If not found, creating a vector drawing object for it and adding it to the list of currently displayed vector drawing objects;
[0024] If a vector drawing object is found, performing a merging process.
[0025] For the aspects and any possible implementation manners described above, a further implementation manner is provided. Drawing the corresponding vector drawing object includes;
[0026] Batch drawing the vector data.
[0027] Another aspect of the present invention provides a vector tile display system, including:
[0028] A calculation module, configured to obtain the required vector tiles according to the next view, and determine the newly added vector tiles and the removed vector tiles compared with the next view;
[0029] A request module, configured to request the vector data corresponding to the newly added vector tile from the server;
[0030] A drawing module, configured to draw and display the next view for the vector data corresponding to the newly added vector tile obtained from the server.
[0031] On the other hand, the present invention provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the above-described method is implemented.
[0032] On the other hand, the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the above-described method is implemented.
[0033] Based on the above introduction, it can be seen that by adopting the solution of the present invention, the dynamic scheduling of vector data on Cesium can be achieved, reducing the scheduling and calculation amount of vector data; by batch-drawing all vector drawing objects, efficient vector object drawing of vector data is realized.
BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a flowchart of the vector tile display method according to the present invention;
[0035] Figure 2 It is a structural diagram of the vector tile display system according to the present invention;
[0036] Figure 3 It shows a block diagram of an exemplary computer system / server 012 suitable for implementing the embodiments of the present invention.
DETAILED DESCRIPTION
[0037] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments in the present application belong to the scope of protection of the present application.
[0038] Figure 1 It is a flowchart of an embodiment of the vector tile display method according to the present invention. As Figure 1 shown, it includes the following steps:
[0039] Step S11: Obtain the required vector tiles according to the next view, and determine the newly added vector tiles and the removed vector tiles compared with the next view;
[0040] Step S12: Request the vector data corresponding to the newly added vector tiles from the server;
[0041] Step S13: Draw the vector data corresponding to the newly added vector tiles obtained from the server and display the next view.
[0042] The execution subject of the method is a 3D display client.
[0043] In a preferred implementation manner of step S11,
[0044] Obtain the required vector tiles according to the next view, and determine the newly added vector tiles and the removed vector tiles compared with the current view.
[0045] Preferably, according to the operation of the user on the earth model in the 3D display client, obtain the user's data request, that is, the next view of the earth model that the user intends to display, and then obtain the vector tiles corresponding to the next view.
[0046] Preferably, in the 3D rendering server, the cut vector data is stored in advance. The vector tile map technology adopts a pyramid model, and cuts the vector data sources of different scales into corresponding levels of vector tiles. Preferably, the vector data source is a description line file of vector data. Currently, vector slicing is mainly stored in the server in GeoJson or protobuf vector formats, and a quadtree spatial index is established for each vector tile during the storage process.
[0047] Preferably, the pyramid model adopts an 18-degree pyramid model; the tile numbering uses 14-character encoding, and a quadtree spatial index is established for each vector tile to form a tile storage index array. The position offset of each vector tile in the tile storage index array is the number of the tile in the pyramid model.
[0048] Preferably, during the vector data source slicing process, Web Mercator projection is adopted to ensure the consistency of map data slicing, so as to realize the rapid conversion from the 3D space coordinates of the client to the row-column architecture values to the geodetic coordinates.
[0049] Preferably, in order to obtain the vector data corresponding to the vector tiles of the next view, first, it is necessary to obtain the vector tile number array corresponding to the next view; then obtain the corresponding vector data according to the vector tile number array.
[0050] Preferably, the user's data request includes the data layer range corresponding to the next view. According to the data layer range, determine the level to which the vector tiles corresponding to the next view belong in the quadtree and the corresponding numbers. The numbers are the tile numbers (layer-row-column) in the pyramid model constructed by the Cesium 3D earth GIS engine. For example, the tile pyramid is organized using a quadtree model, and each map tile can be uniquely identified by its layer number 1, row number X, and column number y in the quadtree. The number of the map tile is <l-x-y>。
[0051] Preferably, an interface for obtaining a quadtree scheduling object Quadtree Primitive (i.e., the quadtree, the variable named _surface in Globe) is added to the Globe object. Among them, the Globe object is saved in the Scene object, and the Scene object is a monomer object in Cesium. Since the Data Source can obtain the Scene object, the quadtree scheduling object Quadtree Primitive can be indirectly obtained through the Globe object. In this way, the tile number array corresponding to the next view can be obtained from the Quadtree Primitive object for each frame. With the scheduling result, that is, the tile number array, the corresponding vector data can be obtained according to the tile number array.
[0052] Preferably, the 3D display client sends a vector data request to the server according to a pre-designed general Provider, and after obtaining the vector data from the server, it is passed back to the Data Source. Preferably, the vector data request includes the tile number array corresponding to the next view.
[0053] Preferably, in order to implement the dynamic scheduling of vector data and reduce the scheduling and calculation amount of vector data; before sending a tile data request to the server, it is first necessary to calculate the newly added vector tiles and the removed vector tiles in the next view.
[0054] Preferably, a two-dimensional key-value table of the tile numbers of the vector tiles corresponding to the current view and the vector data is stored in the Data Source to facilitate the calculation of the newly added vector tiles and the removed vector tiles in the next view. Preferably, the two-dimensional key-value table is stored in the existing cache mechanism TileReplacement Queue of Cesium.
[0055] Preferably, by comparing the tile number array corresponding to the next view with the list of vector tiles of the current view saved in the Data Source, it can be calculated which vector tiles need to be newly added and which vector tiles need to be removed, and the list of vector tiles of the current view is updated as the list of vector tiles of the next view.
[0056] In a preferred implementation manner of step S12
[0057] Request the vector data corresponding to the newly added vector tiles from the server.
[0058] Preferably, send the number of the newly added vector tile to the server to request the corresponding vector data, so as to perform drawing based on the requested vector data and dynamically convert the newly added vector tile into a vector drawing object.
[0059] Preferably, the server sends the corresponding vector data to the client according to the tile number data.
[0060] In a preferred implementation manner of step S13,
[0061] Draw the vector data corresponding to the newly added vector tile obtained from the server and display the next view.
[0062] Preferably, if the original vector tiles in the Data Source are not deleted, the corresponding vector drawing objects are not deleted either, and a vector drawing object list storing the tile numbers of the vector tiles corresponding to the current view and the vector drawing objects is available. Preferably, the vector drawing object list is stored in the existing cache mechanism Tile ReplacementQueue of Cesium. Therefore, only the newly added vector tiles need to be considered, and they can be drawn based on the requested vector data and converted into vector drawing objects.
[0063] Preferably, for the newly added vector tiles, we perform the following processing:
[0064] For all the vector tiles in the newly added vector tiles, query according to their IDs in the currently displayed vector drawing object list;
[0065] If not found, create a vector drawing object for it and add it to the currently displayed vector drawing object list;
[0066] If a vector drawing object is found, perform a merging process, that is, merge the vector drawing object of the newly added vector tile with the found vector drawing object;
[0067] Regardless of whether it is a newly created vector object or a merged vector object, record the list of subordinate vector tile numbers.
[0068] Preferably, consider the process in which some vector tiles in the current frame need to use the vector data corresponding to the vector tiles at the parent level or ancestor level of the vector because the vector data corresponding to the vector tile cannot be found. For example, for the tile at row 100 and column 200 on layer 12, since its vector data cannot be requested, the vector data corresponding to layer 11 will be calculated to replace it. However, if the vector data for the tile at row 100 and column 200 on layer 12 cannot be requested either, the vector data of layer 11 will also be used for replacement. At this time, there will be duplicate vector tiles of layer 11 (two child tiles sharing a parent tile), and in this case, they need to be merged into one vector tile for display.
[0069] For the removed vector tiles, we perform the following processing:
[0070] According to its tile number, query the list of currently displayed vector drawing objects;
[0071] If a vector drawing object is queried, delete this tile number from the list of subordinate vector tile numbers of the vector drawing object;
[0072] Traverse all vector drawing objects, and determine whether the list of subordinate vector tile numbers is empty. If it is empty, delete the vector drawing object.
[0073] Through the above steps, the vector tiles are dynamically converted into displayable vector drawing objects. Among them, the vector tile is the data corresponding to this vector number (layer row and column) requested, and it is purely a data object. The vector drawing object is a Cesium drawing object created from this data object. Only by converting the data object into a drawing object and adding it to the Cesium scene object can it be displayed in the scene.
[0074] Preferably, the rendering of the vector data adopts a texture-based vector drawing method. First, load the vector data and obtain the outer bounding rectangle range of the two-dimensional projection of the terrain tile. Then, through a filter, according to the outer bounding rectangle, filter out the corresponding vector feature set from the two-dimensional vector data. Next, the two-dimensional drawing module Render reads and renders the filtered vector feature set in real time, exports the off-screen texture and overlays the terrain tile (after being transparently processed to form an off-screen texture with coordinate attributes). Then, perform three-dimensional display and online rendering in the WMS service published by the GIS server. Specifically, use texture mapping technology. When rendering each terrain tile, bind the corresponding area in the off-screen texture to the tile, and at the same time establish a mapping table between each rendered tile and the vector features included, which is convenient for subsequent vector point selection and query.
[0075] Preferably, based on the rendering principle of WebGl, all vector data can be saved in the form of Geometry Instance, and uniformly added to Primitive or Ground Primitive for batch rendering, maximizing the efficiency of vector rendering.
[0076] Preferably, in this embodiment, the data calculation and data scheduling of the 3D display client are separated. The calculation engine role is played by the 3D rendering engine, which is responsible for updating the tile number array of the currently displayed frame and sending the vector data that ultimately needs to be rendered to the GPU for rendering; while the data scheduling engine is specifically responsible for processing vector data requests and reading and discarding vector data.
[0077] According to the above embodiments of the present invention,
[0078] 1) The dynamic scheduling of vector data on Cesium is realized, reducing the scheduling and calculation amount of vector data;
[0079] 2) By batch rendering all vector drawing objects, efficient vector object drawing of vector data is realized.
[0080] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0081] The above is the introduction of the method embodiments. The following further illustrates the solution of the present invention through device embodiments.
[0082] Figure 2 It is a flowchart of an embodiment of the vector tile display system of the present invention, as Figure 2 shown, including:
[0083] A calculation module 21, configured to obtain the required vector tiles according to the next view, and determine the newly added vector tiles and the removed vector tiles compared with the next view;
[0084] A request module 22, configured to request the vector data corresponding to the newly added vector tiles from the server;
[0085] A drawing module 23, configured to draw the vector data corresponding to the newly added vector tiles obtained from the server and display the next view.
[0086] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the described terminal and server can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0087] In several embodiments provided in the present application, it should be understood that the disclosed methods and apparatuses can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical or other forms.
[0088] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0089] In addition, the functional units in each embodiment of the present application can be integrated in one processor, or each unit can exist physically alone, or two or more units can be integrated in one unit. The integrated unit can be implemented in the form of hardware or in the form of a hardware plus software functional unit.
[0090] Figure 3 The block diagram of an exemplary computer system / server 012 suitable for implementing the embodiments of the present invention is shown. Figure 3 The displayed computer system / server 012 is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present invention.
[0091] As Figure 3 shown, the computer system / server 012 is presented in the form of a general-purpose computing device. The components of the computer system / server 012 may include but are not limited to: one or more processors or processor 016, a system memory 028, and a bus 018 connecting different system components (including the system memory 028 and the processor 016).
[0092] Bus 018 represents one or more of several types of bus architectures, including a memory bus or memory controller, a peripheral bus, an Accelerated Graphics Port, a processor bus, or a local bus using any of a variety of bus architectures. By way of example, and without limitation, these architectures include Industry Standard Architecture (ISA) buses, Micro Channel Architecture (MAC) buses, Enhanced ISA buses, Video Electronics Standards Association (VESA) local buses, and Peripheral Component Interconnect (PCI) buses.
[0093] The computer system / server 012 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by the computer system / server 012, including both volatile and nonvolatile media, removable and non-removable media.
[0094] System memory 028 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 030 and / or cache memory 032. The computer system / server 012 can further include other removable / non-removable, volatile / nonvolatile computer system storage media. By way of example only, storage system 034 can be used for reading from and writing to non-removable, nonvolatile magnetic media ( Figure 3 not shown and typically called a "hard disk drive"). Although Figure 3 not shown in the figures, a disk drive for reading from and writing to removable, nonvolatile magnetic disks (such as a "floppy disk"), and an optical disk drive for reading from and writing to removable, nonvolatile optical disks (such as a CD-ROM, DVD-ROM or other optical media) can be provided. In such cases, each drive is typically connected to the bus 018 by one or more data media interfaces. Memory 028 can include at least one program product having a set (at least one) of program modules that are configured to carry out the functions of the embodiments of the present invention.
[0095] A program / utility 040 having a set (at least one) of program modules 042 can be stored, for example, in memory 028, such program modules 042 including - but not limited to - an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may include an implementation of a network environment. The program modules 042 typically carry out the functions and / or methods of the embodiments described herein.
[0096] The computer system / server 012 can also communicate with one or more external devices 014 (such as a keyboard, a pointing device, a display 024, etc.). In the present invention, the computer system / server 012 communicates with an external radar device, and can also communicate with one or more devices that enable a user to interact with the computer system / server 012, and / or communicate with any device that enables the computer system / server 012 to communicate with one or more other computing devices (such as a network card, a modem, etc.). Such communication can be carried out through the input / output (I / O) interface 022. Moreover, the computer system / server 012 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 020. As Figure 3 shown, the network adapter 020 communicates with other modules of the computer system / server 012 through the bus 018. It should be understood that although Figure 3 not shown in the figure, other hardware and / or software modules can be used in combination with the computer system / server 012, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0097] The processor 016 executes the functions and / or methods in the embodiments described in the present invention by running the programs stored in the system memory 028.
[0098] The above computer program can be disposed in a computer storage medium, that is, the computer storage medium is encoded with a computer program, and when the program is executed by one or more computers, it enables one or more computers to execute the method flow and / or device operations shown in the above embodiments of the present invention.
[0099] With the development of time and technology, the meaning of the medium has become more and more extensive. The dissemination channels of computer programs are no longer limited to tangible media and can also be directly downloaded from the network, etc. Any combination of one or more computer-readable media can be adopted. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component.
[0100] The computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries the computer-readable program code. Such a propagated data signal can take many forms, including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or component.
[0101] The program code contained on the computer-readable medium can be transmitted by any appropriate medium, including, but not limited to, wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0102] The computer program code for performing the operations of the present invention can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0103] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the described systems, devices, and units can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0104] In several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of devices or units can be in electrical, mechanical, or other forms.
[0105] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0106] In addition, in each embodiment of the present application, the functional units can be integrated in a processor, or each unit can exist physically alone, or two or more units can be integrated in one unit. The integrated unit can be implemented in the form of hardware or in the form of a hardware plus software functional unit.
[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features. And these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of each embodiment of the present application.
Claims
1. A method for displaying vector tiles, characterized in that, The steps include: Obtain the required vector tiles according to the next view, and determine the newly added vector tiles and the removed vector tiles compared with the next view; wherein, in order to obtain the vector data corresponding to the vector tiles of the next view, first, it is necessary to obtain the array of vector tile numbers corresponding to the next view; then obtain the corresponding vector data according to the array of vector tile numbers; wherein, a two-dimensional key-value table of the vector tile numbers corresponding to the current view and the vector data is stored in the Data Source to facilitate calculating the newly added vector tiles and the removed vector tiles of the next view; wherein, the two-dimensional key-value table is stored in the existing cache mechanism TileReplacement Queue of Cesium; Request the vector data corresponding to the newly added vector tiles from the server; wherein, send the numbers of the newly added vector tiles to the server to request the corresponding vector data, so as to perform drawing according to the requested vector data and dynamically convert the newly added vector tiles into vector drawing objects; the server sends the corresponding vector data to the client according to the tile number data; Drawing and displaying the next view for the vector data corresponding to the newly added vector tiles obtained from the server includes: For the newly added vector tiles, create corresponding vector drawing objects, wherein, For the newly added vector tiles, query according to their IDs in the list of currently displayed vector drawing objects; If not found, create a vector drawing object for it and add it to the list of currently displayed vector drawing objects; wherein, perform batch drawing on the vector data; If a vector drawing object is found, perform merging processing; wherein, if two child tiles share a parent tile, merging processing is required; record the list of vector tile numbers to which the newly created or merged vector drawing objects belong, wherein, if the vector data corresponding to the vector tiles in the current frame cannot be found, the vector data corresponding to the parent level or ancestor level vector tiles of the vector tiles is used for replacement; For the removed vector tiles, delete the corresponding vector drawing objects; wherein, According to the tile numbers, query the list of currently displayed vector drawing objects; If a vector drawing object is found, delete the tile number from the list of vector tile numbers to which the vector drawing object belongs; Traverse all vector drawing objects, and determine whether the list of vector tile numbers to which they belong is empty. If it is empty, delete the vector drawing object.
2. The method according to claim 1, wherein The determination of the newly added vector tiles and the removed vector tiles compared with the next view further includes: Update the list of vector tiles of the current view as the list of vector tiles of the next view.
3. A vector tile display system, characterized in that, It includes: A calculation module, which is used to obtain the required vector tiles according to the next view, and determine the newly added vector tiles and the removed vector tiles compared with the next view; wherein, in order to obtain the vector data corresponding to the vector tiles of the next view, it is first necessary to obtain the vector tile number array corresponding to the next view; then obtain the corresponding vector data according to the vector tile number array; wherein, a two-dimensional key-value table of the vector tile numbers and vector data corresponding to the current view is stored in the Data Source, so as to calculate the newly added vector tiles and the removed vector tiles of the next view; wherein, the two-dimensional key-value table is stored in the existing cache mechanism TileReplacement Queue of Cesium; A request module, which is used to request the vector data corresponding to the newly added vector tiles from the server; wherein, the numbers of the newly added vector tiles are sent to the server to request the corresponding vector data, so as to perform drawing according to the requested vector data and dynamically convert the newly added vector tiles into vector drawing objects; the server sends the corresponding vector data to the client according to the tile number data; A drawing module, which is used to draw and display the next view for the vector data corresponding to the newly added vector tiles obtained from the server, including: For the newly added vector tiles, create corresponding vector drawing objects, wherein, For the newly added vector tiles, query according to their IDs in the list of currently displayed vector drawing objects; If not found, create a vector drawing object for it and add it to the list of currently displayed vector drawing objects; wherein, batch drawing of the vector data is performed; If a vector drawing object is found, merge processing is performed; wherein, if two child tiles share a parent tile, merge processing is required; record the list of vector tile numbers to which the newly created or merged vector drawing objects belong. If the vector tiles in the current frame cannot find the corresponding vector data, the vector data corresponding to the parent level or ancestor level of the vector tiles is used for replacement; For the removed vector tiles, delete the corresponding vector drawing objects; wherein, According to the tile numbers, query the list of currently displayed vector drawing objects; If a vector drawing object is found, delete this tile number from the list of vector tile numbers to which the vector drawing object belongs; Traverse all vector drawing objects, and judge whether the list of vector tile numbers to which they belong is empty. If it is empty, delete the vector drawing object.
4. A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method described in any one of claims 1 to 2.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method described in any one of claims 1 to 2.
Citation Information
Patent Citations
Loading method and system of vector tile data, service terminal and memory
CN107766487A