com.vividsolutions.jts.noding

Class SegmentStringDissolver


public class SegmentStringDissolver
extends java.lang.Object

Dissolves a noded collection of SegmentStrings to produce a set of merged linework with unique segments. A custom merging strategy can be applied when two identical (up to orientation) strings are dissolved together. The default merging strategy is simply to discard the merged string.

A common use for this class is to merge noded edges while preserving topological labelling.

Version:
1.7
See Also:
SegmentStringDissolver.SegmentStringMerger

Nested Class Summary

static interface
SegmentStringDissolver.SegmentStringMerger

Constructor Summary

SegmentStringDissolver()
Creates a dissolver with the default merging strategy.
SegmentStringDissolver(SegmentStringDissolver.SegmentStringMerger merger)
Creates a dissolver with a user-defined merge strategy.

Method Summary

void
dissolve(Collection segStrings)
Dissolve all SegmentStrings in the input Collection
void
dissolve(SegmentString segString)
Dissolve the given SegmentString.
Collection
getDissolved()
Gets the collection of dissolved (i.e.

Constructor Details

SegmentStringDissolver

public SegmentStringDissolver()
Creates a dissolver with the default merging strategy.

SegmentStringDissolver

public SegmentStringDissolver(SegmentStringDissolver.SegmentStringMerger merger)
Creates a dissolver with a user-defined merge strategy.
Parameters:
merger - the merging strategy to use

Method Details

dissolve

public void dissolve(Collection segStrings)
Dissolve all SegmentStrings in the input Collection
Parameters:
segStrings -

dissolve

public void dissolve(SegmentString segString)
Dissolve the given SegmentString.
Parameters:
segString - the string to dissolve

getDissolved

public Collection getDissolved()
Returns:
the unique SegmentStrings