Saturday, 2 June 2018

Raster data QGIS and SpatiaLite?


I am a german student and study Geoinformatik.


I have the task to store Raster data in SQLite. So use the turotial from the gaia page to Create a database and store a image (TIFF) named NaturalEarth. This was no problem. In my next step I want to add this image to qgis. I try to add a rasterlayer from my sqlite database but it doesn't work. So my question is how to load the image (raster data) from my database (sqlite) to qgis?



Answer




rasterlite2 brings with it the wmslite wms server that can operate on rasterlite databases. So you run wmslite on your rasterlite db and then load the WMS in QGis.


This https://www.gaia-gis.it/fossil/librasterlite2/wiki?name=tutorials is the index page for rasterlite2 tutorials, and in Step 5 of https://www.gaia-gis.it/fossil/librasterlite2/wiki?name=planetEarth they describe how to set up the WMS service:


$ wmslite -db earth.sqlite

and what URL to use to display it in WMS clients:


http://127.0.0.1:8080/wmslite?service=WMS&request=GetCapabilities

Note that you'll (as far as i remember) have to check "ignore axis orientation" on the WMS properties page in QGis.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...