David, That looks better, let me test if we can now do what we need.
Many thanks Ian -----Original Message----- From: Fawcett, David (MPCA) [mailto:david.fawc...@state.mn.us] Sent: Thursday, July 28, 2011 11:39 AM To: Ian Walberg; Stephen Woodbridge; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Plotting points as a line from sqlite database Ian, Take a look at 2.4.0-RC5 http://www.gaia-gis.it/spatialite-2.4.0-5/spatialite-sql-2.4-5.html#p5 Look under "SQL utility functions [non-standard] for geometric objects" David. -----Original Message----- From: Ian Walberg [mailto:ian.walb...@airborne.aero] Sent: Thursday, July 28, 2011 12:41 PM To: Fawcett, David (MPCA); Stephen Woodbridge; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Plotting points as a line from sqlite database Gents, Thanks for these ideas, however I cannot seem to find a MakeLine function in spatialite 2.4.0. Where should I be looking? Thanks Ian -----Original Message----- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Fawcett, David (MPCA) Sent: Thursday, June 30, 2011 6:44 AM To: Stephen Woodbridge; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Plotting points as a line from sqlite database ST_MAKELINE() does exist in recent versions of Spatialite. It doesn't appear to have made it in to the docs, but it can be seen in this example from the cookbook. http://www.gaia-gis.it/spatialite-2.4.0-4/spatialite-cookbook/html/pp-ad jacent.html Another example is in this thread from the Spatialite list: http://groups.google.com/group/spatialite-users/browse_thread/thread/002 0f8e907ae9226 You will likely need recent versions of both Spatialite and OGR to make it work. David. -----Original Message----- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stephen Woodbridge Sent: Wednesday, June 29, 2011 10:49 PM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Plotting points as a line from sqlite database 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 _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users