1

I am using QGIS to compute a 30 km buffer around the borders of Poland with each neighboring country, preferably in both directions (but most importantly inwards, i.e. the border regions of Poland with each of its neighbors). I have tried to use the different "buffer" functions available in QGIS, natively and through GDAL and SAGA, but even when setting very high values for the number of segments, the contours of the buffers become coarse. Meanwhile, when I try the "Translate" function, the contours become as fine grained as I want them to be, but of course it is not a translation that I'm after. How do I produce buffers that follow the contours of the input shape file in great detail (so that it really looks like just shrinking/expanding the original input file), at a fixed distance?

Here are some settings I've tried for Buffer:

Buffer settings

...producing this output (in green):

Buffer output

...while the Translate function is much more fine grained (in yellow):

Translate output

Note that for the Buffer, I'm using a filled polygon file, since the multiline used for the Translate doesn't produce an output buffer.

I'm experimenting with this using QGIS' graphical interface but eventually will have everything in PyQGIS code.

7
  • 1
    Please provide images of "coarse" and "fine grained" buffers, as well as your exact buffer settings. Thank you.
    – Erik
    Commented Mar 7, 2022 at 10:09
  • Added now. Thank you for the feedback!
    – artur
    Commented Mar 7, 2022 at 10:18
  • You are aware that the translated polygon doesn't fulfill your condition, while the buffer does?
    – Erik
    Commented Mar 7, 2022 at 10:24
  • Do you mean the 30 km one? Yes, absolutely. Correct me if I'm wrong, but I think that a translation cannot do what I want to do, since what I want is a constant distance of 30 km from the original border (i.e. not specifying a distance in x and in y separately, only a total distance) and this also implies a slight change in size. Hence, what I want is essentially a buffer, just a more fine grained one. The translation is just to show what I mean by fine grained
    – artur
    Commented Mar 7, 2022 at 10:27
  • 5
    You can't have both a fixed distance and keep all detail, the rounded buffer IS the real constant distance of 30km from border, it has to be rounded : think of a square country if you expend it by 30km you have to create a 30km radius from corner, if you just create a bigger square by offsetting the side the corner to create a bigger square you will end with part farther than 30km (in fact you will get a distance of 42,2km from corner to corner)
    – J.R
    Commented Mar 7, 2022 at 10:36

1 Answer 1

2

You can't have both a fixed distance and keep all detail, the rounded buffer IS the real constant distance of 30km from border, it has to be rounded : think of a square country if you expand it by 30km you have to create a 30km radius from corner, if you just create a bigger square by offsetting the side the corner to create a bigger square you will end with parts farther than 30km (in fact you will get a distance of 42,2km from corner to corner)

See below for illustration (the "Square buffer" is made by using the "Miter" Join style in the buffer setting)

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.