2

I have a database of climatic data for farms in postgresql/postgis. it contains information about temperature, humidity and ... for farms and it is updated every hour. I need to perform some (spatio-)temporal aggregation on it. the queries would be like "for every square kilometer of the country, compute the monthly precipitation". I was wondering if there are some functions to do that or I should write the desired algorithm for it.

Thank you

f.ashouri
  • 5,409
  • 13
  • 44
  • 52

1 Answers1

0

You can generate a regular grid that covers the entire country e.g. with 1 kilometer square length.

Such grid can be generated using QGIS or write a function in PostgreSQL. Save your grid in a separate table (every cell is a polygon), then you can join the grid table and your data table group by grid cell and time to do your aggregation

iTech
  • 18,192
  • 4
  • 57
  • 80