<div dir="ltr"><div class="gmail_extra">Comments interspersed...</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_quote">On Wed, Dec 31, 2014 at 12:40 PM, garret <span dir="ltr"><<a href="mailto:garretlewis@gmail.com" target="_blank">garretlewis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hello,<br>
<br>
Im am attempting to follow along in the book Postgis Cookbook, and am<br>
importing a raster via raster2pgsql.  So far, unsuccesfully.<br>
<br>
*the original code shows:* (Ive altered it only to fit my current set up)<br>
raster2pgsql -I -C -M -F -t 100x100 worldclim/tmax1.bil chp1.tmax01 | psql<br>
-d postgis_cookbook -U me -f tmax1.sql<br>
<br>
*But I get an error stating, Processing 1/1: tmax1.bil tmax1.sql: No such<br>
file or directory.*<br>
<br></blockquote><div><br></div><div>This is happening because you have "-f tmax1.sql" specified to psql.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
*So, Ive altered the query to this:*<br>
raster2pgsql -I -C -M -F -t 100x100 tmax1.bil chp1.tmax1 | psql -d<br>
postgisCookbook -U gisuser<br>
<br>
*the output is:*<br>
Processing 1/1: tmax1.bil<br>
BEGIN<br>
CREATE TABLE<br>
INSERT 0 1<br>
INSERT 0 1<br>
INSERT 0 1<br></blockquote><div><br></div><div>snip...</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> addrasterconstraints<br>
----------------------<br>
 t<br>
(1 row)<br>
<br>
COMMIT<br>
VACUUM<br>
<br>
=======================================<br>
<br>
So it seems to me to have completed successfully. But then when I go to<br>
check the raster in QGIS I only see a table with no geometry.<br>
<br></blockquote><div><br></div><div>raster loading through raster2pgsql does not generate any geometries. </div><div> </div><div>You're better off checking the metadata of the loaded rasters...</div><div><br></div><div>SELECT ST_Metadata(rast) FROM chp1.tmax1 LIMIT 1</div><div><br></div><div>And...</div><div><br></div><div><div>SELECT ST_BandMetadata(rast, 1) FROM chp1.tmax1 LIMIT 1</div></div><div><br></div><div>-bborie</div></div></div></div>