Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jts-dev] singlesided and flat cap buffer issues

Hello,

I'm working with jts and want to use the buffer function for the validation of a Geometry.

Task: We have a Linestring, that is part of the boundary of some Geometry with dimension 2 and the Geometry itself. Now we want to validate, whether or not the Geometry could be part of the strip to the specified Linestring and if not, work out which parts are not inside. We'd like the accepted area to be perpendicularly cut at the ends of the Linestring.

My simple idea: Generate the singlesided buffer for that Linestring and see, which parts are not inside that buffer (with difference function: difference between input geometry and buffer geometry)
My problem: The JTS buffer function (singlesided, but also flat cap) sometimes produces geometries, I can not understand.
some examples:

LINESTRING (760 180, 863 179.5, 862.5 190.5), single sided buffer with distance 50,

LINESTRING (652 234, 600.5 202.5, 736 203.5, 674.5 234), singlesided buffer with distance 1000

LINESTRING (657.5 257, 639 234.5, 764.5 234.5, 747 255.5), singlesided buffer with distance 275 and higher provide a singlesided buffer that's not including any point of that Linestring!

If you have any hints for me with using the JTS buffer or someone has a hint for my task, I would be very thankful.
Best wishes,
Robin Winkelmann

Back to the top