Geoscience Reference
In-Depth Information
-ts width height
(from GDAL 1.8.0) set output file size in pixels and lines. Note that -ts cannot be
used with -tr
-ot type
(fromGDAL 1.8.0) For the output bands to be of the indicated data type. Defaults
to Float64
-q
(from GDAL 1.8.0) Suppress progress monitor and other non-error output.
src_datasource
Any OGR supported readable datasource.
dst_filename
The GDAL supported output file. Must support update mode access. Before
GDAL 1.8.0, gdal_rasterize could not create new output files.
As an example, we rasterize the burnt areas in continental Portugal, for which
the administrative region is defined in the Spatialite vector nuts_pt1.sqlite .
The burnt areas have been delineated for the year 2010 by the Joint Research Centre
of the European Commission and available as a vector file ( ba_pt.sqlite ,see
Fig. 9.2 a).
We first retrieve the bounding box of continental Portugal in the European pro-
jection (EPSG:3035) using ogrinfo :
ogrinfo -so nuts_pt1.sqlite nuts_pt1
...
Extent: (2635889.224758, 1729712.007284) - (2977211.809029,
2298249.065033)
...
25 m 2 and set the output bounding box with the
option -te . The output data type is set to UInt16 . To obtain optimal compression
rates, the DEFLATE algorithm is selected with ZLEVEL = 9 (see also Sect. 5.5 ) . The
attribute of interest in the burnt area vector is the area of the mapped burnt area,
area_ha . The resulting raster dataset contains the burn area for each pixel. The
legend in Fig. 9.2 b has been created in QGIS.
We define the grid cell size as 25
×
gdal_rasterize -tr 25 25 -te 2635875 1729700 2977225 2298250 -co
COMPRESS=DEFLATE -co PREDICTOR=2 -co ZLEVEL=9 -ot UInt16
-a area_ha -l 2010 -a_nodata 0 -init 0 ba_pt.sqlite
ba_pt.tif
 
 
Search WWH ::




Custom Search