[Qgis-user] [EXT] Re: Trouble with reading raster data from PostGIS

Marks, Constant Constant.Marks at unt.edu
Mon Jul 1 12:37:13 PDT 2019


It seems that if I query the database with:

gdalinfo "PG:host=10.120.60.21 port=5432 dbname='gisdb'  user='postgres' password='***'' schema='public' table=smod"

I can get a response from every row.  I guess that QGIS is not passing the user and password correctly to GDAL.

From: Qgis-user <qgis-user-bounces at lists.osgeo.org> On Behalf Of Marks, Constant
Sent: Monday, July 1, 2019 2:07 PM
To: Jorge Gustavo Rocha <jgr at geomaster.pt>; qgis-user at lists.osgeo.org
Subject: Re: [Qgis-user] [EXT] Re: Trouble with reading raster data from PostGIS

I am trying to trouble shoot and now when I try and add an out of DB raster I simply get a "Cannot open GDAL dataset PG: ..." error.

From: Qgis-user <qgis-user-bounces at lists.osgeo.org<mailto:qgis-user-bounces at lists.osgeo.org>> On Behalf Of Jorge Gustavo Rocha
Sent: Monday, July 1, 2019 11:27 AM
To: qgis-user at lists.osgeo.org<mailto:qgis-user at lists.osgeo.org>
Subject: [EXT] Re: [Qgis-user] Trouble with reading raster data from PostGIS


Hi,

You registered the raster out of the DB. You need to provide the full path for the raster, not just name.tif.

Regards,

Jorge Gustavo
Às 16:46 de 01/07/19, Marks, Constant escreveu:
Can anyone help me with getting my system setup correctly for adding raster layers from a Postgresgl10/PostFIS3 server setup on an RHEL7 server.

I can connect to the database and it shows up in my console but when I go to add a referenced raster layer from the Database Manager I get an error like this in the  Rendering Log:

smodr_5d83364e_b1aa_431d_b8af_c1b1c625710e :: PostGISRasterRasterBand::IRasterIO(): ERROR: rt_band_load_offline_data: Cannot open offline raster: name.tif

In the Layers dialog the extents show as 1.79769e+308/-1.79769e+308.

I can resolve this if I do not use the -R flag when importing the raster into pg using the rater2pgsql function.  I expect this has something to do with the postgis.enable_outdb_raster variable but changing this with SET postgis.enable_outdb_raster TO True does not help.
Any ideas?

Constant Marks
Research Assistant | Computer Science and Engineering
University of North Texas
Office: Discovery Parks F216
e: constant.marks at unt.edu<mailto:constant.marks at unt.edu>
t: (303) 482 7292<tel:482%207292>



_______________________________________________

Qgis-user mailing list

Qgis-user at lists.osgeo.org<mailto:Qgis-user at lists.osgeo.org>

List info: https://lists.osgeo.org/mailman/listinfo/qgis-user<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fqgis-user&data=02%7C01%7Cconstant.marks%40unt.edu%7Cf00e807482034da2dbda08d6fe5742b8%7C70de199207c6480fa318a1afcba03983%7C0%7C0%7C636976048072215579&sdata=DK3rt4Aw5z9GS29PkE%2FxuNCrsokh6O%2FRwAvToVYhxiI%3D&reserved=0>

Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fqgis-user&data=02%7C01%7Cconstant.marks%40unt.edu%7Cf00e807482034da2dbda08d6fe5742b8%7C70de199207c6480fa318a1afcba03983%7C0%7C0%7C636976048072225573&sdata=V0yBqv1DykDmOSEF9Z7nECv06J3%2FeXd9UgIW%2BEtvax0%3D&reserved=0>
--
[Logo]   Geomaster, LDA
  VENHA DESCOBRIR O CAMINHO DO OPEN SOURCE CONNOSCO

Avenida Barros e Soares
N.º 423, 4715-214 Braga
VAT/NIF 510 906 109
Phone   +351 253 680 323
Site       geomaster.pt<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgeomaster.pt&data=02%7C01%7Cconstant.marks%40unt.edu%7Cf00e807482034da2dbda08d6fe5742b8%7C70de199207c6480fa318a1afcba03983%7C0%7C0%7C636976048072225573&sdata=rwWP5EyVJBgiwhbCD%2BbmHp%2Fb4GDHyuAB1vaQ0FOWEz8%3D&reserved=0>
GPS       41.53322, -8.41929
________________________________

Jorge Gustavo Rocha
CTO

Mobile  +351 910 333 888
Email    jgr at geomaster.pt<mailto:jgr at geomaster.pt>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20190701/b62ddc99/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 33896 bytes
Desc: image001.png
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20190701/b62ddc99/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 6534 bytes
Desc: image003.png
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20190701/b62ddc99/attachment-0003.png>


More information about the Qgis-user mailing list