[QGIS-Developer] Reading out-of-db PostgreSQL Raster

Jorge Gustavo Rocha jgr at di.uminho.pt
Wed Nov 6 01:32:24 PST 2019


Hi Paolo,

Nice to know you found out the problem. The easiest option to store
out-of-db rasters can be under Postgresql's data_directory. All users
should be able to read files from there.

# show data_directory;
       data_directory
-----------------------------
 /var/lib/postgresql/11/main

Regards,

Jorge


Às 07:37 de 06/11/19, Paolo Cavallini escreveu:
> /me stupid: postgresql did not have read access to the file.
> sorry for the noise
> 
> Il 06/11/19 08:18, Paolo Cavallini ha scritto:
>> Hi Jorge,
>>
>> Il 05/11/19 21:34, Jorge Gustavo Rocha ha scritto:
>>
>>> If you have GDAL >= 2.4, it should work. Can you check your GDAL version?
>>
>> 2.4.2+dfsg-2
>>
>>> Do you also have overviews/pyramids? The overviews should work, because
>>> they are in db. Only the original raster is out-of-db.
>>
>> sure, all "normal" rasters, incluging the pyramids, are correctly shown.
>>
>> thanks for the feedback.
>>
>>> Às 20:24 de 05/11/19, Paolo Cavallini escreveu:
>>>> Hi all,
>>>> loading PostGIS rasters from the browser works very well, thanks Ale!
>>>> However, those loaded with the -R option (out of db rasters) throw an error:
>>>>
>>>> Warning: Logged warning: RasterIO error:
>>>> PostGISRasterRasterBand::IRasterIO(): ERROR:  rt_band_load_offline_data:
>>>> Cannot open offline raster:
>>>> /home/paolo/Documents/Didattica/Corsi_Formazione_Faunalia/PostGIS/data/dtm_nord.tif
>>>>
>>>> I have enabled out-of-db rasters:
>>>>
>>>>  POSTGIS_ENABLE_OUTDB_RASTERS=1
>>>>  POSTGIS_GDAL_ENABLED_DRIVERS=ENABLE_ALL
>>>>
>>>> The same data are readable from psql
>>>> select * from dtm_ext ;
>>>> ┌─────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
>>>> │ rid │
>>>>
>>>> ├─────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
>>>> │   1 │ 01000001...
>>>>
>>>> Is this a known limitation, or do I need some additional config?
>>>>
>>>> Thanks.
>>>>
>>>
>>> J. Gustavo
>>>
>>
> 

J. Gustavo
-- 
Jorge Gustavo Rocha
Departamento de Informática
Universidade do Minho
4710-057 Braga
Gabinete 3.29 (Piso 3)
Tel: +351 253604480
Fax: +351 253604471
Móvel: +351 910333888
skype: nabocudnosor


More information about the QGIS-Developer mailing list