[postgis-users] postgis raster

Paolo Corti pcorti at gmail.com
Mon Feb 4 07:20:16 PST 2013


On Mon, Feb 4, 2013 at 4:01 PM, Francois Hugues
<hugues.francois at irstea.fr> wrote:
> Hello,
>
> If you want to see your rasters in qgis you should :
>
> 1. add raster constraint using -C option if you didn't
> 2. you may try WKT rasters plugin for qgis
> 3. you can try to use st_dumpaspolygons
>

Hi

Another approach I had good results with in the past, is using a GDAL
virtual raster [1] fed by the PostGIS raster driver [2] and loading it
directly from the "Add raster layer" QGIS dialog (I think it is the
same approach used by the WKT raster plugin behind the scenes).
You should be able to generate the virtual driver using the
gdalbuildvrt utility [3].

Not have the right virtual environment to test right now, but
something like this should work:

gdalbuildvrt pg_raster.vrt PG":host='<host>' port:'<port>'
dbname='<dbname>' user='<user>' password='<password>'

and then add pg_raster.vrt using the "Add raster layer" qgis dialog

regards
p

[1] http://www.gdal.org/gdal_vrttut.html
[2] http://trac.osgeo.org/gdal/wiki/frmts_wtkraster.html
[3] http://www.gdal.org/gdalbuildvrt.html

-- 
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti


More information about the postgis-users mailing list