Friday, 26 February 2016

Loading a raster using QGIS into a PostGIS2.0 enabled database



Following on from my attempt to install a postgresql 9.1 db with postgis 2.0 on windows 7, I am trying to figure out how to load a raster. I have successfully loaded a shapefile, and am trying to do the same with a .tif file using the Load Raster to PostGIS plugin (version 0.5.1) in QGIS (version 1.7). I have set up the connection to my db, and am using the following settings:


enter image description here


When I click on the OK button, I get the below error message. I've tried this with a .adf file and also a .tif file, both projected in Albert Equal Area Conic with an SRID of 102003.


Checking parameters...
Connecting to database...
Storing overview 1 on database...
Failed.
Finished storing overview 1.
Storing overview 2 on database...
Failed.

Finished storing overview 2.
Storing overview 3 on database...
Failed.
Finished storing overview 3.
Finished.

This process has not inserted anything into my database, and I don't understand the error message. Some previous related questions are here (asked by me, using a different process on loading rasters) and here (using the same plugin but much earlier in the year).



Answer



celenius,


It's quite possible that the QGIS raster loader hasn't been revised yet to fit with the new changes we have in place. I suggest trying the raster2pgsql.exe packaged with the latest windows experimental. It should load tifs just fine.



Instructions here.


http://www.postgis.org/documentation/manual-svn/using_raster.xml.html#RT_Loading_Rasters


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...