logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

pksieve - program to sieve filter raster image

Description

pksieve  filters small objects (maximum size defined with the option -s) 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 -c 4) or eight
       directions (N-S, W-E and diagonals NW-SE, NE-SW: set option -c 8).

Example

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

       pksieve-iinput.tif-c8-c5-ooutput.shp

                                                 01 January 2025                                      pksieve(1)

Name

       pksieve - program to sieve filter raster image

Options

-ifilename, --inputfilename
              Input image file

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

       -ofilename, --outputfilename
              Output image file Output image file

       -c4|8, --connect4|8
              the connectedness: 4 directions or 8 directions

       -bband, --bandband
              the band to be used from input file

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

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

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

       -cooption, --cooption
              Creation option for output file.  Multiple options can be specified.

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

       -vlevel, --verboselevel
              verbose mode if > 0

Synopsis

pksieve-iinput [-ssize] -ooutput [options]

See Also