Package org.locationtech.jts.noding
Class SegmentStringDissolver
java.lang.Object
org.locationtech.jts.noding.SegmentStringDissolver
Dissolves a noded collection of
SegmentString
s to produce
a set of merged linework with unique segments.
A custom SegmentStringDissolver.SegmentStringMerger
merging strategy
can be supplied.
This strategy will be called when two identical (up to orientation)
strings are dissolved together.
The default merging strategy is simply to discard one of the merged strings.
A common use for this class is to merge noded edges while preserving topological labelling. This requires a custom merging strategy to be supplied to merge the topology labels appropriately.
- Version:
- 1.7
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
A merging strategy which can be used to update the context data ofSegmentString
s which are merged during the dissolve process. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a dissolver with the default merging strategy.Creates a dissolver with a user-defined merge strategy. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dissolve
(Collection segStrings) Dissolve allSegmentString
s in the inputCollection
void
dissolve
(SegmentString segString) Dissolve the givenSegmentString
.Gets the collection of dissolved (i.e. unique)SegmentString
s
-
Constructor Details
-
SegmentStringDissolver
Creates a dissolver with a user-defined merge strategy.- Parameters:
merger
- the merging strategy to use
-
SegmentStringDissolver
public SegmentStringDissolver()Creates a dissolver with the default merging strategy.
-
-
Method Details
-
dissolve
Dissolve allSegmentString
s in the inputCollection
- Parameters:
segStrings
-
-
dissolve
Dissolve the givenSegmentString
.- Parameters:
segString
- the string to dissolve
-
getDissolved
Gets the collection of dissolved (i.e. unique)SegmentString
s- Returns:
- the unique
SegmentString
s
-