public class Densifier
extends java.lang.Object
Geometry
by inserting extra vertices along the line segments
contained in the geometry.
All segments in the created densified geometry will be no longer than
than the given distance tolerance.
Densified polygonal geometries are guaranteed to be topologically correct.
The coordinates created during densification respect the input geometry's
PrecisionModel
.
Note: At some future point this class will offer a variety of densification strategies.
Constructor | Description |
---|---|
Densifier(Geometry inputGeom) |
Creates a new densifier instance.
|
Modifier and Type | Method | Description |
---|---|---|
static Geometry |
densify(Geometry geom,
double distanceTolerance) |
Densifies a geometry using a given distance tolerance,
and respecting the input geometry's
PrecisionModel . |
Geometry |
getResultGeometry() |
Gets the densified geometry.
|
void |
setDistanceTolerance(double distanceTolerance) |
Sets the distance tolerance for the densification.
|
public Densifier(Geometry inputGeom)
inputGeom
- public static Geometry densify(Geometry geom, double distanceTolerance)
PrecisionModel
.geom
- the geometry to densifydistanceTolerance
- the distance tolerance to densifypublic void setDistanceTolerance(double distanceTolerance)
distanceTolerance
- the densification tolerance to usepublic Geometry getResultGeometry()
Copyright © 2018. All rights reserved.