A storage method and system for cutting a ground object grid

By calculating the intersection points of ground features and grid cells and assigning them to the corresponding grid cells, the problem of wasted storage space after ground feature grid cutting is solved, and more efficient data storage is achieved.

CN116168166BActive Publication Date: 2026-06-05WUHAN ZHONGHAITING DATA TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUHAN ZHONGHAITING DATA TECH CO LTD
Filing Date
2022-11-30
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In existing technologies, the storage method after the ground feature grid is cut results in the data occupying a large amount of storage space, especially when the distance between the feature point and the center point exceeds the grid boundary, the stored relative coordinate value is large and occupies many bits.

Method used

By calculating the intersection of each edge of a feature with a grid cell and assigning the vertices and intersections of the feature to their respective grid cells, the location of all points is ensured to be within the grid, thereby reducing storage space.

Benefits of technology

This reduces the space occupied by data storage. By placing the location of each part of the ground feature within the corresponding grid, it avoids storing coordinates that exceed the grid side length, thus saving storage space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116168166B_ABST
    Figure CN116168166B_ABST
Patent Text Reader

Abstract

The application relates to a storage method and system for cutting a ground object grid, which comprises the following steps: when the ground object crosses the grid unit, the intersection points of each edge of the ground object and the edge of any grid unit are calculated; each vertex of the ground object is classified into the grid unit where the vertex is located, and each intersection point is classified into the grid unit where the edge of the intersection point is located; after the grid cutting of the ground object crossing the grid, the shape points and positions of the ground object can be stored according to the grid where the ground object is located, and the coordinates of the storage do not exceed the edge length of the grid, so that the space size occupied by the data storage is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electronic map production, and in particular to a method and system for storing geographic features after they have been cut into grids. Background Technology

[0002] In map creation, objects such as roads and lanes on the map are often managed and stored in the form of grid cells. When the shape of these objects crosses grid cells, they need to be cut accordingly, and then the position and shape information of the cut parts are stored.

[0003] Taking the location of a feature as an example, assuming the feature's grid cell is L*L (i.e., a rectangle with both length and width L), a common method is to first calculate the coordinates of the center point O of the grid area containing the feature's center point P, and then store the coordinates of the remaining locations of the feature relative to point O. When it is necessary to calculate the actual coordinates of a point on the feature, simply add the stored relative coordinates of that point to the coordinates of point O. Although the method is simple, it has a problem: when a point on the feature is more than the grid boundary from the center point O, the stored relative coordinate (X, Y) data is relatively large (X >= L / 2 or Y >= L / 2). Since larger values ​​occupy more bits, storing such values ​​requires more storage space than storing data within the grid. Summary of the Invention

[0004] This invention addresses the technical problems existing in the prior art by providing a method and system for storing data after the grid is cut, thus solving the problem that storing data within the grid requires a large amount of storage space.

[0005] According to a first aspect of the present invention, a method for storing cut-up feature grids is provided, comprising:

[0006] Step 1: When a feature spans multiple grid cells, calculate the intersection point of each edge of the feature with the edge of any grid cell;

[0007] Step 2: Assign each vertex of the feature to the grid cell containing that vertex, and assign each intersection point to the grid cell containing the edge of that intersection point.

[0008] Based on the above technical solution, the present invention can also be improved as follows.

[0009] Optionally, the method may further include the following steps prior to step 1:

[0010] Determine whether the feature spans multiple cells. If yes, proceed to step 1; otherwise, end the process directly.

[0011] Optionally, the method for determining whether a feature spans multiple cells includes:

[0012] Determine the center point P of the rectangle containing the ground feature and the center point O of the grid cell containing P;

[0013] Calculate the relative coordinates (X1, Y1), (X2, Y2), (X3, Y3), and (X4, Y4) of the four vertices of the circumscribed rectangle of the feature to the center point O. If there exists any Xi >= L / 2 or Yi >= L / 2, i = 1, 2, 3, and 4, where L is the side length of the grid cell, then determine that the feature spans a cell.

[0014] Optionally, when the vertex is located on the edge of any of the grid cells, the vertex is assigned to a grid cell located in the same direction as the vertex.

[0015] Optionally, each of the intersection points can be assigned to a grid cell located in the same direction at the intersection point.

[0016] Optionally, when the edge of the grid cell is vertical, the same direction is the left side; when the edge of the grid cell is horizontal, the same direction is the bottom side.

[0017] According to a second aspect of the present invention, a storage system for cut ground feature grids is provided, comprising: an intersection calculation module and a vertex / intersection allocation module;

[0018] The intersection point calculation module is used to calculate the intersection point of each edge of a ground feature with the edge of any grid cell when the ground feature crosses grid cells.

[0019] The vertex / intersection assignment module is used to assign each vertex of a feature to the grid cell in which the vertex is located, and to assign each intersection to the grid cell in which the edge of the intersection belongs.

[0020] According to a third aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein the processor is configured to execute a computer management program stored in the memory to implement a method for storing ground feature grids after cutting.

[0021] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, on which a computer management class program is stored, wherein when the computer management class program is executed by a processor, the steps of a storage method after feature grid cutting are implemented.

[0022] This invention provides a method, system, electronic device, and storage medium for storing ground features after grid cutting. After grid cutting of ground features spanning multiple grids, the shape points and positions of the ground features can be stored accordingly based on the grid where the ground features are located. Since the positions of each part of the ground features are located within the corresponding grid, the stored coordinates will not exceed the side length of the grid, thereby reducing the space occupied by data storage. Attached Figure Description

[0023] Figure 1 A flowchart illustrating a method for storing cut-up terrain feature grids provided by this invention;

[0024] Figure 2 A schematic diagram of ground features and grid provided for an embodiment of the present invention;

[0025] Figure 3 This is a schematic diagram of cross-grid feature determination provided in an embodiment of the present invention;

[0026] Figure 4 This is a schematic diagram illustrating the relationship between points and grids provided in an embodiment of the present invention;

[0027] Figure 5 This is a schematic diagram of ground feature grid cutting provided in an embodiment of the present invention;

[0028] Figure 6 A structural block diagram of a storage system after the cutting of ground feature grids is provided by the present invention;

[0029] Figure 7 A schematic diagram of the hardware structure of a possible electronic device provided by the present invention;

[0030] Figure 8 This is a schematic diagram of the hardware structure of a possible computer-readable storage medium provided by the present invention. Detailed Implementation

[0031] The principles and features of the present invention are described below with reference to the accompanying drawings. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.

[0032] Figure 1 A flowchart of a method for storing cut-up feature grids provided by the present invention is shown below. Figure 1 As shown, combined with Figure 1 It can be seen that the storage method includes:

[0033] Step 1: When a feature spans a grid cell, calculate the intersection point of each edge of the feature with the edge of any grid cell.

[0034] Step 2: Assign each vertex of the feature to the grid cell containing that vertex, and assign each intersection point to the grid cell containing the edge of that intersection point.

[0035] The present invention provides a method for storing ground features after grid cutting. After grid cutting of ground features that span multiple grids, the shape points and positions of the ground features can be stored accordingly based on the grid where the ground features are located. Since the positions of each part of the ground features are located within the corresponding grid, the stored coordinates will not exceed the side length of the grid, thereby reducing the space occupied by data storage.

[0036] Example 1

[0037] Embodiment 1 provided by this invention is an embodiment of a method for storing ground feature grids after cutting, combined with... Figure 1 It can be seen that embodiments of this storage method include:

[0038] Determine if a feature spans multiple cells. If yes, proceed to step 1; otherwise, end the process directly.

[0039] like Figure 2 The diagram shown is a schematic representation of terrain features and a grid provided in an embodiment of the present invention. A grid is a map grid created by people using areas of fixed size as grid units. This grid is used to divide and study, manage, and display elements on the map. Whether a terrain feature crosses a grid unit is determined by whether its circumscribed rectangle crosses a grid unit. For example... Figure 2 As shown, whether a feature (blue polygonal area) spans a grid cell is determined by whether its circumscribed rectangle (red rectangle) spans a grid cell.

[0040] like Figure 3 The diagram shown is a schematic diagram of cross-grid feature judgment provided by an embodiment of the present invention. Figure 3 It can be seen that, in one possible implementation, the method for determining whether a feature spans multiple cells includes:

[0041] Determine the center point P of the rectangle containing the ground feature and the center point O of the grid cell containing P.

[0042] Calculate the relative coordinates (X1, Y1), (X2, Y2), (X3, Y3), and (X4, Y4) of the four vertices of the bounding rectangle of the feature to the center point O. If there exists any Xi >= L / 2 or Yi >= L / 2, i = 1, 2, 3, and 4, where L is the side length of the grid cell, then determine if the feature spans multiple grid cells. For example... Figure 3 The diagram shows the bounding rectangle (blue outline) and grid (black) of the ground features.

[0043] Step 1: When a feature spans a grid cell, calculate the intersection point of each edge of the feature with the edge of any grid cell.

[0044] Step 2: Assign each vertex of the feature to the grid cell containing that vertex, and assign each intersection point to the grid cell containing the edge of that intersection point.

[0045] In one possible embodiment, when a vertex is located on the edge of any grid cell, the vertex is assigned to a grid cell located in the same direction as that vertex.

[0046] In one possible embodiment, each intersection point is assigned to a grid cell located in the same direction at the intersection point.

[0047] In one possible embodiment, when the edge of a grid cell is vertical, the same direction is the left side; when the edge of a grid cell is horizontal, the same direction is the bottom side.

[0048] It is understandable that when a vertex or intersection is located on the vertical edge of a grid cell, that edge belongs to the grid cells in its left and right directions; when a vertex or intersection is located on the horizontal edge of a grid cell, that edge belongs to the grid cells in its top and bottom directions.

[0049] like Figure 4 The diagram illustrates the relationship between points and grids according to an embodiment of the present invention. In this embodiment, points on the boundary of a grid cell are defined as belonging to the lower left grid cell. Figure 4 As shown, the red dot belongs to grid 5, and the blue dot belongs to grid 7.

[0050] like Figure 5 The diagram shown is a schematic diagram of feature grid cutting provided in an embodiment of the present invention. The intersection points of each side of the polygon with the grid are calculated sequentially: F, G, H, I, J, K, L, M, according to the above-mentioned rules. Figure 3 The terrain features are divided into 7 blocks, namely {A, F}, {G}, {B, H}, {I, C}, {J, D}, {K}, {L, E, M}. The distance from each block to the center point of its grid cell does not exceed half the side length of the grid cell.

[0051] Example 2

[0052] Embodiment 2 provided by this invention is an embodiment of a storage system for cut-up land feature grids provided by this invention. Figure 6 This is a structural diagram of a storage system after the cutting of a land feature grid, provided in an embodiment of the present invention. Figure 6 It is understood that the embodiment of the storage system includes: the storage system includes: an intersection calculation module and a vertex / intersection allocation module.

[0053] The intersection calculation module is used to calculate the intersection point of each edge of a ground feature with an edge of any grid cell when the ground feature spans grid cells.

[0054] The vertex / intersection assignment module is used to assign each vertex of a feature to the grid cell containing that vertex, and to assign each intersection to the grid cell containing the edge of that intersection.

[0055] It is understood that the storage system after feature grid cutting provided by the present invention corresponds to the storage method after feature grid cutting provided in the foregoing embodiments. The relevant technical features of the storage system after feature grid cutting can be referred to the relevant technical features of the storage method after feature grid cutting, and will not be repeated here.

[0056] Please see Figure 7 , Figure 7 This is a schematic diagram illustrating an embodiment of the electronic device provided in this invention. For example... Figure 7 As shown, an embodiment of the present invention provides an electronic device, including a memory 1310, a processor 1320, and a computer program 1311 stored in the memory 1310 and executable on the processor 1320. When the processor 1320 executes the computer program 1311, it performs the following steps: when a feature crosses a grid cell, it calculates the intersection point of each edge of the feature with the edge of any grid cell; it assigns each vertex of the feature to the grid cell where the vertex is located, and assigns each intersection point to the grid cell to which the edge where the intersection point is located belongs.

[0057] Please see Figure 8 , Figure 8 This is a schematic diagram illustrating an embodiment of a computer-readable storage medium provided by the present invention. (See diagram below.) Figure 8 As shown, this embodiment provides a computer-readable storage medium 1400, on which a computer program 1411 is stored. When the computer program 1411 is executed by a processor, it performs the following steps: when a feature crosses a grid cell, the intersection point of each edge of the feature with the edge of any grid cell is calculated; each vertex of the feature is assigned to the grid cell where the vertex is located, and each intersection point is assigned to the grid cell to which the edge where the intersection point is located belongs.

[0058] The present invention provides a method, system, electronic device and storage medium for storing ground features after grid cutting. After grid cutting of ground features that span multiple grids, the shape points and positions of the ground features can be stored accordingly based on the grid where the ground features are located. Since the positions of each part of the ground features are located within the corresponding grid, the stored coordinates will not exceed the side length of the grid, thereby reducing the space occupied by data storage.

[0059] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0060] 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.

[0061] 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 computer, 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. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0062] 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.

[0063] 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.

[0064] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0065] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A method for storing data after feature grid cutting, characterized in that, The storage method includes: Determine if a feature spans multiple cells; if yes, proceed to step 1; otherwise, end the process. The method for determining whether a feature spans multiple cells includes: Determine the center point P of the rectangle containing the ground feature and the center point O of the grid cell containing P; Calculate the relative coordinates (X1, Y1), (X2, Y2), (X3, Y3), and (X4, Y4) of the four vertices of the bounding rectangle of the feature to the center point O. If there exists any Xi>= L / 2 or Yi>=L / 2, i = 1, 2, 3, and 4, where L is the side length of the grid cell, then determine if the feature spans a cell. Step 1: When a feature spans multiple grid cells, calculate the intersection point of each edge of the feature with the edge of any grid cell; Step 2: Assign each vertex of the feature to the grid cell containing that vertex, and assign each intersection point to the grid cell containing the edge of that intersection point. When a vertex is located on the edge of any of the grid cells, the vertex is assigned to a grid cell located in the same direction as that vertex. Each of the aforementioned intersection points is assigned to a grid cell located in the same direction at the intersection point; When the edge of the grid cell is vertical, the same direction is the left side; when the edge of the grid cell is horizontal, the same direction is the bottom side. After grid cutting of features that span multiple grids, the shape points and their locations are stored according to the grid in which the features are located. The shape points include vertices and intersections.

2. A storage system for cut terrain grids using the storage method described in claim 1, characterized in that, The storage system includes: an intersection calculation module and a vertex / intersection allocation module; The intersection point calculation module is used to calculate the intersection point of each edge of a ground feature with the edge of any grid cell when the ground feature crosses grid cells. The vertex / intersection assignment module is used to assign each vertex of a feature to the grid cell in which the vertex is located, and to assign each intersection to the grid cell in which the edge of the intersection belongs.

3. An electronic device, characterized in that, It includes a memory and a processor, wherein the processor is used to implement the steps of the storage method after cutting the feature grid as described in claim 1 when executing a computer management program stored in the memory.

4. A computer-readable storage medium, characterized in that, It stores a computer management program, which, when executed by a processor, implements the steps of the storage method after the feature grid is cut as described in claim 1.