The content of the invention
To solve the above problems, the invention discloses a kind of rainfall radar data extracting method, pole is sat using GIS technology
The radar data for marking projection is converted into the spatial data of grid, and extracts corresponding rainfall value according to the point, face for providing, under
The accurate hydrological analysis of one step provides data source.
In order to achieve the above object, the present invention provides following technical scheme:
X-band areal rainfall radar data extracting method based on GIS comprises the following steps:
Step one, the storage of data
The center of circle is set to radar in place, is stored by polar coordinate mode, totally 360 radial directions, arranged from 0 degree to 359 degree, often
Radial data stores some raininess values, and each raininess value takes two bytes;
Step 2, polar data is converted to raster data
Step 2-1, generates raster data
(1) empty grid is generated
It is coordinate, the empty raster data of call function generation that the longitude and latitude of radar position is passed through into projection transform;
(2) polar data is written to sky grid
1. define a two-dimensional array, be stored with polar coordinates azimuth angel in array, storehouse number n, using two recirculate by
Radar polar data is written in two-dimensional array;
2. from for storing, the empty grid of polar data is abstract to obtain block of pixels, for interim storage rainfall data;
3. by the distance of following formula computation grid point to radar center:
Dis is grid point to radar center distance in formula, and x, y are grid point coordinates;
4. by following formula computation grid point to the azimuth of radar center:
Azim is azimuth, θ=arctan (y/x) in formula;
5. corresponding rainfall value is found in polar coordinates apart from dis, azimuth azim according to grid point to radar center,
So as to obtain the rainfall value of the grid point, since the block of pixels upper left corner, first X-direction in the Y direction, is traveled through successively, assigns grid
Point rainfall value, block of pixels is write back sky grid again, completes radar polar data to the conversion of raster data.
Further, it is further comprising the steps of:
Step 3, radar rainfall image shows
Step 3-1, carries out classification and renders to grid map;
Step 3-2, render to form rainfall color grading using color range;
Step 3-3, transparency setting is carried out to Pluviogram.
Further, also including step 4, radar rainfall data is extracted:Radar rainfall is extracted with point, face mass mode
Value, according to website and/or Administrative boundaries and/or small catchment extraction.
Compared with prior art, the invention has the advantages that and beneficial effect:
The X-band areal rainfall radar data extracting method based on GIS that the present invention is provided, by the radar number of polar projection method
According to the spatial data for being converted into grid, conversion, displaying of the radar polar data to areal rainfall data are realized, and being capable of root
Corresponding rainfall value is extracted according to the point, face that are given, is radar rainfall normal for the accurate hydrological analysis of next step provides data source
Rule hydrology rainfall monitoring, the application in urban flooding mitigation, the early warning of middle small watershed flush flood and debris flow disaster, water resources management is laid
Basis.
Specific embodiment
The technical scheme that the present invention is provided is described in detail below with reference to specific embodiment, it should be understood that following specific
Implementation method is only illustrative of the invention and is not intended to limit the scope of the invention.
X-band areal rainfall radar data extracting method based on GIS proposed by the present invention comprises the following steps:
Step one, the storage of data
X-band rain detection radar data have rigorous data structure and space-time to put in order, and it includes file header and raininess number
According to two parts.File header data length is 256 bytes, comprising Data Identification, versions of data number, radar site and detecting parameter
Etc. information, reserve bytes are stuffed entirely with 0.
Table 1 lists the data structure of file header data.
The file header data structure of table 1
The storage mode of data is as follows:Recording mode is set to the center of circle in place with radar, is stored by polar coordinate mode, altogether
360 radial directions, arrange from 0 degree to 359 degree, storage 600 (total storehouse number is 600 in the present invention) the individual raininess value per radial data,
Each raininess value takes two bytes.As shown in table 2, wherein n is storehouse number to data store organisation.
The radial data storage organization of table 2
Step 2, polar data is converted to raster data
Rainfall radar polar data is dexterously switched to the two-dimensional matrix of 1200*1200 by the present invention.
Step 2-1, generates raster data
Coordinate system is the important Fundamentals of Mathematics of GIS data, for representing geographic element, image and the reference of observed result
System, the definition of coordinate system ensure that radar data correctly shows its position, direction and distance in software.The present invention
Middle use Xi'an 1980 projects.
(1) empty grid is generated
The longitude and latitude of radar position in header file, it is known that by being set to after projection transform (centx,
Centy), unit is rice.IRasterWorkspace2 interfaces in ArcEngine are called using C# language
CreateRasterDataset functions can generate empty grid.The major parameter of the function is as shown in table 3:
Table 3 generates empty raster data major parameter explanation
(2) polar data is written to sky grid
1. a two-dimensional array rain [angle, n] is defined, angel is polar coordinates azimuth, and n is storehouse number, using double
Be written to radar polar data in rain [angle, n] by circulation.
2. from for storing, the empty grid of polar data is abstract to be obtained PixelBlock blocks (block of pixels, actual is two dimension
Gray matrix), its Main Function is interim storage rainfall data.
3. computation grid point to radar center distance, as shown in formula 2-1:
Dis is grid point to radar center distance in formula, and x, y are grid point coordinates.
4. computation grid point is to the azimuth of radar center, as shown in formula 2-2:
Azim is azimuth, θ=arctan (y/x) in formula.
5. grid point to radar center the angle in dis, azimuth azim correspondence dimension group rain [angle, n],
N two values, so as to obtain the rainfall value of the grid point.Since the PixelBlock upper left corners, first X-direction in the Y direction, successively
Traversal, assigns grid point rainfall value.PixelBlock is write back sky grid again, radar polar data to raster data is completed
Conversion.
Specifically, grid point is obtained identical with azimuth in polar coordinates to after the azimuth azim of radar center, finding
Ending corner, be stored with 600 rainfall values under the ending corner, due to apart from dis=storehouses number * step, therefore storehouse number=dis/
Step, corresponding storehouse number can be obtained according to grid point to radar center apart from dis, also can just find storage under corresponding storehouse number
Rainfall value, that is, obtain the rainfall value of the grid point.
After radar data is converted into raster data, also including radar rainfall image shows the step of.
Step 3, radar rainfall image shows
Step 3-1, grid Pluviogram is rendered
Value, the position of differentiation rainfall from radar areal rainfall figure for convenience to grid map, it is necessary to carry out classification wash with watercolours
Dye.ArcEngine offer IRasterRenderer interfaces carry out classification and render to raster map layer.
Step 3-2, rainfall color range
Render to form rainfall color grading using color range, so as to the corresponding rainfall value of user's identification different colours.
Step 3-3, figure layer transparency is set
Avoid border, the watershed information in rainfall map combining hydrology GIS map, in addition it is also necessary to Pluviogram is carried out certain saturating
Lightness is set.
By above step, displaying of the final radar Pluviogram in hydrology GIS map is as shown in Figure 1.
Step 4, radar rainfall data is extracted
In order to the rainfall value to rainfall radar is verified, it is necessary to be compared with existing telemetry station data;Small watershed
Areal rainfall extract the accuracy of middle and small river flood forecasting played a key effect.Radar is extracted with point, face mass mode
Rainfall value, can be according to website and/or Administrative boundaries and/or small catchment extraction.
Technological means disclosed in the present invention program is not limited only to the technological means disclosed in above-mentioned implementation method, also includes
Constituted technical scheme is combined by above technical characteristic.It should be pointed out that for those skilled in the art
For, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications are also considered as
Protection scope of the present invention.