Skip to main content

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

I may not be understanding correctly, but it seems like you don't actually want the CAP_FLAT to appear in the linear ring buffer.  In that case, why not use CAP_ROUND?  Or else just buffer the polygon itself (instead of extracting the boundary as a linear ring).

On Wed, Aug 22, 2018 at 12:23 AM, Janda Martin <jandam@xxxxxxxxxx> wrote:
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
_______________________________________________
jts-dev mailing list
jts-dev@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.locationtech.org/mailman/listinfo/jts-dev


Back to the top