[Mapserver-users] geometryfromtext in orcale spatial?

Fu Chen fchen at ne.rsgs.ac.cn
Sat Jun 12 07:33:12 EDT 2004


Hi!
I need to make a feature, that link gps points into line to render in mapserver.
Vladimir Ilich Guzm¨¢n R. suggest to use geometryfromtest feature in postgis to achieve it. 
It is something like

$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);

This method works in postgis. But this time I have to use oracle database.
How can I achieve this feature in oracle spatial? Is there any oracle function I can use to replace geometryfromtext?

Thanks!

-----Original Message-----
From: mapserver-users-admin at lists.gis.umn.edu
[mailto:mapserver-users-admin at lists.gis.umn.edu]On Behalf Of Vladimir
Guzm¨¢n
Sent: Thursday, June 03, 2004 8:01 PM
To: Fu Chen
Cc: mapserver-users at lists.gis.umn.edu
Subject: Re: [Mapserver-users] store and draw route


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
>
>
>  
>

_______________________________________________
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