-R rasters fail to \i

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

-R rasters fail to \i

Paolo Cavallini
Hi all,
creating an out-of-db raster fails:
===
raster2pgsql -s 3003 -I -M -C -R
/home/paolo/Scrivania/postgis/Dati/dtm/hdr.adf dtm_ext > dtm_ext.sql

less dtm_ext.sql

BEGIN;
CREATE TABLE "dtm_ext" ("rid" serial PRIMARY KEY,"rast" raster);
INSERT INTO "dtm_ext" ("rast") VALUES
(ST_Transform('0100000100000000000000594000000000000059C09D13253B3BB9374114AE473165C9524100000000000000000000000000000000BB0B00007A08A109CAFFFF7FFF002F686F6D652F70616F6C6F2F5363726976616E69612F706F73746769732F446174692F64746D2F6864722E61646600'::raster,
3003));
CREATE INDEX ON "dtm_ext" USING gist (st_convexhull("rast"));
ANALYZE "dtm_ext";
SELECT
AddRasterConstraints('','dtm_ext','rast',TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE);
END;
VACUUM ANALYZE "dtm_ext";

\i dtm_ext.sql
BEGIN
Tempo: 0,234 ms
CREATE TABLE
Tempo: 10,956 ms
psql:dtm_ext.sql:3: ERRORE:  XX000: rt_band_load_offline_data: Cannot
open offline raster: /home/paolo/Scrivania/postgis/Dati/dtm/hdr.adf
CONTESTO: funzione SQL "st_transform" istruzione 1
POSIZIONE:  rt_pg_error, rtpostgis.c:211
Tempo: 1,695 ms
psql:dtm_ext.sql:4: ERRORE:  25P02: la transazione corrente è
interrotta, i comandi saranno ignorati fino alla fine del blocco della
transazione
POSIZIONE:  exec_simple_query, postgres.c:994
Tempo: 2,872 ms
psql:dtm_ext.sql:5: ERRORE:  25P02: la transazione corrente è
interrotta, i comandi saranno ignorati fino alla fine del blocco della
transazione
POSIZIONE:  exec_simple_query, postgres.c:994
Tempo: 0,125 ms
psql:dtm_ext.sql:6: ERRORE:  25P02: la transazione corrente è
interrotta, i comandi saranno ignorati fino alla fine del blocco della
transazione
POSIZIONE:  exec_simple_query, postgres.c:994
Tempo: 0,138 ms
ROLLBACK
Tempo: 0,135 ms
psql:dtm_ext.sql:8: ERRORE:  42P01: la relazione "dtm_ext" non esiste
POSIZIONE:  RangeVarGetRelidExtended, namespace.c:420
Tempo: 12,499 ms
===
Previously the same command was working fine.
postgresql-9.6-postgis-2.3 from Debian sid.

Thanks for any hint.
--
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
https://www.google.com/trends/explore?date=all&geo=IT&q=qgis,arcgis
_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: -R rasters fail to \i

Tumasgiu Rossini
Hi,

maybe the postgres user cannot access the offline band ?
Check permissions on /home/paolo/Scrivania/postgis/Dati/dtm .

2017-01-05 11:58 GMT+01:00 Paolo Cavallini <[hidden email]>:
Hi all,
creating an out-of-db raster fails:
===
raster2pgsql -s 3003 -I -M -C -R
/home/paolo/Scrivania/postgis/Dati/dtm/hdr.adf dtm_ext > dtm_ext.sql

less dtm_ext.sql

BEGIN;
CREATE TABLE "dtm_ext" ("rid" serial PRIMARY KEY,"rast" raster);
INSERT INTO "dtm_ext" ("rast") VALUES
(ST_Transform('0100000100000000000000594000000000000059C09D13253B3BB9374114AE473165C9524100000000000000000000000000000000BB0B00007A08A109CAFFFF7FFF002F686F6D652F70616F6C6F2F5363726976616E69612F706F73746769732F446174692F64746D2F6864722E61646600'::raster,
3003));
CREATE INDEX ON "dtm_ext" USING gist (st_convexhull("rast"));
ANALYZE "dtm_ext";
SELECT
AddRasterConstraints('','dtm_ext','rast',TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE);
END;
VACUUM ANALYZE "dtm_ext";

\i dtm_ext.sql
BEGIN
Tempo: 0,234 ms
CREATE TABLE
Tempo: 10,956 ms
psql:dtm_ext.sql:3: ERRORE:  XX000: rt_band_load_offline_data: Cannot
open offline raster: /home/paolo/Scrivania/postgis/Dati/dtm/hdr.adf
CONTESTO: funzione SQL "st_transform" istruzione 1
POSIZIONE:  rt_pg_error, rtpostgis.c:211
Tempo: 1,695 ms
psql:dtm_ext.sql:4: ERRORE:  25P02: la transazione corrente è
interrotta, i comandi saranno ignorati fino alla fine del blocco della
transazione
POSIZIONE:  exec_simple_query, postgres.c:994
Tempo: 2,872 ms
psql:dtm_ext.sql:5: ERRORE:  25P02: la transazione corrente è
interrotta, i comandi saranno ignorati fino alla fine del blocco della
transazione
POSIZIONE:  exec_simple_query, postgres.c:994
Tempo: 0,125 ms
psql:dtm_ext.sql:6: ERRORE:  25P02: la transazione corrente è
interrotta, i comandi saranno ignorati fino alla fine del blocco della
transazione
POSIZIONE:  exec_simple_query, postgres.c:994
Tempo: 0,138 ms
ROLLBACK
Tempo: 0,135 ms
psql:dtm_ext.sql:8: ERRORE:  42P01: la relazione "dtm_ext" non esiste
POSIZIONE:  RangeVarGetRelidExtended, namespace.c:420
Tempo: 12,499 ms
===
Previously the same command was working fine.
postgresql-9.6-postgis-2.3 from Debian sid.

Thanks for any hint.
--
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
https://www.google.com/trends/explore?date=all&geo=IT&q=qgis,arcgis
_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users


_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: -R rasters fail to \i

Regina Obe-2
In reply to this post by Paolo Cavallini
You sure your postgres service account can access that file?

rt_band_load_offline_data: Cannot open offline raster: /home/paolo/Scrivania/postgis/Dati/dtm/hdr.adf

 sounds like a permission error.

One way to confirm it's not the .hdf driver is to try to load one tile (not using out of db, in db).  If it goes then I think it's probably a permission issue.

-----Original Message-----
From: postgis-users [mailto:[hidden email]] On Behalf Of Paolo Cavallini
Sent: Thursday, January 05, 2017 5:59 AM
To: [hidden email]
Subject: [postgis-users] -R rasters fail to \i

Hi all,
creating an out-of-db raster fails:
===
raster2pgsql -s 3003 -I -M -C -R
/home/paolo/Scrivania/postgis/Dati/dtm/hdr.adf dtm_ext > dtm_ext.sql

less dtm_ext.sql

BEGIN;
CREATE TABLE "dtm_ext" ("rid" serial PRIMARY KEY,"rast" raster); INSERT INTO "dtm_ext" ("rast") VALUES (ST_Transform('0100000100000000000000594000000000000059C09D13253B3BB9374114AE473165C9524100000000000000000000000000000000BB0B00007A08A109CAFFFF7FFF002F686F6D652F70616F6C6F2F5363726976616E69612F706F73746769732F446174692F64746D2F6864722E61646600'::raster,
3003));
CREATE INDEX ON "dtm_ext" USING gist (st_convexhull("rast")); ANALYZE "dtm_ext"; SELECT AddRasterConstraints('','dtm_ext','rast',TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE);
END;
VACUUM ANALYZE "dtm_ext";

\i dtm_ext.sql
BEGIN
Tempo: 0,234 ms
CREATE TABLE
Tempo: 10,956 ms
psql:dtm_ext.sql:3: ERRORE:  XX000: rt_band_load_offline_data: Cannot open offline raster: /home/paolo/Scrivania/postgis/Dati/dtm/hdr.adf
CONTESTO: funzione SQL "st_transform" istruzione 1
POSIZIONE:  rt_pg_error, rtpostgis.c:211
Tempo: 1,695 ms
psql:dtm_ext.sql:4: ERRORE:  25P02: la transazione corrente   interrotta, i comandi saranno ignorati fino alla fine del blocco della transazione
POSIZIONE:  exec_simple_query, postgres.c:994
Tempo: 2,872 ms
psql:dtm_ext.sql:5: ERRORE:  25P02: la transazione corrente   interrotta, i comandi saranno ignorati fino alla fine del blocco della transazione
POSIZIONE:  exec_simple_query, postgres.c:994
Tempo: 0,125 ms
psql:dtm_ext.sql:6: ERRORE:  25P02: la transazione corrente   interrotta, i comandi saranno ignorati fino alla fine del blocco della transazione
POSIZIONE:  exec_simple_query, postgres.c:994
Tempo: 0,138 ms
ROLLBACK
Tempo: 0,135 ms
psql:dtm_ext.sql:8: ERRORE:  42P01: la relazione "dtm_ext" non esiste
POSIZIONE:  RangeVarGetRelidExtended, namespace.c:420
Tempo: 12,499 ms
===
Previously the same command was working fine.
postgresql-9.6-postgis-2.3 from Debian sid.

Thanks for any hint.
--
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
https://www.google.com/trends/explore?date=all&geo=IT&q=qgis,arcgis
_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users

_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: -R rasters fail to \i

Paolo Cavallini
Il 05/01/2017 15:44, Regina Obe ha scritto:
> You sure your postgres service account can access that file?
>
> rt_band_load_offline_data: Cannot open offline raster: /home/paolo/Scrivania/postgis/Dati/dtm/hdr.adf
>
>  sounds like a permission error.
>
> One way to confirm it's not the .hdf driver is to try to load one tile (not using out of db, in db).  If it goes then I think it's probably a permission issue.

apparently permissions are OK:

postgres@440:/home/paolo/$ tail
/home/paolo/Scrivania/postgis/Dati/dtm/hdr.adf
GRID1.2 ?�@Y@YA6;;%�AQ_�1G�ip

thanks a lot
--
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
https://www.google.com/trends/explore?date=all&geo=IT&q=qgis,arcgis
_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: -R rasters fail to \i

Paolo Cavallini
In reply to this post by Paolo Cavallini
Il 05/01/2017 11:58, Paolo Cavallini ha scritto:

> Hi all,
> creating an out-of-db raster fails:
> ===
> raster2pgsql -s 3003 -I -M -C -R
> /home/paolo/Scrivania/postgis/Dati/dtm/hdr.adf dtm_ext > dtm_ext.sql
>
> \i dtm_ext.sql
> BEGIN
> Tempo: 0,234 ms
> CREATE TABLE
> Tempo: 10,956 ms
> psql:dtm_ext.sql:3: ERRORE:  XX000: rt_band_load_offline_data: Cannot
> open offline raster: /home/paolo/Scrivania/postgis/Dati/dtm/hdr.adf

Further tests revealed that it works for tif, not for adf, even with

SET postgis.enable_outdb_rasters TO True;
SET postgis.gdal_enabled_drivers TO DISABLE_ALL;

All the best.
--
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
https://www.google.com/trends/explore?date=all&geo=IT&q=qgis,arcgis
_______________________________________________
postgis-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-users