Class LineDissolver
java.lang.Object
org.locationtech.jts.dissolve.LineDissolver
Dissolves the linear components
from a collection of
Geometrys
into a set of maximal-length LineStrings
in which every unique segment appears once only.
The output linestrings run between node vertices
of the input, which are vertices which have
either degree 1, or degree 3 or greater.
Use cases for dissolving linear components include generalization (in particular, simplifying polygonal coverages), and visualization (in particular, avoiding symbology conflicts when depicting shared polygon boundaries).
This class does not node the input lines. If there are line segments crossing in the input, they will still cross in the output.
- Author:
- Martin Davis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Collection geometries) Adds a collection of Geometries to be processed.voidAdds aGeometryto be dissolved.static GeometryDissolves the linear components in a geometry.Gets the dissolved result as a MultiLineString.
-
Constructor Details
-
LineDissolver
public LineDissolver()
-
-
Method Details
-
dissolve
-
add
-
add
Adds a collection of Geometries to be processed. May be called multiple times. Any dimension of Geometry may be added; the constituent linework will be extracted.- Parameters:
geometries- the geometries to be line-merged
-
getResult
Gets the dissolved result as a MultiLineString.- Returns:
- the dissolved lines
-