Skip to content

sampling_vertex_dp

sampling_vertex_dp(
    n: int, polygon: bool | None = None
) -> FeatureSpec

lets_plot's Douglas-Peucker path simplification. Not applied by ggrust.

Built as lets_plot builds it, so ported code runs; rendering warns (GgrustWarning) and draws every vertex.

Parameters:

  • n (int) –

    Number of vertices to keep.

  • polygon (bool, default: None ) –

    Whether the paths are polygon rings.

Returns:

  • FeatureSpec –

    The lets_plot spec.

Examples:

>>> from ggrust import *
>>> sampling_vertex_dp(500).as_dict()
{'name': 'vertex_dp', 'n': 500}