Low-altitude path coordinate conversion method, device, computer equipment and storage medium
By converting the two-dimensional map data of the low-altitude interface into a regular polygon grid, the existing technology problems of sparse grid combination and low accuracy of interval segmentation when dividing the target area of the low-altitude interface are solved, and closer grid combination and low-accuracy interval segmentation are achieved. More accurate interval segmentation improves the effect of UAV signal detection.
Patent Information
- Application Number
- CN202411141781.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-08-20
AI Technical Summary
When the target area of the low-altitude interface is divided by a two-dimensional rectangular grid method in the prior art, the bond between the grids in the barrier grid area is sparse, the adhesion is poor, and the interval segmentation accuracy is low.
By reaching a low -empty interface coordinates conversion instruction, obtain the area to be converted and corresponding to the two -dimensional map data, carry out a normalized rectangular grid processing, and convert the rectangular grid to a positive polygon grid, the total number of border is greater than 4, updated the obstacle area, and the obstacle area is updated. Map.
A positive and polygon grid method of the target area of the low -altitude interface is realized. The combination of grids is more closely bonded, the adhesion is stronger, and the interval segmentation is more accurate.
Smart Images

Figure CN118670398B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of unmanned aerial vehicle control technology, and in particular to a low-altitude path coordinate conversion method, device, computer equipment and storage medium. Background Art
[0002] With the extensive application of drones, more and more drones will appear in low-altitude areas. However, there are some no-fly zones in low-altitude areas that are not suitable for drones to fly, so it is particularly important to reasonably plan the low-altitude environment and strictly set low-altitude no-fly zones.
[0003] When planning the path of a drone, it is necessary to first display the low-altitude environment (such as the low-altitude environment in an urban area) in two dimensions according to the geographic coordinates, and perform regional planning and deployment based on the displayed low-altitude interface. At present, the commonly used method for dividing the low-altitude interface area is the two-dimensional rectangular grid method, which decomposes a target area in the low-altitude area (such as a designated no-fly zone in the low altitude of an urban area) into grids of equal size. These grids are called Unit cells. The two-dimensional rectangular grid method specifically decomposes the target area into cells of equal size, each of which has a certain value, which can be represented by 0 or 1. If the value of the cell is 0, it means that the current cell is a free grid; if the value is 1, it means that the current cell is an obstacle grid. After obtaining all the obstacle grids in the target area, all obstacle grids are wrapped with a closed curve to obtain the obstacle grid area in the target area. For example Figure 1 As shown in the figure, there is a significant difference between the obstacle grid area after approximate cell decomposition and the original target area. However, the grids in the obstacle grid area obtained by the two-dimensional rectangular grid method are sparsely connected, the adhesion is poor, and the interval segmentation accuracy is low. Summary of the invention
[0004] The embodiments of the present invention provide a low-altitude path coordinate conversion method, device, computer equipment and storage medium, aiming to solve the problems in the prior art of using a two-dimensional rectangular grid method to divide the target area of a low-altitude interface, such as sparse connection between grids in the obstacle grid area, poor adhesion, and low interval segmentation accuracy.
[0005] In a first aspect, an embodiment of the present invention provides a low-altitude path coordinate conversion method, which includes:
[0006] In response to a low-altitude interface coordinate conversion instruction, acquiring an area to be converted corresponding to the low-altitude interface coordinate conversion instruction and two-dimensional map data to be converted corresponding to the area to be converted;
[0007] The two-dimensional map data to be converted is subjected to normalized rectangular grid processing to obtain rectangular grid processing data;
[0008] Each rectangular grid in the rectangular grid processing data is converted into a regular polygon grid based on a preset regular polygon grid conversion strategy to form regular polygon grid processing data; wherein the total number of sides corresponding to the regular polygon grid is greater than 4;
[0009] Obstacle areas to be converted in the two-dimensional map data to be converted are obtained, and the obstacle areas to be converted are mapped correspondingly to the regular polygon grid processing data to update the regular polygon grid processing data.
[0010] In a second aspect, an embodiment of the present invention further provides a low-altitude path coordinate conversion device, which includes:
[0011] The to-be-converted data acquisition unit is used to respond to the low-altitude interface coordinate conversion instruction and acquire the to-be-converted area corresponding to the low-altitude interface coordinate conversion instruction and the to-be-converted two-dimensional map data corresponding to the to-be-converted area;
[0012] A rectangular grid processing unit, used for performing normalized rectangular grid processing on the two-dimensional map data to be converted to obtain rectangular grid processed data;
[0013] A regular polygon grid processing unit, used for converting each rectangular grid in the rectangular grid processing data into a regular polygon grid based on a preset regular polygon grid conversion strategy to form regular polygon grid processing data; wherein the total number of sides corresponding to the regular polygon grid is greater than 4;
[0014] The obstacle area mapping unit is used to obtain the obstacle area to be converted in the two-dimensional map data to be converted, and map the obstacle area to be converted to the regular polygon grid processing data to update the regular polygon grid processing data.
[0015] In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the method described in the first aspect above can be implemented.
[0017] The embodiment of the present invention provides a low-altitude path coordinate conversion method, device, computer equipment and storage medium, the method comprising: in response to a low-altitude interface coordinate conversion instruction, obtaining a to-be-converted area corresponding to the low-altitude interface coordinate conversion instruction, and a to-be-converted two-dimensional map data corresponding to the to-be-converted area; performing normalized rectangular grid processing on the to-be-converted two-dimensional map data to obtain rectangular grid processing data; converting each rectangular grid in the rectangular grid processing data into a regular polygon grid based on a preset regular polygon grid conversion strategy to form regular polygon grid processing data; wherein the total number of edges corresponding to the regular polygon grid is greater than 4; obtaining an obstacle area to be converted in the to-be-converted two-dimensional map data, and correspondingly mapping the obstacle area to be converted to the regular polygon grid processing data to update the regular polygon grid processing data. The embodiment of the present invention can divide the target area of the low-altitude interface into a regular polygon grid, and the regular polygon grids are more closely combined and more cohesive, and the interval segmentation of the low-altitude domain is more accurate; based on more angles of regular polygons, the drone can select more directions and cover a wider range when performing low-altitude signal detection, which is conducive to improving recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0019] Figure 1 It is a schematic diagram of the low-altitude interface area divided by a two-dimensional rectangular grid method in the prior art;
[0020] Figure 2 A schematic diagram of an application scenario of the low-altitude path coordinate conversion method provided by an embodiment of the present invention;
[0021] Figure 3 A schematic diagram of a flow chart of a low-altitude path coordinate conversion method provided by an embodiment of the present invention;
[0022] Figure 4 A schematic diagram of a sub-process of a low-altitude path coordinate conversion method provided by an embodiment of the present invention;
[0023] Figure 5 A schematic diagram of a sub-process of a low-altitude path coordinate conversion method provided by an embodiment of the present invention;
[0024] Figure 6 A schematic diagram of regular polygon grid processing data in a low-altitude path coordinate conversion method provided by an embodiment of the present invention;
[0025] Figure 7 A schematic diagram of a sub-process of a low-altitude path coordinate conversion method provided by an embodiment of the present invention;
[0026] Figure 8 A schematic block diagram of a low-altitude path coordinate conversion device provided by an embodiment of the present invention;
[0027] Fig. 9 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0030] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0031] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0032] Please also refer to Figure 2 and Figure 3 ,in Figure 2 Schematic diagram of a scene of a low-altitude path coordinate conversion method according to an embodiment of the present invention. Figure 3 FIG. 1 is a flow chart of a low-altitude path coordinate conversion method provided by an embodiment of the present invention. Figure 2 As shown, the low-altitude path coordinate conversion method provided in the embodiment of the present invention is applied to a server 10 (such as a drone control center server), and the server 10 is communicatively connected with the drone 20.
[0033] like Figure 3 As shown, the method includes the following steps S110-S140.
[0034] S110. In response to a low-altitude interface coordinate conversion instruction, an area to be converted corresponding to the low-altitude interface coordinate conversion instruction and two-dimensional map data to be converted corresponding to the area to be converted are obtained.
[0035] In this embodiment, the technical solution is described with the server as the execution subject. A drone control center service system is deployed in the server, and the operator can select at least one area in the two-dimensional electronic map data as a no-fly zone on its user interaction interface. The selected no-fly zone in the two-dimensional electronic map data is determined as the area to be converted, and the two-dimensional map data to be converted corresponding to the area to be converted is also obtained from the two-dimensional electronic map data. At this time, the obtained two-dimensional map data to be converted is the initial map data that needs to be further converted.
[0036] S120, performing normalized rectangular grid processing on the two-dimensional map data to be converted to obtain rectangular grid processed data.
[0037] In this embodiment, the two-dimensional map data to be converted is subjected to normalized rectangular grid processing, that is, it is divided into a plurality of rectangular grids of unit length size, thereby achieving preliminary rectangular grid processing of the two-dimensional map data to be converted.
[0038] In one embodiment, step S120 includes:
[0039] A normalized square grid with a preset side length is obtained, and normalized rectangular grid processing is performed on the two-dimensional map data to be converted based on the normalized square grid to obtain the rectangular grid processed data.
[0040] In this embodiment, in order to divide the two-dimensional map data to be converted more regularly, a normalized square grid with a preset side length (in specific implementation, the preset side length can be set to be equal to the side length of a pixel, such as 0.04 cm or 0.026458 cm, and the preset side length can also be set to 1 cm, which can be set according to actual conditions) can be first obtained, and then the movement starts from the upper left corner of the two-dimensional plane area corresponding to the two-dimensional map data to be converted as the starting point, and each time it moves horizontally to the right by a preset side length until it moves to the right boundary of the two-dimensional plane area, and then the normalized square grid is moved to the next row area of the two-dimensional plane area, and the above-mentioned step-by-step movement operation is repeated until the rectangular grid division of the entire two-dimensional plane area is completed. When this division is completed, the original obstacle area to be converted in the two-dimensional map data to be converted can be more accurately mapped to the rectangular grid processing data (see Figure 1 The treatment effect shown, and Figure 1 The blank rectangles in the middle are the free area, and the gray rectangles are the obstacle area).
[0041] In one embodiment, if Figure 4 As shown, in step S120, a normalized square grid with a preset side length is obtained, and normalized rectangular grid processing is performed on the two-dimensional map data to be converted based on the normalized square grid to obtain the rectangular grid processed data, including:
[0042] S121, obtaining the upper left corner vertex position of the two-dimensional map data to be converted, and using it as the origin of the plane rectangular coordinate system;
[0043] S122, constructing a plane rectangular coordinate system with the origin of the plane rectangular coordinate system as the origin of the coordinates; wherein the direction from the upper left corner vertex of the two-dimensional map data to be converted as the starting point and toward the upper right corner vertex is the positive direction of the horizontal axis of the plane rectangular coordinate system, and the direction from the upper left corner vertex of the two-dimensional map data to be converted as the starting point and toward the lower left corner vertex is the positive direction of the longitudinal axis of the plane rectangular coordinate system;
[0044] S123. According to a preset traversal strategy, the two-dimensional map data to be converted, which is constructed with a plane rectangular coordinate system, is subjected to normalized rectangular grid processing to obtain the rectangular grid processing data; wherein the preset traversal strategy includes a horizontal traversal sub-strategy and a vertical traversal sub-strategy, the horizontal traversal sub-strategy is used to perform normalized rectangular grid processing on the normalized square grid in the current horizontal area from left to right, and the vertical traversal sub-strategy is used to move the normalized square grid to the first position on the left in the next adjacent horizontal area in the two-dimensional map data to be converted after completing the normalized rectangular grid processing of the current horizontal area.
[0045] In this embodiment, after obtaining the two-dimensional map data to be converted in the form of a two-dimensional plane (such as a rectangular shape), its upper left corner vertex can be used as the origin of the plane rectangular coordinate system, and then the X axis of the plane rectangular coordinate is constructed from the upper left corner vertex of the two-dimensional map data to be converted as the starting point and the direction toward the upper right corner vertex as the positive direction of the horizontal axis of the plane rectangular coordinate system, and the Y axis of the plane rectangular coordinate is constructed from the upper left corner vertex of the two-dimensional map data to be converted as the starting point and the direction toward the lower left corner vertex as the positive direction of the longitudinal axis of the plane rectangular coordinate system. At this time, the upper left corner vertex of the normalized square grid is first aligned with the origin of the plane rectangular coordinate system, and the two adjacent sides of the normalized square grid are respectively coincident with the X axis and the Y axis, and the initialization positioning of the normalized square grid is completed. At this time, it can be recorded as the first rectangular grid in the first row (more specifically, the first normalized square grid in the first row). Then, according to the horizontal traversal sub-strategy included in the preset traversal strategy, the normalized square grid is controlled to move from left to right, and each movement distance is the length of the side of the normalized square grid. The normalized square grid is moved step by step in the current horizontal area, thereby completing the grid division processing of the normalized square grid in the current horizontal area.
[0046] For example, the normalized square grid is in the horizontal area of the first row of the two-dimensional map data to be converted. Based on the horizontal traversal sub-strategy, the normalized square grid is controlled to move from left to right and each movement distance is the length of the side of the normalized square grid, so that the grid division processing of the horizontal area of the first row can be realized. More specifically, if the horizontal area of the first row can be divided into N1 normalized square grids, then the above N1 normalized square grids are recorded from left to right as the first normalized square grid in the first row, the second normalized square grid in the first row, ..., the N1th normalized square grid in the first row; where N1 is a positive integer.
[0047] Afterwards, after completing the rasterization division processing of the current horizontal area (such as the first row of horizontal areas in the above example), the vertical traversal sub-strategy in the preset traversal strategy needs to control the normalized square grid to move the normalized square grid to the first position on the left in the next adjacent horizontal area in the two-dimensional map data to be converted (such as the second row of horizontal areas in the two-dimensional map data to be converted, where the height of each row of horizontal areas in the two-dimensional map data to be converted is equal to the side length of the normalized square grid) after completing the normalized rectangular grid processing of the current horizontal area (such as the first row of horizontal areas in the above example). At this time, when the normalized square grid moves to the first position on the left side of the next adjacent horizontal area in the two-dimensional map data to be converted, the left side of the normalized square grid coincides with the Y axis, and the upper side of the normalized square grid coincides with the lower side of the leftmost first normalized square grid in the previous adjacent horizontal area in the two-dimensional map data to be converted; then based on the horizontal traversal sub-strategy, the normalized square grid is controlled to move from left to right and each movement distance is the length of the side of the normalized square grid, so as to realize the rasterization division processing of the current row of horizontal areas. After that, the above operation is continuously repeated until the rasterization division processing of the last row of horizontal areas of the two-dimensional map data to be converted is completed, thereby obtaining the rectangular raster processing data.
[0048] S130, converting each rectangular grid in the rectangular grid processing data into a regular polygon grid based on a preset regular polygon grid conversion strategy to form regular polygon grid processing data.
[0049] Wherein, the total number of sides corresponding to the regular polygon grid is greater than 4.
[0050] In this embodiment, in order to increase the compactness and adhesion between the rectangular grids in the rectangular grid processing data, each rectangular grid in the rectangular grid processing data can be converted into a regular polygon grid based on a preset regular polygon grid conversion strategy to form the regular polygon grid processing data. For example, the total number of sides of the regular polygon grid is 5, 6, 7, 8, etc., whichever exceeds the total number of sides of the rectangular grid corresponding to 4.
[0051] In one embodiment, the preset regular polygon grid conversion strategy is a regular hexagon grid conversion strategy, such as Figure 5 As shown, step S130 includes:
[0052] S131, obtaining the center coordinates and the side length of each rectangular grid in the rectangular grid processing data;
[0053] S132, converting the rectangular grid center coordinates of each rectangular grid in the rectangular grid processing data based on the grid center coordinate adjustment strategy in the regular hexagonal grid conversion strategy to obtain regular polygonal grid center coordinates corresponding to the rectangular grid center coordinates;
[0054] S133, converting and adjusting the rectangular grid side length of each rectangular grid in the rectangular grid processing data based on the grid side length adjustment strategy in the regular hexagonal grid conversion strategy to obtain the regular polygon grid side length corresponding to the side length of each rectangular grid;
[0055] S134. Generate the regular polygon grid processing data corresponding to the rectangular grid processing data based on the regular polygon grid center coordinates and the regular polygon grid side lengths obtained by converting each rectangular grid in the rectangular grid processing data.
[0056] In this embodiment, the regular hexagonal grid conversion processing of the first rectangular grid in the first row of the rectangular grid processing data can be used as an example for explanation. Specifically, the rectangular grid center coordinates and the rectangular grid side length of the first rectangular grid in the first row are first obtained; then the rectangular grid center coordinates of the first rectangular grid in the first row are converted based on the grid center coordinate adjustment strategy in the regular hexagonal grid conversion strategy to obtain the regular polygon grid center coordinates corresponding to the first rectangular grid in the first row; then the rectangular grid side length of the first rectangular grid in the first row is converted and adjusted based on the grid side length adjustment strategy in the regular hexagonal grid conversion strategy to obtain the regular polygon grid side length corresponding to the first rectangular grid in the first row.
[0057] The conversion process of the other rectangular grids except the first rectangular grid in the first row in the rectangular grid processing data also refers to the conversion process for the first rectangular grid in the first row. When all the rectangular grids in the rectangular grid processing data have completed the regular polygon grid conversion process, the regular polygon grid processing data can be obtained.
[0058] In one embodiment, the formula corresponding to the grid center coordinate adjustment strategy is: ij =x ij -[y ij -(y ij &1)] / 2 and Y ij = y ij ; Among them, (x ij ,y ij ) represents the center coordinates of the rectangular grid of the jth rectangular grid in the i-th row in the rectangular grid processing data, (X ij , Y ij) represents the regular polygon grid center coordinates obtained by correspondingly converting the rectangular grid center coordinates of the j-th rectangular grid in the i-th row of the rectangular grid processing data based on the grid center coordinate adjustment strategy; when determining the rectangular grid center coordinates of each rectangular grid in the rectangular grid processing data, the upper left corner vertex position of the converted two-dimensional map data is used as the origin of the plane rectangular coordinate system, the direction from the upper left corner vertex of the two-dimensional map data to be converted as the starting point and toward the upper right corner vertex is the positive direction of the horizontal axis of the plane rectangular coordinate system, and the direction from the upper left corner vertex of the two-dimensional map data to be converted as the starting point and toward the lower left corner vertex is the positive direction of the longitudinal axis of the plane rectangular coordinate system;
[0059] The formula corresponding to the grid side length adjustment strategy is: ij = l ij / 3 0.5 ; Among them, l ij represents the grid side length of the j-th rectangular grid in the i-th row of the rectangular grid processing data, L ij It represents the grid side length of the regular polygon obtained after the grid side length of the j-th rectangular grid in the i-th row in the rectangular grid processing data is converted based on the grid side length adjustment strategy.
[0060] In this embodiment, if it is assumed that the rectangular grid processing data is divided into N1*M1 (where M1 is a positive integer and can represent the total number of rows of the horizontal area in the two-dimensional map data to be converted) rectangular grids, the value range of i is 1-M1 and the value range of j is 1-N1. For example, still taking the first rectangular grid in the first row of the rectangular grid processing data as an example, the rectangular grid center coordinates of the rectangular grid are (x 11 ,y 11 ), then X 11 = x 11 -[y 11 -(y 11 &1)] / 2 and Y 11 =y 11 .
[0061] When the plane rectangular coordinate system is constructed with the origin of the plane rectangular coordinate system as the coordinate origin in step S122, a Cartesian coordinate system on a two-dimensional plane can be constructed, which is described by Cartesian coordinates. ij &1 is a bitwise operation, which means taking y ijThe result of this operation can only be 0 or 1, depending on whether y is even or odd. In the Cartesian coordinate system, the coordinates of each hexagonal grid are integers, but these integers are not evenly distributed. Instead, they are arranged in a special way so that the neighbors of each hexagonal grid have integer coordinates. The above arrangement leads to a result that the hexagons in the even and odd rows are not aligned in the x-axis direction. Specifically, the hexagons in the even rows are offset to the right by half a hexagon width than the hexagons in the odd rows.
[0062] S140, obtaining an obstacle area to be converted in the two-dimensional map data to be converted, and mapping the obstacle area to be converted to the regular polygon grid processing data to update the regular polygon grid processing data.
[0063] In this embodiment, after the conversion of the two-dimensional map data to be converted into regular polygonal grid processing data is completed, the obstacle area to be converted in the two-dimensional map data to be converted can also be obtained and mapped to the regular polygonal grid processing data. Figure 6 The grayscale area composed of multiple grayscale regular hexagonal grids in the regular polygonal grid processing data shown corresponds to Figure 1 The obstacle area to be converted is shown as a plurality of grayscale rectangular grids. It can be seen that after the above processing, based on the angle of regular polygons such as regular hexagons, the drone can choose more directions and cover a wider range when performing low-altitude signal detection, which is conducive to improving the recognition accuracy; and the regular polygon grids are more closely combined and have stronger adhesion, which makes the interval segmentation of the low-altitude area more accurate, which is conducive to the customization and modularization of the drone work and shortening the response time.
[0064] In one embodiment, if Figure 7 As shown, step S140 includes:
[0065] S141, obtaining a plurality of rectangular grids corresponding to the obstacle area to be converted in the rectangular grid processing data, and forming a target rectangular grid set;
[0066] S142, obtaining a target regular polygon grid set corresponding to the target rectangular grid set in the regular polygon grid processing data;
[0067] S143, marking an obstacle area for an area corresponding to the target regular polygon grid set in the regular polygon grid processing data, so as to update the regular polygon grid processing data.
[0068] In this embodiment, when mapping the obstacle area to be converted in the two-dimensional map data to be converted into the regular polygonal grid processing data, firstly, a plurality of rectangular grids corresponding to the obstacle area to be converted in the rectangular grid processing data are required to form a target rectangular grid set (for example, reference may be made to Figure 1 Then, the target regular polygon grid set is formed by searching the target regular polygon grid set for each target rectangular grid in the target rectangular grid set in the regular polygon grid processing data, thereby forming a target regular polygon grid set. Finally, the obstacle area is marked in the area corresponding to the target regular polygon grid set in the regular polygon grid processing data, thereby obtaining the following: Figure 6 Regular polygon raster processing data with obstacle areas identified is shown.
[0069] In one embodiment, after step S140, the method further includes:
[0070] If a low-altitude interface coordinate restoration instruction is detected, the regular polygon grid processing data is restored based on a preset regular polygon grid restoration strategy corresponding to the preset regular polygon grid conversion strategy to obtain current rectangular grid processing data.
[0071] In this embodiment, for example, the corresponding regular polygon grid in the regular polygon grid processing data is a regular hexagon grid (that is, the regular polygon grid processing data is specifically regular hexagon grid processing data), and the preset regular polygon grid restoration strategy corresponding to the preset regular polygon grid conversion strategy is the preset regular hexagon grid restoration strategy. Continuing to restore the first regular hexagon grid in the first row of the regular hexagon grid processing data to a rectangular grid as an example, the formula corresponding to the grid center coordinate restoration strategy in the preset regular hexagon grid restoration strategy is x ij =X ij +[Y ij -(Y ij &1)] / 2 and yy ij = Y ij ; and the formula corresponding to the grid edge length restoration strategy in the preset regular hexagon grid restoration strategy is ll ij =L ij ; Among them, (X ij , Y ij ) represents the rectangular grid center coordinates of the regular hexagonal grid in the i-th row and the j-th regular hexagonal grid in the regular hexagonal grid processing data, (xx ij ,yy ij ) represents the rectangular grid center coordinates obtained by converting the regular hexagonal grid in the i-th row and the j-th regular hexagonal grid in the regular hexagonal grid processing data based on the grid center coordinate restoration strategy, L ijrepresents the grid side length of the j-th regular hexagonal grid in the i-th row of the regular hexagonal grid processing data, ll ij It represents the side length of the regular hexagonal grid in the i-th row and the j-th regular hexagonal grid in the regular hexagonal grid processing data, which is converted into the side length of the rectangular grid based on the grid side length restoration strategy.
[0072] The coordinate and side length restoration conversion process of other regular hexagonal grids except the first regular hexagonal grid in the first row in the regular hexagonal grid processing data also refers to the coordinate and side length restoration conversion process for the first regular hexagonal grid in the first row. When all the regular hexagonal grids in the regular hexagonal grid processing data have completed the coordinate and side length restoration conversion process, the current rectangular grid processing data can be obtained.
[0073] It can be seen that the implementation example of the method can divide the target area of the low-altitude interface into regular polygon grids, and the regular polygon grids are more tightly combined and have stronger adhesion, so the interval segmentation of the low-altitude area is more accurate; based on more angles of regular polygons, the drone has more selectable directions and a wider coverage range when performing low-altitude signal detection, which is conducive to improving recognition accuracy.
[0074] Figure 8 is a schematic block diagram of a low-altitude path coordinate conversion device provided by an embodiment of the present invention. Figure 8 As shown, corresponding to the above low-altitude path coordinate conversion method, the present invention also provides a low-altitude path coordinate conversion device 100. The low-altitude path coordinate conversion device 100 includes a unit for executing the above low-altitude path coordinate conversion method. Figure 8 The low-altitude path coordinate conversion device 100 includes: a data acquisition unit 110 for conversion, a rectangular grid processing unit 120, a regular polygon grid processing unit 130 and an obstacle area mapping unit 140.
[0075] The to-be-converted data acquisition unit 110 is used to respond to the low-altitude interface coordinate conversion instruction and acquire the to-be-converted area corresponding to the low-altitude interface coordinate conversion instruction and the to-be-converted two-dimensional map data corresponding to the to-be-converted area.
[0076] In this embodiment, the technical solution is described with the server as the execution subject. A drone control center service system is deployed in the server, and the operator can select at least one area in the two-dimensional electronic map data as a no-fly zone on its user interaction interface. The selected no-fly zone in the two-dimensional electronic map data is determined as the area to be converted, and the two-dimensional map data to be converted corresponding to the area to be converted is also obtained from the two-dimensional electronic map data. At this time, the obtained two-dimensional map data to be converted is the initial map data that needs to be further converted.
[0077] The rectangular grid processing unit 120 is used to perform normalized rectangular grid processing on the two-dimensional map data to be converted to obtain rectangular grid processed data.
[0078] In this embodiment, the two-dimensional map data to be converted is subjected to normalized rectangular grid processing, that is, it is divided into a plurality of rectangular grids of unit length size, thereby achieving preliminary rectangular grid processing of the two-dimensional map data to be converted.
[0079] In one embodiment, the rectangular grid processing unit 120 is specifically used for:
[0080] A normalized square grid with a preset side length is obtained, and normalized rectangular grid processing is performed on the two-dimensional map data to be converted based on the normalized square grid to obtain the rectangular grid processed data.
[0081] In this embodiment, in order to divide the two-dimensional map data to be converted more regularly, a normalized square grid with a preset side length (in specific implementation, the preset side length can be set to be equal to the side length of a pixel, such as 0.04 cm or 0.026458 cm, and the preset side length can also be set to be equal to 1 cm, which can be set according to actual conditions) can be first obtained, and then the movement starts from the upper left corner of the two-dimensional plane area corresponding to the two-dimensional map data to be converted as the starting point, and each time it moves horizontally to the right by a preset side length until it moves to the right boundary of the two-dimensional plane area, and then the normalized square grid is moved to the next row area of the two-dimensional plane area, and the above-mentioned step-by-step movement operation is repeated until the rectangular grid division of the entire two-dimensional plane area is completed. When this division is completed, the original obstacle area to be converted in the two-dimensional map data to be converted can be more accurately mapped to the rectangular grid processing data (see Figure 1 The treatment effect shown, and Figure 1 The blank rectangles in the middle are the free area, and the gray rectangles are the obstacle area).
[0082] In one embodiment, the rectangular grid processing unit 120 is specifically used for:
[0083] Obtaining the upper left corner vertex position of the two-dimensional map data to be converted and using it as the origin of the plane rectangular coordinate system;
[0084] A plane rectangular coordinate system is constructed with the origin of the plane rectangular coordinate system as the origin of the coordinates; wherein the direction from the upper left corner vertex of the two-dimensional map data to be converted as the starting point and toward the upper right corner vertex is the positive direction of the horizontal axis of the plane rectangular coordinate system, and the direction from the upper left corner vertex of the two-dimensional map data to be converted as the starting point and toward the lower left corner vertex is the positive direction of the longitudinal axis of the plane rectangular coordinate system;
[0085] According to a preset traversal strategy, the two-dimensional map data to be converted, which is constructed with a plane rectangular coordinate system, is subjected to normalized rectangular grid processing to obtain the rectangular grid processing data; wherein the preset traversal strategy includes a horizontal traversal sub-strategy and a vertical traversal sub-strategy, the horizontal traversal sub-strategy is used to perform normalized rectangular grid processing on the normalized square grid in the current horizontal area from left to right, and the vertical traversal sub-strategy is used to move the normalized square grid to the first position on the left in the next adjacent horizontal area in the two-dimensional map data to be converted after completing the normalized rectangular grid processing of the current horizontal area.
[0086] In this embodiment, after obtaining the two-dimensional map data to be converted in the form of a two-dimensional plane (such as a rectangular shape), its upper left corner vertex can be used as the origin of the plane rectangular coordinate system, and then the X axis of the plane rectangular coordinate is constructed from the upper left corner vertex of the two-dimensional map data to be converted as the starting point and the direction toward the upper right corner vertex as the positive direction of the horizontal axis of the plane rectangular coordinate system, and the Y axis of the plane rectangular coordinate is constructed from the upper left corner vertex of the two-dimensional map data to be converted as the starting point and the direction toward the lower left corner vertex as the positive direction of the longitudinal axis of the plane rectangular coordinate system. At this time, the upper left corner vertex of the normalized square grid is first aligned with the origin of the plane rectangular coordinate system, and the two adjacent sides of the normalized square grid are respectively coincident with the X axis and the Y axis, and the initialization positioning of the normalized square grid is completed. At this time, it can be recorded as the first rectangular grid in the first row (more specifically, the first normalized square grid in the first row). Then, according to the horizontal traversal sub-strategy included in the preset traversal strategy, the normalized square grid is controlled to move from left to right, and each movement distance is the length of the side of the normalized square grid. The normalized square grid is moved step by step in the current horizontal area, thereby completing the grid division processing of the normalized square grid in the current horizontal area.
[0087] For example, the normalized square grid is in the horizontal area of the first row of the two-dimensional map data to be converted. Based on the horizontal traversal sub-strategy, the normalized square grid is controlled to move from left to right and each movement distance is the length of the side of the normalized square grid, so that the grid division processing of the horizontal area of the first row can be realized. More specifically, if the horizontal area of the first row can be divided into N1 normalized square grids, then the above N1 normalized square grids are recorded from left to right as the first normalized square grid in the first row, the second normalized square grid in the first row, ..., the N1th normalized square grid in the first row; where N1 is a positive integer.
[0088] Afterwards, after completing the rasterization division processing of the current horizontal area (such as the first row of horizontal areas in the above example), the vertical traversal sub-strategy in the preset traversal strategy needs to control the normalized square grid to move the normalized square grid to the first position on the left in the next adjacent horizontal area in the two-dimensional map data to be converted (such as the second row of horizontal areas in the two-dimensional map data to be converted, where the height of each row of horizontal areas in the two-dimensional map data to be converted is equal to the side length of the normalized square grid) after completing the normalized rectangular grid processing of the current horizontal area (such as the first row of horizontal areas in the above example). At this time, when the normalized square grid moves to the first position on the left side of the next adjacent horizontal area in the two-dimensional map data to be converted, the left side of the normalized square grid coincides with the Y axis, and the upper side of the normalized square grid coincides with the lower side of the leftmost first normalized square grid in the previous adjacent horizontal area in the two-dimensional map data to be converted; then based on the horizontal traversal sub-strategy, the normalized square grid is controlled to move from left to right and each movement distance is the length of the side of the normalized square grid, so as to realize the rasterization division processing of the current row of horizontal areas. After that, the above operation is continuously repeated until the rasterization division processing of the last row of horizontal areas of the two-dimensional map data to be converted is completed, thereby obtaining the rectangular raster processing data.
[0089] The regular polygon grid processing unit 130 is used to convert each rectangular grid in the rectangular grid processing data into a regular polygon grid based on a preset regular polygon grid conversion strategy to form regular polygon grid processing data.
[0090] Wherein, the total number of sides corresponding to the regular polygon grid is greater than 4.
[0091] In this embodiment, in order to increase the compactness and adhesion between the rectangular grids in the rectangular grid processing data, each rectangular grid in the rectangular grid processing data can be converted into a regular polygon grid based on a preset regular polygon grid conversion strategy to form the regular polygon grid processing data. For example, the total number of sides of the regular polygon grid is 5, 6, 7, 8, etc., whichever exceeds the total number of sides of the rectangular grid corresponding to 4.
[0092] In one embodiment, the preset regular polygon grid conversion strategy is a regular hexagon grid conversion strategy, and the regular polygon grid processing unit 130 is specifically used to:
[0093] For each rectangular grid in the rectangular grid processing data, correspondingly obtaining the rectangular grid center coordinates and the rectangular grid side length;
[0094] The rectangular grid center coordinates of each rectangular grid in the rectangular grid processing data are converted based on the grid center coordinate adjustment strategy in the regular hexagonal grid conversion strategy to obtain the regular polygon grid center coordinates corresponding to the rectangular grid center coordinates;
[0095] The rectangular grid side length of each rectangular grid in the rectangular grid processing data is converted and adjusted accordingly based on the grid side length adjustment strategy in the regular hexagonal grid conversion strategy to obtain the regular polygon grid side length corresponding to the side length of each rectangular grid;
[0096] Based on the regular polygonal grid center coordinates and the regular polygonal grid side lengths obtained by converting each rectangular grid in the rectangular grid processing data, the regular polygonal grid processing data corresponding to the rectangular grid processing data is generated.
[0097] In this embodiment, the regular hexagonal grid conversion processing of the first rectangular grid in the first row of the rectangular grid processing data can be used as an example for explanation. Specifically, the rectangular grid center coordinates and the rectangular grid side length of the first rectangular grid in the first row are first obtained; then the rectangular grid center coordinates of the first rectangular grid in the first row are converted based on the grid center coordinate adjustment strategy in the regular hexagonal grid conversion strategy to obtain the regular polygon grid center coordinates corresponding to the first rectangular grid in the first row; then the rectangular grid side length of the first rectangular grid in the first row is converted and adjusted based on the grid side length adjustment strategy in the regular hexagonal grid conversion strategy to obtain the regular polygon grid side length corresponding to the first rectangular grid in the first row.
[0098] The conversion process of the other rectangular grids except the first rectangular grid in the first row in the rectangular grid processing data also refers to the conversion process for the first rectangular grid in the first row. When all the rectangular grids in the rectangular grid processing data have completed the regular polygon grid conversion process, the regular polygon grid processing data can be obtained.
[0099] In one embodiment, the formula corresponding to the grid center coordinate adjustment strategy is: ij =x ij -[y ij -(y ij &1)] / 2 and Y ij = y ij ; Among them, (x ij ,y ij ) represents the center coordinates of the rectangular grid of the jth rectangular grid in the i-th row in the rectangular grid processing data, (X ij , Y ij) represents the regular polygon grid center coordinates obtained by correspondingly converting the rectangular grid center coordinates of the j-th rectangular grid in the i-th row of the rectangular grid processing data based on the grid center coordinate adjustment strategy; when determining the rectangular grid center coordinates of each rectangular grid in the rectangular grid processing data, the upper left corner vertex position of the converted two-dimensional map data is used as the origin of the plane rectangular coordinate system, the direction from the upper left corner vertex of the two-dimensional map data to be converted as the starting point and toward the upper right corner vertex is the positive direction of the horizontal axis of the plane rectangular coordinate system, and the direction from the upper left corner vertex of the two-dimensional map data to be converted as the starting point and toward the lower left corner vertex is the positive direction of the longitudinal axis of the plane rectangular coordinate system;
[0100] The formula corresponding to the grid side length adjustment strategy is: ij = l ij / 3 0.5 ; Among them, l ij represents the grid side length of the j-th rectangular grid in the i-th row of the rectangular grid processing data, L ij It represents the grid side length of the regular polygon obtained after the grid side length of the j-th rectangular grid in the i-th row in the rectangular grid processing data is converted based on the grid side length adjustment strategy.
[0101] In this embodiment, if it is assumed that the rectangular grid processing data is divided into N1*M1 (where M1 is a positive integer and can represent the total number of rows of the horizontal area in the two-dimensional map data to be converted) rectangular grids, the value range of i is 1-M1 and the value range of j is 1-N1. For example, still taking the first rectangular grid in the first row of the rectangular grid processing data as an example, the rectangular grid center coordinates of the rectangular grid are (x 11 ,y 11 ), then X 11 = x 11 -[y 11 -(y 11 &1)] / 2 and Y 11 =y 11 .
[0102] When the plane rectangular coordinate system is constructed with the origin of the plane rectangular coordinate system as the coordinate origin, a Cartesian coordinate system on a two-dimensional plane can be constructed, which is described by Cartesian coordinates. ij &1 is a bitwise operation, which means taking y ijThe result of this operation can only be 0 or 1, depending on whether y is even or odd. In the Cartesian coordinate system, the coordinates of each hexagonal grid are integers, but these integers are not evenly distributed. Instead, they are arranged in a special way so that the neighbors of each hexagonal grid have integer coordinates. The above arrangement leads to a result that the hexagons in the even and odd rows are not aligned in the x-axis direction. Specifically, the hexagons in the even rows are offset to the right by half a hexagon width than the hexagons in the odd rows.
[0103] The obstacle region mapping unit 140 is used to obtain the obstacle region to be converted in the two-dimensional map data to be converted, and map the obstacle region to be converted to the regular polygon grid processing data to update the regular polygon grid processing data.
[0104] In this embodiment, after the conversion of the two-dimensional map data to be converted into regular polygonal grid processing data is completed, the obstacle area to be converted in the two-dimensional map data to be converted can also be obtained and mapped to the regular polygonal grid processing data. Figure 6 The grayscale area composed of multiple grayscale regular hexagonal grids in the regular polygonal grid processing data shown corresponds to Figure 1 The obstacle area to be converted is shown as a plurality of grayscale rectangular grids. It can be seen that after the above processing, based on the angle of regular polygons such as regular hexagons, the drone can choose more directions and cover a wider range when performing low-altitude signal detection, which is conducive to improving the recognition accuracy; and the regular polygon grids are more closely combined and have stronger adhesion, which makes the interval segmentation of the low-altitude area more accurate, which is conducive to the customization and modularization of the drone work and shortening the response time.
[0105] In one embodiment, the obstacle area mapping unit 140 is specifically used for:
[0106] Acquire a plurality of rectangular grids corresponding to the obstacle area to be converted in the rectangular grid processing data to form a target rectangular grid set;
[0107] Acquire a target regular polygon grid set corresponding to the target rectangular grid set in the regular polygon grid processing data;
[0108] Obstacle areas are marked for areas corresponding to the target regular polygon grid set in the regular polygon grid processing data to update the regular polygon grid processing data.
[0109] In this embodiment, when mapping the obstacle area to be converted in the two-dimensional map data to be converted into the regular polygonal grid processing data, firstly, a plurality of rectangular grids corresponding to the obstacle area to be converted in the rectangular grid processing data are required to form a target rectangular grid set (for example, reference may be made to Figure 1 Then, the target regular polygon grid set is formed by searching the target regular polygon grid set for each target rectangular grid in the target rectangular grid set in the regular polygon grid processing data, thereby forming a target regular polygon grid set. Finally, the obstacle area is marked in the area corresponding to the target regular polygon grid set in the regular polygon grid processing data, thereby obtaining the following: Figure 6 Regular polygon raster processing data with obstacle areas identified is shown.
[0110] In one embodiment, the low altitude path coordinate conversion device 100 further includes:
[0111] The coordinate restoration unit is used to restore the regular polygon grid processing data based on a preset regular polygon grid restoration strategy corresponding to the preset regular polygon grid conversion strategy to obtain current rectangular grid processing data if a low-altitude interface coordinate restoration instruction is detected.
[0112] In this embodiment, for example, the corresponding regular polygon grid in the regular polygon grid processing data is a regular hexagon grid (that is, the regular polygon grid processing data is specifically regular hexagon grid processing data), and the preset regular polygon grid restoration strategy corresponding to the preset regular polygon grid conversion strategy is the preset regular hexagon grid restoration strategy. Continuing to restore the first regular hexagon grid in the first row of the regular hexagon grid processing data to a rectangular grid as an example, the formula corresponding to the grid center coordinate restoration strategy in the preset regular hexagon grid restoration strategy is x ij =X ij +[Y ij -(Y ij &1)] / 2 and yy ij = Y ij ; and the formula corresponding to the grid edge length restoration strategy in the preset regular hexagon grid restoration strategy is ll ij =L ij ; Among them, (X ij , Y ij ) represents the rectangular grid center coordinates of the regular hexagonal grid in the i-th row and the j-th regular hexagonal grid in the regular hexagonal grid processing data, (xx ij ,yy ij ) represents the rectangular grid center coordinates obtained by converting the regular hexagonal grid in the i-th row and the j-th regular hexagonal grid in the regular hexagonal grid processing data based on the grid center coordinate restoration strategy, L ijrepresents the grid side length of the j-th regular hexagonal grid in the i-th row of the regular hexagonal grid processing data, ll ij It represents the side length of the regular hexagonal grid in the i-th row and the j-th regular hexagonal grid in the regular hexagonal grid processing data, which is converted into the side length of the rectangular grid based on the grid side length restoration strategy.
[0113] The coordinate and side length restoration conversion process of other regular hexagonal grids except the first regular hexagonal grid in the first row in the regular hexagonal grid processing data also refers to the coordinate and side length restoration conversion process for the first regular hexagonal grid in the first row. When all the regular hexagonal grids in the regular hexagonal grid processing data have completed the coordinate and side length restoration conversion process, the current rectangular grid processing data can be obtained.
[0114] It can be seen that the implementation example of the device can divide the target area of the low-altitude interface into regular polygon grids, and the regular polygon grids are more tightly combined and have stronger adhesion, so the interval segmentation of the low-altitude area is more accurate; based on more angles of regular polygons, the drone has more selectable directions and a wider coverage range when performing low-altitude signal detection, which is conducive to improving recognition accuracy.
[0115] The low altitude path coordinate conversion device can be implemented in the form of a computer program. Fig. 9 Runs on the computer device shown.
[0116] See also Fig. 9 , Fig. 9 400 is a schematic block diagram of a computer device provided by an embodiment of the present invention. The computer device 400 integrates any low-altitude path coordinate conversion device provided by an embodiment of the present invention.
[0117] See also Fig. 9 The computer device 400 includes a processor 402 , a memory and a network interface 405 connected via a system bus 401 , wherein the memory may include a storage medium 403 and an internal memory 404 .
[0118] The storage medium 403 may store an operating system 4031 and a computer program 4032. The computer program 4032 includes program instructions, and when the program instructions are executed, the processor 402 may execute the low-altitude path coordinate conversion method.
[0119] The processor 402 is used to provide computing and control capabilities to support the operation of the entire computer device.
[0120] The internal memory 404 provides an environment for the operation of the computer program 4032 in the storage medium 403. When the computer program 4032 is executed by the processor 402, the processor 402 can execute the above-mentioned low-altitude path coordinate conversion method.
[0121] The network interface 405 is used to communicate with other devices over the network. Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include Fig. 9 More or fewer components may be shown, or certain components may be combined, or may have a different arrangement of components.
[0122] The processor 402 is used to run a computer program 4032 stored in a memory to implement the low-altitude path coordinate conversion method.
[0123] It should be understood that in the embodiment of the present invention, the processor 402 may be a central processing unit (CPU), and the processor 402 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0124] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.
[0125] Therefore, the present invention also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the low-altitude path coordinate conversion method.
[0126] The storage medium may be any computer-readable storage medium that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk.
[0127] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0128] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0129] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0130] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.
[0131] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A low-altitude path coordinate conversion method, characterized in that: include: In response to a low-altitude interface coordinate conversion instruction, acquiring an area to be converted corresponding to the low-altitude interface coordinate conversion instruction and two-dimensional map data to be converted corresponding to the area to be converted; The two-dimensional map data to be converted is subjected to normalized rectangular grid processing to obtain rectangular grid processing data; Each rectangular grid in the rectangular grid processing data is converted into a regular polygon grid based on a preset regular polygon grid conversion strategy to form regular polygon grid processing data; wherein the total number of sides corresponding to the regular polygon grid is greater than 4; Obtaining an obstacle area to be converted in the two-dimensional map data to be converted, and mapping the obstacle area to be converted to the regular polygon grid processing data to update the regular polygon grid processing data; The preset regular polygon grid conversion strategy is a regular hexagon grid conversion strategy; and each rectangular grid in the rectangular grid processing data is converted into a regular polygon grid based on the preset regular polygon grid conversion strategy to form the regular polygon grid processing data, including: For each rectangular grid in the rectangular grid processing data, correspondingly obtaining the rectangular grid center coordinates and the rectangular grid side length; The rectangular grid center coordinates of each rectangular grid in the rectangular grid processing data are converted based on the grid center coordinate adjustment strategy in the regular hexagonal grid conversion strategy to obtain the regular polygon grid center coordinates corresponding to the rectangular grid center coordinates; The rectangular grid side length of each rectangular grid in the rectangular grid processing data is converted and adjusted accordingly based on the grid side length adjustment strategy in the regular hexagonal grid conversion strategy to obtain the regular polygon grid side length corresponding to the side length of each rectangular grid; Generate the regular polygon grid processing data corresponding to the rectangular grid processing data based on the regular polygon grid center coordinates and the regular polygon grid side lengths obtained by converting each rectangular grid in the rectangular grid processing data; The formula corresponding to the grid center coordinate adjustment strategy is: ij =x ij -[y ij -(y ij &1)] / 2 and Y ij = y ij ; Among them, (x ij ,y ij ) represents the center coordinates of the rectangular grid of the jth rectangular grid in the i-th row in the rectangular grid processing data, (X ij , Y ij ) represents the regular polygon grid center coordinates obtained by correspondingly converting the rectangular grid center coordinates of the j-th rectangular grid in the i-th row of the rectangular grid processing data based on the grid center coordinate adjustment strategy; when determining the rectangular grid center coordinates of each rectangular grid in the rectangular grid processing data, the upper left corner vertex position of the converted two-dimensional map data is used as the origin of the plane rectangular coordinate system, the direction from the upper left corner vertex of the two-dimensional map data to be converted as the starting point and toward the upper right corner vertex is the positive direction of the horizontal axis of the plane rectangular coordinate system, and the direction from the upper left corner vertex of the two-dimensional map data to be converted as the starting point and toward the lower left corner vertex is the positive direction of the longitudinal axis of the plane rectangular coordinate system; The determining of the rectangular grid center coordinates of each rectangular grid includes: constructing a Cartesian coordinate system on a two-dimensional plane.
2. The method according to claim 1, characterized in that The step of performing normalized rectangular grid processing on the two-dimensional map data to be converted to obtain rectangular grid processed data includes: A normalized square grid with a preset side length is obtained, and normalized rectangular grid processing is performed on the two-dimensional map data to be converted based on the normalized square grid to obtain the rectangular grid processed data.
3. The method according to claim 2, characterized in that The step of performing normalized rectangular grid processing on the two-dimensional map data to be converted based on the normalized square grid to obtain the rectangular grid processed data includes: Obtaining the upper left corner vertex position of the two-dimensional map data to be converted and using it as the origin of the plane rectangular coordinate system; A plane rectangular coordinate system is constructed with the origin of the plane rectangular coordinate system as the origin of the coordinates; wherein the direction from the upper left corner vertex of the two-dimensional map data to be converted as the starting point and toward the upper right corner vertex is the positive direction of the horizontal axis of the plane rectangular coordinate system, and the direction from the upper left corner vertex of the two-dimensional map data to be converted as the starting point and toward the lower left corner vertex is the positive direction of the longitudinal axis of the plane rectangular coordinate system; According to a preset traversal strategy, the two-dimensional map data to be converted, which is constructed with a plane rectangular coordinate system, is subjected to normalized rectangular grid processing to obtain the rectangular grid processing data; wherein the preset traversal strategy includes a horizontal traversal sub-strategy and a vertical traversal sub-strategy, the horizontal traversal sub-strategy is used to perform normalized rectangular grid processing on the normalized square grid in the current horizontal area from left to right, and the vertical traversal sub-strategy is used to move the normalized square grid to the first position on the left in the next adjacent horizontal area in the two-dimensional map data to be converted after completing the normalized rectangular grid processing of the current horizontal area.
4. The method according to claim 3, characterized in that The step of mapping the obstacle area to be converted to the regular polygon grid processing data to update the regular polygon grid processing data includes: Acquire a plurality of rectangular grids corresponding to the obstacle area to be converted in the rectangular grid processing data to form a target rectangular grid set; Acquire a target regular polygon grid set corresponding to the target rectangular grid set in the regular polygon grid processing data; Obstacle areas are marked for areas corresponding to the target regular polygon grid set in the regular polygon grid processing data to update the regular polygon grid processing data.
5. The method according to claim 1, characterized in that: The formula corresponding to the grid side length adjustment strategy is: ij = l ij / 3 0.5 ; Among them, l ij represents the grid side length of the j-th rectangular grid in the i-th row of the rectangular grid processing data, L ij It represents the grid side length of the regular polygon obtained after the grid side length of the j-th rectangular grid in the i-th row in the rectangular grid processing data is converted based on the grid side length adjustment strategy.
6. The method according to any one of claims 1 to 5, characterized in that: After the step of obtaining the obstacle area to be converted in the two-dimensional map data to be converted, and mapping the obstacle area to be converted to the regular polygon grid processing data to update the regular polygon grid processing data, the method further includes: If a low-altitude interface coordinate restoration instruction is detected, the regular polygon grid processing data is restored based on a preset regular polygon grid restoration strategy corresponding to the preset regular polygon grid conversion strategy to obtain current rectangular grid processing data.
7. A low altitude path coordinate conversion device, characterized in that: include: The to-be-converted data acquisition unit is used to respond to the low-altitude interface coordinate conversion instruction and acquire the to-be-converted area corresponding to the low-altitude interface coordinate conversion instruction and the to-be-converted two-dimensional map data corresponding to the to-be-converted area; A rectangular grid processing unit, used for performing normalized rectangular grid processing on the two-dimensional map data to be converted to obtain rectangular grid processed data; A regular polygon grid processing unit, used for converting each rectangular grid in the rectangular grid processing data into a regular polygon grid based on a preset regular polygon grid conversion strategy to form regular polygon grid processing data; wherein the total number of sides corresponding to the regular polygon grid is greater than 4; An obstacle region mapping unit is used to obtain the obstacle region to be converted in the two-dimensional map data to be converted, and map the obstacle region to be converted to the regular polygon grid processing data to update the regular polygon grid processing data; The preset regular polygon grid conversion strategy is a regular hexagon grid conversion strategy, and the regular polygon grid processing unit is specifically used for: For each rectangular grid in the rectangular grid processing data, correspondingly obtaining the rectangular grid center coordinates and the rectangular grid side length; The rectangular grid center coordinates of each rectangular grid in the rectangular grid processing data are converted based on the grid center coordinate adjustment strategy in the regular hexagonal grid conversion strategy to obtain the regular polygon grid center coordinates corresponding to the rectangular grid center coordinates; The rectangular grid side length of each rectangular grid in the rectangular grid processing data is converted and adjusted accordingly based on the grid side length adjustment strategy in the regular hexagonal grid conversion strategy to obtain the regular polygon grid side length corresponding to the side length of each rectangular grid; Generate the regular polygon grid processing data corresponding to the rectangular grid processing data based on the regular polygon grid center coordinates and the regular polygon grid side lengths obtained by converting each rectangular grid in the rectangular grid processing data; The formula corresponding to the grid center coordinate adjustment strategy is: ij =x ij -[y ij -(y ij &1)] / 2 and Y ij = y ij ; Among them, (x ij ,y ij ) represents the center coordinates of the rectangular grid of the jth rectangular grid in the i-th row in the rectangular grid processing data, (X ij , Y ij ) represents the regular polygon grid center coordinates obtained by correspondingly converting the rectangular grid center coordinates of the j-th rectangular grid in the i-th row of the rectangular grid processing data based on the grid center coordinate adjustment strategy; when determining the rectangular grid center coordinates of each rectangular grid in the rectangular grid processing data, the upper left corner vertex position of the converted two-dimensional map data is used as the origin of the plane rectangular coordinate system, the direction from the upper left corner vertex of the two-dimensional map data to be converted as the starting point and toward the upper right corner vertex is the positive direction of the horizontal axis of the plane rectangular coordinate system, and the direction from the upper left corner vertex of the two-dimensional map data to be converted as the starting point and toward the lower left corner vertex is the positive direction of the longitudinal axis of the plane rectangular coordinate system; The method of determining the center coordinates of each rectangular grid includes: constructing a Cartesian coordinate system on a two-dimensional plane.
8. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the low-altitude path coordinate conversion method as described in any one of claims 1-6 when executing the computer program.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor, the low-altitude path coordinate conversion method according to any one of claims 1 to 6 can be implemented.
Citation Information
Patent Citations
Rendering method and device based on rectangular grid, and computer readable storage medium
CN108009281A