1gdal_sieve(1) General Commands Manual gdal_sieve(1)
2
3
4
6 gdal_sieveRemoves small raster polygons.
7
9 gdal_sieve.py [-q] [-st threshold] [-4] [-8] [-o name=value]
10 srcfile [-nomask] [-mask filename] [-of format] [dstfile]
11
13 The gdal_sieve.py script removes raster polygons smaller than a
14 provided threshold size (in pixels) and replaces replaces them with the
15 pixel value of the largest neighbour polygon. The result can be written
16 back to the existing raster band, or copied into a new file.
17
18 The input dataset is read as integer data which means that floating
19 point values are rounded to integers. Re-scaling source data may be
20 necessary in some cases (e.g. 32-bit floating point data with min=0 and
21 max=1).
22
23 Additional details on the algorithm are available in the
24 GDALSieveFilter() docs.
25
26 -q:
27 The script runs in quiet mode. The progress monitor is suppressed
28 and routine messages are not displayed.
29
30 -st threshold:
31 Set the size threshold in pixels. Only raster polygons smaller than
32 this size will be removed.
33
34 -o name=value:
35 Specify a special argument to the algorithm. Currently none are
36 supported.
37
38 -4:
39 Four connectedness should be used when determining polygons. That
40 is diagonal pixels are not considered directly connected. This is
41 the default.
42
43 -8:
44 Eight connectedness should be used when determining polygons. That
45 is diagonal pixels are considered directly connected.
46
47 srcfile
48 The source raster file used to identify target pixels. Only the
49 first band is used.
50
51 -nomask:
52 Do not use the default validity mask for the input band (such as
53 nodata, or alpha masks).
54
55 -mask filename:
56 Use the first band of the specified file as a validity mask (zero
57 is invalid, non-zero is valid).
58
59 dstfile
60 The new file to create with the filtered result. If not provided,
61 the source band is updated in place.
62
63 -of format:
64 Select the output format. Starting with GDAL 2.3, if not specified,
65 the format is guessed from the extension (previously was GTiff).
66 Use the short format name.
67
69 Frank Warmerdam warmerdam@pobox.com
70
71
72
73GDAL Thu Jul 25 2019 gdal_sieve(1)