1gdal_rasterize(1)           General Commands Manual          gdal_rasterize(1)
2
3
4

NAME

6       gdal_rasterize - .TH "gdal_rasterize" 1 "Fri Apr 22 2011" "GDAL"
7

NAME

9       gdal_rasterize - burns vector geometries into a raster
10

SYNOPSIS

12       Usage: gdal_rasterize [-b band] [-i] [-at]
13              [-burn value] | [-a attribute_name] [-3d]
14              [-l layername]* [-where expression] [-sql select_statement]
15              <src_datasource> <dst_filename>
16

DESCRIPTION

18       This program burns vector geometries (points, lines and polygons) into
19       the raster band(s) of a raster image. Vectors are read from OGR
20       supported vector formats.
21
22       Note that the vector data must in the same coordinate system as the
23       raster data, on the fly reprojection is not provided.
24
25       -b band:
26           The band(s) to burn values into. Multiple -b arguments may be used
27           to burn into a list of bands. The default is to burn into band 1.
28
29       -i:
30           Invert rasterization. Burn the fixed burn value, or the burn value
31           associated with the first feature into all parts of the image not
32           inside the provided a polygon.
33
34       -at:
35           Enables the ALL_TOUCHED rasterization option so that all pixels
36           touched by lines or polygons will be updated not just those one the
37           line render path, or whose center point is within the polygon.
38           Defaults to disabled for normal rendering rules.
39
40       -burn value:
41           A fixed value to burn into a band for all objects. A list of -burn
42           options can be supplied, one per band being written to.
43
44       -a attribute_name:
45           Identifies an attribute field on the features to be used for a burn
46           in value. The value will be burned into all output bands.
47
48       -3d:
49           Indicates that a burn value should be extracted from the 'Z' values
50           of the feature. These values are adjusted by the burn value given
51           by '-burn value' or '-a attribute_name' if provided. As of now,
52           only points and lines are drawn in 3D.
53
54       -l layername:
55           Indicates the layer(s) from the datasource that will be used for
56           input features. May be specified multiple times, but at least one
57           layer name or a -sql option must be specified.
58
59       -where expression:
60           An optional SQL WHERE style query expression to be applied to
61           select features to burn in from the input layer(s).
62
63       -sql select_statement:
64           An SQL statement to be evaluated against the datasource to produce
65           a virtual layer of features to be burned in.
66
67       src_datasource:
68           Any OGR supported readable datasource.
69
70       dst_filename:
71           The GDAL supported output file. Must support update mode access.
72           Currently gdal_rasterize cannot create new output files though that
73           may be added eventually.
74

EXAMPLE

76       The following would burn all polygons from mask.shp into the RGB TIFF
77       file work.tif with the color red (RGB = 255,0,0).
78
79       gdal_rasterize -b 1 -b 2 -b 3 -burn 255 -burn 0 -burn 0 -l mask mask.shp work.tif
80
81       The following would burn all 'class A' buildings into the output
82       elevation file, pulling the top elevation from the ROOF_H attribute.
83
84       gdal_rasterize -a ROOF_H -where 'class="A"' -l footprints footprints.shp city_dem.tif
85

AUTHORS

87       Frank Warmerdam <warmerdam@pobox.com>
88
89
90
91GDAL                            Fri Apr 22 2011              gdal_rasterize(1)
Impressum