Sometimes we get a table with sequential points that we want to visualize as lines. In Qlik GeoAnalytics lines are specified as start and end point (coordinate or location) or as a line geometry [[long1,lat1],[long2,lat2],...] .
shape_id * 10000 + shape_pt_sequence as shape_seg_id,
GeoMakePoint(shape_pt_lat,shape_pt_lon) as shape_pt,
One way is copy the next point as an end point to each line, perhaps by loading the point table again. This produces line segments that can have individual color and width, the downside that's it heavier to render.
load shape_seg_id - 1 as shape_seg_id,
shape_pt as shape_to_pt
Another way to is to produce a line geometry instead, quicker to draw, but the width and color are per line. Note, Concat requires "group by" and an order is necessary to get the points to line up correctly.
'[' & concat(shape_pt,',',shape_pt_sequence) & ']' as shape_line