1

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?

user56591
  • 135
  • 5

1 Answers1

0

The following works for me:

UPDATE your_table_name
SET the_geom = ST_GeomFromText(column_with_multilines,4326)

Docs for ST_GeomFromText is here.

Andy Eschbacher
  • 1,111
  • 6
  • 8
  • Thank you very much for your answer! Yes, this works for me as well. What I have been trying to do now is to make these lines curved (I know a similar question has already been asked here). However, all examples of drawing curved lines concentrate on drawing them from one fix centre point, and not from A to B, C to D, E to F (i.e. the start and end points in my multilines column). Do you know how to make curved lines out of these multiline strings? – user56591 Aug 12 '15 at 22:51
  • Nice, glad it worked :) for your other question, could you ask another question? – Andy Eschbacher Aug 12 '15 at 22:52
  • Thanks very much for your help, Andy! I posted another question here. – user56591 Aug 13 '15 at 16:00