[Mapserver-users] store and draw route

=?GB2312?B?VmxhZGltaXIgR3V6baiibg==?= bigfoot at main-task.com
Thu Jun 3 08:00:31 EDT 2004


Hello.
We use postgis + phpmapscript, and is something like this:

$data="
the_geom from (select oid,rumbo, geometryfromtext('MULTILINESTRING((' ||
(select x(gps_geom) || ' ' || y(gps_geom) from gps_vehi ant where
ant.gid<act.gid and ant.id_vehi=$id_vehi order by gid desc limit 1) ||
',' || x(gps_geom) || ' ' || y(gps_geom) || '))',1) as the_geom from
gps_vehi act where act.tiempo>='$from_time' AND act.tiempo<'$to_time'
AND act.id_vehi=$id_vehi) as foo using unique oid using srid=1";
$layer=$map->getLayerByName("secuencia_gps");
$layer->set("data",$data);

Basically, what we do is a subquery to create a multilinestring from a
point geometry.

Hpe that helps,

Vladimir Ilich Guzm¨¢n R.
------------------------
http://maintask.com 



Fu Chen wrote:

>Hi!
>I try to use mapserver and postgis to record and render the some mobile worker's route.
>Those routes are record by a data table like (workorID, time, position).
>In the webgis interface, we try to draw a route map by mapserver.
>Queried by the workor's ID, the position is sort by the time. then these points is linked with a line. We would like to draw a circle(or other symbol) on the key point if it is possible.
>I don't know how to write map file or mapscript to get the feature.
>Anybody can give me some suggestion?
>Thank you!
>
>_______________________________________________
>Mapserver-users mailing list
>Mapserver-users at lists.gis.umn.edu
>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
>
>  
>




More information about the mapserver-users mailing list