[postgis-users] data base structure for holding climate data

Guido Lemoine guido.lemoine at jrc.it
Mon Oct 2 08:20:27 PDT 2006


Look at the (postgresql) timestamp data type, and check whether you require
time zones to be defined. The format is generally 'YYYY-MM-DD hh:mm:ss' 
(plus
time zone, if needed). It makes sense to use timestamp, so that you can 
use postgresql's
date functions which are very useful. Combine very well with postgis 
functions.

GL

Kirk R. Wythers wrote:

> I am curious as to the consensus approach to handling dates in  
> postgis? I have gathered up a fairly large collection of climate  
> data. The date fields however, came parsed in the form  
> (year,month,day). I want to set up a postgres database to hold this  
> data with a location structure along the lines of:
>
> mn_climate=# \d sites
>                 Table "public.sites"
>      Column     |         Type          | Modifiers
> ----------------+-----------------------+-----------
> site_id        | integer               |
> site_shortname | character varying(8)  |
> site_name      | character varying(50) |
> lat            | numeric               |
> lon            | numeric               |
> utm_e          | numeric               |
> utm_n          | numeric               |
> Indexes:
>     "sites_site_id_key" UNIQUE, btree (site_id)
>
>
> And tie this "site" table to a second "clim" table that holds the  
> actual meteorological data. However, I am inclined to concatenate the  
> year, month, day data into a single "date" data type of the form year- 
> month-day-hour-minute-second (yyyy-mm-dd-hh-mm-ss). Does this make  
> sense to you all? If anyone can re-direct me before I do something  
> dumb in way I set this up, I would appreciate it.
>
> Thanks,
>
> Kirk
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



More information about the postgis-users mailing list