I'd like to form a 500 meter buffer around a coordinate. That coordinate is in WGS 84.
I've been playing with this for a little and seem to have a solution, but is seems way too complicated:
SELECT ST_AsText(ST_Transform(ST_Buffer((ST_Transform(ST_GeomFromText('POINT(-71.104 42.315)', 4326), 3857)), 500), 4326))
In this solution I first transform the point to a metric coordinates system (EPSG:3857) so the buffer distance is metric. Then I generate the buffer and then I transform the buffer back into WGS, as I need the result in WGS.
Isn't there a simpler solution?
geography
and let ST_Buffer calculate a geodetic circle --SELECT ST_AsText(ST_Buffer(ST_GeomFromText('POINT(-71.104 42.315)', 4326)::geography, 500))
– Vince Sep 30 '18 at 13:10