Geoscience Reference
In-Depth Information
-dstband n
Identifies the band in the destination file to use (default is 1).
-of format
Select the output format. The default is GeoTIFF (GTiff). Use the short format
name.
-co "NAME=VALUE"
passes a creation option to the output format driver. Multiple -co options may
be listed. See format specific documentation for legal creation options for each
format.
-ot datatype
Force the output image bands to have a specific type. Use type names (i.e. Byte,
Int16,...)
-values n,n,n
A list of target pixel values in the source image to be considered target pixels. If
not specified, all non-zero pixels will be considered target pixels.
-distunits PIXEL/GEO
Indicate whether distances generated should be in pixel or georeferenced coordi-
nates (default PIXEL).
-maxdist n
The maximum distance to be generated. All pixels beyond this distance will
be assigned either the no-data value, or 65535. Distance is interpreted in pixels
unless -distunits GEO is specified.
-nodata n
Specify a no-data value to use for the destination proximity raster.
-fixed-buf-val n
Specify a value to be applied to all pixels that are within the -maxdist of target
pixels (including the target pixels) instead of a distance value.
Proximity maps obtained with gdal_proximity.py can be combined with
gdal_contour (see Sect. 9.4 ) to create contour vectors. We show how to create a
contour map around some area, an active fire for instance. The contour map can be
used as a warning zone with different perimeters. The fire map is a georeferenced
binary mask with values 0 (no fire) and 1 (fire event). We can create a proximity map
to the nearest fire event. We calculate the distance in georeferenced coordinates (in
meter). The first step is to calculate a distance map. Distances beyond 25 km can be
ignored by setting the option -maxdist (Fig. 10.4 b).
gdal_proximity.py fires.tif distance.tif -distunits GEO -maxdist
25000
In a second command we then use the gdal_contour tool to create a contour
vector dataset for each multiple of, e.g. 5 km (Fig. 10.4 c).
 
Search WWH ::




Custom Search