Skip to content

Instantly share code, notes, and snippets.

@jczaplew
Created January 16, 2016 01:09
Show Gist options
  • Save jczaplew/b96b6057a4021ab3a19c to your computer and use it in GitHub Desktop.
Save jczaplew/b96b6057a4021ab3a19c to your computer and use it in GitHub Desktop.
-- Doesn't work
SELECT ST_Buffer(ST_Segmentize('LINESTRING(-88 45,-90 43)'::geography, 1000), 1);
/*
* ERROR: transform: couldn't project point (-88 45 0): latitude or longitude exceeded limits (-14)
* CONTEXT: SQL function "st_buffer" statement 1
* Query failed
* PostgreSQL said: transform: couldn't project point (-88 45 0): latitude or longitude exceeded limits (-14)
*/
-- Works as expected
SELECT ST_Buffer((ST_Segmentize('LINESTRING(-88 45,-90 43)'::geography, 1000)::geometry)::geography, 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment