Road data processing method, device and electronic device
Through the discretization and denoising of road data, adapting to different expression methods and scenarios, the unified processing of road data is achieved, the problem of processing difficulties in the existing technology is solved, and the efficiency and quality of data processing are improved.
Patent Information
- Application Number
- CN202111015441.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-31
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2041-08-31
AI Technical Summary
The prior art is difficult to effectively process road data in different expressions, which leads to difficulty in processing road data in office automation design and affects design implementation.
By obtaining the original road data, dispersing and denoising processing, streamlined road data is obtained, and streamlined data is used for road fitting, adapting to a variety of expressions and scenarios.
It simplifies the road data processing process, reduces complexity and cost, improves processing efficiency and quality, and is suitable for infrastructure industry and photovoltaic power station design.
Smart Images

Figure CN113742801B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of data processing technology, and in particular to a method, device and electronic device for processing road data. Background Art
[0002] With the advancement of science and technology and the popularization of computers in all walks of life, office automation software has developed rapidly in recent years. In photovoltaic power station design and other infrastructure industries, road data is mostly presented in the form of drawings. When designing office automation for road data, it is necessary to process the road data in the drawings. Due to different drawing methods, drawing scenes and drawing habits, there are many ways to express road data in existing drawings, such as drawing roads with a single line, drawing roads with two lines, drawing roads with three lines, and overlapping or approximately overlapping road data. Therefore, there are difficulties in processing road data, which affects the realization of office automation design. Summary of the invention
[0003] The embodiments of the present invention provide a method, device and electronic device for processing road data to adapt to road data in different expressions, reduce the difficulty of processing road data, and facilitate the realization of office automation design.
[0004] In a first aspect, an embodiment of the present invention provides a method for processing road data, comprising:
[0005] Acquire original road data, wherein the original road data includes original coordinate points of the road;
[0006] Discretizing the original road data to obtain discrete road data; wherein the discrete road data includes discrete coordinate points of the road, and the number of the discrete coordinate points is greater than the number of the original coordinate points;
[0007] Performing denoising processing on the discrete road data to remove redundant discrete coordinate points to obtain simplified road data; wherein the simplified road data includes simplified coordinate points of the road, and the number of the simplified coordinate points is less than the number of the discrete coordinate points;
[0008] The simplified road data is used to perform road fitting.
[0009] Optionally, the denoising process includes:
[0010] According to the discrete coordinate points of each road, a single road self-denoising process is performed to remove the redundant discrete coordinate points in each single road;
[0011] The discrete coordinate points of the at least two roads after the self-denoising process are used to perform road linkage denoising process to remove the redundant discrete coordinate points in the at least two roads and merge the at least two roads.
[0012] Optionally, the single road self-denoising process includes:
[0013] Selecting one of the discrete coordinate points on the single road as a first target coordinate point in sequence according to a first preset order;
[0014] A first preset range is determined based on the first target coordinate point, and the discrete coordinate points within the first preset range are merged to obtain simplified coordinate points of the single road.
[0015] Optionally, fusing the discrete coordinate points within the first preset range includes at least one of the following steps:
[0016] Selecting any point within the first preset range as the simplified coordinate point, and filtering out the other discrete coordinate points within the first preset range except the simplified coordinate point;
[0017] Calculating a weighted average of the discrete coordinate points within the first preset range to obtain the simplified coordinate points;
[0018] And, calculating the mean square error of the discrete coordinate points within the first preset range, selecting the discrete coordinate point with the smallest difference from the mean square error as the simplified coordinate point, and filtering out the other discrete coordinate points within the first preset range except the simplified coordinate point.
[0019] Optionally, the first preset order includes at least one of the following orders:
[0020] Starting from the coordinates of one endpoint of the single road and ending at the coordinates of the other endpoint of the single road;
[0021] Starting from the discrete coordinate point between the two end point coordinates of the single road and ending at the two end point coordinates of the single road respectively;
[0022] Select the discrete coordinate point with the largest value in a single road as the starting coordinate point, and the discrete coordinate point with the smallest value as the ending coordinate point; start from the starting coordinate point and end at the ending coordinate point;
[0023] Also, the discrete coordinate point with the smallest value in a single road is selected as the starting coordinate point, and the discrete coordinate point with the largest value is selected as the ending coordinate point; starting from the starting coordinate point and ending at the ending coordinate point.
[0024] Optionally, the first preset range is a circle with the first target coordinate point as the center and a first preset scale as the radius;
[0025] Alternatively, the first preset range is a square with the first target coordinate point as the center and a first preset scale as the side length.
[0026] Optionally, the road linkage denoising process includes:
[0027] Selecting one of the discrete coordinate points on a road as a second target coordinate point in sequence according to a second preset order;
[0028] A second preset range is determined based on the second target coordinate point, and the discrete coordinate points within the second preset range are merged to obtain linkage simplified coordinate points of the at least two roads.
[0029] Optionally, before performing denoising on the discrete road data, the method further includes:
[0030] Gridding the area covered by the original road data to obtain grids arranged in an array;
[0031] The discrete road data is subjected to denoising processing, comprising:
[0032] Selecting a grid having the discrete coordinate points as a first target processing grid;
[0033] The discrete coordinate points in the first target processing grid are merged to obtain the simplified coordinate points corresponding to the first target processing grid.
[0034] Optionally, using the simplified road data to perform road fitting includes:
[0035] Selecting one of the grids having the simplified coordinate points as the second target processing grid in sequence according to a third preset order;
[0036] A third preset range is determined based on the second target processing grid, and the grid with the simplified coordinate point within the third preset range is determined as a valid grid; and the second target processing grid and the valid grid closest to the second target processing grid are connected.
[0037] Optionally, using the simplified road data to perform road fitting includes:
[0038] Selecting one of the simplified coordinate points as the third target coordinate point in sequence according to a fourth preset order;
[0039] A fourth preset range is determined based on the third target coordinate point, the simplified coordinate point closest to the third target coordinate point in the fourth preset range is determined as a valid coordinate point, and the third target coordinate point and the valid coordinate point are connected.
[0040] In a second aspect, an embodiment of the present invention further provides a road data processing device, including:
[0041] An original data acquisition module, used to acquire original road data, wherein the original road data includes original coordinate points of the road;
[0042] A discretization module, used for discretizing the original road data to obtain discrete road data; wherein the discrete road data includes discrete coordinate points of the road, and the number of the discrete coordinate points is greater than the number of the original coordinate points;
[0043] A denoising module, configured to perform denoising processing on the discrete road data to remove redundant discrete coordinate points to obtain simplified road data; wherein the simplified road data includes simplified coordinate points of the road, and the number of the simplified coordinate points is less than the number of the discrete coordinate points;
[0044] A fitting module is used to perform road fitting using the simplified road data.
[0045] In a third aspect, an embodiment of the present invention further provides an electronic device, including:
[0046] one or more processors;
[0047] a storage device for storing one or more programs,
[0048] When the one or more programs are executed by the one or more processors, the one or more processors implement the road data processing method as described in any embodiment of the present invention.
[0049] The embodiment of the present invention first discretizes the original road data, then denoises it, and finally restores it to a road. Among them, the discrete road data is denoised to remove redundant discrete coordinate points, which is conducive to the unification of road denoising processing and is applicable to various expressions of road data. For example, for roads drawn with a single line, the coordinate points on the single line can be retained; for roads drawn with two lines or three lines, the two lines or three lines can be merged into a single line representation; for situations where road data overlaps or approximately overlaps, the roads can be merged. Therefore, the embodiment of the present invention does not need to process road data in different situations for different road data expressions, and the embodiment of the present invention is not limited by the road data expression. Similarly, the embodiment of the present invention does not need to process road data in different scenarios for different application scenarios, and the embodiment of the present invention is not limited by the application scenario and can be applied to road data processing in the infrastructure industry and road data processing in photovoltaic power station design. In summary, the embodiment of the present invention simplifies the process of road data processing, reduces the complexity of road data processing, and improves the efficiency and quality of road data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A schematic flow chart of a method for processing road data provided by an embodiment of the present invention;
[0051] Figure 2 A schematic diagram of the effects of each step of a road data processing method provided by an embodiment of the present invention;
[0052] Figure 3-Figure 5 Different road data expressions provided by embodiments of the present invention;
[0053] Figure 6 A schematic flow chart of another method for processing road data provided by an embodiment of the present invention;
[0054] Figure 7 A schematic diagram of the effects of another road data processing method provided by an embodiment of the present invention implemented in each step;
[0055] Figure 8 A schematic flow chart of another method for processing road data provided by an embodiment of the present invention;
[0056] Figure 9-12 A schematic diagram of the effects of implementing another method for processing road data in each step provided by an embodiment of the present invention;
[0057] Fig.13 A schematic diagram of road merging provided by an embodiment of the present invention;
[0058] Fig.14 A schematic diagram of the structure of a road data processing device provided by an embodiment of the present invention;
[0059] Fig.15 A schematic diagram of the structure of a server provided in Embodiment 6 of the present invention. DETAILED DESCRIPTION
[0060] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0061] The embodiment of the present invention provides a method for processing road data, which is applicable to office automation software such as photovoltaic design software and infrastructure design software, and the office automation software can be installed in electronic devices such as computers and tablet computers. The method is executed by a road data processing device, which can be implemented by hardware and / or software.
[0062] Figure 1 A schematic diagram of a process flow of a road data processing method provided by an embodiment of the present invention, Figure 2 A schematic diagram of the effects of each step of a road data processing method provided by an embodiment of the present invention. Figure 1 and Figure 2 , the road data processing method includes the following steps:
[0063] S110: Acquire original road data, where the original road data includes original coordinate points of the road.
[0064] Taking photovoltaic design software as an example, when designing a photovoltaic power station, at least part of the collector line needs to be laid along the road to obtain the best connection result. At this time, the road data needs to be processed to facilitate the route planning of the collector line.
[0065] The original road data can be obtained by importing the road data from drawings in other tools or software into the photovoltaic design software. However, due to the differences in drawing methods, drawing scenes and drawing habits, there are many ways to express road data. Figure 3-Figure 5 The different road data expressions provided by the embodiments of the present invention are as follows. Figure 3 As shown, a road in the original road data includes the coordinate points of a line; Figure 4 As shown, a road in the original road data includes coordinate points of two lines; Figure 5 As shown in FIG. 1 , a road in the original road data includes coordinate points of three lines, and there are situations where the roads overlap or nearly overlap. In this embodiment, a line is treated as a road for processing, such as Figure 2As shown, a road includes line segment 11, line segment 12, line segment 13 and line segment 14, each line segment is represented by two coordinate points, these coordinate points are collectively referred to as original coordinate points, and the original coordinate points between two line segments coincide.
[0066] S120: discretize the original road data to obtain discrete road data.
[0067] The discrete road data includes discrete coordinate points of the road, and the number of discrete coordinate points is greater than the number of original coordinate points, providing a processable target for the denoising process in the subsequent steps. In the process of road discretization, it is set to discretize with the second preset scale r2, that is, new coordinate points are added on each line segment with the second preset scale r2 as the step size. The original coordinate points and the newly added coordinate points are collectively referred to as discrete coordinate points.
[0068] S130: De-noising the discrete road data to remove redundant discrete coordinate points to obtain simplified road data.
[0069] The simplified road data includes simplified coordinate points of the road, and the number of simplified coordinate points is less than the number of discrete coordinate points. In the discrete road data, there are a large number of redundant discrete coordinate points. For example, if at least two discrete coordinate points overlap or are too close to each other, they can be considered to be of the same type, and only one discrete coordinate point of the same type is retained. Figure 2 The four discrete coordinate points in area 10 are very close and can be merged into one coordinate point. This processing method can be called fuzzy processing or clustering processing, which can reduce the amount of data without affecting the accuracy of data processing. It is set that during the denoising process, the coordinate points are simplified with a first preset scale r1. Exemplarily, there is only one simplified coordinate point in a circle with the simplified coordinate point as the center and the first preset scale r1 as the radius. Therefore, the first preset scale r1 is smaller than the distance between two simplified coordinate points.
[0070] S140: Use simplified road data to perform road fitting.
[0071] Among them, road fitting refers to connecting discrete coordinate points and restoring discrete coordinate points into roads.
[0072] The embodiment of the present invention first discretizes the original road data, then denoises it, and finally restores it to a road. Among them, the discrete road data is denoised to remove redundant discrete coordinate points, which is conducive to the unification of road denoising processing and is applicable to various expressions of road data. For example, for roads drawn with a single line, the coordinate points on the single line can be retained; for roads drawn with two lines or three lines, the two lines or three lines can be merged into a single line representation; for situations where road data overlaps or approximately overlaps, the roads can be merged. Therefore, the embodiment of the present invention does not need to process road data in different situations for different road data expressions, and the embodiment of the present invention is not limited by the road data expression. Similarly, the embodiment of the present invention does not need to process road data in different scenarios for different application scenarios, and the embodiment of the present invention is not limited by the application scenario and can be applied to road data processing in the infrastructure industry and road data processing in photovoltaic power station design. In summary, the embodiment of the present invention simplifies the process of road data processing, reduces the complexity of road data processing, and improves the efficiency and quality of road data processing.
[0073] In the above embodiments, there are many ways to implement the denoising process for discrete road data, several of which are described below, but are not intended to limit the present invention.
[0074] Figure 6 A schematic diagram of a flow chart of another method for processing road data provided by an embodiment of the present invention, Figure 7 A schematic diagram of the effects of another road data processing method provided by an embodiment of the present invention in each step. Figure 6 and Figure 7 In another embodiment of the present invention, optionally, the method for processing road data includes the following steps:
[0075] S210: Acquire original road data, where the original road data includes original coordinate points of the road.
[0076] The original road data may include data of only one road, data of two roads, or data of multiple roads. In practical applications, the original road data mainly includes data of multiple roads. Figure 6 As an example, the original road data includes original coordinate points of three horizontal roads and three vertical roads.
[0077] S220: discretize the original road data to obtain discrete road data.
[0078] Exemplarily, each road is discretized with the second preset scale r2. For most discrete coordinate points, the distance between adjacent discrete coordinate points is the second preset scale r2. For example, for the first horizontal road counted from left to right, the upper end point is used as the starting coordinate point for discretization, and one coordinate point is added every second preset scale r2 until the distance between the newly added coordinate point and the lower end point is less than the second preset scale r2. The original coordinate points and the newly added coordinate points are collectively referred to as discrete coordinate points. Except that the distance between the last two discrete coordinate points is less than the second preset scale r2, the distances between other adjacent coordinate points are all the second preset scale r2.
[0079] S230, performing denoising processing on discrete road data includes S231 and S232.
[0080] S231. Performing a self-noise removal process on a single road according to the discrete coordinate points of each road to remove redundant discrete coordinate points in each single road.
[0081] The self-denoising of a single road means that the denoising is performed only on the discrete coordinate points of each road itself without considering the discrete coordinate points of other roads. Exemplarily, the self-denoising of a single road includes: firstly, a discrete coordinate point is determined as the first target coordinate point for the selected single road according to a first preset order. The first preset order may be from the coordinate of one end point of the single road to the coordinate of the other end point of the single road, and then Figure 7 For example, the first preset order can be from top to bottom, from bottom to top, from left to right or from right to left. The first preset order can also start from the discrete coordinate point between the two endpoint coordinates of a single road and end at the two endpoint coordinates of the single road. The first preset order can also be determined according to the numerical values of the discrete coordinate points. If the discrete coordinate point with the largest value in a single road is selected as the starting coordinate point and the discrete coordinate point with the smallest value is selected as the ending coordinate point, the first preset order can also start from the starting coordinate point and end at the ending coordinate point, or start from the ending coordinate point and end at the starting coordinate point. The numerical comparison of discrete coordinate points can be implemented in a rectangular coordinate system or in a polar coordinate system.
[0082] In the rectangular coordinate system, (x, y) is used to represent discrete coordinate points. The numerical values are compared with x as the first comparison bit and y as the second comparison bit, or y as the first comparison bit and x as the second comparison bit. For example, the discrete coordinate point (2, 2) is greater than the discrete coordinate point (1, 1). In the polar coordinate system, (r, θ) is used to represent discrete coordinate points. The numerical values are compared with r as the first comparison bit and θ as the second comparison bit, or θ as the first comparison bit and r as the second comparison bit. For example, the discrete coordinate point (5, 60°) is greater than the discrete coordinate point (2, 30°).
[0083] Then, the first preset range is determined based on the first target coordinate point, and the discrete coordinate points in the first preset range are merged to obtain the simplified coordinate points of a single road. For example, the first preset range is determined based on the discrete coordinate point A in the first road counted from left to right as the first target coordinate point. The first preset range can be determined using a geometric algorithm, for example, the first preset range can be a circle with the first target coordinate point as the center and the first preset scale r1 as the radius; the first preset range can also be a square with the first target coordinate point as the center and the first preset scale r1 as the side length. Figure 7 For example, a circle with the discrete coordinate point A as the center and the first preset scale r1 as the radius is used as the first preset range of the first target coordinate point.
[0084] The way to fuse the discrete coordinate points within the first preset range may be to select any point within the first preset range as a simplified coordinate point, and filter out other discrete coordinate points within the first preset range except the simplified coordinate point. The way to fuse the discrete coordinate points within the first preset range may also be to calculate the weighted average of the discrete coordinate points within the first preset range to obtain the simplified coordinate point. The way to fuse the discrete coordinate points within the first preset range may also be to calculate the mean square error of the discrete coordinate points within the first preset range, select the discrete coordinate point with the minimum difference from the mean square error as the simplified coordinate point, and filter out other discrete coordinate points within the first preset range except the simplified coordinate point. For example, there are three discrete coordinate points within the first preset range determined with coordinate point A as the center of the circle. Two of the discrete coordinate points are discrete coordinate points on the first road from left to right, so only the weighted average of the two discrete coordinate points is calculated to obtain discrete coordinate point B, and discrete coordinate point B is used as the simplified coordinate point. In this way, the self-denoising process of a single road can be completed, and then other single roads are selected in turn for self-denoising process until the self-denoising process of all single roads is completed.
[0085] S232: using the discrete coordinate points of at least two roads after the self-denoising process, perform road linkage denoising process to remove redundant discrete coordinate points in the at least two roads and merge the at least two roads.
[0086] Among them, the road linkage denoising process refers to comprehensively considering the discrete coordinate points in different roads and performing denoising processes at the same time. Exemplarily, the road linkage denoising process includes: first, determining a discrete coordinate point as the second target coordinate point for a selected road according to a second preset order. The setting method of the second preset order can refer to the setting method of the first preset order, and will not be repeated here. The setting method of the second preset order can be the same as or different from the setting method of the first preset order. For example, a discrete coordinate point in the second road counted from left to right is selected as the second target coordinate point, and after traversing the discrete coordinate points in the road, discrete coordinate points in other roads are selected.
[0087] Then, the second preset range is determined based on the second target coordinate point, and the discrete coordinate points within the second preset range are fused to obtain the linkage simplified coordinate points of at least two roads. The second preset range is used to limit the distance condition for merging at least two roads. The setting method of the second preset range can refer to the setting method of the first preset range, and the setting methods of the second preset range and the first preset range can be the same or different. The fusion method of the discrete coordinate points within the second preset range refers to the fusion method of the discrete coordinate points within the first preset range. The difference is that all discrete coordinate points within the second preset range participate in the fusion. For example, an endpoint coordinate point C in the second road counted from left to right is the second target coordinate point, and the second preset range is set with a circle with a third preset scale r3 as the radius. There are three discrete coordinate points within the second preset range, and these three discrete coordinate points are fused to obtain the linkage simplified coordinate point D. In this way, the linkage denoising process based on one road can be completed, and then other single roads are selected in turn for linkage denoising.
[0088] S240: Use simplified road data to perform road fitting.
[0089] Among them, there are many ways to use simplified road data for road fitting. For example, first, a simplified coordinate point is selected as the third target coordinate point in sequence according to the fourth preset order. The setting method of the fourth preset order can refer to the setting method of the first preset order, and will not be repeated. The setting method of the fourth preset order and the first preset order can be the same or different. Then, the fourth preset range is determined based on the third target coordinate point, and the simplified coordinate point closest to the third target coordinate point in the fourth preset range is determined as a valid coordinate point, and the third target coordinate point and the valid coordinate point are connected. The setting method of the fourth preset range can refer to the setting method of the first preset range, and the setting method of the fourth preset range and the first preset range can be the same or different. For example, the third target coordinate point is the simplified coordinate point E, and the fourth preset range is set with a circle with a radius of the fourth preset scale r4. In addition to the simplified coordinate point E, there is also a simplified coordinate point F in the fourth preset range, and the simplified coordinate point F is a valid coordinate point, and the simplified coordinate point E and the simplified coordinate point F are connected.
[0090] The embodiment of the present invention divides the denoising process into two steps: self-denoising of a single road and road-linked denoising, which is beneficial to avoid processing errors caused by directly using road-linked denoising, thereby facilitating improving the accuracy of road data processing.
[0091] It should be noted that, when the original road data only includes the original road data of one road, it is only necessary to perform the step of self-denoising of the single road, and there is no need to perform the step of road linkage denoising.
[0092] Figure 8 A flowchart of another method for processing road data provided by an embodiment of the present invention is shown below. Figure 9-12 A schematic diagram of the effects of implementing another method for processing road data in each step provided by an embodiment of the present invention. Figure 8-Figure 12 In another embodiment of the present invention, optionally, the method for processing road data includes the following steps:
[0093] S310: Acquire original road data, where the original road data includes original coordinate points of the road.
[0094] S320, gridding the area covered by the original road data to obtain grids arranged in an array, such as Fig. 9 shown.
[0095] S330: discretize the original road data to obtain discrete road data.
[0096] like Fig.10 As shown, the discrete coordinate points are all located in the grid.
[0097] S340: De-noising the discrete road data.
[0098] Among them, the grid can be used to achieve discrete road denoising. Fig.10 and Fig.11 , first select a grid with discrete coordinate points as the first target processing grid. For example, select grid G as the first target processing grid, and grid G includes two discrete coordinate points. Then fuse the discrete coordinate points in grid G to obtain the simplified coordinate points corresponding to the first target processing grid. The fusion method of the discrete coordinate points in the grid refers to the fusion method of the discrete coordinate points within the first preset range. For example, select the center of grid G as the simplified coordinate point. The processing order of the first target processing grid can be set arbitrarily, and the present invention is not limited thereto.
[0099] S350: Use simplified road data to perform road fitting.
[0100] There are many ways to use grids to fit roads. For example, Fig.11 and Fig.12, first select a grid with simplified coordinate points as the second target processing grid in sequence according to the third preset order. The setting method of the third preset order can refer to the setting method of the first preset order, and the setting methods of the second preset order and the first preset order can be the same or different. For example, first select the grid H with discrete coordinate points in the upper left corner as the second processing grid. Determine the third preset range based on the second target processing grid, determine the grid with simplified coordinate points within the third preset range as the valid grid; connect the second target processing grid and the valid grid closest to the second target processing grid. The setting method of the third preset range can refer to the setting method of the first preset range, and the setting method of the third preset range and the first preset range can be the same or different. For example, a circle with the second target processing grid as the center and the fourth preset scale r4 as the radius includes a valid grid I, and connects grid H and grid I. If there is no valid grid within the third preset range, delete the data in grid H.
[0101] It can be seen that the embodiment of the present invention implements the steps of first discretizing the road data, then gridding the data, then using the grid to denoise, and finally restoring the road based on the grid through S310-S350. The grid-based road data processing simplifies the process of road data processing and improves the efficiency and quality of road data processing.
[0102] It should be noted that, in the above embodiments, specific values of the first preset scale r1, the second preset scale r2, the third preset scale r3 and the fourth preset scale r4 can be set as needed, and the present invention does not limit them.
[0103] In the above embodiments, after executing road fitting, the road intersection can be determined based on the number of connection times on the simplified coordinate points. Specifically, the endpoint coordinate points are connected only once, the middle coordinate points of the road are connected twice, and the coordinate points connected three times or more are road intersections.
[0104] Fig.13 A schematic diagram of road merging provided by an embodiment of the present invention. Fig.13 On the basis of the above embodiments, optionally, after the discrete road data is denoised, it further includes: merging two parallel roads whose distance is less than a preset distance into one road. For example, the roads in the drawing include Road 1, Road 2, Road 3, Road 4 and Road 5, wherein a part of the area of Road 4 and a part of the area of Road 5 are parallel and close to each other, less than the preset distance, then these two parts are merged to obtain a corrected road. At this time, the roads in the drawing include Road 1, Road 2, Road 3, Road 4, Road 5 and Road 6. This arrangement further simplifies the road data and improves the efficiency and quality of road data processing.
[0105] An embodiment of the present invention also provides a road data processing device. Fig.14 A schematic diagram of the structure of a road data processing device provided by an embodiment of the present invention. Fig.14 The road data processing device includes an original data acquisition module 410, a discretization module 420, a denoising module 430 and a fitting module 440. The original data acquisition module 410 is used to acquire original road data, and the original road data includes original coordinate points of the road. The discretization module 420 is used to discretize the original road data to obtain discrete road data; wherein the discrete road data includes discrete coordinate points of the road, and the number of discrete coordinate points is greater than the number of original coordinate points. The denoising module 430 is used to denoise the discrete road data to remove redundant discrete coordinate points to obtain simplified road data; wherein the simplified road data includes simplified coordinate points of the road, and the number of simplified coordinate points is less than the number of discrete coordinate points. The fitting module 440 is used to use the simplified road data to perform road fitting.
[0106] Optionally, the denoising module includes a self-denoising processing unit and a linkage denoising processing unit. The self-denoising processing unit is used to perform self-denoising processing on a single road according to the discrete coordinate points of each road, so as to remove redundant discrete coordinate points in each single road. The linkage denoising processing unit is used to perform road linkage denoising processing using the discrete coordinate points of at least two roads after the self-denoising processing, so as to remove redundant discrete coordinate points in at least two roads and merge the at least two roads.
[0107] Optionally, the self-denoising processing unit is also used to select a discrete coordinate point in a single road as a first target coordinate point in sequence according to a first preset order; determine a first preset range based on the first target coordinate point, and merge the discrete coordinate points within the first preset range to obtain a simplified coordinate point of the single road.
[0108] Optionally, fusing the discrete coordinate points within the first preset range includes at least one of the following steps:
[0109] Select any point within the first preset range as a simplified coordinate point, and filter out other discrete coordinate points within the first preset range except the simplified coordinate point;
[0110] Calculate the weighted average of discrete coordinate points within the first preset range to obtain simplified coordinate points;
[0111] And, calculating the mean square error of the discrete coordinate points within the first preset range, selecting the discrete coordinate point with the minimum difference from the mean square error as the simplified coordinate point, and filtering out other discrete coordinate points within the first preset range except the simplified coordinate point.
[0112] Optionally, the first preset order includes at least one of the following orders:
[0113] It starts from the coordinates of one end point of a single road and ends at the coordinates of the other end point of a single road;
[0114] Starting from the discrete coordinate point between the two end point coordinates of a single road, and ending at the two end point coordinates of a single road;
[0115] Select the discrete coordinate point with the largest value in a single road as the starting coordinate point, and the discrete coordinate point with the smallest value as the ending coordinate point; start from the starting coordinate point and end at the ending coordinate point;
[0116] Also, the discrete coordinate point with the smallest value in a single road is selected as the starting coordinate point, and the discrete coordinate point with the largest value is selected as the ending coordinate point; starting from the starting coordinate point and ending at the ending coordinate point.
[0117] Optionally, the first preset range is a circle with the first target coordinate point as the center and the first preset scale as the radius;
[0118] Alternatively, the first preset range is a square with the first target coordinate point as the center and the first preset scale as the side length.
[0119] Optionally, the linkage denoising processing unit is also used to select a discrete coordinate point in a road as a second target coordinate point in sequence according to a second preset order; determine a second preset range based on the second target coordinate point, and merge the discrete coordinate points within the second preset range to obtain linkage simplified coordinate points of at least two roads.
[0120] Optionally, the road data processing device further includes: a gridding module, configured to grid the area covered by the original road data to obtain grids arranged in an array.
[0121] Correspondingly, the denoising module is used to select a grid with discrete coordinate points as a first target processing grid; and fuse the discrete coordinate points in the first target processing grid to obtain simplified coordinate points corresponding to the first target processing grid.
[0122] Correspondingly, the fitting module is used to select a grid with simplified coordinate points as the second target processing grid in sequence according to a third preset order; determine the third preset range based on the second target processing grid, and determine the grid with simplified coordinate points within the third preset range as the valid grid; connect the second target processing grid and the valid grid closest to the second target processing grid.
[0123] Optionally, the fitting module is also used to select a simplified coordinate point as the third target coordinate point in sequence according to a fourth preset order; determine the fourth preset range based on the third target coordinate point, determine the simplified coordinate point closest to the third target coordinate point within the fourth preset range as the valid coordinate point, and connect the third target coordinate point and the valid coordinate point.
[0124] An embodiment of the present invention further provides an electronic device. Fig.15 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Fig.15 The server includes a processor 510, a memory 520, an input device 530, and an output device 540; the number of processors 510 in the server may be one or more. Figure 5 A processor 510 is taken as an example; the processor 510, the memory 520, the input device 530 and the output device 540 in the server can be connected via a bus or other means. Fig.15 The example of connecting through bus is taken in the following.
[0125] The memory 520, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the data caching method in the embodiment of the present invention (for example, the original data acquisition module 410, the discretization module 420, the denoising module 430 and the fitting module 440). The processor 510 executes various functional applications and data processing of the server by running the software programs, instructions and modules stored in the memory 520, that is, implements the above-mentioned data caching method.
[0126] The memory 520 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the server, etc. In addition, the memory 520 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 520 may further include a memory remotely arranged relative to the processor 510, and these remote memories may be connected to the server via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0127] The input device 530 may be used to receive input digital or character information and generate key signal input related to the function control of the server. The output device 540 may include a display device such as a display screen.
[0128] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for processing road data, characterized in that: Applied to photovoltaic design software and infrastructure design software, the method includes: Acquire original road data, the original road data including original coordinate points of the road; wherein one road in the original road data includes coordinate points of one line, two lines or three lines, and each line segment is represented by two coordinate points; Discretizing the original road data to obtain discrete road data; wherein the discrete road data includes discrete coordinate points of the road, and the number of the discrete coordinate points is greater than the number of the original coordinate points; adding new coordinate points on each of the line segments with a second preset scale as a step size, and the original coordinate points and the newly added coordinate points are collectively referred to as discrete coordinate points; De-noising the discrete road data to remove redundant discrete coordinate points to obtain simplified road data; wherein, if at least two discrete coordinate points coincide or the distance between them is less than a set value, only one is retained; the simplified road data includes simplified coordinate points of the road, and the number of the simplified coordinate points is less than the number of the discrete coordinate points; Using the simplified road data to perform road fitting; The denoising process includes: According to the discrete coordinate points of each road, a single road self-denoising process is performed to remove the redundant discrete coordinate points in each single road; The discrete coordinate points of the at least two roads after the self-denoising process are used to perform road linkage denoising process to remove the redundant discrete coordinate points in the at least two roads and merge the at least two roads.
2. The method for processing road data according to claim 1, characterized in that: The single road self-denoising process comprises: Selecting one of the discrete coordinate points on the single road as a first target coordinate point in sequence according to a first preset order; A first preset range is determined based on the first target coordinate point, and the discrete coordinate points within the first preset range are merged to obtain simplified coordinate points of the single road.
3. The method for processing road data according to claim 2, characterized in that: Fusing the discrete coordinate points within the first preset range includes at least one of the following steps: Selecting any point within the first preset range as the simplified coordinate point, and filtering out the other discrete coordinate points within the first preset range except the simplified coordinate point; Calculating a weighted average of the discrete coordinate points within the first preset range to obtain the simplified coordinate points; And, calculating the mean square error of the discrete coordinate points within the first preset range, selecting the discrete coordinate point with the smallest difference from the mean square error as the simplified coordinate point, and filtering out the other discrete coordinate points within the first preset range except the simplified coordinate point.
4. The method for processing road data according to claim 2, characterized in that: The first preset order includes at least one of the following orders: Starting from the coordinates of one endpoint of the single road and ending at the coordinates of the other endpoint of the single road; Starting from the discrete coordinate point between the two end point coordinates of the single road and ending at the two end point coordinates of the single road respectively; Select the discrete coordinate point with the largest value in a single road as the starting coordinate point, and the discrete coordinate point with the smallest value as the ending coordinate point; start from the starting coordinate point and end at the ending coordinate point; Also, the discrete coordinate point with the smallest value in a single road is selected as the starting coordinate point, and the discrete coordinate point with the largest value is selected as the ending coordinate point; starting from the starting coordinate point and ending at the ending coordinate point.
5. The method for processing road data according to claim 2, characterized in that: The first preset range is a circle with the first target coordinate point as the center and a first preset scale as the radius; Alternatively, the first preset range is a square with the first target coordinate point as the center and a first preset scale as the side length.
6. The method for processing road data according to claim 1, characterized in that: Road linkage denoising processing includes: Selecting one of the discrete coordinate points on a road as a second target coordinate point in sequence according to a second preset order; A second preset range is determined based on the second target coordinate point, and the discrete coordinate points within the second preset range are merged to obtain linkage simplified coordinate points of the at least two roads.
7. The method for processing road data according to claim 1, characterized in that: Before performing denoising on the discrete road data, the method further includes: Gridding the area covered by the original road data to obtain grids arranged in an array; The discrete road data is subjected to denoising processing, comprising: Selecting a grid having the discrete coordinate points as a first target processing grid; The discrete coordinate points in the first target processing grid are merged to obtain the simplified coordinate points corresponding to the first target processing grid.
8. The method for processing road data according to claim 7, characterized in that: The simplified road data is used to perform road fitting, including: Selecting one of the grids having the simplified coordinate points as the second target processing grid in sequence according to a third preset order; A third preset range is determined based on the second target processing grid, and the grid with the simplified coordinate point within the third preset range is determined as a valid grid; and the second target processing grid and the valid grid closest to the second target processing grid are connected.
9. The method for processing road data according to claim 1, characterized in that: The simplified road data is used to perform road fitting, including: Selecting one of the simplified coordinate points as the third target coordinate point in sequence according to a fourth preset order; A fourth preset range is determined based on the third target coordinate point, the simplified coordinate point closest to the third target coordinate point in the fourth preset range is determined as a valid coordinate point, and the third target coordinate point and the valid coordinate point are connected.
10. A road data processing device, characterized in that: Applied to photovoltaic design software and infrastructure design software, the device includes: An original data acquisition module is used to acquire original road data, wherein the original road data includes original coordinate points of the road; wherein one road in the original road data includes coordinate points of one line, two lines or three lines, and each line segment is represented by two coordinate points; A discretization module is used to discretize the original road data to obtain discrete road data; wherein the discrete road data includes discrete coordinate points of the road, and the number of the discrete coordinate points is greater than the number of the original coordinate points; new coordinate points are added on each of the line segments with a second preset scale as a step size, and the original coordinate points and the newly added coordinate points are collectively referred to as discrete coordinate points; A denoising module is used to perform denoising on the discrete road data to remove redundant discrete coordinate points and obtain simplified road data; wherein, if at least two discrete coordinate points coincide or the distance between them is less than a set value, only one is retained; the simplified road data includes simplified coordinate points of the road, and the number of the simplified coordinate points is less than the number of the discrete coordinate points; the denoising module includes a self-denoising processing unit and a linkage denoising processing unit; the self-denoising processing unit is used to perform self-denoising on a single road according to the discrete coordinate points of each road to remove redundant discrete coordinate points in each single road; the linkage denoising processing unit is used to perform road linkage denoising using the discrete coordinate points of at least two roads after the self-denoising processing to remove redundant discrete coordinate points in at least two roads and merge at least two roads; A fitting module is used to perform road fitting using the simplified road data.
11. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the road data processing method as described in any one of claims 1-9.
