3

I have a layer containing points (in yellow) and a layer containing the Exclusive economic zones of all countries (as polygons, its geometry is MultiPolygon). See the image below:

enter image description here

I would like to create a buffer around the edges of all EEZ regions and determine how many of the points are contained within the buffered region.

I tried finding relevant questions on this website, but haven't found one that answers mine yet. For instance, there's this one, but it focuses on dissolving all separate polygons depicting the Spanish autonomous communities and creating a buffer around Spain as a whole. This is not what I'd like to do. I would like to create a buffer around the lines that trace out the borders of the separate communities, or in my case, the EEZ regions.

Is there a way to do that in QGIS 3.10.11?

I followed @Eric's answer, but I run into some difficulties. Here's the menu for the buffering of the polygons:

enter image description here

I see a Modify All Features button, but I don't want to modify anything, I just want to create a new layer with the buffer. What am I doing wrong?

Also, it seems that when I do this, it buffers inwards, and it only buffers the countries on the coastal area (not the EEZ themselves). Here's what it looks like:

enter image description here

Taras
  • 32,823
  • 4
  • 66
  • 137
Max Muller
  • 375
  • 2
  • 9

2 Answers2

2

Convert your polygons to lines, then buffer the lines by the distance you are interested in. Beware that you might have to reproject the data, since buffering can't be done reliable using degree-based CRS. Then use select by location to determine which points lie within the created buffer.

Erik
  • 16,269
  • 1
  • 24
  • 43
  • 1
    Why convert to lines? You can directly buffer to polygons... – Babel Sep 23 '21 at 12:36
  • @Babel as far as I understood it, OP is interested in points close to the borders, not in all the points within a polygon and its buffer. – Erik Sep 23 '21 at 13:47
  • OK, but if you buffer the line, the buffer will be on both sides of the line (if you don't choose single sided buffers), thus within the polygon and outside. If you create a buffer around the polygon, you can use difference to substract the initial polygon from the buffer. – Babel Sep 23 '21 at 13:50
  • True enough @Babel. I guess OP needs to add some details to their question. – Erik Sep 23 '21 at 14:28
  • 1
    If you convert to lines, then remove the lines that are coastlines, the double-sided line buffering solution is correct as I understand the question. – Llaves Sep 23 '21 at 15:21
  • @Erik thank you for your answer. It seems simple enough to apply it, but I'm having some difficulties. For one, I see a button "modify all features" instead of just "run". Do you know why this might be the case? Also, the buffer seems to make the polygons smaller instead of larger, which isn't what I'd like – Max Muller Sep 24 '21 at 08:17
0

A negative buffer a.k.a. inward buffering should do the job.

As was mentioned in this article:

For polygon layers, a negative value can be used to remove the outer part of the polygons (to buffer inward).

Taras
  • 32,823
  • 4
  • 66
  • 137