Spatio-Temporal function - Mailing list pgsql-novice

From Nick Raj
Subject Spatio-Temporal function
Date
Msg-id AANLkTinRU1_piS9HShb0apkUL4z+tnRVdBsqX1mRkdQg@mail.gmail.com
Whole thread Raw
List pgsql-novice
Hi,
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 t1<t2<t3.
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 rows?
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


pgsql-novice by date:

Previous
From: Le Fromager
Date:
Subject: Re: Do checkpoints flush all data from shared buffers ?
Next
From: Liran Ritkop
Date:
Subject: General question about memory usage