A vector drawing method, device and electronic equipment based on vector tile data
By constructing a vector tile data format with its own coordinate range and projection information, the problem of insufficient spatial geographic data analysis of vector tiles in a network environment is solved, enabling fast loading and efficient rendering, and improving the performance of applications such as digital earth and digital city.
Patent Information
- Application Number
- CN202210208623.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-03
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2042-03-03
AI Technical Summary
Existing vector tile technology lacks spatial geographic data analysis attributes in a network environment, resulting in significant accuracy loss, difficulty in integrating with tiles of various specifications, and low performance.
By constructing a complete vector tile data format with its own coordinate range, projection information, and display style, and using memory block storage, fast loading and rendering are achieved, eliminating the file decoding step.
The performance of vector tiles in special application scenarios such as digital earth and digital cities has been improved, achieving fast loading and efficient rendering.
Smart Images

Figure CN116737852B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of geographic information system technology, and in particular to a vector drawing method, apparatus and electronic device based on vector tile data. Background Technology
[0002] Geographic Information Systems (GIS) are becoming a key supporting technology for network information platforms such as Digital Earth, Digital Cities, and Navigation and Positioning. As a core resource of GIS, vector maps are increasingly widely used, even serving as essential foundational data for many network information platforms. To meet the demand for high-quality map creation in the network environment, tile technology is commonly used in two ways. One method involves rendering vector data into raster tiles on the server side, and then the client requests the image for display. The disadvantages of this method are large data volume, distortion during scaling, and the inability to freely configure the display style. The other method involves the server providing vector tile data, which the client requests and renders itself. Because vector tiles use vector data to describe map elements, and maps are formed by rendering these vector data, the data volume is small, there is no distortion during scaling, and it can be displayed from different perspectives, effectively meeting the demand for real-time vector map creation.
[0003] The commonly used vector tile standard is "Mapbox MVT," encoded using "Google Protocol Buffers," a storage-efficient vector tile data encoding format. The map rendering process typically involves downloading, parsing, and rendering vector tile data. Generally, the requirements for the tile data format are small file size, fast parsing, and the ability to generate different effects with different styles. When using the "Mapbox MVT" data format, the implementation steps for a vector map are as follows:
[0004] Calculate the vector tile number as required by the display and send a download request;
[0005] Download the vector tile data, decode it, and obtain the vector tile object;
[0006] Analyze the features, geometry, and tags in vector tiles;
[0007] The decision to perform appropriate map projection and coordinate system transformation depends on the map display coordinate system.
[0008] Select a style for rendering based on the feature attributes;
[0009] Display a vector map.
[0010] While the existing "Mapbox MVT" vector tile scheme can effectively solve map display in a network environment, it lacks the analytical attributes of spatial geographic data. In practical applications, its main drawbacks are:
[0011] Vector tiles use a local small integer coordinate system based on the tile, resulting in significant accuracy loss and making it difficult to integrate with tiles of various sizes.
[0012] Vector tiles do not include coordinate range and projection information, and their spatial data cannot be used independently.
[0013] Vector tile decoding and geometric object extraction suffer from frequent creation and deletion of small memory blocks, resulting in low performance. Summary of the Invention
[0014] To address the issue of the lack of spatial geographic data analysis attributes when displaying maps in a network environment, this application proposes a vector drawing method, apparatus, and electronic device based on vector tile data.
[0015] This disclosure provides a vector drawing method based on vector tile data, the method comprising:
[0016] Based on the map's display scale and range, calculate the vector tile number, construct resource links, send download request links, and obtain vector tile data;
[0017] Vector tile objects are created using vector tile data based on the defined vector tile data format;
[0018] By comparing the vector tile data with the data in the display projection, the geometric data for drawing is selected from the vector tile object or after the display projection transformation. The geometric data is then used to render the drawing and display the vector map.
[0019] Furthermore, the step of calculating vector tile numbers, constructing resource links, and sending download requests based on the map's display scale and display range includes:
[0020] The query request level, where the level of the request is determined by a scale greater than a threshold.
[0021] Calculate the size of the vector tile cell mesh based on the requested hierarchy;
[0022] Calculate the row and column numbers of the bottom left and top right corners of the hierarchy within the display area;
[0023] Obtain the vector tile grid of the display range, construct the resource links for the vector tile requests based on the vector tile grid, find the request links for the network service resources of the vector tile from the resource links, and send the requested resources to the server to obtain the vector tile data.
[0024] Furthermore, the creation of vector tile objects using vector tile data based on the defined vector tile data format includes:
[0025] The vector tile data is stored using memory blocks as indicators;
[0026] Create a vector tile object class, where a memory block is attached to the class instance during the creation of the vector tile object class;
[0027] Based on the defined vector tile data format, vector tile objects are automatically constructed by calling methods of the vector tile object class.
[0028] Furthermore, the step of comparing vector tile data with data in the display projection, and selecting geometric data for drawing from the vector tile object or after transforming the display projection, includes: viewing the display projection of the map; if the vector tile data and the display projection data are the same, then the geographic geometric objects in the vector tile object are used as the geometric data for drawing; if the vector tile data and the display projection data are different, then the geographic geometric data obtained by the projection transformation is used as the geometric data for drawing.
[0029] Furthermore, in the geometric data rendering process, a style is selected based on the feature attributes for rendering.
[0030] Furthermore, in the process of selecting a style for drawing and rendering based on feature attributes, if the selected style information is defaulted, and the user needs to customize the style, the drawing is performed after obtaining the attribute information of the feature.
[0031] On the other hand, the present invention also provides a vector drawing apparatus based on vector tile data, the apparatus comprising:
[0032] The acquisition unit is used to calculate the vector tile number, construct resource links, send download request links, and acquire vector tile data based on the map's display scale and display range.
[0033] Create a cell for creating vector tile objects using vector tile data based on a defined vector tile data format;
[0034] The drawing unit is used to compare vector tile data with data in the display projection, select the geometric data for drawing from the vector tile object or after transforming the display projection, render the drawing using the geometric data, and display the vector map.
[0035] Furthermore, the step of comparing vector tile data with data in the display projection, and selecting geometric data for drawing from the vector tile object or after transforming the display projection, includes: viewing the display projection of the map; if the vector tile data and the display projection data are the same, then the geographic geometric objects in the vector tile object are used as the geometric data for drawing; if the vector tile data and the display projection data are different, then the geographic geometric data obtained by the projection transformation is used as the geometric data for drawing.
[0036] This application achieves the following beneficial effects: This invention proposes a vector drawing technology based on vector tile data, that is, by constructing a complete vector tile map data (complete in two ways: firstly, the vector tile can carry coordinate range, projection information, display style, etc.; secondly, a single vector tile is a block of memory, and no secondary decoding is required after loading), a balance is struck between the size of the tile data and the decoding method, thereby improving the performance of vector tiles in some special application scenarios such as digital earth and digital cities; In this invention, a vector tile file structure with spatial range, projection information, feature attributes, and rendering style is proposed; fast loading of vector tiles is achieved through index placeholder information, eliminating the file decoding step. Attached Figure Description
[0037] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0038] Figure 1 This is a flowchart illustrating the principle of a vector drawing method based on vector tile data according to the present invention.
[0039] Figure 2 This is a schematic diagram of the structure of a vector drawing device based on vector tile data according to the present invention;
[0040] Figure 3 This is a flowchart of the vector tile loader processing of the present invention.
[0041] Figure 4 This is a diagram defining the identifier for the vector tile format of this invention.
[0042] Figure 5 This is a flowchart of the vector tile constructor process of the present invention. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0044] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.
[0045] like Figure 1 As shown, this invention provides a vector drawing method based on vector tile data, the method comprising:
[0046] Step S1: Calculate the vector tile number based on the map's display scale and display range, construct resource links, send download request links, and obtain vector tile data;
[0047] Step S2: Based on the defined vector tile data format, create vector tile objects using the vector tile data;
[0048] Step S3: Compare the vector tile data with the data in the display projection, select the geometric data for drawing from the vector tile object or after transforming the display projection, render the drawing using the geometric data, and display the vector map.
[0049] Based on the map's display scale and range, calculate the vector tile numbers, construct resource links, and send download requests, including:
[0050] The query request level, where the level of the request is determined by a scale greater than a threshold.
[0051] Calculate the size of the vector tile cell mesh based on the requested hierarchy;
[0052] Calculate the row and column numbers of the bottom left and top right corners of the hierarchy within the display area;
[0053] Obtain the vector tile grid of the display range, construct the resource links for the vector tile requests based on the vector tile grid, find the request links for the network service resources of the vector tile from the resource links, and send the requested resources to the server to obtain the vector tile data.
[0054] Based on the defined vector tile data format, vector tile objects are created using vector tile data, including:
[0055] The vector tile data is stored using memory blocks as indicators;
[0056] Create a vector tile object class, where a memory block is attached to the class instance during the creation of the vector tile object class;
[0057] Based on the defined vector tile data format, vector tile objects are automatically constructed by calling methods of the vector tile object class.
[0058] In some embodiments of the present invention, the step of comparing vector tile data with data in the display projection, and selecting geometric data for drawing from the vector tile object or after transforming the display projection, includes: viewing the display projection of the map; if the vector tile data and the display projection data are the same, then the geographic geometric objects in the vector tile object are used as the geometric data for drawing; if the vector tile data and the display projection data are different, then the geographic geometric data obtained by the projection transformation is used as the geometric data for drawing.
[0059] In some embodiments of the present invention, in the geometric data rendering drawing, a style is selected for drawing and rendering based on the feature attributes.
[0060] In some embodiments of the present invention, during the drawing and rendering process based on the selection of style according to feature attributes, if the selected style information is defaulted, and if the user needs to customize the style, the drawing is performed by obtaining the attribute information of the feature.
[0061] On the other hand, such as Figure 2 As shown, the present invention also provides a vector drawing device based on vector tile data, the device comprising:
[0062] The acquisition unit is used to calculate the vector tile number, construct resource links, send download request links, and acquire vector tile data based on the map's display scale and display range.
[0063] Create a cell for creating vector tile objects using vector tile data based on a defined vector tile data format;
[0064] The drawing unit is used to compare vector tile data with data in the display projection, select the geometric data for drawing from the vector tile object or after transforming the display projection, render the drawing using the geometric data, and display the vector map.
[0065] In some embodiments of the present invention, the step of comparing vector tile data with data in the display projection, and selecting geometric data for drawing from the vector tile object or after transforming the display projection, includes: viewing the display projection of the map; if the vector tile data and the display projection data are the same, then the geographic geometric objects in the vector tile object are used as the geometric data for drawing; if the vector tile data and the display projection data are different, then the geographic geometric data obtained by the projection transformation is used as the geometric data for drawing.
[0066] The above-mentioned technical solutions adopted in the embodiments of this application can achieve the following beneficial effects: This invention proposes a vector drawing technology based on vector tile data, that is, by constructing a complete vector tile map data (complete means that the vector tile can carry coordinate range, projection information, display style, etc., and that a single vector tile is a block of memory, which does not require secondary decoding after loading), a balance is struck between the size of the tile data and the decoding method, thereby improving the performance of vector tiles in some special application scenarios such as digital earth, digital city, etc.; In this invention, a vector tile file structure with spatial range, projection information, feature attributes, and rendering style is proposed; fast loading of vector tiles is achieved through index placeholder information, eliminating the file decoding step.
[0067] like Figure 3 , 4 As shown, the present invention proposes a fast loading technology for vector tiles, which is standardized by a vector tile file format, specifically including a vector tile constructor, a vector tile format specification, and a vector tile loader.
[0068] Figure 3 This is the process of building vector tiles. The vector tile builder outputs vector map slices as vector tiles that conform to the vector tile data format and stores them for later use. The process includes: obtaining the vector map; preprocessing the vector map (including projection transformation, thinning, and style setting); building vector tiles on the preprocessed vector map (including cropping and formatting); obtaining vector tiles; repeating the above process to finally obtain the vector tile map set. Figure 4 It is the vector tile application process, which is the process of reading vector tiles and sending them to the map renderer to form a vector map through a vector tile loader. It includes: obtaining a single vector tile from a vector tile atlas; loading the vector tile (including: transmission and download, object construction); and processing the loaded vector tile through map processing (including: projection transformation, style setting, drawing and rendering) to obtain a vector map.
[0069] This proposal focuses on the definition of vector tile format and fast loading techniques.
[0070] In this invention, the vector tile data format definition includes:
[0071] The main objective of the vector tile data format in this invention is to encapsulate all necessary layer information, feature information, geometric information, labeling information, style information, and other information required for mapmaking into a single memory block. By customizing a special data structure and reserving an index table within this memory block, the vector tiles can be loaded and used quickly, while also avoiding the small memory overhead associated with decoding or format conversion. The main identifiers of this vector tile data are defined as follows: Figure 5 As shown.
[0072] The following details each data segment in the format:
[0073] 1. Vector tile information: OHeader, including two fixed-length data segments: OHInfo and ODInfo.
[0074] File information: OHInfo, including version information, data length, etc.
[0075] Data information: ODInfo, including coordinate range, number of layers, etc.
[0076] 2. Vector Layer Information
[0077] Layer index: layers, defined as a layer index placeholder, is written to the first byte offset of each layer in the vector tile builder, and is a variable-length data segment;
[0078] Layers 1-n: OLayer
[0079] Layer information area: includes information such as layer name and number of features.
[0080] Features: Defined as placeholder information for the feature index, it is written into the first byte offset of each feature in the vector tile builder and is a variable-length data segment.
[0081] Element 1-n: OFeature
[0082] Element information: including element ID, type, etc.
[0083] Geometry index: Defined as the placeholder information for the geometry index, the offset of the first byte of geometry data written in the vector tile builder;
[0084] Style index: Defined as style index placeholder information, the first byte offset of the style data written in the vector tile builder;
[0085] Label index: Defined as placeholder information for the label index, the offset of the first byte of label data written in the vector tile constructor;
[0086] LabelStyle: Defined as the placeholder information for the label style index, the offset of the first byte of the label style data written in the vector tile constructor;
[0087] Style data: Defines the symbol styles, etc., that this layer should display;
[0088] Other data area: Defines other data that this layer needs to carry, such as layer attributes.
[0089] Vector tile loading drawing techniques include:
[0090] Using the vector tile data format of this proposal, the steps for fast loading of vector tile data are as follows:
[0091] Step 1: Based on the map's display scale and range, calculate the vector tile numbers to be displayed, construct resource links for local (e.g., file paths) or service (e.g., network addresses) requests, and send download requests; detailed instructions are as follows:
[0092] Vector tiles are a pyramid grid organization method for dividing a map according to a quadtree rule. Based on the top-level square, a binary division is performed. Once the display scale (Scale0) and range (xmin0, ymin0, xmax0, ymax0) of the top-level map are determined, each tile in the tile pyramid has a unique number, typically represented by a level (zoom), row number (y), and column number (x). The level represents different map scales, and the row and column numbers are the north-south and east-west indices of the tile grid after fixing the level. The tile scale (represented by the scale denominator in calculations) is usually calculated based on the complete top-level range displayed in pixels of a specified screen area. It can be labeled Scale0, corresponding to level Z0, and zoomed in once to obtain Scale1, Scale2, Scale3, ..., Scale... zoom The corresponding levels are Z1, Z2, Z3, ..., Z zoom The size of the topmost tile is D0 (calculated from the topmost range: D0 = xmax0 - xmin0), and is successively represented as D1, D2, D3, ..., D zoom etc. When a map scale and display range (x) are given... min y min x max y max )back:
[0093] First, use the nearest level that is larger than the given scale obtained from the query as the level to be requested (zoom);
[0094] Next, the size D of the tile unit grid is calculated based on the hierarchy. zoom =D0 / 2 zoom ;
[0095] Then calculate the row and column numbers of the bottom left and top right corners of the display area.
[0096] xzoom' 左=floor((x min -x min0 ) / D zoom )
[0097] yzoom' 下 =ceil((y min -y min0 ) / D zoom )
[0098] xzoom' 右 =floor((x max -x min0 ) / D zoom )
[0099] yzoom' 上 =ceil((y max -y min0 ) / Dz oom )
[0100] The floor function rounds down, and the ceil function rounds up.
[0101] Finally, the display area is obtained as a zoom level tile grid (x zoom’左 y zoom’下 x zoom’右 y zoom’上 The resource links for tile requests can be constructed using this tile grid. For example, the tile grid of the third layer (2, 3, 5, 5) is calculated in the figure above. Then, the network service resources of the vector tiles are request links in the form of http: / / server:port / 3 / 2 / 5, http: / / xxxxxx / 3 / 2 / 5..., which can be sent to the server to obtain the corresponding tile data.
[0102] Step 2: Obtain vector tile data through the download request in Step 1. This data is downloaded into a memory block. You can directly create an instance of a tile object (class OData) using the memory block of the vector tile data. Use the tile object's constructor (method build) to perform the tile object construction operation. The initialization of the index area will be completed inside the object. This process does not require creating or destroying memory separately. After completion, you will get the vector tile object and its own layer objects, feature entities, geometry objects, label attributes, and display styles (Style, LabelStyle), etc.
[0103] To achieve the purpose of this step, based on the vector tile specification under section "2. Vector Tile Data Format Definition", a class diagram structure for the vector tile loader is designed.
[0104] The specific operating steps include:
[0105] First, the vector tile data block obtained from the first step is received and stored using the memory block unsigned char*bufferData;
[0106] Next, a tile object OData*data = new OData(bufferData) is created, and the memory block is attached to the data instance;
[0107] Then, the `build` method of the tile object's `data` is called to automatically build the tile. This process fills the corresponding object index placeholders according to the vector tile's data specifications, completing the connection between the tile object's internal information area, index area, and data area, ensuring that the tile object's attributes point to the correct memory addresses. The core idea of automatic construction is to use contiguous memory to build hierarchical, randomly accessible vector tile objects. By filling the reserved index area, secondary indexing of layers, features, geometry, styles, etc., is achieved, realizing the goal of random access.
[0108] Step 3: From the tile object data obtained in Step 2, the geometric objects of the features can be obtained. Based on the map display coordinate system, it is determined whether to perform appropriate map projection and display coordinate system transformation; the specific implementation process is as follows:
[0109] Typically, map display requires setting the view's projection information, such as setting it to a geographic coordinate system or a projected coordinate system depending on the application. When using tile objects for rendering and mapping, first check the map's display projection. If the original tile projection is the same as the display projection, the geographic geometry objects in the vector tiles can be directly used as the geometric data required for drawing. If the original tile data is different from the display projection, the geographic geometry data after projection transformation needs to be used as the geometric data for drawing, and then the drawing data is used for rendering.
[0110] Step 4: After processing the drawing data in Step 3, select a style based on the feature attributes for drawing and rendering. In the tile object data of this scheme, there is default style information. Obtain the drawing geometric data and default style information through the following figure.
[0111] If the user needs a custom style, other attribute information of the feature can be obtained, such as the encoding attribute, and different encodings can be used to match the user's style before drawing.
[0112] Step 5: After drawing all the requested vector tile data in sequence, display the vector map.
[0113] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0114] Therefore, this application also proposes a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the methods described in any embodiment of this application.
[0115] Furthermore, this application also proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in any embodiment of this application.
[0116] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0117] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0118] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0119] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0120] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0121] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0122] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0123] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A vector drawing method based on vector tile data, characterized by, The method comprises the following steps: According to the display scale and display range of the map, the vector tile number is calculated, the resource link is constructed, the download request link is sent, and the vector tile data is acquired; Based on the defined vector tile data format, the vector tile object is created using the vector tile data, including: storing the vector tile data with a memory block indication; creating a vector tile object class, wherein the memory block is attached to the class instance in the creation of the vector tile object class; based on the defined vector tile data format, the method of the vector tile object class is called to automatically build the vector tile object; The geometric data for drawing is selected from the vector tile object or after the display projection transformation by comparing the vector tile data with the data in the display projection, the drawing is rendered using the geometric data, and the vector map is displayed.
2. The vector drawing method based on vector tile data according to claim 1, wherein, The method comprises the following steps: The requested level is queried, wherein the level with a scale greater than a threshold value is taken as the requested level; The size of the vector tile unit grid is calculated according to the requested level; The row and column numbers of the left lower corner point and the right upper corner point of the level in the display range are calculated; The vector tile grid of the level in the display range is obtained, the resource link of the vector tile request is constructed according to the vector tile grid, the request link of the network service resource of the vector tile is found from the resource link, and the request resource is sent to the server to acquire the vector tile data.
3. The vector drawing method based on vector tile data according to claim 1, wherein, The geometric data for drawing is selected from the vector tile object or after the display projection transformation by comparing the vector tile data with the data in the display projection, including: checking the display projection of the map, if the vector tile data is the same as the display projection data, the geographic geometric object in the vector tile object is taken as the geometric data for drawing, and if the vector tile data is different from the display projection data, the geographic geometric data obtained by the projection transformation is taken as the geometric data for drawing.
4. The vector drawing method based on vector tile data according to claim 1, wherein, In the rendering of the drawing using the geometric data, the style is selected according to the attribute of the element to perform drawing rendering.
5. The vector drawing method based on vector tile data according to claim 4, wherein, In the rendering of the drawing according to the selected style, if the user needs to customize the style, the attribute information of the feature is acquired, and then the drawing is performed when the selected style information is default.
6. A vector drawing apparatus based on vector tile data, for implementing the method according to any one of claims 1 to 5, characterized in that The method comprises the following steps: An acquisition unit is configured to calculate the vector tile number according to the display scale and display range of the map, construct the resource link, send the download request link, and acquire the vector tile data; A creation unit is configured to create the vector tile object using the vector tile data based on the defined vector tile data format; A drawing unit is configured to select the geometric data for drawing from the vector tile object or after the display projection transformation by comparing the vector tile data with the data in the display projection, render the drawing using the geometric data, and display the vector map.
7. The vector plotting device based on vector tile data according to claim 6, wherein, The method comprises: selecting the geometric data of drawing from the vector tile object and the data in the display projection, comprising: checking the display projection of the map, if the vector tile data is the same as the display projection data, taking the geographic geometric object in the vector tile object as the geometric data of drawing, if the vector tile data is different from the display projection data, projecting and transforming to obtain the geographic geometric data as the geometric data of drawing.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program, when executed by a processor, implements the method of any one of claims 1-5.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the method of any one of claims 1-5 when executing the computer program.
Citation Information
Patent Citations
Method for rendering massive vector data
CN102663119A
Model rendering method, apparatus, and device, and computer readable storage medium
WO2021164233A1