Make great arcs between two points.
From @andrewxhill: http://gis.stackexchange.com/questions/84443/what-is-this-postgis-query-doing-to-show-great-circle-connections
Make great arcs between two points.
From @andrewxhill: http://gis.stackexchange.com/questions/84443/what-is-this-postgis-query-doing-to-show-great-circle-connections
SELECT ST_Transform( | |
ST_Segmentize( | |
ST_MakeLine( | |
ST_Transform(CDB_LatLng(source_lat, source_lng), 953027), | |
ST_Transform(ST_PointOnSurface(CDB_LatLng(target_lat, target_lng)),953027) | |
), 100000 | |
), 3857) as the_geom_webmercator | |
FROM table |
UPDATE my_table | |
SET the_geom = | |
ST_Transform( | |
ST_Segmentize( | |
ST_MakeLine( | |
ST_Transform(my_table.the_geom, 953027), | |
ST_Transform(CDB_LatLng(48.432044, -71.060316), 953027) | |
), | |
100000 | |
), | |
4326 | |
) |