/** * Comutes the buffer for a geometry for a given buffer distance * and accuracy of approximation. * * @param g the geometry to buffer * @param distance the buffer distance * @param quadrantSegments the number of segments used to approximate a quarter circle * @param endCapStyle the end cap style to use * @return the buffer of the input geometry * */ public static Geometry bufferOp(Geometry g, double distance, int quadrantSegments, int endCapStyle) { BufferOp bufOp = new BufferOp(g); bufOp.setQuadrantSegments(quadrantSegments); bufOp.setEndCapStyle(endCapStyle); Geometry geomBuf = bufOp.getResultGeometry(distance); return geomBuf; }
/** * Comutes the buffer for a geometry for a given buffer distance * and accuracy of approximation. * * @param g the geometry to buffer * @param distance the buffer distance * @param quadrantSegments the number of segments used to approximate a quarter circle * @param endCapStyle the end cap style to use * @return the buffer of the input geometry * */ public static Geometry bufferOp(Geometry g, double distance, int quadrantSegments, int endCapStyle) { BufferOp bufOp = new BufferOp(g); bufOp.setQuadrantSegments(quadrantSegments); bufOp.setEndCapStyle(endCapStyle); Geometry geomBuf = bufOp.getResultGeometry(distance); return geomBuf; }