Skip to main content
Tweeted twitter.com/StackGIS/status/1045916414954139648
Edited last sentence, so encourage those answers and sound more chipper
Source Link
Amroco
  • 435
  • 4
  • 13

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!

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 are there some code options (2) that allow me to use my own crs?

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!

Source Link
Amroco
  • 435
  • 4
  • 13

Buffer polyline to kilometres in custom projection in QGIS, Python, R

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 are there some code options (2) that allow me to use my own crs?