[postgis-users] raster2pgsql is not creating a raster table in postgis
Bborie Park
dustymugs at gmail.com
Wed Dec 31 14:21:20 PST 2014
Comments interspersed...
On Wed, Dec 31, 2014 at 12:40 PM, garret <garretlewis at gmail.com> wrote:
> Hello,
>
> Im am attempting to follow along in the book Postgis Cookbook, and am
> importing a raster via raster2pgsql. So far, unsuccesfully.
>
> *the original code shows:* (Ive altered it only to fit my current set up)
> raster2pgsql -I -C -M -F -t 100x100 worldclim/tmax1.bil chp1.tmax01 | psql
> -d postgis_cookbook -U me -f tmax1.sql
>
> *But I get an error stating, Processing 1/1: tmax1.bil tmax1.sql: No such
> file or directory.*
>
>
This is happening because you have "-f tmax1.sql" specified to psql.
> *So, Ive altered the query to this:*
> raster2pgsql -I -C -M -F -t 100x100 tmax1.bil chp1.tmax1 | psql -d
> postgisCookbook -U gisuser
>
> *the output is:*
> Processing 1/1: tmax1.bil
> BEGIN
> CREATE TABLE
> INSERT 0 1
> INSERT 0 1
> INSERT 0 1
>
snip...
> addrasterconstraints
> ----------------------
> t
> (1 row)
>
> COMMIT
> VACUUM
>
> =======================================
>
> So it seems to me to have completed successfully. But then when I go to
> check the raster in QGIS I only see a table with no geometry.
>
>
raster loading through raster2pgsql does not generate any geometries.
You're better off checking the metadata of the loaded rasters...
SELECT ST_Metadata(rast) FROM chp1.tmax1 LIMIT 1
And...
SELECT ST_BandMetadata(rast, 1) FROM chp1.tmax1 LIMIT 1
-bborie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20141231/3afba3fd/attachment.html>
More information about the postgis-users
mailing list