This content applies to a previous version of CARTO
In October 2021 we released a new version of our platform. You can find the latest documentation at docs.carto.com
Back to Help Center
How to Convert Straight Lines to Great Circles
Learn how to transform straight lines into great circles.
You can use the ST_Segmentize PostGIS function to emulate flight routes or great circles.
SELECT ST_Transform(
ST_Segmentize(
the_geom::geography,
10000
)::geometry,
3785
) as the_geom_webmercator,
cartodb_id
FROM table_name
Handling Dateline Crossings
Note that when any of these routes crosses the dateline, some horizontal lines will appear. To resolve this issue, you can consult a CARTO blog post about jets and datelines for a workaround solution.
