Package org.meteoinfo.jts.noding
Class SegmentStringDissolver
- java.lang.Object
-
- org.meteoinfo.jts.noding.SegmentStringDissolver
-
public class SegmentStringDissolver extends java.lang.ObjectDissolves a noded collection ofSegmentStrings to produce a set of merged linework with unique segments. A customSegmentStringDissolver.SegmentStringMergermerging 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSegmentStringDissolver.SegmentStringMergerA merging strategy which can be used to update the context data ofSegmentStrings which are merged during the dissolve process.
-
Constructor Summary
Constructors Constructor Description SegmentStringDissolver()Creates a dissolver with the default merging strategy.SegmentStringDissolver(SegmentStringDissolver.SegmentStringMerger merger)Creates a dissolver with a user-defined merge strategy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddissolve(java.util.Collection segStrings)Dissolve allSegmentStrings in the inputCollectionvoiddissolve(SegmentString segString)Dissolve the givenSegmentString.java.util.CollectiongetDissolved()Gets the collection of dissolved (i.e.
-
-
-
Constructor Detail
-
SegmentStringDissolver
public SegmentStringDissolver(SegmentStringDissolver.SegmentStringMerger merger)
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 Detail
-
dissolve
public void dissolve(java.util.Collection segStrings)
Dissolve allSegmentStrings in the inputCollection- Parameters:
segStrings-
-
dissolve
public void dissolve(SegmentString segString)
Dissolve the givenSegmentString.- Parameters:
segString- the string to dissolve
-
getDissolved
public java.util.Collection getDissolved()
Gets the collection of dissolved (i.e. unique)SegmentStrings- Returns:
- the unique
SegmentStrings
-
-