Data resampling method for interference imaging altimeter
1. A data resampling method for an interferometric imaging altimeter, the method comprising:
step 1) sequencing data of different scenes on the same track, and sequentially reading in original data of an interference imaging altimeter including an azimuth direction and a distance direction, wherein the original data is issued by each scene;
step 2) carrying out preprocessing of coordinate conversion and boundary removal on the original data of each scene to obtain preprocessed data of each scene;
step 3) selecting the Alt sea surface height data after each scene preprocessing for the preprocessed data of each scene, selecting an azimuth anchor point in the azimuth direction, and generating an azimuth resampling sequence;
step 4) selecting a distance direction anchor point for each azimuth direction resampling point in the azimuth direction resampling sequence in the corresponding distance direction, and generating a distance direction resampling sequence corresponding to each azimuth direction resampling point;
step 5) according to the azimuth resampling sequence obtained in the step 3) and the distance resampling sequence generated by each azimuth resampling point in the distance direction obtained in the step 4), with the filtering radius r as a small area, performing small area mean filtering resampling on the data preprocessed by each scene, selecting the resampling point therein, and storing the resampling point in a pre-prepared array as the array of each scene;
step 6) judging whether the array of the current foreground is the array of the first scene, splicing the scenes according to the judgment result and the sequence to obtain the data after resampling, writing the data into a hard disk, and reissuing the data; data resampling is completed.
2. The data resampling method for interferometric imaging altimeter of claim 1, characterized in that the raw data is NC format data comprising: UTC time, ECEF coordinate system, Mask and Alt sea level height.
3. The data resampling method for the interferometric imaging altimeter of claim 2, characterized in that said step 2) specifically comprises:
converting the ECEF coordinate parameter system into an LLA coordinate system;
converting the point P (x, y, z) in ECEF coordinate system into P (lon, lat, alt) in LLA coordinate system:
wherein e is the eccentricity of the earth ellipsoid, N is the curvature radius of the earth ellipsoid, p is the projection length of OP in the xy plane, and O is the origin of the coordinate system;
obtaining an LLA coordinate system, and after the coordinate system conversion is completed, performing boundary excision on the original data of each scene:
according to the effective range of the preset sea surface height data, performing boundary cutting on the Alt sea surface height in the original data by adopting a circular judgment method to obtain cut sea surface height data;
performing the above-mentioned boundary removal on the respective effective ranges by adopting a cyclic judgment method on the effective range of the UTC time data, the effective range of the converted LLA coordinate system data and the effective range of the Mask data, so that all kinds of data have the same dimensionality on rows and columns;
and summarizing the results to obtain the data after each scene is preprocessed.
4. The data resampling method for the interferometric imaging altimeter of claim 1, characterized in that said step 3) specifically comprises:
selecting Alt sea surface height data after any scene preprocessing for each scene preprocessed data, selecting an azimuth anchor point according to a filtering radius r in the azimuth direction, and taking the azimuth anchor point as an initial sampling point; starting from the initial sampling point, calculating the spherical distance l from each data point to the initial sampling point in the azimuth directioni:
li=αiR
Wherein alpha isiIs the spherical angle between two data points in the azimuth direction; r is the radius of the earth;
wherein the content of the first and second substances,
wherein the content of the first and second substances,the latitude of the data point q in the azimuth direction;the latitude of the data point p in the azimuth direction; lambda [ alpha ]qiLongitude in the azimuth direction for data point q; lambda [ alpha ]piLongitude in the azimuth direction for data point p;
according to a preset azimuth sampling interval, traversing and judging whether the distance from each data point to the initial sampling point meets integral multiple of the distance of the sampling interval:
when the distance from the ith data point to the initial sampling point meets integral multiple of the sampling interval, selecting the data point as an azimuth resampling point, and summarizing each data point meeting the conditions to generate an azimuth resampling sequence;
and when the distance from the ith data point to the initial sampling point does not meet the integral multiple of the sampling interval, deleting the data point and judging whether the next data point meets the condition.
5. The data resampling method for the interferometric imaging altimeter of claim 1, characterized in that said step 4) specifically comprises:
in the azimuth resampling sequence, for each azimuth resampling point, in the corresponding distance direction, according to the invalid data point of the boundary and the filtering radius r, selecting a distance direction anchor point as a distance direction resampling initial point of the azimuth resampling point in the distance direction;
starting from this distance toward the resampling initial point, the spherical distance l from each data point in the distance direction to this distance toward the resampling initial point is calculatedj:
lj=αjR
Wherein alpha isjIs the spherical angle between two data points with upward distance; r is the radius of the earth;
wherein the content of the first and second substances,
wherein the content of the first and second substances,the latitude of the data point q with the distance upward;the latitude of the data point p with the distance upward; lambda [ alpha ]qjLongitude, data point q distance up; lambda [ alpha ]pjLongitude from the up for data point p;
according to a preset distance direction sampling interval, traversing and judging whether the distance from each data point to a distance direction resampling initial point meets integral multiple of the distance direction sampling interval:
when the distance from the ith data point to the distance direction resampling initial point meets integral multiple of the distance direction sampling interval, selecting the data point as a distance direction resampling point, and summarizing each data point meeting the conditions to generate a distance direction resampling sequence of each direction resampling point in the distance direction;
and when the distance from the ith data point to the distance direction resampling initial point does not meet the integral multiple of the distance direction sampling interval, deleting the data point and judging whether the next data point meets the condition.
6. The data resampling method for interferometric imaging altimeter according to claim 1, characterized in that said step 6) comprises in particular:
judging whether the array of the current foreground is the array of the first scene or not:
if the array of the current foreground is the array of the first scene, recording the longitude value of the last azimuth resampling point of the current foreground as the azimuth anchor point of the next scene preprocessing data to obtain the array of the next scene, and repeating the steps 1) to 5);
if the array of the current foreground is the array of the non-first scene, after the array of the current foreground is obtained, recording the longitude value of the last azimuth resampling point of the current foreground as the azimuth anchor point of the next scene preprocessing data, obtaining the array of the next scene, repeating the steps 1) -5), carrying out scene splicing with the array of the previous scene in sequence, and repeating the steps;
and after all scenes are processed, making all the spliced arrays into a netCDF format file, obtaining the resampled data, writing the resampled data into a hard disk, and reissuing the resampled data to finish data resampling.
Background
Satellite altimeters are instruments that measure sea surface height, and are typically mounted on satellite platforms. The height measurement principle of the traditional radar altimeter is that a cluster of microwave pulses are transmitted to the sea surface, the microwave pulses are scattered after reaching the sea surface, part of energy of the backscattering is received by the altimeter again, the accurate distance R from a satellite platform to the sea surface can be obtained by measuring the time delay amount of the microwave pulses, the satellite orbit height H can be obtained by a global satellite navigation system, and therefore the measurement of the sea surface height SSH can be calculated by the following formula:
SSH=H-R
the pulse emitted by the traditional altimeter is emitted to a subsatellite point, so that one-dimensional observation can be obtained along the direction of the orbit. Meanwhile, because the data is one-dimensional, the data can be directly stored in a one-dimensional array, distribution is easy to form, the resampling process is simple, and points are fetched again along the axial direction according to the resampling interval.
The interferometric imaging altimeter is a new generation satellite altimeter, sea surface elevation measurement is based on a Synthetic Aperture Radar (SAR) interferometric measurement technology deviating from a sub-satellite point, and elevation inversion is performed through interferometric phases of two SAR images acquired at different viewing angles. Because the interference imaging mechanism is different from that of the traditional altimeter, the device can simultaneously observe a large-range ocean, and simultaneously form an observation point in the azimuth direction and the distance direction, two dimensions of the distance direction and the azimuth direction and the measured sea surface elevation, thereby realizing the sea surface three-dimensional imaging. The specific sea surface elevation SSH1 may be calculated by the following equation
Wherein the sea surface elevation SSH1 is determined by the orbital height H, the slope distance r, the base length B, the base inclination angle alpha, the wavelength lambda and the interference phase of the satelliteBitAnd jointly calculating.
At present, an interference imaging radar altimeter carried in a space laboratory is a radar altimeter which adopts a small-angle interference measurement technology, an aperture synthesis technology and a sea-land compatible height tracking technology to realize wide-swath sea level height measurement, can realize three-dimensional imaging of a land surface to obtain a digital elevation map, and measures the sea level height, the sea level wind speed and the wind wave in ocean observation. The method comprises the steps of obtaining high-coherence sea surface echoes by using a small incident angle, a double antenna with one transmitting and double receiving and a double-channel receiver, and accurately obtaining interference phase information of the sea surface height in a wide swath range (40km) by using high-precision interference phase measurement capability and waveform tracking capability. The geometrical relation between the phase center of the double antennas of the altimeter and the sea surface point is accurately recovered by processing the interference phase, so that the height value of the average sea surface is determined. The traditional altimeter can only obtain the observation range of about 3km of the subsatellite point in ocean observation, namely one-dimensional sea level height measurement of the subsatellite point along the track direction is obtained, the breadth of the interference imaging radar altimeter is improved by 10 times in the aspect of three-dimensional ocean surface observation compared with that of the traditional altimeter, the observation efficiency is greatly improved, and the obtained observation data has a very important role in researching the global ocean dynamic environment (including sea level height, sea surface storms and ocean currents). Meanwhile, the sea surface height is used as an inversion input quantity, the method has important contribution to multiple fields of ocean gravity anomaly inversion, ocean bottom topography inversion, internal wave inversion and the like, and has great promotion effect on subjects such as physical oceanography, ocean geodety, ocean geology and the like.
Due to the observation mechanism of the synthetic aperture and the measurement of the swath width, the storage and distribution of the two-dimensional observation data also face a difficult problem:
on one hand, the resolution of two-dimensional observation original data in the azimuth direction can reach 20m, the resolution in the distance direction can reach 50m, the high resolution causes huge data volume, the data volume of the imaging altimeter along the length of 60km can reach 500MB, which is far larger than dozens of KB of the traditional altimeter, therefore, the two-dimensional observation cannot be resampled, and the data size cannot be reduced.
On the other hand, due to the rolling phenomenon of the satellite platform, the load of the altimeter can generate side sway, so that the swath is observed and influenced on the ground. The existing imaging altimeter is right-side looking, to which the roll motion appears: rolling to the left, shifting and widening the ground swath to the right; roll to the right and the ground swath shifts and narrows to the left. Due to the characteristic, the existing imaging altimeter data is not regular rectangles or parallelograms in a strict sense, irregular invalid values are generated on two sides of the data, and resampling is difficult.
Disclosure of Invention
In order to solve the defects in the prior art, the invention provides a data resampling method for an interference imaging altimeter, which is used for accurately resampling data of the interference imaging altimeter, so that the data volume is reduced and the distribution is convenient to form; the method respectively calculates sampling sequences in the azimuth direction and the distance direction, overcomes the defects that azimuth direction sampling is easy to overlap and distance direction sampling is easy to generate invalid points, and can adapt to the requirement of non-uniform sampling; the method is suitable for the actual measurement data of the Tiangong No. two imaging altimeter and is also suitable for the imaging altimeter to be transmitted subsequently;
the invention provides a data resampling method for an interference imaging altimeter, which comprises the following steps:
step 1) sequencing data of different scenes on the same track, and sequentially reading in original data of an interference imaging altimeter including an azimuth direction and a distance direction, wherein the original data is issued by each scene;
step 2) carrying out preprocessing of coordinate conversion and boundary removal on the original data of each scene to obtain preprocessed data of each scene;
step 3) selecting the Alt sea surface height data after each scene preprocessing for the preprocessed data of each scene, selecting an azimuth anchor point in the azimuth direction, and generating an azimuth resampling sequence;
step 4) selecting a distance direction anchor point for each azimuth direction resampling point in the azimuth direction resampling sequence in the corresponding distance direction, and generating a distance direction resampling sequence corresponding to each azimuth direction resampling point;
step 5) according to the azimuth resampling sequence obtained in the step 3) and the distance resampling sequence generated by each azimuth resampling point in the distance direction obtained in the step 4), with the filtering radius r as a small area, performing small area mean filtering resampling on the data preprocessed by each scene, selecting the resampling point therein, and storing the resampling point in a pre-prepared array as the array of each scene;
step 6) judging whether the array of the current foreground is the array of the first scene, splicing the scenes according to the judgment result and the sequence to obtain the data after resampling, writing the data into a hard disk, and reissuing the data; data resampling is completed.
As an improvement of the above technical solution, the original data is NC format data, which includes: UTC time, ECEF coordinate system, Mask and Alt sea level height.
As an improvement of the above technical solution, the step 2) specifically includes:
converting the ECEF coordinate parameter system into an LLA coordinate system;
converting the point P (x, y, z) in ECEF coordinate system into P (lon, lat, alt) in LLA coordinate system:
wherein e is the eccentricity of the earth ellipsoid, N is the curvature radius of the earth ellipsoid, p is the projection length of OP in the xy plane, and O is the origin of the coordinate system.
Obtaining an LLA coordinate system, and after the coordinate system conversion is completed, performing boundary excision on the original data of each scene:
according to the effective range of the preset sea surface height data, performing boundary cutting on the Alt sea surface height in the original data by adopting a circular judgment method to obtain cut sea surface height data;
performing the above-mentioned boundary removal on the respective effective ranges by adopting a cyclic judgment method on the effective range of the UTC time data, the effective range of the converted LLA coordinate system data and the effective range of the Mask data, so that all kinds of data have the same dimensionality on rows and columns;
and summarizing the results to obtain the data after each scene is preprocessed.
As an improvement of the above technical solution, the step 3) specifically includes:
selecting Alt sea surface height data after any scene preprocessing for each scene preprocessed data, selecting an azimuth anchor point according to a filtering radius r in the azimuth direction, and taking the azimuth anchor point as an initial sampling point; starting from the initial sampling point, calculating the spherical distance l from each data point to the initial sampling point in the azimuth directioni:
li=αiR
Wherein alpha isiIs the spherical angle between two data points in the azimuth direction; r is the radius of the earth;
wherein the content of the first and second substances,
wherein the content of the first and second substances,the latitude of the data point q in the azimuth direction;the latitude of the data point p in the azimuth direction; lambda [ alpha ]qiLongitude in the azimuth direction for data point q; lambda [ alpha ]piFor data point p in azimuthLongitude in the upward direction;
according to a preset azimuth sampling interval, traversing and judging whether the distance from each data point to the initial sampling point meets integral multiple of the distance of the sampling interval:
when the distance from the ith data point to the initial sampling point meets integral multiple of the sampling interval, selecting the data point as an azimuth resampling point, and summarizing each data point meeting the conditions to generate an azimuth resampling sequence;
and when the distance from the ith data point to the initial sampling point does not meet the integral multiple of the sampling interval, deleting the data point and judging whether the next data point meets the condition.
As an improvement of the above technical solution, the step 4) specifically includes:
in the azimuth resampling sequence, for each azimuth resampling point, in the corresponding distance direction, according to the invalid data point of the boundary and the filtering radius r, selecting a distance direction anchor point as a distance direction resampling initial point of the azimuth resampling point in the distance direction;
starting from this distance toward the resampling initial point, the spherical distance l from each data point in the distance direction to this distance toward the resampling initial point is calculatedj:
lj=αjR
Wherein alpha isjIs the spherical angle between two data points with upward distance; r is the radius of the earth;
wherein the content of the first and second substances,
wherein the content of the first and second substances,the latitude of the data point q with the distance upward;the latitude of the data point p with the distance upward; lambda [ alpha ]qjLongitude, data point q distance up; lambda [ alpha ]pjLongitude from the up for data point p;
according to a preset distance direction sampling interval, traversing and judging whether the distance from each data point to a distance direction resampling initial point meets integral multiple of the distance direction sampling interval:
when the distance from the ith data point to the distance direction resampling initial point meets integral multiple of the distance direction sampling interval, selecting the data point as a distance direction resampling point, and summarizing each data point meeting the conditions to generate a distance direction resampling sequence of each direction resampling point in the distance direction;
and when the distance from the ith data point to the distance direction resampling initial point does not meet the integral multiple of the distance direction sampling interval, deleting the data point and judging whether the next data point meets the condition.
As an improvement of the above technical solution, the step 6) specifically includes:
judging whether the array of the current foreground is the array of the first scene or not:
if the array of the current foreground is the array of the first scene, recording the longitude value of the last azimuth resampling point of the current foreground as the azimuth anchor point of the next scene preprocessing data to obtain the array of the next scene, and repeating the steps 1) to 5);
if the array of the current foreground is the array of the non-first scene, after the array of the current foreground is obtained, recording the longitude value of the last azimuth resampling point of the current foreground as the azimuth anchor point of the next scene preprocessing data, obtaining the array of the next scene, repeating the steps 1) -5), carrying out scene splicing with the array of the previous scene in sequence, and repeating the steps;
and after all scenes are processed, making all the spliced arrays into a netCDF format file, obtaining the resampled data, writing the resampled data into a hard disk, and reissuing the resampled data to finish data resampling.
Compared with the prior art, the invention has the beneficial effects that:
1. the method of the invention has adaptability; the imaging altimeter adopting the distance direction and the azimuth direction storage data can be subjected to resampling processing by using the method;
2. the method of the invention has flexibility; different sampling intervals are allowed to be used in the distance direction and the azimuth direction; allowing the azimuthal use of non-uniform sampling intervals; allowing distance-wise use of non-uniform sampling intervals;
3. the method of the invention has accuracy; the distance direction and the azimuth direction are separately processed, the azimuth direction considers the splicing problem between the foreground and the background, the distance direction considers the invalid values of the left side and the right side, points are accurately fetched according to the original data index when the points are fetched by resampling, and the data points are accurate and correct.
Drawings
FIG. 1 is a flow chart of a data resampling method for an interferometric imaging altimeter of the present invention;
FIG. 2 is a flowchart of a particular method of the data resampling method for the interferometric imaging altimeter of FIG. 1;
FIG. 3 is a schematic diagram of the processing of a first scene and a second scene for a data resampling method for an interferometric imaging altimeter of the present invention.
Detailed Description
The invention will now be further described with reference to the accompanying drawings.
As shown in fig. 1 and 2, the present invention provides a data resampling method for an interferometric imaging altimeter, the method comprising:
step 1) sequencing data of different scenes on the same track, and sequentially reading in original data of an interference imaging altimeter including an azimuth direction and a distance direction, wherein the original data is issued by each scene; wherein, the original data is NC format data, which comprises: UTC (Universal Time Coordinated), ECEF (Earth-Centered Earth-Fixed) coordinate system (including three parameters x, y, z in the coordinate system), Mask and Alt sea level height; wherein UTC time is the time of the satellite altimeter at the observation point; the position information of the observation point is expressed by ECEF coordinate coefficient data, Mask marine Mask data is used for distinguishing sea from land, and Alt sea height data is the sea height observed by the interference imaging altimeter. For oceanographic research or other geographic information research, such as oceanographic geodetic science, oceanographic geology and the like, a LLA (Longitude, Latitude, Altitude) coordinate system is generally adopted as a position description, namely, three parameters of Longitude (Longitude), Latitude (Latitude) and Altitude (Altitude). Therefore, the ECEF coordinate system needs to be converted into the LLA coordinate system.
Specifically, the interferometric imaging altimeter has a different working mechanism from the conventional altimeter, the generated data volume is very large compared with the conventional altimeter data, and the size of the original data file can reach thousands to tens of thousands of times. Thus, a conventional altimeter may distribute data in tracks, one for each data file. However, the data size of the interferometric imaging altimeter is too large, so that the tracks need to be segmented and then stored separately, and for one track, the segmentation processing is usually performed according to the length of 60km, and each part is called a scene. The resolution of the original data of the interference imaging altimeter in the distance direction is 50m, the resolution in the azimuth direction is about 20m, the data volume is too dense, the subsequent ocean parameter inversion is inconvenient to use, and the original data needs to be resampled into the resolution suitable for oceanographic research. And (4) using a Python programming language, sequencing according to the scene sequence in the file name, and reading in one by one for processing.
Step 2) carrying out preprocessing of coordinate conversion and boundary removal on the original data of each scene to obtain preprocessed data of each scene;
specifically, the ECEF coordinate parameter system is converted into a LLA coordinate system;
converting the point P (x, y, z) in the ECEF coordinate system into the parameter P (lon, lat, alt) in the LLA coordinate system:
wherein e is the eccentricity of the earth ellipsoid, N is the curvature radius of the earth ellipsoid, p is the projection length of OP in the xy plane, and O is the origin of the coordinate system.
Obtaining an LLA coordinate system, and after the coordinate system conversion is finished, carrying out boundary excision preprocessing on the original data of each scene:
according to the effective range of the preset sea surface height data, a cycle judgment method is adopted to perform boundary cutting on the Alt sea surface height in the original data to obtain cut sea surface height data, so that the edges are prevented from generating invalid values to influence the subsequent splicing work of different scenes;
in the stored original data of each scene, the boundary of the Alt sea surface height data has an invalid value, and splicing work of subsequent different scenes can be influenced if the boundary is not cut. The method used for boundary removal is a circular judgment method, Alt sea surface height data is read line by line, and whether all the line data are invalid values is judged; if yes, deleting the row of data; reading the data row by row, and judging whether the row of data is all invalid values; if yes, deleting the row of data.
And (3) performing the boundary removal on the effective range of the UTC time data, the effective range of the converted LLA coordinate system data and the effective range of the Mask by adopting a circular judgment method, wherein the specific removal process is the same as the row and column removal of the Alt sea surface height data, and the same row and column removal is performed, so that each data has the same dimension in rows and columns. Because the UTC time only has azimuth information, the UTC time data only needs to be cut off by the same number of lines.
Step 3) selecting the Alt sea surface height data after each scene preprocessing for the preprocessed data of each scene, selecting an azimuth anchor point in the azimuth direction, and generating an azimuth resampling sequence;
specifically, for each scene of preprocessed data, selecting Alt sea surface height data after any scene of preprocessed data, and selecting an azimuth in the azimuth direction according to the filtering radius rTaking the azimuth anchor point as an initial sampling point; starting from the initial sampling point, calculating the spherical distance l from each data point selected in the azimuth direction to the initial sampling pointi:
li=αiR
Wherein alpha isiIs the spherical angle between two data points in the azimuth direction; r is the radius of the earth;
wherein the content of the first and second substances,
wherein the content of the first and second substances,the latitude of the data point q with the azimuth upward;the latitude of the data point p with the azimuth upward; lambda [ alpha ]qiLongitude in azimuth of data point q; lambda [ alpha ]piLongitude in azimuth of data point p;
according to a preset azimuth sampling interval, traversing and judging whether the distance from each data point to the initial sampling point meets integral multiple of the distance of the sampling interval:
when the distance from the ith data point to the initial sampling point meets integral multiple of the sampling interval, selecting the data point as an azimuth resampling point, and summarizing each data point meeting the conditions to generate an azimuth resampling sequence;
and when the distance from the ith data point to the initial sampling point does not meet the integral multiple of the sampling interval, deleting the data point and judging whether the next data point meets the condition.
Since the data points in the first row and the first column are used as initial sampling points, boundary loss occurs when filtering is used for sampling, and sampling precision is affected. For the selection of the first scene azimuth anchor point, only the influence of the filtering radius needs to be considered, and the distance from the azimuth anchor point to the boundary needs to be greater than the filtering radius, so that the region covered by the filtering kernel function is ensured to be effective data. For a non-first scene, when the azimuth anchor point is selected, the splicing with the previous scene needs to be considered, and when the longitude of the initial sampling point of the foreground is greater than the longitude of the last sampling point of the previous scene, the situation that the overlapping cannot occur during the splicing can be ensured. Meanwhile, the influence of the filtering radius is considered, and the fact that cracks cannot occur in splicing is guaranteed. Therefore, when the anchor point of the foreground is selected to be larger than the sum of the longitude and the filtering radius of the last resampling point from the azimuth of the previous scene, all requirements can be met.
In consideration of the filtering operation when the anchor point is selected by subsequent resampling in the distance direction, the change of the filtering radius will affect the position of the anchor point, so that the distance from the anchor point to the boundary needs to be greater than the filtering radius, and all data points can be guaranteed to be effective values during filtering.
In order to realize accurate splicing of different scenes and accurate extraction of sampling intervals, a certain data point is selected as an initial sampling point, and the initial sampling point is used as a reference for the generation of a subsequent azimuth sampling sequence, so that the accurate extraction of the data point at the sampling interval is ensured. Meanwhile, the initial end range is determined for splicing of the next scene, and repeated sampling caused by coverage when different scenes are spliced or no sampling point caused by gaps is avoided. And when the anchor point is selected, the filtering operation during resampling is considered at the same time, the distance from the anchor point to the boundary is ensured to be larger than the filtering radius, and the filtering kernel function coverage area is ensured to be all effective data points.
To ensure accurate resampling of data points in the azimuth direction of the current scene, the distances of all data points to the anchor point in the azimuth direction are calculated using accurate distance calculations when the sample sequence is generated. In a practical implementation, the run time of this step is short by vectoring operations. And according to the sampling interval and the calculated distance, recording the point as a resampling point when the distance from the data point to the anchor point meets integral multiple of the sampling interval. The method ensures accurate sampling from the original azimuth data according to the length of the sampling interval, and can accurately calculate the non-uniform sampling sequence when the non-uniform sampling interval is given.
Step 4) selecting a distance direction anchor point for each azimuth direction resampling point in the azimuth direction resampling sequence in the corresponding distance direction, and generating a distance direction resampling sequence corresponding to each azimuth direction resampling point;
specifically, in the azimuth resampling sequence, for each azimuth resampling point, in the corresponding distance direction, according to the invalid data point and the filtering radius of the boundary, a distance direction anchor point is selected and used as a distance direction resampling initial point of the azimuth resampling point in the distance direction;
starting from the distance toward the resampling initial point, calculating a spherical distance l from each data point selected in the distance direction to the distance toward the resampling initial pointj:
lj=αjR
Wherein alpha isjIs the spherical angle between two data points; r is the radius of the earth;
wherein the content of the first and second substances,
wherein the content of the first and second substances,the latitude of the data point q with the distance upward;the latitude of the data point p with the distance upward; lambda [ alpha ]qjLongitude, data point q distance up; lambda [ alpha ]pjLongitude from the up for data point p;
according to a preset distance direction sampling interval, traversing and judging whether the distance from each data point to a distance direction resampling initial point meets integral multiple of the distance direction sampling interval:
when the distance from the ith data point to the distance direction resampling initial point meets integral multiple of the distance direction sampling interval, selecting the data point as a distance direction resampling point, and summarizing each data point meeting the conditions to generate a distance direction resampling sequence of each direction resampling point in the distance direction;
and when the distance from the ith data point to the distance direction resampling initial point does not meet the integral multiple of the distance direction sampling interval, deleting the data point and judging whether the next data point meets the condition.
And according to a preset distance direction sampling interval, when the distance from the ith data point to the distance direction resampling initial point meets integral multiple of the sampling interval, recording the data point as a distance direction resampling point. In the distance direction, points are sequentially re-sampled from the leftmost effective value to the rightmost effective value according to the length of the distance direction sampling interval. In practice, the index of the point may be taken out and the distance resampling point may be recorded in this way. It should be noted that the distance toward the resampling point needs to add the number of index points (including the number of filter radius points and the number of invalid data values on the left) on the left side of the initial point to the distance toward the final sampling index point. The interferometric imaging altimeter has different observation precision and resolution at the amplitude input end and the amplitude output end due to the observation system and the characteristic of small incident angle of the synthetic aperture radar, so that the non-uniform sampling in the distance direction is particularly common. The resampling method proposed by the invention is also adaptive to the distance direction. Sampling intervals are not subjected to point extraction according to integral multiples, different sampling intervals are redesigned according to the requirement of non-uniform sampling, point extraction is performed according to the non-uniform sampling intervals, and the operation of extracting index points is the same as that in uniform sampling.
To ensure accurate resampling of range-wise data points corresponding to each azimuth-wise data sampling point, the distances of all data points to the range-wise anchor point are calculated in the current range direction using accurate range calculations when generating the sampling sequence. And according to the distance to the sampling interval and the calculated distance, recording the point as a rectangular resampling point when the distance from the data point to the distance to the anchor point meets integral multiple of the sampling interval. The method ensures accurate sampling from the original distance to the data according to the length of the distance to sampling interval, and can accurately calculate the distance to non-uniform sampling sequence when the non-uniform sampling interval is given.
Wherein, considering the filtering operation when the distance is taken from the resampling point, the change of the filtering radius will affect the anchor point position. Meanwhile, when the rolling change of the satellite platform is considered, deformation of distance direction data is easily caused, missing points or redundant points are easily generated at the near amplitude end and the far amplitude end, and sampling is interfered. Therefore, the distance from the anchor point to the boundary needs to be larger than the filtering radius and the number of the missing points, so that all data points are valid values during filtering.
The obtained azimuth sampling sequence is recorded in the form of original data index points. And processing the distance direction corresponding to each azimuth resampling point in the azimuth sampling sequence to obtain a distance direction resampling sequence corresponding to the point in the azimuth direction. Because there is rolling motion in the satellite platform, can produce the influence to the ground swath of interference formation of image altimeter, interference formation of image altimeter looks sideways for the right side, and rolling motion shows it as: rolling to the left, shifting and widening the ground swath to the right; roll to the right and the ground swath shifts and narrows to the left. In order to overcome the defect that the ground observation swath deviates leftwards or rightwards due to the side sway of the satellite platform during operation, the number of invalid values on the left side needs to be considered for selecting the distance-direction anchor point. Also because of this feature, the original data of the imaging altimeter is not regular rectangle, nor strictly parallelogram, and irregular invalid values are generated on both sides of the data, so that it is difficult to resample. The corresponding range data points are different at different azimuth data points. Therefore, when the distance direction anchor point is selected, the influence of the filtering radius and the invalid values on the two sides is considered at the same time, and the distance from the distance direction anchor point to the boundary is required to be larger than the range of the left invalid value and the filtering radius, so that the coverage range of the filtering kernel function is guaranteed to be valid data points by sampling, and meanwhile, sampling in the invalid data areas on the two sides is avoided.
The sampling interval in the azimuth direction and the sampling interval in the distance direction may be the same or different. However, in order to ensure that the observation at each resampling point is a corresponding independent observation quantity, the filtering radius needs to be smaller than or equal to half of the corresponding sampling interval, that is, the azimuth resampling point or the distance resampling point does not have a weighting influence on each adjacent sampling point, and each azimuth resampling point or distance resampling point only performs filtering processing in a corresponding neighborhood small area.
The generation of the azimuth resample sequence or the range resample sequence may be dynamically changed as the filter radius and the sampling interval are changed. The generation of the azimuth resampling sequence or the range resampling sequence is divided into two steps: firstly, determining a sampling anchor point, namely an initial sampling point according to a filtering radius; secondly, calculating the distance according to the sampling interval, and selecting the point as a sampling point when the distance meets the multiple requirement. Thus, the azimuth resampling sequence or the range resampling sequence can be accurately determined when the sampling interval is changed, the filtering radius is changed or the sampling interval and the filtering radius are simultaneously changed. This feature also enables the method to have the ability of non-uniform sampling.
The azimuth resampling sequence and the range resampling sequence are calculated separately, so that accurate calculation and accurate sampling can be guaranteed when the azimuth filtering radius, the sampling interval, the range filtering radius and the sampling interval are different. This property also enables the method to achieve non-uniform sampling in both azimuth and range directions.
Judging whether the process of generating a distance direction resampling sequence in the distance direction at each position direction resampling point is finished or not;
if the process of the distance direction resampling sequence generated by each direction resampling point in the distance direction is completely finished, the next step is carried out;
if the process of generating the distance resampling sequence in the distance direction at each position resampling point is not finished, returning to the step 1), repeating the process until the distance resampling sequence is generated in the corresponding distance direction at each position resampling point, and then performing the next step;
step 5) according to the azimuth resampling sequence obtained in the step 3) and the distance resampling sequence generated by each azimuth resampling point in the distance direction obtained in the step 4), with the filtering radius r as a small area, performing small area mean filtering resampling on the data preprocessed by each scene, selecting the resampling point therein, and storing the resampling point in a pre-prepared array as the array of each scene;
step 6) judging whether the array of the current foreground is the array of the first scene;
if the array of the current foreground is the array of the first scene, recording the longitude value of the last azimuth resampling point of the current foreground as the azimuth anchor point of the next scene preprocessing data to obtain the array of the next scene, and repeating the steps 1) to 5);
if the array of the current foreground is the array of the non-first scene, after the array of the current foreground is obtained, recording the longitude value of the last azimuth resampling point of the current foreground as the azimuth anchor point of the next scene preprocessing data, obtaining the array of the next scene, repeating the steps 1) -5), carrying out scene splicing with the array of the previous scene in sequence, and repeating the steps;
and after all scenes are processed, making all the spliced arrays into a netCDF format file, obtaining the resampled data, writing the resampled data into a hard disk, and reissuing the resampled data to finish data resampling.
And when resampling is carried out on the data after each scene is preprocessed, neighborhood filtering is carried out on the resampling points, and the influence of high-frequency noise is removed. Mean filtering or gaussian filtering is generally used,
and (3) splicing the foreground and the background, wherein after the arrays of different scenes are sequentially processed, scene splicing operation needs to be executed, and the specific process is as follows:
and (4) completing the distance direction according to the maximum distance direction sampling points of the front scene and the rear scene in the distance direction, so that the front scene and the rear scene have the same dimension in the distance direction, and directly splicing in the direction.
The direct splicing is based on the fact that the splicing problem is considered when the foreground selects the azimuth anchor point, and due to the fact that the longitude changes from small to large and has continuity, the longitude can be used as the reference of splicing. Therefore, the longitude of the last resampling point of the previous scene is continued in the longitude, so that coverage and gaps can be avoided during splicing.
If the foreground is the first scene, storing the foreground into a cache and continuously reading the next scene for processing; if the current scene is a non-first scene, splicing with the previous scene is needed, and selecting a last azimuth resampling point of the current scene as an azimuth anchor point of the next scene; the problem that the distance between the front scene and the rear scene is not matched with the dimension can occur during splicing, the scenes with less distance values need to be expanded, and the distance direction is expanded by using an invalid value, so that the front scene and the rear scene have the same dimension in the distance direction. And then directly splicing in the azimuth direction, wherein the splicing problem is considered when the anchor point is selected in the foreground, and the longitude of the last sampling point of the scene is continued in the longitude, so that the situation that coverage and gaps cannot occur in splicing is ensured. And performing splicing operation on UTC time, longitude, latitude and Mask data. Until the last scene is processed, sequentially completing the splicing of all scenes, generating a data grid, obtaining the data after resampling, storing the data in a cache, writing the data into a hard disk, and reissuing the data; data resampling is completed.
The netCDF data format is a data format commonly used in the field of geographic information, can conveniently store multidimensional information, and is easy to release to the outside. When the data is stored, the effective information is UTCtime, longitude, latitude, Mask ocean Mask and Alt sea surface height data. Writing a data file, and adding annotation information, wherein the annotation information comprises data file initial time, data file end time, azimuth sampling interval, azimuth filtering radius, distance sampling interval, distance filtering radius, file creation time and the like.
Example 1.
As shown in fig. 3, the method includes:
step 1) sequencing data of different scenes on the same track, and sequentially reading in original data of an interference imaging altimeter including an azimuth direction and a distance direction, wherein the original data is issued by each scene;
step 2) carrying out preprocessing of coordinate conversion and boundary removal on the original data of each scene to obtain preprocessed data of each scene; as shown in fig. 3, the gray area can be regarded as a dense and dense hemp data point, and the data amount is very large, so that data resampling needs to be performed on the data; after preprocessing, the data points are subjected to boundary excision to obtain effective data, wherein the effective data is similar to a parallelogram, and invalid data points are arranged around the effective data. The gray circles are then filters.
Step 3) selecting Alt sea surface height data after first scene preprocessing for each scene preprocessed data, selecting an azimuth anchor point in the azimuth direction, and generating an azimuth resampling sequence;
specifically, a azimuth anchor point, namely an initial sampling point, is selected in the azimuth direction, then the distance from all azimuth data points to the azimuth anchor point is calculated in the azimuth direction, the distance is an integral multiple of 5km of a sampling interval and is recorded as an azimuth re-sampling point, namely the distance meets the sampling interval of 5km, 10km, 15km and the like and is re-marked until all azimuth data points are compared, and an azimuth re-sampling sequence is generated;
step 4) selecting a distance direction anchor point for each azimuth direction resampling point in the azimuth direction resampling sequence in the corresponding distance direction, and generating a distance direction resampling sequence corresponding to each azimuth direction resampling point;
specifically, a distance direction anchor point is selected in the distance direction, namely a distance direction initial sampling point, then the distance from all distance direction data points to the distance direction anchor point is calculated in the distance direction, the distance is an integral multiple of 5km of a sampling interval and is recorded as an azimuth direction resampling point, namely the distance direction resampling point meets the sampling interval of 5km, 10km, 15km and the like and is marked again until all the distance direction data points are compared, and a distance direction resampling sequence is generated;
to have the same latitude as the azimuth direction, the data points in the distance direction resample sequence include: the unequal length spaces to the left of the distance plus the index points of the distance-wise index sequence.
Step 5) according to the azimuth resampling sequence obtained in the step 3) and the distance resampling sequence generated by each azimuth resampling point in the distance direction obtained in the step 4), with the filtering radius r as a small area, performing small area mean filtering resampling on the data preprocessed by each scene, selecting the resampling point therein, and storing the resampling point in a pre-prepared array as the array of each scene;
specifically, filtering operation is performed once in a small neighborhood around each sampling point, which may be gaussian filtering or mean filtering, and in the mean filtering, the mean value around the sampling point (the size of the filtering radius r) is taken as a value to be taken out for storage, so that the error of the sampling point can be reduced;
the small surrounding neighborhood is a range formed by taking the filtering radius r as a radius, and the filtering radius r is considered to be incapable of being too close to the boundary when the initial orientation anchor point and the distance anchor point are taken, otherwise, the filtering radius r is out of range, and at least one filtering radius is left from the boundary. In the schematic diagram, the initial anchor point is just vacated by a filtering radius in the azimuth and distance directions, so that the range covered by the filter just can be guaranteed to have a value during sampling.
Step 6) judging whether the array of the current foreground is the array of the first scene, splicing the scenes according to the judgment result and the sequence to obtain the data after resampling, writing the data into a hard disk, and reissuing the data; data resampling is completed.
When the foreground is judged to be a first scene, directly recording the last azimuth resampling point in the first scene, continuously repeating the process, processing a second scene, and splicing the second scene and the first scene;
every time a scene is processed, the last sampling point of the azimuth direction needs to be stored as the initial sampling point of the next scene. The schematic diagram can be seen, the front scene and the rear scene have the repeated area, so that the sampling of the next scene does not need to be started from the first line, the last sampling point longitude and latitude of the previous scene is directly followed, and the resampling is continued;
and after all scenes are spliced, making the scenes into a netCDF format file, writing the netCDF format file into a hard disk, and releasing the netCDF format file again.
Finally, it should be noted that the above embodiments are only used for illustrating the technical solutions of the present invention and are not limited. Although the present invention has been described in detail with reference to the embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted without departing from the spirit and scope of the invention as defined in the appended claims.