Java Code Examples for com.vividsolutions.jts.operation.buffer.BufferParameters#setSingleSided()
The following examples show how to use
com.vividsolutions.jts.operation.buffer.BufferParameters#setSingleSided() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BufferFunctions.java From jts with GNU Lesser General Public License v2.1 | 5 votes |
public static Geometry singleSidedBufferCurve(Geometry geom, double distance) { BufferParameters bufParam = new BufferParameters(); bufParam.setSingleSided(true); OffsetCurveBuilder ocb = new OffsetCurveBuilder( geom.getFactory().getPrecisionModel(), bufParam ); Coordinate[] pts = ocb.getLineCurve(geom.getCoordinates(), distance); Geometry curve = geom.getFactory().createLineString(pts); return curve; }
Example 2
Source File: BufferFunctions.java From jts with GNU Lesser General Public License v2.1 | 4 votes |
public static Geometry singleSidedBuffer(Geometry geom, double distance) { BufferParameters bufParams = new BufferParameters(); bufParams.setSingleSided(true); return BufferOp.bufferOp(geom, distance, bufParams); }