Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jts-dev] BufferOp on polygon exterior ring - End Cap?

Hi, 

  please can you help me with my problem.

I want to buffer exterior ring of polygon with join=ROUND, cap=FLAT. This setting works for LineStrings as expected. But there is problem with closed rings.

PSEUDOCODE:

Polygon p = ...;

Geometry outline = p.getExteriorRing(); // linear ring

BufferParameters bufParams = new BufferParameters();
bufParams.setEndCapStyle(CAP_FLAT);
bufParams.setJoinStyle(JOIN_ROUND);
BufferOp.bufferOp(outline, 0.5, bufParams);

I would expect that 'join' will be used for first and last coordinate because outline is closed ring.
Currently cap=FLAT is used for first and last point. Tested on JTS < 1.14. I'm sorry I can't test it on latest JTS.

Is this my misunderstanding? Or is there another parameter?

REAL USAGE:
P is polygon of garden. I would like to construct wall (width=0.5m) around the garden.


Thank you for your help.
  Martin


Back to the top