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?

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.

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.