I want to calculate a buffer around the worlds coastlines. To do so, I downloaded the GSHHS data version 2.3.7, imported it into qgis, used "polygons to lines" and then the MMQGIS Plugin to produce a 50 km buffer. It produces the buffer, but also a buffer around strange horizontal lines (see image). Also Europe and Asia shouldn't be filled.
I also see these lines when I use the buffer from the Geoprocessing tools, but they disappear when I'm zooming in. Do you have an idea what the problem might be?
I'm using MacOS 10.13.2 and QGis 2.18.15.

Buffer with strange lines:

Buffer with strange lines

GSHHS dataset: polygons:

GSHHS dataset: polygons

GSHHS dataset: polygons to lines:

GSHHS dataset: polygons to lines

  • 1
    my first guess is the Polygon to Lines tool produced invalid geometries, maybe due to multipolygons in the source data or already invalid polygons even. try e.g. the Geometry Checker Plugin on your data. does your data has multipolygons e.g. to group continents with their islands? – ThingumaBob Jan 21 '18 at 19:39

The problem is that you are buffering lines at the antimeridian.

Before converting polygons to lines, if you want to buffer one degree, you need to draw a rectangle with corners (-180 , -90) and (180 , 90), buffer it by a radius = -1, and intersect the original layer against the buffered rectangle.

Then, convert polygons to lines and when you buffer the lines with a radius = 1 the edges of the buffer polygons will go to the antimeridian and will not cross it.

Since you are buffering 50km, your layer must be in a projected CRS. So project the rectangle to the same CRS before buffering it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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