CoordinateSequenceFilter
public class CoordinatePrecisionReducerFilter extends java.lang.Object implements CoordinateSequenceFilter
Coordinate
s in a
CoordinateSequence
to match the supplied PrecisionModel
.
Uses PrecisionModel.makePrecise(double)
.
The input is modified in-place, so
it should be cloned beforehand if the
original should not be modified.Constructor | Description |
---|---|
CoordinatePrecisionReducerFilter(PrecisionModel precModel) |
Creates a new precision reducer filter.
|
Modifier and Type | Method | Description |
---|---|---|
void |
filter(CoordinateSequence seq,
int i) |
Rounds the Coordinates in the sequence to match the PrecisionModel
|
boolean |
isDone() |
Always runs over all geometry components.
|
boolean |
isGeometryChanged() |
Always reports that the geometry has changed
|
public CoordinatePrecisionReducerFilter(PrecisionModel precModel)
precModel
- the PrecisionModel to usepublic void filter(CoordinateSequence seq, int i)
filter
in interface CoordinateSequenceFilter
seq
- the CoordinateSequence
to which the filter is appliedi
- the index of the coordinate to apply the filter topublic boolean isDone()
isDone
in interface CoordinateSequenceFilter
public boolean isGeometryChanged()
isGeometryChanged
in interface CoordinateSequenceFilter
Copyright © 2018. All rights reserved.