[postgis-devel] temporal indexing

Chris Hodgson chodgson at refractions.net
Thu Aug 9 08:57:20 PDT 2007


You need to get the float minx,maxx, miny, maxy values out of the 
geometry's bbox and put them into the cube constuctor. Then convert your 
datetime value into a unix-timestamp format (ie. number of seconds since 
the epoch date) and use that as the third value of the cube, both as the 
min and the max (unless of your you have both start and end date values).

Also, note that there is a trick or two to get the functional indexing 
to work. This is because cube constructor or one of the functions it 
calls is not marked as "non-volatile" and postgres doesn't allow you to 
index a volatile function's result.

Chris

Elena Camossi wrote:
> Hi Paul,
> 
> does the cube constructor syntax allow to build a cube on geometric and 
> temporal columns?
> I'm asking because all what I have found in the manual is the 
> possibility to construct cube on float values.
> 
> Best regards,
> -Elena
> 
> On 8/8/07, *Paul Ramsey* <pramsey at refractions.net 
> <mailto:pramsey at refractions.net>> wrote:
> 
>     I have had good success building a functional index on the cube
>     constructors. That way you can have the cube index while not carrying
>     the extra weight of a cube object in every tuple.
> 
>     Chris Hodgson wrote:
>      > In order to build the cube index you will need to add an additional
>      > column of type 'cube'
>     http://postgis.refractions.net/mailman/listinfo/postgis-devel
>     <http://postgis.refractions.net/mailman/listinfo/postgis-devel>
> 
> 
>     --
> 
>        Paul Ramsey
>        Refractions Research
>        http://www.refractions.net
>        pramsey at refractions.net <mailto:pramsey at refractions.net>
>        Phone: 250-383-3022
>        Cell: 250-885-0632
>     _______________________________________________
>     postgis-devel mailing list
>     postgis-devel at postgis.refractions.net
>     <mailto:postgis-devel at postgis.refractions.net>
>     http://postgis.refractions.net/mailman/listinfo/postgis-devel
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel




More information about the postgis-devel mailing list