Skip to content

Instantly share code, notes, and snippets.

View ajashton's full-sized avatar

AJ Ashton ajashton

View GitHub Profile
-- PostGIS functions which will create an pollygon representing an ellipse using the "Pins and String" method
--
-- https://en.wikipedia.org/wiki/Ellipse#Pins-and-string_method
--
-- Usage: ST_Ellipse(LINESTRING, DISTANCE, NUMBER OF NODES);
-- Usage: ST_Ellipse(LINESTRING, DISTANCE); -- defaults to 8 nodes
--
-- Args:
-- LINESTRING -- A two point linestring. Use ST_MakeLine(p1,p2) if you have two points