On 6/29/2011 10:13 PM, Ian Walberg wrote:
I hope this isn't too stupid a question.

Would like to display a list of positions in an sqlite database as a
line, to show the flight path of an aircraft. The data is in the db as
Lat, Long and point (lat, long)

We can display the positions as individual dots but not as a line, I
fear the problem is that the data is a point.

As the data is being accumulated we would prefer not to create a new
line in the database each time if possible.

Any suggestions to what options we have would be appreciated.

Hi Ian,

In postgis there is an aggregrate function makeline() that you can feed points to. I think there may be an equivalent function in SpatiaLite.

In sqlite, you might be able to use a group_concat() something like:

select 'LINESTRING('|| group_concat(lat||' '||long, ',') ||')'
  from points;

But I think the issue will be that this is not a format that mapserver understands. You might be able to access this via GDAL/OGR but I'm not sure on that.

-Steve W
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to