Geoscience Reference
In-Depth Information
range
A difference between the minimum and maximum values found in grid node
search ellipse.
count
A number of data points found in grid node search ellipse.
average_distance
An average distance between the grid node (center of the search ellipse) and all
of the data points found in grid node search ellipse.
average_distance_pts
An average distance between the data points found in grid node search ellipse.
The distance between each pair of points within ellipse is calculated and average
of all distances is set as a grid node value.
The options for the data metrics consist of the parameters that define the search
ellipse, the minimum number of data points to use and the no-data value.
As an example we use a point cloud obtained from a LiDAR instrument. LiDAR
derived data are typically stored in a format that is not in a regular grid and is thus
well suited to test the gdal_grid command. However, as discussed in Chap. 15 ,
LiDAR instruments produce large amounts of data and their processing is beyond
the scope of GDAL/OGR utilities. For the sake of illustration, we will only use a
subset of the pointcloud data on Mount Saint Helens that is used in Sect. 15.3.1 .
The subset covers a small spatial extent of 200 by 200m and represents only
0.15% from the original point cloud st-helens.las . The LAS file has been
converted to an OGR vector dataset, as explained in Sect. 15.3.1 . The point density
has been calculated as 0.65 points per square meter.
With the gdal_grid utility we now create a raster dataset from this subset.
gdal_grid -a
invdist:radius1=2:radius2=2:angle=0:minpoints=1:nodata=0
-l st-helens_part st-helens_part.shp st-helens_part.tif
-outsize 100 100 -a_srs EPSG:26910
The inverse distance neighbor algorithm is used and both radii of the search ellipse
are set to 2m (circle). The power of the distance function is left at its default value of
two. If less than one point has been found in the search ellipse, the grid cell value gets
a no-data value of 0. Notice that gdal_grid does not allow the ground sampling
distance to be set directly. Instead it uses the number of pixels in x and y (set to 100 in
this example).
We can check the number of points that were used for the interpolation by setting
the data metric option to count :
gdal_grid -a
count:radius1=2:radius2=2:angle=0:minpoints=1:nodata=0 -l
st-helens_part st-helens_part.shp
st-helens_part_count.tif -outsize 100 100 -a_srs
EPSG:26910
 
Search WWH ::




Custom Search