2

I have imported an excel s/sheet into CartoDB.

I have the following columns:

BookingReference | Long | Lat

I want to see the journey my app users take. As such I want add a line between long lat points for a booking reference.

For example:

0001/34458      51.5074 -0.1278
0001/34458      52.8984 -1.2698
0001/34458      53.8008 -1.5491
0001/34459      21.1619 -86.8515
0002/44492      21.1619 -86.8515
0002/44492      51.5074 -0.1278

One booking reference might have several long/lat points, others may just have a single one or two+

Thanks in advance

2

You need to use the PostGIS ST_MakeLine(geom, geom) function.

You can find here a tutorial about a GPS track where we use it: http://docs.cartodb.com/tutorials/gps_track.html (search for 'st_makeline' text)

The documentation about the PostGIS function is available here:

http://postgis.net/docs/ST_MakeLine.html

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.