From f9d8e8288f895292264ff4155b87e798f0dc3985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A9=8D=E4=B8=B9=E5=B0=BC=20Dan=20Jacobson?= Date: Wed, 28 Feb 2024 23:50:02 +0800 Subject: [PATCH] Update gdal_rasterize.rst grammar and colors (#9349) --- doc/source/programs/gdal_rasterize.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/source/programs/gdal_rasterize.rst b/doc/source/programs/gdal_rasterize.rst index 71060b79ba11..32121529f2b1 100644 --- a/doc/source/programs/gdal_rasterize.rst +++ b/doc/source/programs/gdal_rasterize.rst @@ -6,7 +6,7 @@ gdal_rasterize .. only:: html - Burns vector geometries into a raster. + Burns vector geometries into a raster .. Index:: gdal_rasterize @@ -202,7 +202,7 @@ raster data is only supported since GDAL 2.1.0. The GDAL supported output file. Must support update mode access. This file will be created (or overwritten if it already exists). -The program create a new target raster image when any of the :option:`-of`, +The program creates a new target raster image when any of the :option:`-of`, :option:`-a_nodata`, :option:`-init`, :option:`-a_srs`, :option:`-co`, :option:`-te`, :option:`-tr`, :option:`-tap`, :option:`-ts`, or :option:`-ot` options are used. The resolution or size must be specified using the :option:`-tr` or :option:`-ts` option for all new @@ -216,13 +216,13 @@ This utility is also callable from C with :cpp:func:`GDALRasterize`. .. versionadded:: 2.1 -Example -------- +Examples +-------- The following would burn all polygons from mask.shp into the RGB TIFF file work.tif with the color red (RGB = 255,0,0). -:: +.. code-block:: gdal_rasterize -b 1 -b 2 -b 3 -burn 255 -burn 0 -burn 0 -l mask mask.shp work.tif @@ -230,7 +230,7 @@ file work.tif with the color red (RGB = 255,0,0). The following would burn all "class A" buildings into the output elevation file, pulling the top elevation from the ROOF_H attribute. -:: +.. code-block:: gdal_rasterize -a ROOF_H -where "class='A'" -l footprints footprints.shp city_dem.tif @@ -238,6 +238,6 @@ The following would burn all polygons from footprint.shp into a new 1000x1000 rgb TIFF as the color red. Note that :option:`-b` is not used; the order of the :option:`-burn` options determines the bands of the output raster. -:: +.. code-block:: gdal_rasterize -burn 255 -burn 0 -burn 0 -ot Byte -ts 1000 1000 -l footprints footprints.shp mask.tif