pksieve(1)

pksieve1

Program to sieve filter raster image

Usage

FCpksieveF [0] FC-iF [0] input [FC-sF [0] size] FC-oF [0] output [options]

Overview

pksieve filters small objects (maximum size defined with the option FC-sF[0]) in a raster by replacing them to the largest neighbor object. In this context, objects are defined as pixels of the same value that are also connected. The connection can be defined in four directions (N-S and W-E: set option FC-cF[0] 4) or eight directions (N-S, W-E and diagonals NW-SE, NE-SW: set option FC-cF[0] 8).

Options

FC-iF[0] filename, FC--inputF[0] filename

Input image file

FC-sF[0] size, FC--sizeF[0] size

raster polygons with sizes smaller than this will be merged into their largest neighbour. No sieve is performed if size = 0

FC-oF[0] filename, FC--outputF[0] filename

Output image file Output image file

FC-cF[0] 4|8, FC--connectF[0] 4|8

the connectedness: 4 directions or 8 directions

FC-bF[0] band, FC--bandF[0] band

the band to be used from input file

FC-mF[0] filename, FC--maskF[0] filename

Use the first band of the specified file as a validity mask (zero is invalid, non-zero is valid).

FC-otF[0] type, FC--otypeF[0] type

Data type for output image ({Byte / Int16 / UInt16 / UInt32 / Int32 / Float32 / Float64 / CInt16 / CInt32 / CFloat32 / CFloat64}). Empty string: inherit type from input image

FC-ofF[0] format, FC--oformatF[0] format

Output image format (see also gdal_translate(1)). Empty string: inherit from input image

FC-coF[0] option, FC--coF[0] option

Creation option for output file. Multiple options can be specified.

FC-ctF[0] filename, FC--ctF[0] filename

colour table in ASCII format having 5 columns: id R G B ALFA (0: transparent, 255: solid)

FC-vF[0] level, FC--verboseF[0] level

verbose mode if > 0

Examples

merge all patches smaller than 5 pixels into bigger classes, using 8 connectivity (horizontal, vertical and diagonal)

FC
pksieve -i input.tif -c 8 -c 5 -o output.shp
      F[0]

Releases

5 releases since Debian 9 (Stretch); the text changed 4 times.

  1. 9
  2. 10
  3. 11
  4. 12
  5. 13

From pktools 2.6.7.6+ds-6+b3 in Debian 13 (Trixie). Parsed by carta from the page's man source.