SELECT ST_GeomFromGeoJSON('{"type":"LineString","coordinates":[[-3.01055556,56.46583333],[-71.20583333,46.825]]}')
gives me a line from Dundee to Quebec.
I try to surround it with a 999 nautical mile buffer
SELECT ST_Buffer(
ST_GeomFromGeoJSON('{"type":"LineString","coordinates":[[-3.01055556,56.46583333],[-71.20583333,46.825]]}')::geography,
999 * 1852,
'quad_segs=30 endcap=round join=round'
)
(1852 = number of metres in a nautical mile)
A 999NM radius around Dundee ought to intersect Coimbra, Portugal. But the buffer only extends as far as half-way through France. The buffer appears correct for shorter distances e.g. 10NM.
Why is the buffer smaller than expected?
Best Answer
It's probably linked to the projection the buffer will use. By default, it will do that:
Your geometry is definitly bigger than an UTM zone, and if you make your buffer in 3857 (mercator) directly you get the same result:
So it mean the ST_buffer fall back to 3857 for your geom. If you want a more correct result for your case, you have to choose a better fitting projection, in your case one that respects the distances instead of the form. For example, there is the Bonne projection (srid 54024) (there is probably better suited projection for your case, but it's a classic). Replace the 3857 in the request above by 54024, and I think the result (in red) is closer to what you expect than the 3857 projection (in green):
EDIT: the North Pole Azimuthal Equidistant (102016) is also a good candidate in the north hemisphere I think