Method for rapidly acquiring three-dimensional contour line data of radar basic reflectivity
The technical field is as follows:
the invention relates to a method for rapidly acquiring three-dimensional contour line data of radar basic reflectivity.
Background art:
the conventional radar basic reflectivity data is basically in a two-dimensional plane image form, the radar single-layer scanning data is essentially distributed in a three-dimensional space, and the three-dimensional contour line data is generally calculated based on three-dimensional regular grid data. In the extraction process, the radar data needs to be subjected to three-dimensional regular lattice localization, then reflectivity data corresponding to each grid is obtained through a large amount of interpolation, and then contour line calculation is carried out; the process needs a large amount of interpolation calculation on original detection data of the radar, the spatial distribution of the regular grid and the radar scanning mode have great difference, ambiguity exists when the quadrilateral grid judges the contour line, and extra calculation is needed to process the problems. The method needs a large amount of preprocessing calculation before the contour line is extracted, and brings obstruction to the rapid extraction of the three-dimensional contour line.
The invention content is as follows:
the method directly utilizes the original data points detected by the radar to construct the triangular mesh so as to quickly acquire the three-dimensional contour line data of the radar basic reflectivity with the vector characteristics.
The specific technical scheme of the invention is as follows:
a method for rapidly acquiring three-dimensional contour line data of radar basic reflectivity comprises the following steps:
(1) acquiring scanning layer data of a preset elevation angle from radar reflectivity data to be processed, calculating the spatial position coordinates of ith database data on a scanning line of each azimuth angle in the scanning layer, and forming a radar data point structure corresponding to each database data on each scanning line, wherein i represents any data point on the scanning line, and the number of data points on the scanning line is more than or equal to 1 and less than or equal to i;
(2) in the radar data point structure, two points of the i-th and i + 1-th library positions which are adjacent to each other are sequentially and respectively taken on two adjacent scanning lines, the total four points are sequentially connected and used as vertexes to construct a quadrilateral surface patch, and then all quadrilateral surface patches are constructed to obtain a quadrilateral grid;
(3) connecting a diagonal line to each quadrilateral patch, and dividing each quadrilateral patch into two triangles to form a triangular mesh;
(4) in the triangular mesh, a connecting line of two data points which are farthest away from the center of the radar on each adjacent scanning line forms the boundary of the triangular mesh; for any reflectivity factor Z in a preset reflectivity factor set, finding an initial edge on the boundary of a triangular grid, enabling the reflectivity factor Z value to be between the reflectivity values of two vertexes of the initial edge, and when the initial edge exists, firstly performing non-closed contour line search and then performing closed contour line search; when the initial edge does not exist, performing closed contour line search to obtain a contour line corresponding to the reflectivity factor Z; and repeating the steps to complete contour line search corresponding to all the reflectivity factors in the preset reflectivity factor set, and acquiring three-dimensional contour line data of the basic reflectivity of the radar.
The invention is further designed in that:
in the step 1, the longitude and latitude coordinates of the center of the radar are set as follows: (radarLX, radarLY, radarHKm), on a scanning line of the radar with a certain scanning layer elevation angle being elevaAngle and an azimuth angle being AZ _ angle, the first library distance is firstGate, and the library length is W, the spatial longitude and latitude position coordinate of the ith library data is calculated according to the following formula (wherein, i is more than or equal to 1 and less than or equal to the number of data points on the scanning line):
xDis = ((firstGate + (i-1) * W) * cos(elevaAngle)) * sin(AZ_angle) (1)
yDis = ( (firstGate + (i-1) * W)* cos(elevaAngle)) *cos(AZ_angle) (2)
LY = radarLY + yDis/(π * EarthRadius )*180 (3)
LX = radarLX + xDis/(π * EarthRadius*cos(LY*π/180))*180 (4)
disKM = firstGate + (i-1) * W; (5)
H =radarHKm+disKM *sin(elevaAngle)+disKM/(1.21*2* EarthRadius) (6)
wherein, xDis is the horizontal distance of ith storehouse data subaerial projection distance radar center, and yidis is the vertical distance of ith storehouse data subaerial projection distance radar center, and LY is the latitude coordinate of ith storehouse data, and LX is the longitude coordinate of ith storehouse data, and H is the altitude coordinate of ith storehouse data, and disKM is the spatial distance of current data point distance radar center, and Earth radius is the earth radius, gets: 6371.004 km.
In the step 3, when each quadrilateral surface patch is divided into two triangles by diagonal lines, the dividing directions of the diagonal lines are consistent.
And 4, endowing corresponding colors to the obtained basic reflectivity contour line of the scanning layer according to the reflectivity factor Z value.
The non-closed contour line search in step 4 comprises the following steps:
A. according to two vertexes of the initial edge found from the boundary, calculating point coordinates equal to the Z value of the reflectivity factor on the initial edge through interpolation, adding the point coordinates into a point set of the contour line, then searching a new edge which also meets the conditions on the other two edges of the triangle where the initial edge is located, namely the Z value is between the reflectivity values of the two vertexes of the edge, taking the new edge as the current initial edge, performing interpolation calculation on the two vertexes of the new edge to obtain point coordinates equal to the Z value of the reflectivity factor on the edge, adding the point coordinates into the point set of the contour line, and removing the current triangle from the triangle to be searched;
B. finding a triangle adjacent to the new edge, continuously searching a second new edge which also meets the condition in the other two edges of the triangle, namely the Z value is between the reflectivity values of the two vertexes of the edge, taking the second new edge which meets the condition as the current initial edge, carrying out interpolation calculation on the two vertexes of the second new edge to obtain a point coordinate which is equal to the reflectivity factor Z value on the edge, adding the point coordinate into a contour line point set, and removing the current triangle from the triangle to be searched;
C. b, repeating the step B until the point coordinates with the same reflectivity factor Z value are located on the boundary, and finishing searching the isoline point set of the non-closed isoline; sequentially connecting the coordinates of each point in the point set of the contour line to form a non-closed contour line;
D. and continuously searching another initial edge from the boundary which is not removed, and repeating the steps A-C until the initial edge can not be found in the boundary, and finishing all the non-closed contour line searches corresponding to the reflectivity factor Z.
Step 4 the search for a closed contour comprises the following steps:
a. searching any edge meeting the conditions from the triangle which is not removed as an initial edge, namely, the value of the reflectivity factor Z is between the reflectivity values of two vertexes of the initial edge, and ending the closed contour line search if the initial edge cannot be found; if the initial edge meeting the conditions is found, entering the next step;
b. carrying out interpolation calculation on two vertexes of the found initial edge to obtain a point coordinate equal to the value of the reflectivity factor Z on the edge, and adding the point coordinate into the isoline point set; then, searching a new edge which is in accordance with the same condition on the other two edges of any triangle where the initial edge is positioned, namely, the Z value is between the reflectivity values of the two vertexes of the edge, taking the new edge as the current initial edge, carrying out interpolation calculation on the two vertexes of the new edge to obtain a point coordinate which is equal to the reflectivity factor Z value on the edge, adding the point coordinate into a contour point set, and removing the current triangle from the triangle to be searched;
c. taking the new edge as an initial edge to search for another triangle, continuously searching for a second new edge which also meets the condition in the other two edges of the found triangle, namely, the Z value is between the reflectivity values of the two vertexes of the edge, taking the second new edge which meets the condition as the initial edge, carrying out interpolation calculation on the two vertexes of the second new edge to obtain a point coordinate which is equal to the reflectivity factor Z value on the edge, adding the point coordinate into a contour point set, and removing the current triangle from the triangle to be searched;
d. c is repeatedly executed until the point coordinate which is equal to the reflectivity factor Z value is located on the initial edge which is found in the step A, and searching of the isoline point set of the closed isoline is finished; sequentially connecting the coordinates of each point in the isoline point set to form a closed isoline;
e. and (4) continuously searching another initial edge from the triangle which is not removed, repeating the steps a-c until the initial edge can not be found, and completing all closed contour line searches corresponding to all the reflectivity factors Z.
Compared with the prior art, the invention has the following beneficial effects:
1. in view of the fact that in the conventional method for acquiring three-dimensional contour line data of radar basic reflectivity in the prior art, calculation is performed based on three-dimensional regular grid data, a large amount of interpolation calculation needs to be performed on original detection data of the radar in the process, the spatial distribution of the regular grid and the radar scanning mode have great difference, ambiguity exists in judgment of contour lines of the quadrilateral grid, and extra calculation is needed to solve the problem. The conventional method needs a large amount of preprocessing calculation before contour line extraction, and brings obstruction to rapid extraction of the three-dimensional contour line.
2. According to the method, the triangular mesh is constructed by directly utilizing the original data points detected by the radar, so that the three-dimensional isoline data of the radar basic reflectivity with vector characteristics is rapidly acquired, each vertex of the generated triangular mesh has the three-dimensional coordinate attribute of x.y.z, the radar basic reflectivity series products are perfected, the accuracy of radar data is improved, and the data networking of the radar products is promoted.
3. The method is beneficial to realizing global sharing of radar product data, provides effective decision support for disaster reduction and prevention of meteorological disasters, and has good social and economic effects; meanwhile, the data acquisition has high efficiency and high precision, is convenient for manual interpretation and analysis, and can shorten the response time of relevant departments to disasters.
Description of the drawings:
FIG. 1 is a schematic diagram illustrating a dot structure of radar scan data according to an embodiment;
FIG. 2 is a schematic diagram illustrating a quadrilateral patch connection according to an embodiment;
FIG. 3 is a schematic diagram of a quadrilateral mesh according to a first embodiment;
FIG. 4 is a schematic diagram of a quadrilateral mesh subdivision triangle mesh in the first embodiment;
FIG. 5 is a schematic diagram of a non-closed contour search according to an embodiment I;
FIG. 6 is a schematic diagram of a closed contour search according to an embodiment I;
FIG. 7 is a diagram of the effect of finding the three-dimensional contour of the basic reflectivity in the second embodiment.
The specific implementation mode is as follows:
the first embodiment is as follows:
the invention discloses a method for rapidly acquiring radar basic reflectivity data, which comprises the following specific steps:
(1) acquiring scanning layer data of a preset elevation angle from the radar reflectivity data to be processed, and calculating the spatial position coordinate of the ith database data on the scanning line of each azimuth angle in the scanning layer, wherein i represents any data point on the scanning line, and the number of the data points on the scanning line is more than or equal to 1 and less than or equal to i:
the longitude and latitude coordinates of the radar center are as follows: (radarLX, radarLY, radarHKm (unit: kilometer or kilometer)), on a scanning line of a certain scanning layer of the radar with an elevation angle of elevaAngle (unit: radian) and an azimuth angle of AZ _ angle (unit: radian), the first library distance is firstGate (unit: kilometer), the library length is W (unit: kilometer), and the spatial longitude and latitude position coordinates of the ith library data are calculated according to the following formula (wherein, i is more than or equal to 1 and less than or equal to the number of data points on the scanning line):
the ith database data is projected on the ground to be away from the radar center by a transverse distance xDis:
xDis = ((firstGate + (i-1)* W) * cos(elevaAngle)) * sin(AZ_angle); (1)
the ith database data projects the longitudinal distance yDis from the radar center on the ground:
yDis = ( (firstGate + (i-1) * W)* cos(elevaAngle)) *cos(AZ_angle); (2)
latitude coordinate LY of ith library data:
LY = radarLY + yDis / (π * EarthRadius ) * 180; (3)
longitude coordinate LX of ith library data:
LX = radarLX + xDis / (π * EarthRadius * cos(LY * π/180)) * 180; (4)
spatial distance disKM of the current data point from the radar center:
disKM = firstGate+ (i-1) * W; (5)
height coordinate H of ith library data:
H = radarHKm + disKM * sin(elevaAngle) + disKM /(1.21 * 2 * EarthRadius);(6)
wherein Earth radius is the radius of the earth, and the following are taken: 6371.004km
And a schematic diagram of the radar data point structure corresponding to each database data on each scanning line is formed, as shown in fig. 1;
(2) in the schematic diagram of the radar data point structure, two points at the i-th and i + 1-th library positions adjacent to each other are sequentially taken from two adjacent scanning lines, and the total four points are sequentially connected as vertexes to form a trapezoid patch, wherein the trapezoid patch is a trapezoid patch which is a non-self-intersecting quadrilateral patch formed by sequentially connecting four coordinate vertexes, as shown in fig. 2. Further completing the construction of the trapezoid patches of all the adjacent points on the scanning layer to form mutually adjacent trapezoid grids as shown in fig. 3;
(3) connecting a diagonal line to each trapezoid patch, and dividing each trapezoid patch into two triangles, wherein when each trapezoid patch is divided into two triangles by the diagonal line, the dividing directions of the diagonal lines are consistent, thereby forming a triangle mesh, as shown in fig. 4;
(4) in the triangular mesh, a connecting line of two data points which are farthest away from the center of the radar on each adjacent scanning line forms the boundary of the triangular mesh; for any reflectivity factor Z in the preset reflectivity factor set, finding an initial edge on the boundary of the triangular mesh, enabling the reflectivity factor Z value to be between the reflectivity values of two vertexes of the initial edge, firstly carrying out non-closed contour line search, and then carrying out closed contour line search.
(5) And repeating the step 4 to complete contour line search corresponding to all the reflectivity factors in the preset reflectivity factor set, and obtaining the basic reflectivity contour line data of the scanning layer.
Example two:
in this embodiment, on the basis of the first embodiment, a non-closed contour is further searched, and the specific process is as follows:
A. according to two vertexes of the initial edge found from the boundary, calculating point coordinates of the initial edge, which are equal to the Z value of the reflectivity factor, by interpolation, adding the point coordinates into a point set of the contour line, then searching a new edge which also meets the conditions on the other two edges of the triangle where the initial edge is located, namely the Z value is between the reflectivity values of the two vertexes of the edge, taking the new edge as the current initial edge, performing interpolation calculation on the two vertexes of the new edge to obtain point coordinates of the edge, which are equal to the Z value of the reflectivity factor, adding the point coordinates into the point set of the contour line, and removing the current triangle from the triangle to be searched;
B. finding a triangle adjacent to the new edge, continuously searching a second new edge which also meets the condition in the other two edges of the triangle, namely the Z value is between the reflectivity values of the two vertexes of the edge, taking the second new edge which meets the condition as the current initial edge, carrying out interpolation calculation on the two vertexes of the second new edge to obtain a point coordinate which is equal to the reflectivity factor Z value on the edge, adding the point coordinate into a contour line point set, and removing the current triangle from the triangle to be searched;
C. b, repeating the step B until the point coordinates with the same reflectivity factor Z value are located on the boundary, and finishing searching the isoline point set of the non-closed isoline; sequentially connecting the coordinates of each point in the point set of the contour line to form a non-closed contour line;
D. and continuing to search another starting edge from the boundary which is not removed, and repeating the steps A-C until all the non-closed contour line searches corresponding to the reflectivity factor Z are completed after the starting edge cannot be found in the boundary, as shown in FIG. 5.
Example three:
in this example, on the basis of the second embodiment, the closed contour is further searched, and the specific process is as follows:
a. searching any edge meeting the conditions from the triangle which is not rejected as an initial edge, namely, the numerical value of the reflectivity factor Z is between the reflectivity numerical values of two vertexes of the initial edge, and ending the search of the closed contour line if the initial edge cannot be found; if the initial edge meeting the conditions is found, entering the next step;
b. carrying out interpolation calculation on two vertexes of the found initial edge to obtain a point coordinate of the edge, which is equal to the value of the reflectivity factor Z, and adding the point coordinate into the isoline point set; then searching a new edge which is in accordance with the same condition on the other two edges of any triangle where the initial edge is located, namely, enabling a Z value to be between the reflectivity values of the two vertexes of the edge, taking the new edge as a current initial edge, carrying out interpolation calculation on the two vertexes of the new edge to obtain a point coordinate which is equal to the reflectivity factor Z value on the edge, adding the point coordinate into a contour line point set, and removing the current triangle from the triangle to be searched;
c. taking the new edge as an initial edge to search another triangle, continuously searching a second new edge which also meets the condition in the other two edges of the found triangle, namely the Z value is between the reflectivity values of the two vertexes of the edge, taking the second new edge which meets the condition as the initial edge, carrying out interpolation calculation on the two vertexes of the second new edge to obtain a point coordinate which is equal to the reflectivity factor Z value on the edge, adding the point coordinate into a contour line point set, and removing the current triangle from the triangle to be searched;
d. c is repeatedly executed until the point coordinate which is found to be equal to the value of the reflectivity factor Z is positioned on the initial edge which is found in the step A, and the searching of the isoline point set of the closed isoline is finished; sequentially connecting the coordinates of each point in the isoline point set to form a closed isoline;
e. and (4) continuing to search another starting edge from the triangle which is not rejected, repeating the steps a-c until the starting edge can not be found, and completing all closed contour line searches corresponding to all the reflectivity factors Z, as shown in FIG. 6.
Example four:
in the basic reflectance contour data of the scanned layer obtained in example three, the corresponding color is assigned to each contour according to the reflectance factor Z value, and the result is shown in fig. 7.
The isolines with different values are endowed with different colors, so that the size of the echo value can be visually expressed, for example, if the isoline is red or deep red, the isoline indicates a high echo value area, and a weather expert can visually judge a heavy rainfall area.