---
name: "pkfilterdem"
section: "1"
platform: "linux"
package: "pktools"
version: "2.6.7.6+ds-6+b3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/pkfilterdem"
---

# pkfilterdem(1)

Filter digital elevation model raster datasets

## NAME

pkfilterdem - Filter digital elevation model raster datasets

## SYNOPSIS

FC**pkfilterdem**F\[0\]  FC**-i**F\[0\] *input* FC**-o**F\[0\] *output* \[*options*\] \[*advanced options*\]

## DESCRIPTION

**pkfilterdem** can be used to filter digital elevation models. It is typically used after the utility [**pklas2img**(1)](/pklas2img/1.md) to create a digital terrain model. The default filter operation is the progressive morphological filter ⟨http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1202973&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs\_all.jsp%3Farnumber%3D1202973⟩ .

## OPTIONS

- FC**-i**F\[0\] *filename*, FC**--input**F\[0\] *filename*

  input image

- FC**-o**F\[0\] *filename*, FC**--output**F\[0\] *filename*

  output classification image

- FC**-f**F\[0\] *filter*, FC**--filter**F\[0\] *filter*

  post processing filter: vito, etew\_min, promorph (progressive morphological filter), open, close).

- FC**-dim**F\[0\] *maxsize*, FC**--dim**F\[0\] *maxsize*

  maximum filter kernel size

- FC**-ot**F\[0\] *type*, FC**--otype**F\[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**-of**F\[0\] *format*, FC**--oformat**F\[0\] *format*

  Output image format (see also [**gdal\_translate**(1)](/gdal_translate/1.md)).

- FC**-ct**F\[0\] *colortable*, FC**--ct**F\[0\] *colortable*

  color table (file with 5 columns: id R G B ALFA (0: transparent, 255: solid)). Use none to omit color table

- FC**-nodata**F\[0\] *value*, FC**--nodata**F\[0\] *value*

  nodata value

- FC**-v**F\[0\] *level*, FC**--verbose**F\[0\] *level*

  verbose mode if \> 0

Advanced options

- FC**-circ**F\[0\], FC**--circular**F\[0\]

  circular disc kernel for dilation and erosion

- FC**-st**F\[0\] *threshold*, FC**--st**F\[0\] *threshold*

  slope threshold used for morphological filtering. Use a low values to remove more height objects in flat terrains

- FC**-ht**F\[0\] *threshold*, FC**--ht**F\[0\] *threshold*

  initial height threshold for progressive morphological filtering. Use low values to remove more height objects. Optionally, a maximum height threshold can be set via a second argument (e.g., FC**-ht**F\[0\] *0.2* FC**-ht**F\[0\] *2.5* sets an initial threshold at 0.2 m and caps the threshold at 2.5 m).

- FC**-minchange**F\[0\] *number*, FC**--minchange**F\[0\] *number*

  Stop iterations when no more pixels are changed than this threshold.

## SEE ALSO

[**pklas2img**(1)](/pklas2img/1.md)
