[postgis-users] Problem with raster2psql out-db

Alex German gr1047 at gmail.com
Wed Nov 9 23:42:40 PST 2022


Thank you, Regina Obe!
Your advice really helped. Now the raster is loaded into the database .
But there was another problem.
The Cloud Optimized GeoTIFF raster that was created by gdal_translate.
The raster has pyramids. However, pyramids are not used when uploading to
the database.
What could be the problem?

Alex German

чт, 10 нояб. 2022 г. в 08:30, Regina Obe <lr at pcorp.us>:

> The  out_db constraint is not filled in unless you include the –C option
> to include constraints.
>
> So I suspect your raster loaded is really out of database.
>
>
>
> An easy way to check is run a query like this described on this page:
> https://postgis.net/docs/manual-3.3/RT_ST_BandMetaData.html
>
>
>
>
>
> SELECT bmd.out_db, bmd.path
>
> FROM t1 AS r, ST_BandMetaData(r.rast) AS bmd LIMIT 1;
>
>
>
>
>
> You can add an out_db constraint with this function -
> https://postgis.net/docs/manual-3.3/RT_AddRasterConstraints.html
>
>
>
> Like so:
>
>
>
> SELECT AddRasterConstraints('t1', 'rast', 'out_db' );
>
>
>
> Hope that helps,
>
> Regina
>
>
>
> *From:* postgis-users [mailto:postgis-users-bounces at lists.osgeo.org] *On
> Behalf Of *Alex German
> *Sent:* Wednesday, November 9, 2022 12:51 AM
> *To:* postgis-users at lists.osgeo.org
> *Subject:* [postgis-users] Problem with raster2psql out-db
>
>
>
> Hi, everybody.
>
> I need help.
>
> I have a problem when using the raster2psql utility.
>
> I use the -R key, but the raster is loaded into the raster table, and not
> as an external file. raster_columns in the out_db field is null
>
> raster2pgsql -R //geoserver/t1.tif | psql
>
> What am I doing wrong?
>
> --
>
> Alex German
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>


-- 
Алексей Герман
8-905-86-00-416
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20221110/ef1f80cb/attachment.htm>


More information about the postgis-users mailing list