A negative buffer operation no longer removes some collinear points (blue is input geometry, red is result after positive and then negative buffering. Problematic points are marked in red):
Context:
We have a geometry of photovoltaic (PV) module array (a MultiPolygon) and we want to "fill the gaps" between individual PV modules to arrive at a single polygon for the whole PV module array.
For this we use an inflate-deflate approach, where we buffer the geometry using a positive distance, and then buffer the result using an equal but negative distance. In general this seems to work reliably.
Test case that reproduces it (and from which the example image was generated):
It seems that inflatedResult (IR) is the same in all 3 tested versions.
deflatedResult (DR) is less optimal in 1.20.0-SNAPSHOT (has some extra collinear points).
This is not a big problem for us, but wanted to report anyway in case this regression is important for some other use cases.
While testing
1.20.0-SNAPSHOT
version built from https://github.com/locationtech/jts/pull/1005 I noticed a minor change in behavior since 1.19.0.A negative buffer operation no longer removes some collinear points (blue is input geometry, red is result after positive and then negative buffering. Problematic points are marked in red):![image](https://github.com/locationtech/jts/assets/8446128/ace719c9-dd86-43c4-a17f-2df4087bbd0d)
Context: We have a geometry of photovoltaic (PV) module array (a
MultiPolygon
) and we want to "fill the gaps" between individual PV modules to arrive at a single polygon for the whole PV module array. For this we use an inflate-deflate approach, where we buffer the geometry using a positive distance, and then buffer the result using an equal but negative distance. In general this seems to work reliably.Test case that reproduces it (and from which the example image was generated):
It seems that
inflatedResult
(IR
) is the same in all 3 tested versions.deflatedResult
(DR
) is less optimal in1.20.0-SNAPSHOT
(has some extra collinear points).This is not a big problem for us, but wanted to report anyway in case this regression is important for some other use cases.