While creating inner buffers for polygons on postgres/postgis base- a set of few thousand- I received a strange result. Inner buffer for one of the polygons, that was not supposed to appear from logical point of view, showed up. What is more, it looked like flipped. I've made some more "research" in QGIS and noticed that polygons of certain rotation, with buffer of approx. 65% of one of the edges receive above buffer result. As seen in the picture, when rotated, polygon's buffer won't be generated. I tried regular QGIS tools (buffer) executed on shapefiles not on postgres table.
In the screenshot you can see polygons of different size and orientation to the north. All inner buffers are wrong - should not be present. One polygon that hasn't got inner buffer is just rotated copy of the other in the picture. That was enough for the QGIS "buffer" algorithm to work properly, and not generate buffer there.
The source problem is as follows:
POLYGON ((666360.09 429614.71, 666344.4 429597.12, 666358.47 429584.52, 666374.5 429602.33, 666360.09 429614.71))
in epsg:2180 , and -15m buffer for it.
It gives me wrong result - I guess
I tried to detect error using st_orientation( to check if these buffers have different vertices flow, they don't). I have also changed direction of base/source polygon vertices but it does't make any difference. Vertices seem to be moved according to buffer size and then used to form polygon. A bit larger or smaller inner buffor works fine. What am I missing?