[postgis-users] day length calculation
Kirk Wythers
kwythers at umn.edu
Fri Jan 26 09:57:38 PST 2007
I am looking for ideas to add a daylength calculation to a postgis
database. The database in question has a table named "sites", which
contains lat, lon, and geometry info for a number of locations. A
second table contains climate data including a day_of_the_year column.
I would like to add the capability to calculate the length of each
day (could be done as a view or another table). The equation for day
length calculation takes as input day_of_the_year and latitude, does
some trig (uses acos, tan, cos, radians, and pi) and spits out an
estimate of the day length in hours.
How would folks recommend I approach this problem?
Thanks,
Kirk
More information about the postgis-users
mailing list