I need help with the phrasing of this query. I am applying this in CARTO to a file with lines. The following query does not generate a curve as expected. I am new to SQL/PostGIS.
select
mycartoid.home2015_1, the_geom
st_transform(
st_segmentize(
st_makeline(origin.h_block, dests.w_block )::geography,
10000
)::geometry,
3857) the_geom_webmercator
from origin,dests
Also attached is a snippet of my data for reference:
I am trying to generate a map with curved lines similar to this link:
https://team.carto.com/u/jsanz/viz/89f6adfe-48f8-11e5-b416-0e0c41326911/public_map
SQL Query Link line 26-35 from this gist:
lines as(
select
dests.cartodb_id, dests.name, dests.adm0name, dests.distance,
st_transform(
st_segmentize(
st_makeline(origin.the_geom, dests.the_geom )::geography,
10000
)::geometry,
3857) the_geom_webmercator
from origin,dests
origin
&dest
tables defined as points? thath_block
column seems to be only text? if you are simply selecting from that one line table, try... ST_MakeLine( ST_StartPoint(the_geom), ST_EndPoint(the_geom) ) ... FROM <your_line_layer>
and see if that gets you your geographic linework.