On Sun, Mar 15, 2009 at 7:16 PM, Alex Mandel <[email protected]> wrote: > You should talk with Alessandro Furieri [email protected] who is > currently working on adding Raster support to spatialite. > http://www.gaia-gis.it/spatialite/ > > It may be more efficient to store the data separately in well used > raster formats and attach them to the database as needed for queries.
heh... I already have the data in raster format (and other sources as well). I am experimenting with converting it all to a db and doing away with all the raster data altogether. The problem with the raster format is that every time we change the spatial extent of our model, we have to re-generate all the associated data. By having it in a db (SQLite or PostGres), we can simply query our area of interest and get all the data for that area in one simple query (or a couple of simple queries). No screwing around with bash scripts and IDL and other crap. In any case, this is an experiment. > > Alex > > P Kishor wrote: >> I have a grid of 1000 x 1000 cells with their own data as well as 20 >> years of daily weather data (20 * 365 = 7300 rows) for each contiguous >> group of 50 x 50 cell. >> >> CREATE TABLE cells ( >> cell_id INTEGER PRIMARY KEY, >> other cell attributes, >> lat, >> lon, >> met_grid_id INTEGER >> ); >> >> cell_id met_grid_id >> ------- ------------ >> 0 0 >> 1 0 >> .. >> 2499 0 >> 2500 1 >> 2501 1 >> .. >> 4999 1 >> >> CREATE TABLE met ( >> met_id INTEGER PRIMARY KEY, >> other met attributes, >> met_grid_id INTEGER >> ); >> >> met_id met_grid_id >> ------ ----------- >> 0 0 >> 1 0 >> .. >> 7299 0 >> 7300 1 >> 7301 1 >> .. >> >> CREATE VIRTUAL TABLE cell_index USING rtree ( >> cell_id INTEGER, >> minx REAL, >> maxx REAL, >> miny REAL, >> maxy REAL >> ) >> >> The db is about 350 MB with the cell table with 1000,000 rows and the >> met table with 2,920,000 rows and the R*Tree index. >> >> Is there any other better way that jumps out at any of you? >> >> > -- Puneet Kishor http://www.punkish.org/ Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/ Carbon Model http://carbonmodel.org/ Open Source Geospatial Foundation http://www.osgeo.org/ Sent from: Madison WI United States. _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

