Обсуждение: Spatio-Temporal Functions

Поиск
Список
Период
Сортировка

Spatio-Temporal Functions

От
Nick Raj
Дата:
Hi,<br />I am writing some spatio-temporal function in postgis.<br />Like, ST_Enters( obj_geom, boundary_geom, time
t1,timet2)<br /><br />For example- Does vehicle enters in ABC between time t1 to t2?<br />Let us suppose, i take only
oneobject geometry at a time and do compare then i could not produce the output because it is continous function of
timei.e. Enters is made up of Disjoint -> Touches -> Inside .<br /> So, for creating this function, i require all
theobject's geometry before it go inside the function. So that it can call only once.<br /><br />My first problem is
that<br/>create or replace function ST_Enters(????, geometry,timestamp,timestamp) returns boolean ............<br /><br
/>Whichkind of data type to be used because i have to catch more than 1000 rows and geometry[] doesn't work for it.<br
/>So,Can anyone tell me which data type can be used to catch this?<br /><br />Second,<br />How can i use this function
inSQL? Because suppose i write query like<br /> select ST_Enters ( obj_geom, (select boundary_geom from boundary),
'25/2/201112:23:32','26/2/2011') from vehicledata where vehicleid= 'XYZ';<br />and again it comes out to be one object
geometrymatches with boundary geometry,<br /> if i store the inbetween data in some temp table then it creates a lot of
computationbetween the table and if it end up in between then table may contains some wrong data.<br />So, How to use
thisfunction in SQL in continuous manner??<br /><br />Thanks in advance.<br /><br /><br /> 

Re: Spatio-Temporal Functions

От
Robert Haas
Дата:
On Sat, Feb 26, 2011 at 1:43 PM, Nick Raj <nickrajjain@gmail.com> wrote:
> Hi,
> I am writing some spatio-temporal function in postgis.
> Like, ST_Enters( obj_geom, boundary_geom, time t1,time t2)
>
> For example- Does vehicle enters in ABC between time t1 to t2?
> Let us suppose, i take only one object geometry at a time and do compare
> then i could not produce the output because it is continous function of time
> i.e. Enters is made up of Disjoint -> Touches -> Inside .
> 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 1000
> rows and geometry[] doesn't work for it.
> So, Can anyone tell me which data type can be used to catch this?
>
> Second,
> How can i use this function in SQL? Because suppose i write query like
> select ST_Enters ( obj_geom, (select boundary_geom from boundary),
> '25/2/2011 12:23:32','26/2/2011') from vehicledata where vehicleid= 'XYZ';
> and again it comes out to be one object geometry matches with boundary
> geometry,
> if i store the inbetween data in some temp table then it creates a lot of
> computation between the table and if it end up in between then table may
> contains some wrong data.
> So, How to use this function in SQL in continuous manner??
>
> Thanks in advance.

I think you might need to ask these questions on the PostGIS lists...

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company