/** * Specifies the end cap style of the generated buffer. * The styles supported are {@link BufferParameters#CAP_ROUND}, {@link BufferParameters#CAP_FLAT}, and {@link BufferParameters#CAP_SQUARE}. * The default is CAP_ROUND. * * @param endCapStyle the end cap style to specify */ public void setEndCapStyle(int endCapStyle) { bufParams.setEndCapStyle(endCapStyle); }
private void bindCap(BufferParameters parameters, Map<String, Object> params) { String endCap = (String) params.get("endCap"); if (endCap != null) { Integer style = capStyles.get(endCap); if (style != null) { parameters.setEndCapStyle(style); } } }
/** * Creates a set of parameters with the * given quadrantSegments and endCapStyle values. * * @param quadrantSegments the number of quadrant segments to use * @param endCapStyle the end cap style to use */ public BufferParameters(int quadrantSegments, int endCapStyle) { setQuadrantSegments(quadrantSegments); setEndCapStyle(endCapStyle); }
String param = keyValue[1]; if (param.equalsIgnoreCase("round")) { bufferParameters.setEndCapStyle(BufferParameters.CAP_ROUND); } else if (param.equalsIgnoreCase("flat") || param.equalsIgnoreCase("butt")) { bufferParameters.setEndCapStyle(BufferParameters.CAP_FLAT); } else if (param.equalsIgnoreCase("square")) { bufferParameters.setEndCapStyle(BufferParameters.CAP_SQUARE); } else { throw new IllegalArgumentException("Supported join values are round, flat, butt or square.");
public static Geometry logoBuffer(Geometry g, double distance) { Geometry lines = logoLines(g); BufferParameters bufParams = new BufferParameters(); bufParams.setEndCapStyle(BufferParameters.CAP_SQUARE); return BufferOp.bufferOp(lines, distance, bufParams); }
String param = keyValue[1]; if (param.equalsIgnoreCase("round")) { bufferParameters.setEndCapStyle(BufferParameters.CAP_ROUND); } else if (param.equalsIgnoreCase("square")) { bufferParameters.setEndCapStyle(BufferParameters.CAP_SQUARE); } else { throw new IllegalArgumentException("Supported join values are round or square.");
String param = keyValue[1]; if (param.equalsIgnoreCase("round")) { bufferParameters.setEndCapStyle(BufferParameters.CAP_FLAT); } else if (param.equalsIgnoreCase("square")) { bufferParameters.setEndCapStyle(BufferParameters.CAP_FLAT); } else if (param.equalsIgnoreCase("flat")) { bufferParameters.setEndCapStyle(BufferParameters.CAP_FLAT); } else { throw new IllegalArgumentException("Supported join values are round or square.");
/** * Creates a set of parameters with the * given parameter values. * * @param quadrantSegments the number of quadrant segments to use * @param endCapStyle the end cap style to use * @param joinStyle the join style to use * @param mitreLimit the mitre limit to use */ public BufferParameters(int quadrantSegments, int endCapStyle, int joinStyle, double mitreLimit) { setQuadrantSegments(quadrantSegments); setEndCapStyle(endCapStyle); setJoinStyle(joinStyle); setMitreLimit(mitreLimit); }
public static Geometry bufferCurveWithParams(Geometry g, Double distance, @Metadata(title="Quadrant Segs") Integer quadrantSegments, @Metadata(title="Cap style") Integer capStyle, @Metadata(title="Join style") Integer joinStyle, @Metadata(title="Mitre limit") Double mitreLimit) { double dist = 0; if (distance != null) dist = distance.doubleValue(); BufferParameters bufParams = new BufferParameters(); if (quadrantSegments != null) bufParams.setQuadrantSegments(quadrantSegments.intValue()); if (capStyle != null) bufParams.setEndCapStyle(capStyle.intValue()); if (joinStyle != null) bufParams.setJoinStyle(joinStyle.intValue()); if (mitreLimit != null) bufParams.setMitreLimit(mitreLimit.doubleValue()); return buildCurveSet(g, dist, bufParams); }
public static Geometry bufferWithParams(Geometry g, Double distance, @Metadata(title="Quadrant Segs") Integer quadrantSegments, @Metadata(title="Cap style") Integer capStyle, @Metadata(title="Join style") Integer joinStyle, @Metadata(title="Mitre limit") Double mitreLimit) { double dist = 0; if (distance != null) dist = distance.doubleValue(); BufferParameters bufParams = new BufferParameters(); if (quadrantSegments != null) bufParams.setQuadrantSegments(quadrantSegments.intValue()); if (capStyle != null) bufParams.setEndCapStyle(capStyle.intValue()); if (joinStyle != null) bufParams.setJoinStyle(joinStyle.intValue()); if (mitreLimit != null) bufParams.setMitreLimit(mitreLimit.doubleValue()); return BufferOp.bufferOp(g, dist, bufParams); }
String param = keyValue[1]; if(param.equalsIgnoreCase("round")){ bufferParameters.setEndCapStyle(BufferParameters.CAP_ROUND); bufferParameters.setEndCapStyle(BufferParameters.CAP_FLAT); bufferParameters.setEndCapStyle(BufferParameters.CAP_SQUARE);
bp.setEndCapStyle(BufferParameters.CAP_SQUARE); bp.setJoinStyle(BufferParameters.JOIN_MITRE); BufferOp bufferOp = new BufferOp(geomInGridsetCrs, bp);