Created
January 7, 2012 18:38
-
-
Save andrewxhill/1575587 to your computer and use it in GitHub Desktop.
Finding longest path between two geoms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH f as (SELECT | |
ST_LongestLine(ST_SetSRID(ST_MakePoint(-3,55),4326),ST_SetSRID(ST_Union(ST_MakePoint(-1,51),ST_MakePoint(-1,49)),4326)) as line) | |
SELECT ST_Distance_Sphere(ST_StartPoint(f.line),ST_EndPoint(f.line)) FROM f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment