From: | Nick Raj <nickrajjain(at)gmail(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Spatio-Temporal function |
Date: | 2011-02-27 04:06:16 |
Message-ID: | AANLkTinRU1_piS9HShb0apkUL4z+tnRVdBsqX1mRkdQg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Joel | 2011-02-27 21:43:58 | Not accepting passwords for remote logins |
Previous Message | Le Fromager | 2011-02-26 22:19:15 | Re: Do checkpoints flush all data from shared buffers ? |