Generalize
The Generalize gem reduces the number of vertices in polygons and polylines while preserving their overall shape. This is useful for reducing file sizes, improving rendering performance, and simplifying complex geometries for analysis or visualization.
tip
info
The gem uses the Ramer–Douglas–Peucker algorithm, which removes vertices based on their perpendicular distance from line segments. You can control the level of simplification by adjusting the distance threshold.
Input and Output
The Generalize gem accepts the following input and output.
Port | Description |
---|---|
in0 | Source dataset containing a column with lines or polygons. |
out | Output dataset containing a new column with the transformed lines or polygons. |
Parameters
Configure the Generalize gem using the following parameters.
Parameter | Description |
---|---|
Geometry column | Column containing the WKT geometries to generalize. |
Threshold | Distance threshold for vertex removal. Vertices closer than this distance to the line segment connecting their neighbors will be removed. |
Units | Unit of measurement for the threshold in miles or kilometers. |