public class PrecisionReducer extends Object
This class handles only polygonal and linear inputs.
For full functionality see
|Modifier and Type||Method and Description|
Reduces the precision of a geometry by rounding and snapping it to the supplied
public static Geometry reducePrecision(Geometry geom, PrecisionModel pm)
PrecisionModel. The input geometry must be polygonal or linear.
The output is always a valid geometry. This implies that input components may be merged if they are closer than the grid precision. if merging is not desired, then the individual geometry components should be processed separately.
The output is fully noded
(i.e. coincident lines are merged and noded).
This provides an effective way to node / snap-round a collection of
geom- the geometry to reduce
pm- the precision model to use
IllegalArgumentException- if the reduction fails due to invalid input geometry is invalid
Copyright © 2020. All rights reserved.