use of com.revolsys.geometry.operation.buffer.OffsetCurveSetBuilder in project com.revolsys.open by revolsys.
the class BufferFunctions method buildCurveSet.
private static Geometry buildCurveSet(final Geometry geometry, final double dist, final BufferParameters bufParams) {
// --- now construct curve
final GeometryFactory precisionModel = geometry.getGeometryFactory();
final OffsetCurveSetBuilder curveBuilder = new OffsetCurveSetBuilder(geometry, dist, precisionModel, bufParams);
final List curves = curveBuilder.getCurves();
final List<LineString> lines = new ArrayList<>();
for (final Iterator i = curves.iterator(); i.hasNext(); ) {
final SegmentString ss = (SegmentString) i.next();
final LineString points = ss.getLineString();
lines.add(geometry.getGeometryFactory().lineString(points));
}
final Geometry curve = geometry.getGeometryFactory().geometry(lines);
return curve;
}
Aggregations