GraphOptions.DegenerateEdges

Controls how degenerate edges (i.e., an edge from a vertex to itself) are handled. Such edges may be present in the input, or they may be created when both endpoints of an edge are snapped to the same output vertex. The options available are:

DISCARD: Discards all degenerate edges. This is useful for layers that do not support degeneracies, such as S2PolygonLayer.

More...

Values

ValueMeaning
DISCARD
DISCARD_EXCESS
KEEP

Detailed Description

DISCARD EXCESS

Discards all degenerate edges that are connected to non-degenerate edges. (Any remaining duplicate edges can be merged using DuplicateEdges::MERGE.) This is useful for simplifying polygons while ensuring that loops that collapse to a single point do not disappear.

KEEP: Keeps all degenerate edges. Be aware that this may create many redundant edges when simplifying geometry (e.g., a polyline of the form AABBBBBCCCCCCDDDD). DegenerateEdges::KEEP is mainly useful for algorithms that require an output edge for every input edge.

Meta