CN117724850B - Method, system, equipment and medium for evaluating feasibility of field pre-passing path - Google Patents

Method, system, equipment and medium for evaluating feasibility of field pre-passing path Download PDF

Info

Publication number
CN117724850B
CN117724850B CN202410171094.2A CN202410171094A CN117724850B CN 117724850 B CN117724850 B CN 117724850B CN 202410171094 A CN202410171094 A CN 202410171094A CN 117724850 B CN117724850 B CN 117724850B
Authority
CN
China
Prior art keywords
dem
road
slice data
data
vector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410171094.2A
Other languages
Chinese (zh)
Other versions
CN117724850A (en
Inventor
杨岸然
张志群
刘万涛
谢婷萱
王轩
李军
黄亚哲
袁丽红
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin Institute Of Advanced Technology
National University of Defense Technology
Phytium Technology Co Ltd
Original Assignee
Tianjin Institute Of Advanced Technology
National University of Defense Technology
Phytium Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin Institute Of Advanced Technology, National University of Defense Technology, Phytium Technology Co Ltd filed Critical Tianjin Institute Of Advanced Technology
Priority to CN202410171094.2A priority Critical patent/CN117724850B/en
Publication of CN117724850A publication Critical patent/CN117724850A/en
Application granted granted Critical
Publication of CN117724850B publication Critical patent/CN117724850B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The application relates to a method, a system, equipment and a medium for evaluating feasibility of a field pre-passing path, which are used for carrying out parallel calculation according to a preset road width to generate a road buffer area; acquiring corresponding DEM slice data based on road vector data in a road buffer area; projecting and splicing the DEM slice data by adopting a multithreading parallel technology to obtain first DEM slice data; projecting the road vector data into a coordinate system of corresponding first DEM slice data, and cutting the first DEM slice data to obtain second DEM slice data; converting the second DEM slice data into a one-dimensional vector, and calculating according to a gradient percentage formula to obtain gradient information corresponding to the pre-passing path; and carrying out feasibility assessment on the pre-passing path through gradient information. The application realizes high-efficiency processing and accurate analysis of the geographic information.

Description

Method, system, equipment and medium for evaluating feasibility of field pre-passing path
Technical Field
The application relates to the technical field of geographic information, in particular to a method, a system, equipment and a medium for evaluating feasibility of a field pre-passing path.
Background
Currently, the demands of the fields of road planning, environment monitoring, resource development and the like for the feasibility evaluation of the field pre-passing path are continuously increased. However, the conventional path evaluation method often depends on manual investigation, map analysis and expert experience, and has the problems of strong subjectivity, low efficiency, inaccurate data and the like. These problems limit the accuracy and efficiency of pre-traffic path assessment, and thus a more efficient, accurate, automated method is needed to meet the current needs in the art.
As a basic element of topography feature analysis and visualization, the gradient reflects the degree of inclination of a certain point on the ground surface, and is a factor to be considered first for path evaluation, road planning and treatment measure configuration. In the conventional gradient calculation method, serial calculation is mostly adopted, that is, gradient values of pixel units are calculated one by one. However, this serial calculation approach limits the calculation speed when processing large-scale elevation data sets. In addition, in a scenario requiring fast response or real-time, the conventional serial calculation method cannot meet the requirements. In particular, in the context of modern computer hardware having multiple cores and parallel computing capabilities, traditional serial computing methods fail to fully exploit the hardware potential, resulting in computing tasks that become time consuming and inefficient. Therefore, efficient calculation of large-scale elevation data is a technical problem to be solved at present.
Disclosure of Invention
Based on the foregoing, it is necessary to provide a method, a system, a device and a medium for evaluating feasibility of a field pre-passing path, which can efficiently process and accurately analyze geographic information.
A method of assessing feasibility of a pre-transit path in the field, the method comprising:
setting the road width of a pre-passing path, and generating a road buffer area through parallel calculation according to the preset road width;
obtaining DEM slice data corresponding to the road vector data based on the road vector data in the road buffer area;
projecting and splicing the DEM slice data by adopting a multithreading parallel technology to obtain first DEM slice data;
Projecting the road vector data into a coordinate system of the corresponding first DEM slice data, and cutting the first DEM slice data based on the road vector data to obtain second DEM slice data;
converting the second DEM slice data into a one-dimensional vector, and calculating the one-dimensional vector according to a gradient percentage formula to obtain gradient information corresponding to a pre-passing path;
And carrying out feasibility evaluation on the pre-passing path through the gradient information.
In one embodiment, generating the road buffer by parallel calculation according to the preset road width includes:
decomposing the pre-passing path into a plurality of road segments to obtain road vector data of each road segment;
Traversing and processing the road vector data simultaneously by adopting a parallel circulation instruction, wherein the geometric shape of a road buffer area is generated for each road vector data according to a preset road width;
And merging the geometric shapes of all the road buffers into one set to obtain a road buffer set.
In one embodiment, obtaining DEM slice data corresponding to the road vector data based on the road vector data in the road buffer includes:
acquiring each road vector data in the road buffer area set;
Extracting geometric information from each road vector data to obtain the longitude and latitude coordinate range of the minimum circumscribed rectangle of each road polygon;
And determining the line number and the stripe range of the DEM slice data corresponding to each road vector data according to the line number and the stripe mapping relation of the DEM slice data corresponding to each longitude and latitude coordinate range, and obtaining the DEM slice data corresponding to each road vector data.
In one embodiment, the projecting and splicing the DEM slice data by using a multithreading parallel technology to obtain first DEM slice data includes:
Adopting a multithreading technology, respectively distributing a thread for each DEM slice data to carry out projection processing, and converting a geographic coordinate system in each DEM slice data into a projection coordinate system;
determining the sequence of the DEM slice data converted into a projection coordinate system, and sequentially splicing the DEM slice data to obtain first DEM slice data of uniform topography.
In one embodiment, projecting the road vector data to a coordinate system of the corresponding first DEM slice data, and clipping the first DEM slice data based on the road vector data to obtain second DEM slice data includes:
projecting the road vector data into a corresponding projection coordinate system of the first DEM slice data, and then acquiring projection coordinates of four vertexes of the minimum circumscribed rectangle of each road polygon based on the road vector data;
and converting the projection coordinate coverage into a pixel coordinate range, and then cutting the corresponding first DEM slice data based on the pixel coordinate range to obtain second DEM slice data.
In one embodiment, converting the second DEM slice data into a one-dimensional vector, and calculating the one-dimensional vector according to a gradient percentage formula to obtain gradient information corresponding to the pre-passing path, where the method includes:
Dividing the second DEM slice data into a plurality of subareas, and obtaining the elevation values of the central and peripheral pixel points of each subarea;
combining the elevation values of the pixel points with the same relative positions in the plurality of sub-areas based on the set vector length to obtain an elevation value vector;
And inputting the elevation value vector into a NEON register, and calculating through the gradient percentage formula to obtain gradient information corresponding to the pre-passing path.
In one embodiment, the feasibility assessment of the pre-passing path through the gradient information includes:
The gradient information comprises gradient percentages corresponding to coordinates of each pixel point in the second DEM slice data;
judging whether the gradient percentage corresponding to each pixel point coordinate is larger than a threshold value, and marking the raster image pixel corresponding to each pixel point coordinate based on a judging result so as to generate a new raster image;
Cutting the new raster image according to the geometric shape of the preset road width to obtain a cut raster image;
And converting the cut raster image into vector data, and analyzing the feasibility of the pre-passing path based on the vector data.
A field pre-transit path feasibility assessment system, the system comprising:
the buffer zone calculation module is used for setting the road width of the pre-passing path and generating a road buffer zone through parallel calculation according to the preset road width;
the DEM slice data acquisition module is used for acquiring DEM slice data corresponding to the road vector data based on the road vector data in the road buffer area;
the projection splicing module is used for projecting and splicing the DEM slice data by adopting a multithreading parallel technology to obtain first DEM slice data;
the coordinate conversion and clipping module is used for projecting the road vector data into a coordinate system of the corresponding first DEM slice data, clipping the first DEM slice data based on the road vector data, and obtaining second DEM slice data;
The gradient calculation module is used for converting the second DEM slice data into a one-dimensional vector, and calculating the one-dimensional vector according to a gradient percentage formula to obtain gradient information corresponding to the pre-passing path;
And the evaluation analysis module is used for carrying out feasibility evaluation on the pre-passing path through the gradient information.
A computer device comprising a memory storing a computer program and a processor implementing the steps of any one of the methods described above when the processor executes the computer program.
A computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method of any of the preceding claims.
According to the method, the system, the equipment and the medium for evaluating the feasibility of the field pre-passing path, the road width of the pre-passing path is set, and the road buffer area is generated through parallel calculation according to the preset road width; obtaining DEM slice data corresponding to the road vector data based on the road vector data in the road buffer area; projecting and splicing the DEM slice data by adopting a multithreading parallel technology to obtain first DEM slice data; projecting the road vector data into a coordinate system of the corresponding first DEM slice data, and cutting the first DEM slice data based on the road vector data to obtain second DEM slice data; converting the second DEM slice data into one-dimensional vectors, and calculating the one-dimensional vectors according to a gradient percentage formula to obtain gradient information corresponding to the pre-passing path; and carrying out feasibility assessment on the pre-passing path through gradient information.
The invention adopts a multithreading parallel technology to project and splice the DEM slice data so as to provide uniform topographic data; the road vector data are projected into a coordinate system of the corresponding first DEM slice data, and the first DEM slice data are cut based on the road vector data so as to reduce data redundancy; quantifying the terrain gradient information by adopting a gradient percentage calculation method; and converting the second DEM slice data into a one-dimensional vector, and efficiently processing the gradient calculation task by taking the vector as a unit. According to the invention, a plurality of tasks are processed simultaneously by adopting a multithread parallel technology, and the NEON technology is adopted to execute the same type of operation on a plurality of data in the same instruction period, so that the defect of low efficiency of the existing gradient calculation method is overcome, the calculation efficiency is greatly improved, and the accurate and efficient assessment of the traffic condition of a field new planning path is ensured.
Drawings
FIG. 1 is a flow chart of a method for evaluating feasibility of a field pre-traffic path in one embodiment;
FIG. 2 is a schematic diagram of DEM elevation data in one embodiment A pixel sub-region schematic;
FIG. 3 is a schematic diagram of a structural framework of a field pre-transit path feasibility assessment system in one embodiment;
Fig. 4 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
It should be noted that the description as referred to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or data implicitly indicating the indicated technical feature. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present invention, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
In the technical process of realizing the scheme, the inventor finds that the traditional path evaluation method has the problems of strong subjectivity, low efficiency, inaccurate data and the like, and based on the method, the inventor provides a field pre-passing path feasibility evaluation method, and decomposes a computing task into a plurality of subtasks by introducing an OpenMP multithreading technology, and each subtask is executed in parallel on different processor cores, so that the performance and the computing efficiency of a program are remarkably improved. In addition, the NEON technology is used for vectorizing calculation of gradient percentage data, high-performance calculation capability is fully exerted, and efficient processing and accurate analysis of geographic information are realized.
Embodiments of the present invention will be described in detail below with reference to the attached drawings in the drawings of the embodiments of the present invention.
In one embodiment, as shown in fig. 1, a method for evaluating feasibility of a field pre-passing path is provided, including the following steps:
step 202, setting the road width of the pre-traffic path, and generating a road buffer area through parallel calculation according to the preset road width.
It can be understood that, for the pre-traffic road, the road width is set according to the requirement, and then the buffer areas with certain widths are generated on both sides of the road according to the preset road width, so as to ensure that the space is reserved in the specific width range around the road.
Specifically, in order to improve the calculation efficiency, a parallel loop instruction is adopted, a calculation task is decomposed into a plurality of parallel subtasks, line elements are split into line segments, and the line segments are equally distributed to each thread to perform buffer calculation.
Step 204, obtaining DEM slice data corresponding to the road vector data based on the road vector data in the road buffer.
It will be appreciated that road vector data typically comprises an entire data set or layer of a plurality of road vector data, typically used to analyze, visualize and manage geospatial information. The road vector data is a specific road element in the map, such as the geometric shape, length, width, direction, topological relation, etc. of the road, and can be used to represent a single road or road segment. DEM is a digital model for representing the height of the ground, and DEM slice data divides this elevation information into multiple small areas or tiles for more efficient processing and management of the data; each DEM slice data typically represents a particular geographic area, such as a particular latitude and longitude range or a particular terrain area. This slicing approach allows the user to precisely select and process the desired geographic region without having to process the entire data set, thereby improving the operability and efficiency of the data.
And 206, projecting and splicing the DEM slice data by adopting a multithreading parallel technology to obtain first DEM slice data.
It is appreciated that multithreaded parallelism is a technique capable of performing multiple thread computations simultaneously by taking advantage of the nature of having multiple processing units (e.g., multi-core processors) in a computer system to process multiple tasks or sub-tasks simultaneously. This parallel technique helps to improve the performance and efficiency of the program.
In this embodiment, the whole processing procedure may be decomposed into a plurality of subtasks by using a multithreading parallel technique, each subtask processes one or more DEM slice data, and then the subtasks are simultaneously operated to increase the processing speed, and especially in a multi-core processor or a multithreading environment, the efficiency of processing a large amount of DEM slice data may be significantly increased. The DEM slice data is projected to be converted into the same coordinate system, so that the terrain data is unified, and the DEM slice data is spliced into large continuous data.
And step 208, projecting the road vector data into a coordinate system of the corresponding first DEM slice data, and cutting the first DEM slice data based on the road vector data to obtain second DEM slice data.
It will be appreciated that in order to increase the accuracy and consistency of the data, the road vector data is projected into the coordinate system of the corresponding first DEM slice data to ensure that the road vector data and DEM slice data have the same spatial reference. Meanwhile, the first DEM slice data is cut based on the road vector data, so that accurate spatial analysis is facilitated, and subsequent analysis is facilitated.
On the other hand, the first DEM slice data is cut, so that the processing range can be reduced, the data analysis is more focused on the topography of a specific area, the data quantity and the processing range are reduced, and the efficiency of subsequent processing is improved.
In a word, after projection alignment and cutting, features of the terrain to be analyzed can be better understood, and accuracy and efficiency of subsequent data analysis are improved.
And 210, converting the second DEM slice data into a one-dimensional vector, and calculating the one-dimensional vector according to a gradient percentage formula to obtain gradient information corresponding to the pre-passing path.
It will be appreciated that the DEM slice data is a two-dimensional raster data whose elevation information is stored in a matrix or array, and that converting it to a one-dimensional vector simplifies the slope calculation and facilitates analysis and processing of elevation values. And after the DEM slice data are converted into one-dimensional vectors, the pixels around the specific position are more easily determined, and the neighborhood elevation analysis is facilitated.
The gradient percentage is an index for measuring the gradient of the ground surface, and the calculation is obtained by measuring the ratio of the vertical height to the horizontal distance. By calculating the gradient percentage, important information about the surface can be provided to determine whether the road is passable.
Step 212, feasibility assessment is performed on the pre-traffic path through gradient information.
It can be understood that the gradient information includes gradient percentages corresponding to coordinates of all pixels in the second DEM slice data, and the steep degree of the topography of the corresponding pixels is judged by comparing and marking the gradient percentages with a set threshold value, so as to judge whether the road is suitable for traffic.
According to the field pre-passing path feasibility assessment method, the road width of the pre-passing path is set, and the road buffer area is generated through parallel calculation according to the preset road width; obtaining DEM slice data corresponding to the road vector data based on the road vector data in the road buffer area; projecting and splicing the DEM slice data by adopting a multithreading parallel technology to obtain first DEM slice data; projecting the road vector data into a coordinate system of the corresponding first DEM slice data, and cutting the first DEM slice data based on the road vector data to obtain second DEM slice data; converting the second DEM slice data into one-dimensional vectors, and calculating the one-dimensional vectors according to a gradient percentage formula to obtain gradient information corresponding to the pre-passing path; and carrying out feasibility assessment on the pre-passing path through gradient information.
The invention adopts a multithreading parallel technology to project and splice the DEM slice data so as to provide uniform topographic data; the road vector data are projected into a coordinate system of the corresponding first DEM slice data, and the first DEM slice data are cut based on the road vector data so as to reduce data redundancy; quantifying the terrain gradient information by adopting a gradient percentage calculation method; and converting the second DEM slice data into a one-dimensional vector, and efficiently processing the gradient calculation task by taking the vector as a unit. According to the invention, a plurality of tasks are processed simultaneously by adopting a multithread parallel technology, and the NEON technology is adopted to execute the same type of operation on a plurality of data in the same instruction period, so that the defect of low efficiency of the existing gradient calculation method is overcome, the calculation efficiency is greatly improved, and the accurate and efficient assessment of the traffic condition of a field new planning path is ensured.
In one embodiment, generating the road buffer by parallel calculation according to the preset road width includes: decomposing the pre-passing path into a plurality of road segments to obtain road vector data of each road segment; traversing and processing the road vector data simultaneously by adopting a parallel circulation instruction, wherein the geometric shape of a road buffer area is generated for each road vector data according to a preset road width; and merging the geometric shapes of all the road buffers into one set to obtain a road buffer set.
Specifically, the pre-passing path is first decomposed into a plurality of road segments, and road vector data of each road segment is obtained. The computing task is decomposed into multiple parallel sub-tasks using the parallel loop instructions of OpenMP. In the parallel loop, the number of threads is set to 8, the line elements are split into line segments, and the line segments are equally distributed to each thread for buffer zone calculation. In addition, to ensure that only one thread can access the protected shared resource at the same time, data contention and inconsistencies are avoided, creating a mutex lock. It should be noted that, in the parallel loop, the number of threads may be designed according to the practical situation, and the number of threads is set to 8 in this embodiment, which is only for a clearer development description and is not a limitation of the present invention.
Then, for each thread, assume that the two endpoints of the line segment are/>And the buffer area radius of the road is w, and the direction vector D of the line segment is calculated by using the following formula:
And according to the direction vector of the line segment and the radius of the buffer zone, obtaining the vertex of a new polygon of the buffer zone by vertically shifting the point to calculate the buffer zone. In each iteration of the parallel loop, each subtask independently calculates the buffer geometry of the corresponding line segment. These calculations are stored in a corresponding data structure for subsequent processing and analysis.
Finally, the buffer calculation results of all lines are integrated into one set.
In one embodiment, obtaining DEM slice data corresponding to road vector data based on the road vector data in the road buffer includes: acquiring each road vector data in a road buffer area set; extracting geometric information from the road vector data to obtain the longitude and latitude coordinate range of the minimum circumscribed rectangle of each road polygon; and determining the line number and the stripe range of the DEM slice data corresponding to each road vector data according to the line number and the stripe mapping relation of the DEM slice data corresponding to each longitude and latitude coordinate range, and obtaining the DEM slice data corresponding to each road vector data.
Specifically, geometric information is extracted from road vector data to obtain the longitude and latitude coordinate range of the minimum circumscribed rectangle of the road polygonWherein/>And/>Representing a longitude minimum and a latitude minimum respectively,And/>The longitude maximum value and the latitude maximum value are respectively represented, the coordinate range defines the boundary of the road vector data in the geographic space, and the geographic range of the area where the road is located is determined.
And determining the line number and the stripe range of the DEM slice data corresponding to the road vector according to the line number and stripe mapping relation of the longitude and latitude to the DEM slice data.
DEM slice data within this range of line numbers and strips is queried and extracted, and the DEM slice data is typically stored in a grid, each slice covering a local geographical area.
In one embodiment, the projecting and splicing are performed on the DEM slice data by using a multithreading parallel technology to obtain first DEM slice data, including: adopting a multithreading technology, respectively distributing a thread for each DEM slice data to carry out projection processing, and converting a geographic coordinate system in each DEM slice data into a projection coordinate system; and determining the sequence of the slice data of each DEM after being converted into a projection coordinate system, and sequentially splicing the slice data of each DEM to obtain first DEM slice data of uniform topography.
Specifically, a thread is started for each DEM slice data, a multi-thread parallel technology is adopted to simultaneously carry out projection operation on different DEM slice data, and slice data is converted into a target projection coordinate system from a geographic coordinate system; acquiring slice data of each DEM and spatial position information thereof, namely a coordinate range in a projection coordinate system, and judging the slice splicing sequence; the DEM data after projection are spliced in turn to ensure that they are spatially closely connected.
In this embodiment, the DEM slice data is projected in a parallel manner. A thread is distributed for each DEM slice data, a multi-thread parallel technology is adopted to simultaneously project different DEM slice data, and the geographic coordinate system of each pixel of the DEM slice data is adoptedConversion to UTM projection coordinates/>To ensure accurate mapping of spatial locations.
In one embodiment, projecting the road vector data into a coordinate system of the corresponding first DEM slice data, and clipping the first DEM slice data based on the road vector data to obtain second DEM slice data includes: projecting the road vector data into a projection coordinate system of the corresponding first DEM slice data, and then acquiring projection coordinates of four vertexes of the minimum circumscribed rectangle of each road polygon based on the road vector data; and converting the projection coordinate coverage into a pixel coordinate range, and then cutting the corresponding first DEM slice data based on the pixel coordinate range to obtain second DEM slice data.
Specifically, the road vector data is projected into the same projection coordinate system as the DEM slice data.
Extracting the projected coordinate range of the minimum bounding rectangle from the polygon data in the road vector data
Obtaining geographical transformation information of DEM slice data, including upper left cornerCoordinates, pixel width,/>Direction rotation angle, upper left corner/>Coordinates,/>Direction rotation angle and pixel height.
For each vertex in the projection vector data, the projection coordinates are converted into pixel coordinates by using geographic transformation information, and the conversion is specifically performed by adopting the following formula:
wherein, And/>For projection coordinates,/>And/>Is pixel point coordinates,/>Representing the upper left corner/>, of DEM slice dataCoordinates/>Representing the upper left corner/>, of DEM slice dataCoordinates/>For pixel width,/>Is the pixel height.
And positioning a corresponding rectangular region in the DEM slice data by using the converted pixel coordinate range, and then cutting out a part containing the region in the DEM slice data.
In one embodiment, converting the second DEM slice data into a one-dimensional vector, and calculating the one-dimensional vector according to a gradient percentage formula to obtain gradient information corresponding to the pre-passing path, where the method includes: dividing the second DEM slice data into a plurality of subareas, and obtaining the elevation values of the central and peripheral pixel points of each subarea; combining the elevation values of the pixel points with the same relative positions in the plurality of sub-areas based on the set vector length to obtain an elevation value vector; and inputting the elevation value vector into a NEON register, and calculating through a gradient percentage formula to obtain gradient information corresponding to the pre-passing path.
Specifically, the NEON technology is utilized to convert the two-dimensional image of the second DEM slice data into a one-dimensional vector, and the gradient calculation task is efficiently processed by taking the vector as a unit.
As shown in FIG. 2, from the DEM slice dataElevation values of central pixel points of the subareas and elevation values of 8 surrounding pixel points; inputting the elevation value vector of the pixel point into a NEON register, and calculating/>' according to a gradient percentage formulaThe gradient percentage formula expression of the central pixel point of the subarea is as follows:
Wherein the method comprises the steps of Is gradient percentage,/>Is an increment in the horizontal direction,/>Is elevation increment,/>For/>Elevation value of each pixel in the subregion,/>For/>Spatial resolution of the pixels in the direction,/>For/>Spatial resolution of the picture elements in the direction;
it can be appreciated that by setting the vector length Defining 8 pixel point elevation value vectors respectively, namely each vectorStore/>Continuous/>In subregion/>Elevation values of (2). Wherein/>Is the ratio of the number of vector register bits to the variable type length. Taking a specific parameter as an example, if the number of bits of the vector register is 128 bits and the variable type is float32, the vector length is as follows4. Thus, every 4/>The pixel elevation values for the same relative position within the window will be combined into a vector. Further specifically, a vector/>, of length 4, is definedFor storing 4 consecutive/>Pixel point elevation values for the upper left corner of the window center point; define a length 4 vector/>For storing 4 consecutive/>Pixel elevation values directly above the window center point, and so on.
Designing NEON Intrinsics programs to realize efficient parallel calculation of gradient percentages of multiple groups of data, and specifically comprises the following steps: inputting the elevation value vector of the pixel point into a NEON register; calculating vectors corresponding to the increment in the horizontal direction according to a gradient percentage calculation formula by utilizing NEON Intrinsics instructionsAnd vectors corresponding to increments in the vertical direction; By combining vectors/>Divided by vector/>And multiplying by 100 to obtain the result vector/>
And for redundant data with the quantity less than s in the group, sequentially performing independent processing. For example, the above steps are repeated until the number of the remaining pixels is less than 4, and the redundant data with the number less than 4 is sequentially and separately processed.
And finally, combining the result obtained by parallel calculation by using the NEON intrinsics program with the result obtained by independent calculation to form a final result, and obtaining gradient information corresponding to the pre-passing path.
In this embodiment, a Single Instruction Multiple Data (SIMD) extended instruction (Single Instruction Multiple Data) based on the FT2500+ processor utilizes 32 128-bit vector registers to process multiple data elements in a single instruction at the same time, so as to improve the efficiency of intensive data calculation.
In one embodiment, the feasibility assessment of the pre-traffic path through gradient information includes: the gradient information comprises gradient percentages corresponding to the coordinates of each pixel point in the second DEM slice data; judging whether the gradient percentage corresponding to each pixel point coordinate is larger than a threshold value, and marking the raster image pixel corresponding to each pixel point coordinate based on a judging result so as to generate a new raster image; cutting the new raster image according to the geometric shape of the preset road width to obtain a cut raster image; converting the cut raster image into vector data, and analyzing the feasibility of the pre-passing path based on the vector data.
Specifically, gradient percentages corresponding to all pixel points in gradient information are obtained one by one.
Setting a threshold valueThreshold/>About equal to the coefficient of friction of an automobile tire with a road/>. Sequentially judging whether the gradient value of each pixel point is larger than a preset threshold value/>If the gradient percentage is greater than/>The topography of the pixel point is steeper and is not suitable for traffic, the raster image pixel at the position corresponding to the coordinates of the pixel point is set to 0, and if the gradient percentage is less than or equal to/>The terrain of the pixel point is gentle, the pixel point is suitable for traffic, and the raster image pixel at the position corresponding to the coordinate of the pixel point is set to be 1.
The marked raster image is generated into a new raster image by the designated raster resolution, wherein each pixel point corresponds to a pass mark 0 or 1.
And cutting the raster image according to the geometric shape of the preset road width, setting the pixel value in a non-road range to be-1, keeping the pixel value of other areas unchanged, converting the cut raster image into vector data, and analyzing the feasibility of the pre-passing path based on the vector data.
Further specifically, for each pixel point coordinateObtaining the corresponding gradient percentage/>
For each pixel pointJudging whether the gradient value is greater than a preset threshold/>. If it isThe method comprises the steps of representing steeper terrain and unsuitable for passing, and setting a grid image pixel at a position corresponding to a pixel point coordinate to be 0; if/>The raster image pixel which indicates that the terrain is relatively gentle and is suitable for traffic is set to be 1 at the position corresponding to the pixel point coordinate.
Resolution by specified gridGenerating a new raster image/>Wherein/>And/>Representing the row and column indices of the raster image, each raster pixel representing a pass flag 0 or 1.
Clipping raster image according to geometry of preset road widthThe pixels in the non-road range are set to be-1, the pixel values of other areas are kept unchanged, the cut raster data are converted into vector data, the evaluation accuracy of the method is influenced by the DEM slice data resolution, and the path feasibility evaluation effect can be improved by using the high-resolution DEM slice data.
It can be understood that in the buffer zone calculation and projection stage, the invention carries out projection operation on the DEM slice data by a multithreading parallel technology, effectively improves the efficiency and instantaneity of data processing, fully utilizes system resources and simultaneously enhances the expandability of the system. In the gradient calculation process, the NEON vector acceleration model is used, a plurality of data points can be processed simultaneously in a single instruction period, the hardware performance is fully exerted, the calculation efficiency is greatly enhanced, and a high-efficiency and feasible solution is provided for geographic data processing. The innovation strategies have obvious superiority in the aspect of processing large-scale elevation data and road gradient calculation, and provide powerful support for the optimization and application of a geographic information system.
It should be understood that, although the steps in the flowchart of fig. 1 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 1 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the sub-steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of other steps or sub-steps of other steps.
In one embodiment, as shown in fig. 3, there is provided a field pre-transit path feasibility assessment system comprising: a buffer calculation module 402, a DEM slice data acquisition module 404, a projection stitching module 406, a coordinate transformation and clipping module 408, a gradient calculation module 410, and an evaluation analysis module 412, wherein:
The buffer calculation module 402 is configured to set a road width of the pre-traffic path, and generate a road buffer by parallel calculation according to the preset road width.
And the DEM slice data acquiring module 404 is configured to acquire DEM slice data corresponding to the road vector data based on the road vector data in the road buffer.
And the projection splicing module 406 is configured to project and splice the DEM slice data by using a multithreading parallel technology, so as to obtain first DEM slice data.
The coordinate conversion and clipping module 408 is configured to project the road vector data into a coordinate system of the corresponding first DEM slice data, and clip the first DEM slice data based on the road vector data to obtain second DEM slice data.
The gradient calculation module 410 is configured to convert the second DEM slice data into a one-dimensional vector, and calculate the one-dimensional vector according to a gradient percentage formula to obtain gradient information corresponding to the pre-passing path.
And the evaluation analysis module 412 is used for performing feasibility evaluation on the pre-passing path through the gradient information.
In one embodiment, DEM slice data acquisition module 404 includes:
And the boundary generation unit is used for extracting geometric information from the road vector data to obtain the longitude and latitude coordinate range of the minimum circumscribed rectangle of each road polygon.
And the DEM positioning unit is used for determining the line number and the strip range of the DEM slice data corresponding to each road vector data according to the line number and the strip mapping relation of the DEM slice data corresponding to each longitude and latitude coordinate range, and acquiring the DEM slice data corresponding to each road vector data.
In one embodiment, projection stitching module 406 includes:
And the parallel projection unit is used for respectively distributing one thread for each DEM slice data to carry out projection processing by adopting a multithreading technology and converting a geographic coordinate system in each DEM slice data into a projection coordinate system.
And the splicing unit is used for determining the sequence of the slice data of each DEM after being converted into the projection coordinate system, and splicing the slice data of each DEM in sequence to obtain first DEM slice data of uniform topography.
In one embodiment, the coordinate transformation and clipping module 408 includes:
And the coordinate conversion unit is used for converting the projection coordinate coverage range of the minimum circumscribed rectangle of each road polygon into a pixel coordinate range.
And the clipping unit is used for clipping the corresponding first DEM slice data according to the converted pixel coordinate range to obtain second DEM slice data.
In one embodiment, the grade calculation module 410 includes:
The definition unit is used for acquiring the elevation values of the pixel points at the center and the periphery of each sub-region from the second DEM slice data and defining a gradient percentage calculation formula.
And the vector acceleration unit is used for combining elevation values of pixel points with the same relative positions in a plurality of subareas based on the set vector length to obtain an elevation value vector, inputting the elevation value vector into the NEON register, and simultaneously calculating gradient percentages of a plurality of groups of data to obtain gradient information corresponding to the pre-passing path.
In one embodiment, the evaluation analysis module 412 includes:
the gradient analysis unit is used for judging whether the gradient value of each pixel point is larger than a preset threshold value, and if so, setting the pixel at the corresponding position to be 0; if the pixel value is smaller than or equal to the threshold value, the pixel at the corresponding position is set to be 1.
And a vector conversion unit clipping the raster image by using a geometric shape of a preset road width and converting it into vector data.
For specific limitations on the field pre-passage path feasibility assessment system, reference may be made to the above limitation on the field pre-passage path feasibility assessment method, and no further description is given here. The modules in the field pre-traffic path feasibility assessment system can be all or partially implemented by software, hardware and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 4. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing field pre-traffic path feasibility assessment data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program when executed by a processor implements a method for evaluating feasibility of a pre-transit path in the field.
It will be appreciated by persons skilled in the art that the architecture shown in fig. 4 is merely a block diagram of some of the architecture relevant to the present inventive arrangements and is not limiting as to the computer device to which the present inventive arrangements are applicable, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory storing a computer program and a processor that when executing the computer program performs the steps of:
step 202, setting the road width of the pre-traffic path, and generating a road buffer area through parallel calculation according to the preset road width.
Step 204, obtaining DEM slice data corresponding to the road vector data based on the road vector data in the road buffer.
And 206, projecting and splicing the DEM slice data by adopting a multithreading parallel technology to obtain first DEM slice data.
And step 208, projecting the road vector data into a coordinate system of the corresponding first DEM slice data, and cutting the first DEM slice data based on the road vector data to obtain second DEM slice data.
And 210, converting the second DEM slice data into a one-dimensional vector, and calculating the one-dimensional vector according to a gradient percentage formula to obtain gradient information corresponding to the pre-passing path.
Step 212, feasibility assessment is performed on the pre-traffic path through gradient information.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
step 202, setting the road width of the pre-traffic path, and generating a road buffer area through parallel calculation according to the preset road width.
Step 204, obtaining DEM slice data corresponding to the road vector data based on the road vector data in the road buffer.
And 206, projecting and splicing the DEM slice data by adopting a multithreading parallel technology to obtain first DEM slice data.
And step 208, projecting the road vector data into a coordinate system of the corresponding first DEM slice data, and cutting the first DEM slice data based on the road vector data to obtain second DEM slice data.
And 210, converting the second DEM slice data into a one-dimensional vector, and calculating the one-dimensional vector according to a gradient percentage formula to obtain gradient information corresponding to the pre-passing path.
Step 212, feasibility assessment is performed on the pre-traffic path through gradient information.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SYNCHLINK) DRAM (SLDRAM), memory bus (rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (9)

1. A method for evaluating feasibility of a pre-traffic path in the field, the method comprising:
setting the road width of a pre-passing path, and generating a road buffer area through parallel calculation according to the preset road width;
obtaining DEM slice data corresponding to the road vector data based on the road vector data in the road buffer area;
projecting and splicing the DEM slice data by adopting a multithreading parallel technology to obtain first DEM slice data;
Projecting the road vector data into a coordinate system of the corresponding first DEM slice data, and cutting the first DEM slice data based on the road vector data to obtain second DEM slice data;
converting the second DEM slice data into a one-dimensional vector, and calculating the one-dimensional vector according to a gradient percentage formula to obtain gradient information corresponding to a pre-passing path;
Carrying out feasibility assessment on the pre-passing path through the gradient information;
Converting the second DEM slice data into a one-dimensional vector, calculating the one-dimensional vector according to a gradient percentage formula to obtain gradient information corresponding to a pre-passing path, wherein the method comprises the following steps of:
Dividing the second DEM slice data into a plurality of subareas, and obtaining the elevation values of the central and peripheral pixel points of each subarea;
combining the elevation values of the pixel points with the same relative positions in a plurality of different subareas based on the set vector length to obtain an elevation value vector;
And inputting the elevation value vector into a NEON register, and simultaneously calculating gradient percentages of a plurality of groups of data through the gradient percentage formula to obtain gradient information corresponding to the pre-passing path.
2. The method for evaluating feasibility of a field pre-passing path according to claim 1, wherein generating a road buffer by parallel calculation according to a preset road width comprises:
decomposing the pre-passing path into a plurality of road segments to obtain road vector data of each road segment;
Traversing and processing the road vector data simultaneously by adopting a parallel circulation instruction, wherein the geometric shape of a road buffer area is generated for each road vector data according to a preset road width;
And merging the geometric shapes of all the road buffers into one set to obtain a road buffer set.
3. The method of assessing feasibility of a field pre-transit path of claim 2, wherein obtaining DEM slice data corresponding to road vector data in the road buffer based on the road vector data, comprises:
acquiring each road vector data in the road buffer area set;
Extracting geometric information from each road vector data to obtain the longitude and latitude coordinate range of the minimum circumscribed rectangle of each road polygon;
And determining the line number and the stripe range of the DEM slice data corresponding to each road vector data according to the line number and the stripe mapping relation of the DEM slice data corresponding to each longitude and latitude coordinate range, and obtaining the DEM slice data corresponding to each road vector data.
4. The method for evaluating feasibility of a field pre-transit path according to claim 3, wherein projecting and splicing the DEM slice data by using a multi-thread parallel technique to obtain first DEM slice data comprises:
Adopting a multithreading technology, respectively distributing a thread for each DEM slice data to carry out projection processing, and converting a geographic coordinate system in each DEM slice data into a projection coordinate system;
determining the sequence of the DEM slice data converted into a projection coordinate system, and sequentially splicing the DEM slice data to obtain first DEM slice data of uniform topography.
5. The method of claim 4, wherein projecting the road vector data into a coordinate system of the corresponding first DEM slice data, clipping the first DEM slice data based on the road vector data to obtain second DEM slice data, includes:
projecting the road vector data into a corresponding projection coordinate system of the first DEM slice data, and then acquiring projection coordinates of four vertexes of the minimum circumscribed rectangle of each road polygon based on the road vector data;
and converting the projection coordinate coverage into a pixel coordinate range, and then cutting the corresponding first DEM slice data based on the pixel coordinate range to obtain second DEM slice data.
6. The field pre-passage path feasibility assessment method according to any one of claims 1 to 5, characterized in that the feasibility assessment of the pre-passage path by the gradient information comprises:
The gradient information comprises gradient percentages corresponding to coordinates of each pixel point in the second DEM slice data;
judging whether the gradient percentage corresponding to each pixel point coordinate is larger than a threshold value, and marking the raster image pixel corresponding to each pixel point coordinate based on a judging result so as to generate a new raster image;
Cutting the new raster image according to the geometric shape of the preset road width to obtain a cut raster image;
And converting the cut raster image into vector data, and analyzing the feasibility of the pre-passing path based on the vector data.
7. A field pre-transit path feasibility assessment system, the system comprising:
the buffer zone calculation module is used for setting the road width of the pre-passing path and generating a road buffer zone through parallel calculation according to the preset road width;
the DEM slice data acquisition module is used for acquiring DEM slice data corresponding to the road vector data based on the road vector data in the road buffer area;
the projection splicing module is used for projecting and splicing the DEM slice data by adopting a multithreading parallel technology to obtain first DEM slice data;
the coordinate conversion and clipping module is used for projecting the road vector data into a coordinate system of the corresponding first DEM slice data, clipping the first DEM slice data based on the road vector data, and obtaining second DEM slice data;
The gradient calculation module is used for converting the second DEM slice data into a one-dimensional vector, and calculating the one-dimensional vector according to a gradient percentage formula to obtain gradient information corresponding to the pre-passing path;
the evaluation analysis module is used for carrying out feasibility evaluation on the pre-passing path through the gradient information;
Wherein, the slope calculation module includes:
The definition unit is used for acquiring the elevation values of the central and peripheral pixel points of each sub-region from the second DEM slice data and defining a gradient percentage calculation formula;
And the vector acceleration unit is used for combining elevation values of pixel points with the same relative positions in a plurality of subareas based on the set vector length to obtain an elevation value vector, inputting the elevation value vector into the NEON register, and simultaneously calculating gradient percentages of a plurality of groups of data to obtain gradient information corresponding to the pre-passing path.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202410171094.2A 2024-02-06 2024-02-06 Method, system, equipment and medium for evaluating feasibility of field pre-passing path Active CN117724850B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410171094.2A CN117724850B (en) 2024-02-06 2024-02-06 Method, system, equipment and medium for evaluating feasibility of field pre-passing path

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410171094.2A CN117724850B (en) 2024-02-06 2024-02-06 Method, system, equipment and medium for evaluating feasibility of field pre-passing path

Publications (2)

Publication Number Publication Date
CN117724850A CN117724850A (en) 2024-03-19
CN117724850B true CN117724850B (en) 2024-04-19

Family

ID=90200101

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410171094.2A Active CN117724850B (en) 2024-02-06 2024-02-06 Method, system, equipment and medium for evaluating feasibility of field pre-passing path

Country Status (1)

Country Link
CN (1) CN117724850B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110379150A (en) * 2018-09-13 2019-10-25 北京京东尚科信息技术有限公司 A kind of method and apparatus for assessing road
CN111243091A (en) * 2020-04-09 2020-06-05 速度时空信息科技股份有限公司 Massive DEM pyramid slice parallel construction method based on distributed system
CN113048981A (en) * 2021-03-22 2021-06-29 中国人民解放军国防科技大学 DEM-oriented method for road-free regional path planning algorithm
CN114116948A (en) * 2021-12-06 2022-03-01 中国人民解放军国防科技大学 Geographic vector data space buffer area analysis method, device, equipment and medium
CN114202454A (en) * 2021-11-01 2022-03-18 北京旷视科技有限公司 Graph optimization method, system, computer program product and storage medium
CN114326754A (en) * 2022-03-09 2022-04-12 中国科学院空天信息创新研究院 Complex terrain path planning method and device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110322556B (en) * 2019-04-29 2022-06-03 武汉大学 High-speed high-precision vector grid superposition analysis method based on boundary clipping

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110379150A (en) * 2018-09-13 2019-10-25 北京京东尚科信息技术有限公司 A kind of method and apparatus for assessing road
CN111243091A (en) * 2020-04-09 2020-06-05 速度时空信息科技股份有限公司 Massive DEM pyramid slice parallel construction method based on distributed system
CN113048981A (en) * 2021-03-22 2021-06-29 中国人民解放军国防科技大学 DEM-oriented method for road-free regional path planning algorithm
CN114202454A (en) * 2021-11-01 2022-03-18 北京旷视科技有限公司 Graph optimization method, system, computer program product and storage medium
CN114116948A (en) * 2021-12-06 2022-03-01 中国人民解放军国防科技大学 Geographic vector data space buffer area analysis method, device, equipment and medium
CN114326754A (en) * 2022-03-09 2022-04-12 中国科学院空天信息创新研究院 Complex terrain path planning method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN117724850A (en) 2024-03-19

Similar Documents

Publication Publication Date Title
US9626761B2 (en) Sampling method and image processing apparatus of CS-RANSAC for estimating homography
RU2749893C1 (en) Method for aligning fluorescence images, gene sequencing apparatus and system and storage medium
JP4915545B2 (en) Predictive evaluation method of habitats in urban green space
CN110647596A (en) Map data processing method and device
US9070203B2 (en) Identification and quantification of microtextured regions in materials with ordered crystal structure
CN115794414B (en) Satellite earth-to-earth view analysis method, device and equipment based on parallel computing
CN112288842B (en) Shadow map algorithm-based quantitative analysis method and device for terrain visible area
CN106971369B (en) Data scheduling and distributing method based on GPU (graphics processing Unit) for terrain visual field analysis
CN117724850B (en) Method, system, equipment and medium for evaluating feasibility of field pre-passing path
Netzel et al. Comparison of different implementations of a raster map calculator
Puligandla et al. A multiresolution approach for large real-world camera placement optimization problems
CN111862001B (en) Semi-automatic labeling method and device for CT images, electronic equipment and storage medium
CN112712089A (en) Obstacle detection method, obstacle detection device, computer device, and storage medium
EP3016073B1 (en) Projection method of three-dimensional imaging
CN116994245A (en) Space transcriptome analysis method, device and readable medium based on deep learning
Fernández-Fabeiro et al. Simplifying the multi-gpu programming of a hyperspectral image registration algorithm
CN114758104B (en) Automatic interference-dispersion-resistant bar arrangement marking method suitable for three-dimensional design steel bar drawing
CN115034950B (en) Thread construction method and device
Carabaño et al. Efficient implementation of a fast viewshed algorithm on SIMD architectures
Fitzgerald et al. Real-time, parallel segmentation of high-resolution images on multi-core platforms
Walton et al. Dynamic 3-d visualization of climate model development and results
Fickenscher et al. Modeling, programming and performance analysis of automotive environment map representations on embedded GPUs
Yu et al. A parallel strategy to accelerate neighborhood operation for raster data coordinating CPU and GPU
JP5071679B2 (en) Inclination analyzer, method and program
CN111445503B (en) Pyramid mutual information image registration method based on parallel programming model on GPU cluster

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant