Vector data spatial object drawing method, system, storage medium and electronic device

By performing spatial retrieval and supplementary drawing at the edge of vector tile, the problem of incomplete drawing of spatial objects at the edge of vector tile is solved, and the complete display of vector data space objects on the map is achieved, improving the accuracy and reliability of data interaction.

CN119359838BActive Publication Date: 2025-06-24YIHAILAN (BEIJING) DATA TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411381792.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-06-24
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

In the prior art, the spatial objects at the edges of vector tile are incompletely drawn, resulting in the missing spatial objects displayed on the map, affecting the interaction effect of data information.

Method used

By monitoring the vector data space object event of vector tile, we can judge whether there is an incomplete vector data space object drawing, record incomplete objects, and change the spatial range of each vector tile for spatial search, determine the vector tile to which the incomplete object belongs, and supplementary drawing on the tile.

Benefits of technology

It solves the problem of incomplete drawing of space objects near the edge of vector tile, ensures the integrity of vector data space objects displayed on the map, avoids the omission of key information, and provides users with more accurate and reliable information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119359838B_ABST
    Figure CN119359838B_ABST
Patent Text Reader

Abstract

The present invention provides a method, a system, a storage medium and an electronic device for drawing vector data spatial objects, which relates to the technical field of geographic information systems. The method for drawing vector data spatial objects includes: when a vector data spatial object event of a vector tile is monitored, determining whether there is a vector data spatial object with incomplete drawing corresponding to the vector tile; in the case of determining that there is a vector data spatial object with incomplete drawing, recording the vector data spatial object with incomplete drawing; changing the spatial range of each vector tile, performing a spatial search on the vector data spatial object with incomplete drawing, and determining the vector tile to which the vector data spatial object with incomplete drawing belongs; and drawing the vector data spatial object with incomplete drawing on the belonging vector tile. This application solves the problem that the spatial objects near the edge of the vector tile are not completely drawn, avoids the omission of key information in the vector tile, and provides more accurate and reliable information for users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of geographic information systems, and more particularly, to a method, system, storage medium, and electronic device for rendering spatial objects of vector data. Background Art

[0002] Currently, when rendering a large number of spatial objects through WebGIS (Web Geographic Information System), the background service generates static tile images from spatial data, and then the front end loads the tile images through WebGIS. However, since each tile only renders the data within its own range, there may be a problem that the spatial objects near the tile edges are not rendered completely, resulting in missing spatial objects displayed on the map and affecting the interaction effect of data information. Therefore, the method of rendering vector data spatial objects through tiles in the related art cannot solve the problem of incomplete rendering of spatial objects at the tile edges.

[0003] Therefore, how to propose a method for rendering complete spatial objects on vector tiles has become an urgent problem to be solved currently. Summary of the Invention

[0004] The present application provides a method, system, storage medium, and electronic device for rendering spatial objects of vector data, which solves the problem of incomplete rendering of spatial objects at the vector tile edges in the related art.

[0005] To this end, the first object of the present invention is to provide a method for rendering spatial objects of vector data based on vector tiles.

[0006] The second object of the present invention is to provide a system for rendering spatial objects of vector data based on vector tiles.

[0007] The third object of the present invention is to provide a storage medium.

[0008] The fourth object of the present invention is to provide an electronic device.

[0009] In view of this, the technical solution of the first aspect of the present invention provides a method for rendering spatial objects of vector data based on vector tiles, including: when a vector data spatial object event of a vector tile is monitored, determining whether there is an incompletely rendered vector data spatial object corresponding to the vector tile; when it is determined that there is an incompletely rendered vector data spatial object, recording the incompletely rendered vector data spatial object; changing the spatial range of each vector tile, performing a spatial search on the incompletely rendered vector data spatial object to determine the vector tile to which the incompletely rendered vector data spatial object belongs; and rendering the incompletely rendered vector data spatial object on the belonging vector tile.

[0010] According to the vector data space object drawing method based on vector tiles proposed by the present invention, first, the vector data space object event of the vector tile is monitored, and when the vector data space object event of the vector tile is monitored, it is determined whether there is an incompletely drawn vector data space object corresponding to the vector tile, that is, for each vector tile, it is determined whether there is an incompletely drawn vector data space object. In the case of determining that there is an incomplete vector data space object, the incomplete vector data space object is recorded, that is, when it is detected that there is an incompletely drawn vector data space object on the vector tile, the incompletely drawn vector data space object is recorded, so that the vector data space object on the edge of the vector tile can be screened out. Next, change the spatial range of each vector tile, and perform spatial retrieval on the incomplete vector data space object. The spatial range here is not the drawing range of the vector tile. The drawing range of each vector tile is fixed. By changing the spatial range of the vector tile, the outer edge space of the vector tile can be retrieved, and then determine whether there is an incomplete vector data space object in the outer edge space of the vector tile. If it is determined that there is an incomplete vector data space object, then the vector tile is identified as a vector tile that needs to be supplemented. The vector tile that needs to be supplemented is the vector tile to which the incomplete vector data space object belongs. Finally, draw the incomplete vector data space object on the vector tile to which it belongs, wherein the recorded incomplete vector data space object is only displayed incompletely on the vector tile, not that the vector data space object itself is incomplete, so it is only necessary to draw the incompletely drawn vector data space object on the vector tile to which it belongs, and the missing vector data space object can be displayed complete. That is to say, the present application retrieves the incompletely drawn vector data space objects on the vector tile, then records the incompletely drawn vector data space objects, and traverses each vector tile. When there is a vector data space object within the outer edge space range, the vector tile corresponding to the space range is determined to be the corresponding vector tile, and finally the incompletely drawn vector data space object is supplemented on the corresponding vector tile. It can be seen that the present application solves the problem of incomplete drawing of space objects near the edge of the vector tile. Multiple vector tiles are spliced ​​to form a map, and the complete vector data space objects can be displayed, avoiding the omission of key information by the vector tile, and providing users with more accurate and reliable information.

[0011] Among them, the vector data spatial object represents entity attributes through geometric objects such as points, lines, and planes, and contains rich attribute information, such as: name, type, geographical coordinates, and status information, etc. The vector data spatial object can represent ships, vehicles, people, etc. The status information can be understood as the orientation direction of the ship's bow, the orientation direction of the vehicle's head, and the moving direction of people, etc. Therefore, the present application can display the moving directions of all vector data spatial objects on the vector tiles, avoiding the loss of key information such as the moving directions of vector data spatial objects.

[0012] Optionally, in some technical solutions, determining whether there are vector data spatial objects with incomplete drawing corresponding to the vector tiles includes: traversing each vector data spatial object, and determining whether the vector data spatial object on each vector tile overlaps with the boundary of the corresponding vector tile; in the case where the vector data spatial object overlaps with the boundary of the vector tile, determining the vector data spatial object overlapping with the boundary of the vector tile as an incomplete vector data spatial object.

[0013] In this technical solution, when determining whether there are vector data spatial objects with incomplete drawing corresponding to the vector tiles, specifically, traversing each vector data spatial object, and determining whether the vector data spatial object on each vector tile overlaps with the boundary of the corresponding vector tile, that is, determining whether each vector data spatial object overlaps with the boundary of the corresponding vector tile. In the case of overlap, it can be determined that the vector data spatial object is an incomplete vector data spatial object. According to whether the vector data spatial object overlaps with the boundary of the corresponding vector tile, it is possible to quickly determine the vector data spatial objects with incomplete drawing from a large number of vector data spatial objects, improving the screening efficiency.

[0014] Optionally, of course, it is also possible to determine the vector data spatial objects with incomplete drawing by calculating the area of each vector data spatial object. First, determine the standard area of the vector data spatial object, and then compare the calculated area with the standard area, and determine the vector data spatial object with an area smaller than the standard area as the vector data spatial object with incomplete drawing. Determining the area of the vector data spatial object with incomplete drawing according to the calculated area of the vector data spatial object can improve the accuracy of screening.

[0015] Optionally, in some technical solutions, changing the spatial range of each vector tile and performing a spatial search on the incomplete vector data spatial objects, the steps of determining the vector tile to which the incomplete vector data spatial object belongs include: expanding the spatial range of each vector tile according to the size of the vector data spatial object; retrieving whether there are incomplete vector data spatial objects within each spatial range; in the case where incomplete vector data spatial objects are retrieved within the spatial range, determining the vector tile corresponding to the spatial range as the vector tile to which it belongs.

[0016] In this technical solution, when determining the vector tile to which an incomplete vector data spatial object belongs, specifically, the spatial range of each vector tile is expanded according to the size of the vector data spatial object, and it is retrieved whether there is an incomplete vector data spatial object within each spatial range. Among them, the size of the vector tile can be 256 pixels × 256 pixels or 512 pixels × 512 pixels. When zooming the map, the display size of the vector tile changes, while the display size of the vector data spatial object does not change. Therefore, determining the spatial range of the vector tile according to the size of the incomplete vector data spatial object can more accurately retrieve the vector data spatial object with incomplete drawing. When it is retrieved that there is an incomplete vector data spatial object within the spatial range, the vector tile corresponding to the spatial range is determined as the belonging vector tile. That is, when an incomplete vector data spatial object is retrieved within the spatial range of one of the vector tiles, then this vector tile is determined as the belonging vector tile, that is, the vector tile that needs to be supplemented with drawing. By performing spatial retrieval on each vector tile, it is possible to find the vector tiles to which all the vector data spatial objects with incomplete drawing belong, ensuring that each vector data spatial object with incomplete drawing can find its belonging vector tile and avoiding omission.

[0017] Optionally, it is also possible to expand a fixed spatial range outside each vector tile. The expanded spatial range is greater than 0 pixels and less than or equal to 10 pixels, which improves the efficiency of expanding the spatial range of each vector tile and can also avoid the low retrieval efficiency caused by an overly large expanded spatial range.

[0018] Optionally, in some technical solutions, the step of retrieving whether there is an incomplete vector data spatial object within each spatial range includes: determining the coverage range of each vector tile; retrieving whether there is an incomplete vector data spatial object within the spatial range outside the coverage range of each vector tile.

[0019] In this technical solution, when retrieving whether there is an incomplete vector data spatial object within each spatial range, specifically, the coverage range of each vector tile is determined, and then it is retrieved whether there is an incomplete vector data spatial object within the spatial range outside the coverage range of each vector tile. That is, the spatial retrieval of this application is to retrieve the outer edge space of each vector tile and does not retrieve the coverage range of the vector tile. For example, when it is retrieved that there is an incomplete vector data spatial object in the outer edge space of the current vector tile, the coverage range of the current vector tile will not be retrieved, avoiding interference with the retrieval result when there is an incomplete vector data spatial object within the current tile, and further improving the retrieval efficiency and retrieval accuracy.

[0020] Optionally, in some technical solutions, the steps of drawing an incomplete vector data spatial object on the vector tile to which it belongs include: obtaining the shape of the completely drawn vector data spatial object; and drawing the incomplete vector data spatial object on the vector tile to which it belongs according to the shape of the completely drawn vector data spatial object.

[0021] In this technical solution, when drawing an incomplete vector data spatial object on the vector tile to which it belongs, specifically, first obtain the shape of the completely drawn vector data spatial object, and then draw the incomplete vector data spatial object on the vector tile to which it belongs according to the shape of the completely drawn vector data spatial object. Among them, the vector data spatial object is displayed as graphic data on the vector tile. Different objects can be displayed as different graphics according to needs. When there is an incomplete vector data spatial object to be drawn, the shape of the completely drawn vector data spatial object can be obtained, and the vector tile to which it belongs can be supplemented and drawn completely according to the complete shape of the vector data spatial object, so as to display the complete vector data spatial object, avoid missing key information, and provide more accurate and reliable information for users.

[0022] Optionally, in some technical solutions, before the step of determining whether there is an incomplete vector data spatial object corresponding to the vector tile when a vector data spatial object event of the vector tile is monitored, it includes: obtaining the vector data spatial object; and rendering the vector data spatial object onto the vector tile.

[0023] In this technical solution, before monitoring that there is a vector data spatial object event of the vector tile, obtain the vector data spatial object and render the vector data spatial object onto the vector tile. Among them, the vector data spatial object can represent ships, vehicles, people, etc. That is to say, this application monitors the rendered vector tile, that is, continuously monitors the vector data spatial object on the vector tile, and then can find out the incomplete vector data spatial object and draw it. That is, most of the vector data spatial objects are uniformly rendered onto the vector tile, and only some of the completely drawn vector data spatial objects are supplemented and drawn, greatly improving the drawing efficiency of the vector data spatial object.

[0024] Optionally, in some technical solutions, the method for drawing a vector data spatial object based on a vector tile further includes: monitoring an event of an incomplete vector data spatial object; and when it is monitored that each vector tile has completed the drawing event, determining that all the recorded incomplete vector data spatial objects have been completely drawn.

[0025] In this technical solution, continuously monitor the incomplete vector data spatial object events. When all vector tiles have completed the supplementary drawing events, it is determined that all the recorded incomplete vector data spatial objects have been completely drawn. Conduct spatial retrieval on the outer edges of each vector tile, which can avoid missing any incompletely drawn vector data spatial object, ensure that all the recorded incomplete vector data spatial objects are completely supplemented and drawn onto the corresponding vector tiles, further avoid the omission of key information, and can provide more accurate and reliable information for users.

[0026] The technical solution of the second aspect of the present invention provides a vector data spatial object drawing system based on vector tiles, including: a judgment module, configured to judge whether there are incompletely drawn vector data spatial objects corresponding to a vector tile when a vector data spatial object event of the vector tile is monitored; a recording module, configured to record the incompletely drawn vector data spatial objects when it is determined that there are incompletely drawn vector data spatial objects; a determination module, configured to change the spatial range of each vector tile, conduct spatial retrieval on the incompletely drawn vector data spatial objects, and determine the vector tile to which the incompletely drawn vector data spatial objects belong; a drawing module, configured to draw the incompletely drawn vector data spatial objects on the vector tiles to which they belong.

[0027] The vector data spatial object drawing system based on vector tiles proposed according to the present invention includes: a judgment module, a recording module, a determination module, and a drawing module. Among them, the judgment module is used to monitor the event of the existence of vector data spatial objects in the vector tile, and when the event of the existence of vector data spatial objects in the vector tile is monitored, it judges whether there are vector data spatial objects that are not completely drawn corresponding to the vector tile. That is, for each vector tile, it judges whether there are vector data spatial objects that are not completely drawn. The recording module is used to record the vector data spatial objects that are not complete when it is determined that there are vector data spatial objects that are not complete. That is, when it is detected that there are vector data spatial objects that are not completely drawn on the vector tile, the vector data spatial objects that are not completely drawn are recorded, so that the vector data spatial objects on the edge of the vector tile can be screened out. Immediately afterwards, the determination module is used to change the spatial range of each vector tile and perform a spatial search on the vector data spatial objects that are not complete. Here, the spatial range is not the drawing range of the vector tile, and the drawing range of each vector tile is fixed. The determination module is also used to be able to search the outer edge space of the vector tile by changing the spatial range of the vector tile, and then determine whether there are vector data spatial objects that are not complete in the outer edge space of the vector tile. When it is determined that there are vector data spatial objects that are not complete, it is determined that the vector tile is a vector tile that needs to be supplemented with drawing. The vector tile that needs to be supplemented with drawing is also the vector tile to which the incomplete vector data spatial object belongs. Finally, the drawing module is used to draw the vector data spatial objects that are not complete on the vector tile to which they belong. Among them, the recorded vector data spatial objects that are not complete are only incomplete in the display on the vector tile, rather than the vector data spatial objects themselves being incomplete. Therefore, only by drawing the vector data spatial objects that are not complete on the vector tile to which they belong can the missing vector data spatial objects in the display be supplemented. That is to say, in this application, by searching for the vector data spatial objects that are not completely drawn on the vector tile, then recording the vector data spatial objects that are not completely drawn, and traversing each vector tile, when there are vector data spatial objects in its outer edge space range, determining the vector tile corresponding to the spatial range as the vector tile to which it belongs, and finally supplementing and drawing the vector data spatial objects that are not complete on the vector tile to which they belong. It can be seen that this application solves the problem that the spatial objects near the edge of the vector tile are not completely drawn. Multiple vector tiles are spliced to form a map, and the complete vector data spatial objects can be displayed, avoiding missing key information and providing more accurate and reliable information for users.

[0028] In the third aspect of the present invention, a storage medium is proposed, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for drawing vector data spatial objects based on vector tiles provided in the first aspect of the present invention are implemented.

[0029] The storage medium in the technical solution of the present invention implements the steps of the method for drawing vector data spatial objects based on vector tiles provided in the first aspect of the present invention. Therefore, it has all the beneficial effects of the method for drawing vector data spatial objects based on vector tiles provided in the first aspect of the present invention, which will not be elaborated here.

[0030] A fourth aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the method for drawing vector data spatial objects based on vector tiles provided in the first aspect of the present invention.

[0031] The electronic device in the technical solution of the present invention implements the steps of the method for drawing vector data spatial objects based on vector tiles provided in the first aspect of the present invention. Therefore, it has all the beneficial effects of the method for drawing vector data spatial objects based on vector tiles provided in the first aspect of the present invention, which will not be elaborated here.

[0032] The additional aspects and advantages of the present invention will become apparent in the following description section or be learned through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on the structures shown in these drawings.

[0034] Figure 1 is one of the schematic flowcharts of the method for drawing vector data spatial objects based on vector tiles provided by the embodiments of the present invention;

[0035] Figure 2 is another schematic flowchart of the method for drawing vector data spatial objects based on vector tiles provided by the embodiments of the present invention;

[0036] Figure 3 is the structural block diagram of the system for drawing vector data spatial objects based on vector tiles provided by the embodiments of the present invention;

[0037] Figure 4 is the structural block diagram of the electronic device provided by the embodiments of the present invention;

[0038] Figure 5 is the schematic diagram of detecting the existence of vector data spatial objects on vector tiles provided by the embodiments of the present invention;

[0039] Figure 6It is a schematic diagram of drawing an edge spatial object on a vector tile provided by an embodiment of the present invention. Detailed implementation manners

[0040] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0041] An embodiment of the first aspect of the present invention provides a method for drawing a vector data spatial object based on a vector tile, as Figure 1 shown. The method for drawing a vector data spatial object based on a vector tile includes:

[0042] S101: When it is monitored that there is a vector data spatial object event in the vector tile, determine whether there is an incompletely drawn vector data spatial object corresponding to the vector tile;

[0043] S102: In the case of determining that there is an incompletely drawn vector data spatial object, record the incompletely drawn vector data spatial object;

[0044] S103: Change the spatial range of each vector tile, perform a spatial search on the incompletely drawn vector data spatial object, and determine the vector tile to which the incompletely drawn vector data spatial object belongs;

[0045] S104: Draw the incompletely drawn vector data spatial object on the vector tile to which it belongs.

[0046] According to the vector data spatial object drawing method based on vector tiles proposed by the present invention, first, when it is monitored that there is an event of a vector data spatial object in the vector tile, and when it is monitored that there is an event of a vector data spatial object in the vector tile, it is judged whether there is a vector data spatial object that is not completely drawn corresponding to the vector tile, that is, for each vector tile, it is judged whether there is a vector data spatial object that is not completely drawn. In the case of determining that there is an incompletely drawn vector data spatial object, the incompletely drawn vector data spatial object is recorded, that is, when it is detected that there is an incompletely drawn vector data spatial object on the vector tile, the incompletely drawn vector data spatial object is recorded, so that the vector data spatial objects on the edge of the vector tile can be screened out. Immediately afterwards, the spatial range of each vector tile is changed, and a spatial search is performed on the incompletely drawn vector data spatial objects. Here, the spatial range is not the drawing range of the vector tile. The drawing range of each vector tile is fixed. By changing the spatial range of the vector tile, the outer edge space of the vector tile can be retrieved, and then it can be determined whether there is an incompletely drawn vector data spatial object in the outer edge space of the vector tile. In the case of determining that there is an incompletely drawn vector data spatial object, it is determined that the vector tile is a vector tile that needs to be supplemented with drawing. The vector tile that needs to be supplemented with drawing is also the vector tile to which the incompletely drawn vector data spatial object belongs. Finally, the incompletely drawn vector data spatial object is drawn on the belonging vector tile. Among them, the recorded incompletely drawn vector data spatial object is only incomplete in display on the vector tile, and it is not that the vector data spatial object itself is incomplete. Therefore, only by drawing the incompletely drawn vector data spatial object on the belonging vector tile can the missing vector data spatial object be supplemented and completed. That is to say, in this application, by retrieving the incompletely drawn vector data spatial objects on the vector tile, then recording the incompletely drawn vector data spatial objects, and traversing each vector tile, when there is a vector data spatial object within the outer edge space range, the vector tile corresponding to the spatial range is determined as the belonging vector tile, and finally the incompletely drawn vector data spatial object is supplemented and drawn on the belonging vector tile. It can be seen that this application solves the problem that the spatial objects near the edge of the vector tile are not completely drawn. Multiple vector tiles are spliced to form a map, and the complete vector data spatial objects can be displayed, avoiding missing key information and providing more accurate and reliable information for users.

[0047] Among them, the vector data spatial object represents entity attributes through geometric objects such as points, lines, and planes, and contains rich attribute information, such as: name, type, geographic coordinates, and status information, etc. The vector data spatial object can represent ships, vehicles, people, etc. The status information can be understood as the orientation direction of the ship's bow, the orientation direction of the vehicle's head, and the moving direction of people, etc. Therefore, this application can display the moving directions of all vector data spatial objects on the vector tile, avoiding the loss of key information such as the moving directions of vector data spatial objects.

[0048] Optionally, in some embodiments, determining whether there are vector data spatial objects with incomplete drawing corresponding to the vector tile includes: traversing each vector data spatial object and determining whether the vector data spatial object on each vector tile overlaps with the boundary of the corresponding vector tile; in the case where the vector data spatial object overlaps with the boundary of the vector tile, determining the vector data spatial object that overlaps with the boundary of the vector tile as an incomplete vector data spatial object.

[0049] In this embodiment, when determining whether there are vector data spatial objects with incomplete drawing corresponding to the vector tile, specifically, traversing each vector data spatial object and determining whether the vector data spatial object on each vector tile overlaps with the boundary of the corresponding vector tile, that is, determining whether each vector data spatial object overlaps with the boundary of the corresponding vector tile. In the case of overlap, it can be determined that the vector data spatial object is an incomplete vector data spatial object. According to whether the vector data spatial object overlaps with the boundary of the corresponding vector tile, it is possible to quickly determine the vector data spatial objects with incomplete drawing from a large number of vector data spatial objects, improving the screening efficiency.

[0050] Optionally, of course, it is also possible to determine the vector data spatial objects with incomplete drawing by calculating the area of each vector data spatial object. First, determine the standard area of the vector data spatial object, and then compare the calculated area with the standard area, and determine the vector data spatial object with an area smaller than the standard area as the vector data spatial object with incomplete drawing. Determining the area of the vector data spatial object with incomplete drawing according to the calculated area of the vector data spatial object can improve the accuracy of screening.

[0051] Optionally, in some embodiments, changing the spatial range of each vector tile and performing a spatial search on the incomplete vector data spatial objects to determine the vector tile to which the incomplete vector data spatial object belongs includes: expanding the spatial range of each vector tile according to the size of the vector data spatial object; retrieving whether there are incomplete vector data spatial objects within each spatial range; in the case where incomplete vector data spatial objects are retrieved within the spatial range, determining the vector tile corresponding to the spatial range as the vector tile to which it belongs.

[0052] In this embodiment, when determining the vector tile to which the incomplete vector data spatial object belongs, specifically, the spatial range of each vector tile is expanded according to the size of the vector data spatial object, and it is retrieved whether there is an incomplete vector data spatial object within each spatial range. The size of the vector tile can be 256 pixels × 256 pixels or 512 pixels × 512 pixels. When the map is scaled, the display size of the vector tile changes, while the display size of the vector data spatial object does not change. Therefore, determining the spatial range of the vector tile according to the size of the incomplete vector data spatial object can more accurately retrieve the vector data spatial object that is incompletely drawn. When it is retrieved that there is an incomplete vector data spatial object within the spatial range, the vector tile corresponding to the spatial range is determined as the belonging vector tile. That is, when an incompletely drawn vector data spatial object is retrieved within the spatial range of one of the vector tiles, then this vector tile is determined as the belonging vector tile, that is, the vector tile that needs to be supplemented and drawn. By performing spatial retrieval on each vector tile, it is possible to find the vector tiles to which all incompletely drawn vector data spatial objects belong, ensuring that each incompletely drawn vector data spatial object can find its belonging vector tile and avoiding omission.

[0053] Optionally, a fixed spatial range can also be expanded outside each vector tile. The expanded spatial range is greater than 0 pixels and less than or equal to 10 pixels, which improves the efficiency of expanding the spatial range of each vector tile and can also avoid the low retrieval efficiency caused by an overly large expanded spatial range.

[0054] Optionally, in some embodiments, the step of retrieving whether there is an incomplete vector data spatial object within each spatial range includes: determining the coverage range of each vector tile; retrieving whether there is an incomplete vector data spatial object within the spatial range outside the coverage range of each vector tile.

[0055] In this embodiment, when retrieving whether there is an incomplete vector data spatial object within each spatial range, specifically, the coverage range of each vector tile is determined, and then it is retrieved whether there is an incomplete vector data spatial object within the spatial range outside the coverage range of each vector tile. That is, the spatial retrieval of this application is to retrieve the outer edge space of each vector tile and does not retrieve the coverage range of the vector tile. For example, when it is retrieved that there is an incompletely drawn vector data spatial object in the outer edge space of the current vector tile, the coverage range of the current vector tile will not be retrieved, avoiding interference with the retrieval result when there is an incompletely drawn vector data spatial object within the current tile and further improving the retrieval efficiency and retrieval accuracy.

[0056] Optionally, in some embodiments, the step of drawing an incomplete vector data spatial object on the vector tile includes: obtaining the shape of the completely drawn vector data spatial object; and drawing the incomplete vector data spatial object on the vector tile according to the shape of the completely drawn vector data spatial object.

[0057] In this embodiment, when drawing an incomplete vector data spatial object on the vector tile, specifically, first obtain the shape of the completely drawn vector data spatial object, and then draw the incomplete vector data spatial object on the vector tile according to the shape of the completely drawn vector data spatial object. Among them, the vector data spatial object displays graphic data on the vector tile, and different objects can be displayed as different graphics according to needs. When there is an incomplete vector data spatial object to be drawn, the shape of the completely drawn vector data spatial object can be obtained, and the vector tile can be supplemented and drawn completely according to the complete shape of the vector data spatial object, so as to display the complete vector data spatial object, avoid missing key information, and provide more accurate and reliable information for users.

[0058] Optionally, in some embodiments, before the step of determining whether there is an incomplete vector data spatial object corresponding to the vector tile when a vector data spatial object event of the vector tile is monitored, it includes: obtaining the vector data spatial object; and rendering the vector data spatial object onto the vector tile.

[0059] In this embodiment, before monitoring that there is a vector data spatial object event of the vector tile, obtain the vector data spatial object and render the vector data spatial object onto the vector tile. Among them, the vector data spatial object can represent ships, vehicles, people, etc. That is to say, the present application monitors the rendered vector tile, that is, continuously monitors the vector data spatial object on the vector tile, and then can find out the incomplete vector data spatial object and draw it. That is, most of the vector data spatial objects are uniformly rendered onto the vector tile, and only a part of the completely drawn vector data spatial objects are supplemented and drawn, greatly improving the drawing efficiency of the vector data spatial object.

[0060] Optionally, in some embodiments, the method for drawing a vector data spatial object based on a vector tile further includes: monitoring an event of an incomplete vector data spatial object; and when it is monitored that each vector tile has completed the drawing event, determining that all the recorded incomplete vector data spatial objects have been completely drawn.

[0061] In this embodiment, continuously monitor the incomplete vector data spatial object event. When all the vector tiles have completed the supplementary drawing event, it is determined that all the recorded incomplete vector data spatial objects have been completely drawn. Perform a spatial search on the outer edge of each vector tile, which can avoid missing any incompletely drawn vector data spatial object, ensure that all the recorded incomplete vector data spatial objects are supplemented and drawn onto the corresponding vector tiles, further avoid the omission of key information, and can provide more accurate and reliable information for users.

[0062] According to another method for drawing vector data spatial objects based on vector tiles provided by an embodiment of the present invention, as Figure 2 shown, the method for drawing vector data spatial objects based on vector tiles includes:

[0063] S201: Obtain vector data spatial objects;

[0064] S202: Render the vector data spatial objects onto the vector tiles;

[0065] S203: When it is monitored that there is a vector data spatial object event on the vector tile, traverse each vector data spatial object and determine whether the vector data spatial object on each vector tile overlaps with the boundary of the corresponding vector tile;

[0066] S204: In the case where the vector data spatial object overlaps with the boundary of the vector tile, determine the vector data spatial object that overlaps with the boundary of the vector tile as an incomplete vector data spatial object;

[0067] S205: In the case where it is determined that there are incomplete vector data spatial objects, record the incomplete vector data spatial objects;

[0068] S206: Expand the spatial range of each vector tile according to the size of the vector data spatial object;

[0069] S207: Determine the coverage range of each vector tile;

[0070] S208: Retrieve whether there are incomplete vector data spatial objects in the spatial range outside the coverage range of each vector tile;

[0071] S209: In the case where incomplete vector data spatial objects are retrieved in the spatial range, determine the vector tile corresponding to the spatial range as the belonging vector tile;

[0072] S210: Obtain the shape of the completely drawn vector data spatial object;

[0073] S211: Draw the incomplete vector data space object on the corresponding vector tile according to the shape of the complete vector data space object;

[0074] S212: Listen for the event of drawing the incomplete vector data space object;

[0075] S213: When it is monitored that each vector tile has completed the drawing event, determine that all the recorded incomplete vector data space objects have been drawn.

[0076] An embodiment of the second aspect of the present invention provides a vector data space object drawing system 10 based on vector tiles, as Figure 3 shown. The vector data space object drawing system 10 based on vector tiles includes: a judgment module 11, a recording module 12, a determination module 13, and a drawing module 14. Among them, the judgment module 11 is used to judge whether there is an incomplete vector data space object corresponding to the vector tile when it is monitored that there is a vector data space object event in the vector tile; the recording module 12 is used to record the incomplete vector data space object when it is determined that there is an incomplete vector data space object; the determination module 13 is used to change the spatial range of each vector tile, perform a spatial search on the incomplete vector data space object, and determine the vector tile to which the incomplete vector data space object belongs; the drawing module 14 is used to draw the incomplete vector data space object on the corresponding vector tile.

[0077] According to the vector data space object drawing system 10 based on vector tiles proposed by the present invention, the judgment module 11 is used to monitor the event that a vector data space object exists in a vector tile, and when the event that a vector data space object exists in a vector tile is monitored, it is judged whether there is an incompletely drawn vector data space object corresponding to the vector tile, that is, for each vector tile, it is judged whether there is an incompletely drawn vector data space object. The recording module 12 is used to record the incomplete vector data space object when it is determined that there is an incompletely drawn vector data space object, that is, when it is detected that there is an incompletely drawn vector data space object on the vector tile, the incompletely drawn vector data space object is recorded, so that the vector data space object on the edge of the vector tile can be screened out. Next, the determination module 13 is used to change the spatial range of each vector tile and perform spatial retrieval on the incomplete vector data space object. The spatial range here is not the drawing range of the vector tile. The drawing range of each vector tile is fixed. The determination module 13 is also used to retrieve the outer edge space of the vector tile by changing the spatial range of the vector tile, and then determine whether there is an incomplete vector data space object in the outer edge space of the vector tile. In the case of determining that there is an incomplete vector data space object, the vector tile is identified as a vector tile that needs to be supplemented and drawn. The vector tile that needs to be supplemented and drawn is the vector tile to which the incomplete vector data space object belongs. Finally, the drawing module 14 is used to draw the incomplete vector data space object on the vector tile to which it belongs, wherein the recorded incomplete vector data space object is only displayed incompletely on the vector tile, not that the vector data space object itself is incomplete, so it is only necessary to draw the incompletely drawn vector data space object on the vector tile to which it belongs to complete the displayed missing vector data space object. That is to say, the present application retrieves the incompletely drawn vector data space objects on the vector tile, then records the incompletely drawn vector data space objects, and traverses each vector tile. When there is a vector data space object within the outer edge space range, the vector tile corresponding to the space range is determined to be the corresponding vector tile, and finally the incompletely drawn vector data space object is supplemented on the corresponding vector tile. It can be seen that the present application solves the problem of incomplete drawing of space objects near the edge of the vector tile. Multiple vector tiles are spliced ​​to form a map, which can display the complete vector data space objects, avoid missing key information, and provide users with more accurate and reliable information.

[0078] The third aspect of the present invention provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the vector data space object drawing method based on vector tiles provided in the first aspect of the present invention are implemented.

[0079] The storage medium in the embodiments of the present invention implements the steps of the method for rendering vector data spatial objects based on vector tiles provided in the first aspect of the present invention. Therefore, it has all the beneficial effects of the method for rendering vector data spatial objects based on vector tiles provided in the first aspect of the present invention, which will not be elaborated here.

[0080] A fourth aspect of the present invention proposes an electronic device 20, as Figure 4 shown. The electronic device 20 includes a memory 21, a processor 22, and a computer program stored on the memory 21 and executable on the processor 22. When the processor 22 executes the computer program, it implements the steps of the method for rendering vector data spatial objects based on vector tiles provided in the first aspect of the present invention.

[0081] The electronic device in the embodiments of the present invention implements the steps of the method for rendering vector data spatial objects based on vector tiles provided in the first aspect of the present invention. Therefore, it has all the beneficial effects of the method for rendering vector data spatial objects based on vector tiles proposed in the first aspect of the present invention, which will not be elaborated here.

[0082] In a specific application, when rendering spatial objects in the vector tile mode, data requests and rendering are mainly carried out in units of tiles. For the recognition of incomplete edge spatial objects, specifically, after obtaining the data corresponding to a single tile, the spatial objects near the edge are recognized.

[0083] The specific method is as follows:

[0084] Listen for the event of the tile obtaining the corresponding vector data spatial object (all existing WebGIS-related vector tile modes for rendering vector layers support "listening for the event of the tile obtaining the corresponding vector data spatial object", which will not be elaborated in this application); determine whether there are spatial objects that are not completely rendered. Traverse each vector data spatial object, perform spatial calculations with the corresponding tile, determine whether there is a graph of the vector data spatial object that exceeds the tile range, and record it in the cache.

[0085] After all tiles are rendered, query and render the edge spatial objects: When all tiles are rendered, traverse the rendered tiles to find whether there are spatial objects near the outer edge of the tiles. If so, render these edge spatial objects within the current tile.

[0086] All tile rendering completion events are monitored: Traverse the rendered tiles, expand each tile by a certain spatial range (the size of the expanded spatial range depends on the spatial size of the rendered vector object), perform a spatial search on the cache records of the incomplete edge spatial objects, and if an edge spatial object can be found, draw the found edge spatial object into the tile. In this way, traverse all tiles to find and draw the edge spatial objects. Among them, the main purpose of monitoring this event is to ensure that all the vector data corresponding to the rendered tiles are loaded and the edge spatial object recognition is completed.

[0087] As Figure 5 and Figure 6 shown, the vector tiles 30 are numbered as tile ①, tile ②, tile ③, and tile ④ from left to right and top to bottom in sequence. There are two incomplete edge spatial objects (incomplete vector data spatial objects 50) in tile ③. In addition, there is one complete vector data spatial object 40 in each of tile ①, tile ③, and tile ④. Perform a spatial search on the cache records of the incomplete edge spatial objects with the expanded range of tile ①, and a triangle spanning tile ① and tile ③ can be found and drawn in tile ①, that is, a part of the triangle is drawn in each of tile ① and tile ③, and the triangle is complete after splicing tile ① and tile ③. Similarly, perform a spatial search on the cache records of the incomplete edge spatial objects with the expanded range of tile ④, and a triangle (incomplete vector data spatial object 50) spanning tile ③ and tile ④ can be found and drawn in tile ④, that is, a part of the triangle is drawn in each of tile ③ and tile ④, and the triangle is complete after splicing tile ③ and tile ④.

[0088] In addition, in the present invention, descriptions such as "first" and "second" are only for descriptive purposes and should not be construed as indicating or implying their relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include at least one of such features. In the description of the present invention, the meaning of "a plurality" is at least two, such as two, three, etc., unless otherwise specifically defined.

[0089] In the present invention, unless otherwise clearly specified and limited, terms such as "connection" and "fixation" should be understood in a broad sense. For example, "fixation" can be a fixed connection, a detachable connection, or integrated; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the internal communication of two components or the interaction relationship between two components, unless otherwise clearly limited. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0090] In addition, the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the ability of those of ordinary skill in the art to implement. When the combination of technical solutions results in contradictions or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0091] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the scope of protection of the present invention.

Claims

1. A method for drawing vector data space objects based on vector tiles, characterized in that: Applied to WebGIS, the vector data space object drawing method based on vector tiles includes: When a vector data space object event is detected for a vector tile, determining whether there is an incompletely drawn vector data space object corresponding to the vector tile; In the case where it is determined that the incomplete vector data space object exists, recording the incomplete vector data space object; Changing the spatial range of each of the vector tiles, performing spatial retrieval on the incomplete vector data spatial object, and determining the vector tile to which the incomplete vector data spatial object belongs; Drawing the incomplete vector data space object on the corresponding vector tile; The vector data space object is used to represent a ship, a vehicle and a person, and the vector data space object includes a name, a type, a geographic coordinate and status information, and the status information includes the direction of the bow of the ship, the direction of the front of the vehicle and the direction of travel of the person; The step of changing the spatial range of each of the vector tiles, performing spatial retrieval on the incomplete vector data spatial object, and determining the vector tile to which the incomplete vector data spatial object belongs comprises: Expanding the spatial range of each of the vector tiles according to the size of the vector data spatial object; Retrieve whether there is the incomplete vector data space object in each of the space ranges; In the case where the incomplete vector data space object is found to exist within the space range, determining the vector tile corresponding to the space range as the vector tile to which it belongs; The size of the vector tile is 256 pixels×256 pixels or 512 pixels×512 pixels, and the external expansion space range is greater than 0 pixels and less than or equal to 10 pixels; The step of retrieving whether the incomplete vector data space object exists in each of the space ranges comprises: Determining the coverage of each of the vector tiles; It is then retrieved whether the incomplete vector data space object exists in the spatial range outside the coverage range of each vector tile.

2. The vector data space object drawing method based on vector tiles according to claim 1, characterized in that: The determining whether there is an incompletely drawn vector data space object corresponding to the vector tile includes: Traversing each of the vector data space objects, and determining whether the vector data space object on each of the vector tiles overlaps with a boundary of the corresponding vector tile; In a case where the vector data space object overlaps with a boundary of the vector tile, the vector data space object overlapping with the boundary of the vector tile is determined as the incomplete vector data space object.

3. The vector data space object drawing method based on vector tiles according to claim 1, characterized in that: The step of drawing the incomplete vector data space object on the vector tile to which it belongs comprises: Get the shape of the fully drawn vector data space object; The incomplete vector data space object is drawn on the corresponding vector tile according to the shape of the complete vector data space object.

4. The vector data space object drawing method based on vector tiles according to any one of claims 1 to 3, characterized in that: Before the step of determining whether there is an incompletely drawn vector data space object corresponding to the vector tile when the vector data space object event is monitored, the method includes: Obtain the vector data space object; The vector data space object is rendered onto the vector tile.

5. The vector data space object drawing method based on vector tiles according to any one of claims 1 to 3, characterized in that: Also includes: Listening for an event of drawing the incomplete vector data space object; When the drawing event of each of the vector tiles is monitored, it is determined that all the recorded incomplete vector data space objects are drawn completely.

6. A vector data space object rendering system based on vector tiles, characterized in that: Applied to WebGIS, the vector data space object drawing system based on vector tiles includes: A judging module, configured to judge whether there is an incompletely drawn vector data space object corresponding to the vector tile when a vector data space object event is monitored; A recording module, configured to record the incomplete vector data space object when it is determined that the incomplete vector data space object exists; A determination module, used for changing the spatial range of each of the vector tiles, performing spatial retrieval on the incomplete vector data spatial object, and determining the vector tile to which the incomplete vector data spatial object belongs; A drawing module, used for drawing the incomplete vector data space object on the vector tile to which it belongs; The vector data space object is used to represent a ship, a vehicle and a person, and the vector data space object includes a name, a type, a geographic coordinate and status information, and the status information includes the direction of the bow of the ship, the direction of the front of the vehicle and the direction of travel of the person; The step of changing the spatial range of each of the vector tiles, performing spatial retrieval on the incomplete vector data spatial object, and determining the vector tile to which the incomplete vector data spatial object belongs comprises: Expanding the spatial range of each of the vector tiles according to the size of the vector data spatial object; Retrieve whether there is the incomplete vector data space object in each of the space ranges; In the case where the incomplete vector data space object is found to exist within the space range, determining the vector tile corresponding to the space range as the vector tile to which it belongs; The size of the vector tile is 256 pixels×256 pixels or 512 pixels×512 pixels, and the external expansion space range is greater than 0 pixels and less than or equal to 10 pixels; The searching whether there is the incomplete vector data space object in each of the space ranges comprises: Determining the coverage of each of the vector tiles; It is then retrieved whether the incomplete vector data space object exists in the spatial range outside the coverage range of each vector tile.

7. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

8. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 5 when executing the computer program.

Citation Information

Patent Citations

  • Vector drawing method and device based on vector tile data and electronic equipment

    CN116737852A

  • Two-dimensional vector data automatic publishing method and system based on GIS (Geographic Information System) platform

    CN118193655A