📄 gdal_rasterize.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>GDAL: gdal_rasterize</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.5.1 --><div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul></div><h1><a class="anchor" name="gdal_rasterize">gdal_rasterize</a></h1>burns vector polygons into a raster<p> Usage: <p><div class="fragment"><pre class="fragment">Usage: gdal_rasterize [-b band] [-burn value] | [-a attribute_name] | [-3d] [-l layername]* [-where expression] [-sql select_statement] <src_datasource> <dst_filename></pre></div><p>This program burns vector polygons into the raster band(s) of a raster image. Vectors are read from OGR supported vector formats.<p><dl><dt><b>-b</b> <em>band</em>: </dt><dd>The band(s) to burn values into. Multiple -b arguments may be used to burn into a list of bands. The default is to burn into band 1.<p></dd><dt><b>-burn</b> <em>value</em>: </dt><dd>A fixed value to burn into a band for all objects. A list of -burn options can be supplied, one per band being written to.<p></dd><dt><b>-a</b> <em>attribute_name</em>: </dt><dd>Identifies an attribute field on the features to be used for a burn in value. The value will be burned into all output bands.<p></dd><dt><b>-3d</b>: </dt><dd>Indicates that a burn value should be extracted from the "Z" values of the feature (not yet implemented).<p></dd><dt><b>-l</b> <em>layername</em>: </dt><dd>Indicates the layer(s) from the datasource that will be used for input features. May be specified multiple times, but at least one layer name or a -sql option must be specified.<p></dd><dt><b>-where</b> <em>expression</em>: </dt><dd>An optional SQL WHERE style query expression to be applied to select features to burn in from the input layer(s). <p></dd><dt><b>-sql</b> <em>select_statement</em>: </dt><dd>An SQL statement to be evaluated against the datasource to produce a virtual layer of features to be burned in.<p></dd><dt><em>src_datasource</em>: </dt><dd>Any OGR supported readable datasource.<p></dd><dt><em>dst_filename</em>: </dt><dd>The GDAL supported output file. Must support update mode access. Currently gdal_rasterize cannot create new output files though that may be added eventually.<p></dd></dl><p> Example:<p>The following would burn all polygons from mask.shp into the RGB TIFF file work.tif with the color red (RGB = 255,0,0).<p><div class="fragment"><pre class="fragment">gdal_rasterize -b 1 -b 2 -b 3 -burn 255 -burn 0 -burn 0 -l mask mask.shp work.tif</pre></div><p>The following would burn all "class A" buildings into the output elevation file, pulling the top elevation from the ROOF_H attribute.<p><div class="fragment"><pre class="fragment">gdal_rasterize -a ROOF_H -where 'class="A"' -l footprints footprints.shp city_dem.tif</pre></div> <hr>Generated for GDAL by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1.</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -