[R-sig-DB] Raster data and MySQL

Toad 2000 to@dy2k @end|ng |rom hotm@||@com
Wed Apr 19 15:11:02 CEST 2006


Hi Folks,

Hope this isn't too far off topic + apologies for cross posting if you're on 
both lists...

I'm in the lucky(?) position of setting up an archive of geophysical 
(meteorological) data from scratch. R has been my working 
language/environment for the last few years. I've had plenty of need for the 
maptools + rgdal packages.  Ditto the RMySQL package but never inconjuction 
with spatial analyses.  My worlds are about to collide.

The data come in two types: Station data (irregular grid, irregular times, 
lots of missing values) and Model output (regular grid, regular times, no 
missing data).  The data come in hour after hour, day after day.

Typical queries can be spatial (e.g. what did the rainfall over a given post 
code area look like yesterday?), temporal (what were the houlry wind speeds 
at a specific point for last month?), or both (what was the mean temperature 
across the UK last year).

So how best to store the data to facilitate such queries?  This is where I 
hope you can help! :)

My initial thoughts are to invoke the spatial capabilites of MySQL.  The 
station data seem easy enough to store as POINT or MULTIPOINT and set up a 
spatial index and another on the time stamp.  Spatial queries can be 
performed using a WKB (Well Known Binary - new to me;) representation of the 
region of interest.

I'm stuck on the model data.  I could break it down into points and proceed 
as above but this seems grossly inefficient.  I was hoping to find a RASTER 
data type and store the grids in that.  Trouble is, I could be missing 
something, that I can't seem to find anything like one in MySQL.  Don't know 
about Postgre or SQL sever.  I'm open to suggestions.

Your hopefully, T

_________________________________________________________________

7.5 today! http://join.msn.com/messenger/overview




More information about the R-sig-DB mailing list