I'm trying to buffer a polyline (WGS84/EPSG 4326) by 50km, and then dissolve all the overlaps in the buffer. So far I've tried a combination of:
- casting the EPSG 4326 geometry as geography (to get accurate buffer) then
- creating a dissolved buffer using ST_union(ST_buffer(geo.my_polyline)).
However, I'm getting a syntax error around my
ERROR: syntax error at or near ")"
Here is my code:
create table geo.fifty_km_buffer as ( select id, ST_union(ST_buffer( CAST(geo.polyline.geom) as geography, 50000 )) as geom from geo.polyline )