4

I have a map containing polyline squiggles all over the world (shown below). I need to buffer these lines by 50 km either side, resulting in polygons.

Figure 1. Global polyline squiggles that need to be buffered by 50 km

I have reprojected my data to this custom projection:

+proj=cea +lon_0=0 +lat_ts=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs

However, when I buffer my polylines using the Vector>Geoprocessing>Buffer option QGIS reverts to WSG84 with an error bar stating that my crs is unknown.

There are two options I am considering:
(1) i) Use ESPG 3857 instead, as suggested as option 4. here (although a commenter in this thread (top comment of the top answer) states that EPSG 3857 is not in real 'm' - so I am now unsure if this option is valid). ii) Reproject to my custom crs.

(2) Try to force the buffer to work in my projection using code in R or Python.

So my questions are:
a) Is (1) a valid method?
If so, despite the 'metre units not being real metres' comment, then I am down to use the easier method, followed by reprojecting to my custom crs.
b) Or if are there some code options (2) that allow me to use my own crs, I would love to hear those too!

  • 1
    Unless QGIS has a buffer function/tool that supports geodesic distances, there's not a good projected CRS for worldwide data like this. 3857 has horrible distance distortion away from the equator, and cea (cylindrical equal area) also has bad distance distortion. – mkennedy Jun 5 '17 at 20:32
  • 1
    One solution would be to buffer individual lines or portions of lines by projecting each into a customized ProjCRS. – mkennedy Jun 5 '17 at 20:33
6

what you're after here is a geodesic buffer. I suspect the problem is that your CRS is a custom one (assigned a code > 100000) so it's not in GDAL/OGR's database of known CRSes.

I just noticed that mmqgis plugin allows buffers in km and nautical miles ... if you install this, use mmqgis > create > create buffers

enter image description here

Here are 50 km buffers around country borders from the Natural Earth 110m dataset...

enter image description here

I'm not sure what algorithm it uses - It's been a while since I looked at the source :) So I'm not sure if it's using true geodesics or projection.

You can use the measure tool to check if the results are accurate enough for your needs.

| improve this answer | |

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.