More

Add geometry to MULTILINESTRING in cartodb

Add geometry to MULTILINESTRING in cartodb


I have a table that contains a column with MULTILINESTRINGS (which are the coordinates from two places (i.e. long0,lat0,long1,lat1), like this:

MULTILINESTRING((97.0253024 4.3685491,8.5618685 47.4524688))

When I now click on "Map View", nothing gets displayed because "the_geom" in my table is null. My question now is: how can I add geometry information to the column with the MULTILINESTRINGs so that they get displayed on the map? I tried by updating "the_geom" like this:

UPDATE table_name SET the_geom = ST_SetSRID(column_with_multilines,4326)

But I only get "undefined rows affected". Could anyone please help me?


The following works for me:

UPDATE your_table_name SET the_geom = ST_GeomFromText(column_with_multilines,4326)

Docs forST_GeomFromTextis here.