[postgis-users] Spatio-Temporal Function

Nick raj nickrajjain at gmail.com
Wed Mar 2 21:55:55 PST 2011

I am writing some spatio-temporal function in postgis.
Like, ST_Enters( obj_geom, boundary_geom, time t1,time t2)
i.e. Does vehicle enters in ABC area between time t1 to t2?

For example, select ST_Enters ( obj_geom, (select boundary_geom from
boundary), '25/2/2011 12:23:32','26/2/2011') from vehicledata where
vehicleid= 'XYZ';
Vehicledata is a table consist of more than 10,000 object location geometry
named obj_geom.

On query execution, it take one object geometry at every execution of
ST_Enters and compare with boundary area. But this doesn't provide proper
output because it is continous function of time i.e. Enters is made up of
Disjoint -> Touches -> Inside.First, check for disjoint, if it is true at
t1, then check for touches at t2 then check for inside at t3, provided
So, for creating this function, i require all the object's geometry before
it go inside the function. So that it can call only once.

My first problem is that
create or replace function ST_Enters(????, geometry,timestamp,timestamp)
returns boolean ............
Which kind of data type to be used because i have to catch more than 10000
So, Can anyone tell me which data type can be used to catch this?

Second question is that,
How to use this function in SQL in continuous manner??

Hope am i clear.

Thanks in advance
View this message in context: http://old.nabble.com/Spatio-Temporal-Function-tp31056304p31056304.html
Sent from the PostGIS - User mailing list archive at Nabble.com.

More information about the postgis-users mailing list