[R-sig-Geo] Raster data and MySQL
Roger Bivand
Roger.Bivand at nhh.no
Wed Apr 19 16:03:01 CEST 2006
On Wed, 19 Apr 2006, Toad 2000 wrote:
> 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! :)
Could you have a look at aRT? It has an R component, a database (typically
MySQL) component, and uses Terralib as glue:
http://www.est.ufpr.br/art/
I think you can use RMySQL directly for non-spatial tasks too. Terralib
has well-developed spatial data types.
>
> 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
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the R-sig-Geo
mailing list