Skip to content

Add min_number parameter to segmentize #405

@runarberg

Description

@runarberg

I am working on a neural network which operates on polylines with variable number of vertices. To fit each polyline into the ANN the simplify method works well to reduce the number of vertices of long polylines. However to increase the number of vertices for short polylines, I am out of luck (currently I just fill the matrix with zeros but I suspect that may limiting the sensitivity of the model).

I am thinking that segmentize could work similar to simplify where you either pass in max_distance or min_number (but not both), and if you pass in min_number a simple algorithm of inserting a redundant vertex in the center of the longest line iteratively until the min_number is reached.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions