Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I want to cache my raster data(large geotiff files) on local database. I thought to use spatialite. I found librasterlite which provide functionality to do that.

Can anybody point to some tutorial on it. Or is there any other alternative.

Programming environment - C++


I want to store geotiff data to spatialite database. I am using gdal to read metadata and reading tiles converting them to hexwkb format and storing it in raster table (id (integer) and raster (blob) as columns).Table is created but when i am opening my database and select raster data column it shows nothing. I mean i can not explore data and see the tile image. Can any body tell me what should be the format in which we should store the tiled data. Are there any function which can automate these things. Like I tried to integrate rasterlite_load in my code but there were memory leakage in the code. Is there any function in spatialite or rasterlite which can take char buffer of tiled image and store it into blob data type in table (and corresponding function for reading).

share|improve this question
3  
Here is a 20 page tutorial, gaia-gis.it/gaia-sins/rasterlite-docs/rasterlite-how-to.pdf –  klewis Jun 24 '12 at 14:23
2  
You might have better luck asking the Spatialite folks directly. You can also query the forum posts. groups.google.com/forum/?fromgroups#!forum/spatialite-users –  klewis Jun 26 '12 at 22:21

1 Answer 1

Can you just compile gdal with spatialite support? Or do you just want to store entire tiffs in a blob column. See spatialite driver docs:

http://gdal.org/frmt_rasterlite.html

Then you can use gdal_translate:

gdal_translate -of Rasterlite source.tif RASTERLITE:my_db.sqlite,table=source
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.