I am experimenting drawing curved line from Origin to Destination in Cartodb. I was able to do so once, however, failed the second and third time.
Could anyone offer me some insights into the following code and help me debug?
I am using CartoDB and start with a table of centroid points for all the countries.
Step 1:CHANGE THE REFERENCE SYSTEM I used the following code
INSERT into spatial_ref_sys (srid, auth_name, auth_srid, proj4text, srtext) values ( 953027, 'esri', 53027, '+proj=eqdc +lat_0=0 +lon_0=0 +lat_1=60 +lat_2=60 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs ', 'PROJCS["Sphere_Equidistant_Conic",GEOGCS["GCS_Sphere",DATUM["Not_specified_based_on_Authalic_Sphere",SPHEROID["Sphere",6371000,0]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Equidistant_Conic"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",0],PARAMETER["Standard_Parallel_1",60],PARAMETER["Standard_Parallel_2",60],PARAMETER["Latitude_Of_Origin",0],UNIT["Meter",1],AUTHORITY["EPSG","53027"]]');
Step 2:CREATE THE LINES
update world_borders_coarse_2013
set the_geom=
(select st_transform(
st_segmentize(
st_makeline(
st_transform(world_borders_coarse_2013.the_geom,953027),
st_transform(b.the_geom,953027)),100),4326)
from world_borders_coarse_2013 b
where b.name='China'
)
It should give me the curved lines between China to all the other places. However the reality is that I have the "the_geom" column as "line", but nothing shows in the "map view".
Would anyone give me some suggestion to change the code?