use of com.revolsys.geometry.noding.ScaledNoder in project com.revolsys.open by revolsys.
the class NodingFunctions method scaledNoding.
/**
* Runs a ScaledNoder on input.
* Input vertices should be rounded to precision model.
*
* @param geom
* @param scaleFactor
* @return the noded geometry
*/
public static Geometry scaledNoding(final Geometry geom, final double scaleFactor) {
final List segs = newSegmentStrings(geom);
final Noder noder = new ScaledNoder(new MCIndexSnapRounder(1.0), scaleFactor);
noder.computeNodes(segs);
final Collection nodedSegStrings = noder.getNodedSubstrings();
return fromSegmentStrings(nodedSegStrings);
}
use of com.revolsys.geometry.noding.ScaledNoder in project com.revolsys.open by revolsys.
the class Buffer method bufferFixedPrecision.
private static Geometry bufferFixedPrecision(final GeometryFactory precisionModel, final Geometry geometry, final double distance, final BufferParameters parameters) {
final MCIndexSnapRounder rounder = new MCIndexSnapRounder(1.0);
final double scale = precisionModel.getScaleXY();
final Noder noder = new ScaledNoder(rounder, scale);
return buffer(noder, precisionModel, geometry, distance, parameters);
}
Aggregations