<div dir="ltr">Can you post the shell script?<div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 25, 2015 at 11:50 AM, Phil Hurvitz <span dir="ltr"><<a href="mailto:phurvitz@uw.edu" target="_blank">phurvitz@uw.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Bborie, I am starting with a shell script, and have added the env vars to that script, but am still unable to access the out-db rasters.<span class=""><br>
<br>
-P.<br>
<br>
******************************<u></u>******************************<u></u>**<br>
Philip M. Hurvitz, PhD | Research Assistant Professor | UW-CBE<br>
Urban Form Lab | 1107 NE 45th Street, Suite 535 | Box 354802<br>
University of Washington, Seattle, Washington 98195-4802, USA<br>
<a href="mailto:phurvitz@u.washington.edu" target="_blank">phurvitz@u.washington.edu</a> | <a href="http://gis.washington.edu/phurvitz" target="_blank">http://gis.washington.edu/<u></u>phurvitz</a><br>
"What is essential is invisible to the eye." -de Saint-Exupéry<br>
******************************<u></u>******************************<u></u>**<br>
<br></span><span class="">
On 2/25/2015 11:45, Bborie Park wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
The env variables need to be within the environment of the postgres<br>
process. How are you starting postgres?<br>
<br>
Shell script? Then you should be able to add the variables to that script.<br>
<br>
Direct invocation of posrgres on the command line? You need to have the<br>
variables before the command<br>
<br>
VAR=1 postgres ...<br>
<br>
-bborie<br>
<br>
On Feb 25, 2015 11:40 AM, "Phil Hurvitz" <<a href="mailto:phurvitz@uw.edu" target="_blank">phurvitz@uw.edu</a><br></span><span class="">
<mailto:<a href="mailto:phurvitz@uw.edu" target="_blank">phurvitz@uw.edu</a>>> wrote:<br>
<br>
Thanks Bborie, I built from the tarball rather than using an rpm;<br>
does that still mean I should be adding the environment variables to<br>
<br></span>
/etc/sysconfig/pgsql/__<u></u>postgresql<span class=""><br>
<br>
So for overkill I added the env vars to that file as well as to the<br>
init script, restarted PostgreSQL, and it seems I still cannot<br>
access the out-db raster.<br>
<br>
I added a slope raster using:<br>
<br>
raster2pgsql -I -C -e -Y -F -d -R -s 2926 ./slope/slope_ps.tif<br>
gis.slope | psql osm_test<br>
<br>
I can get metadata (sorry for the ugly text wrapping):<br>
<br></span>
select rid, (<a href="http://foo.md" target="_blank">foo.md</a> <<a href="http://foo.md" target="_blank">http://foo.md</a>>).* from (select rid,<span class=""><br>
st_Metadata(rast) as md from slope) as foo;<br>
rid | upperleftx | upperlefty | width | height |<br>
scalex | scaley | skewx | skewy | srid | numbands<br></span>
-----+------------------+-----<u></u>__-------------+-------+------<u></u>--__+------------------+------<u></u>----__---------+-------+------<u></u>-+----__--+----------<span class=""><br>
1 | 835161.301005914 | 758483.868026069 | 31935 | 34649 |<br>
32.8083333333333 | -32.8083333333333 | 0 | 0 | 2926 | 1<br>
<br>
But cannot access values:<br>
<br>
select st_summarystats(rast) from slope;<br>
ERROR: rt_raster_load_offline_data: Access to offline bands disabled<br>
CONTEXT: SQL function "st_summarystats" statement 1<br>
<br>
select st_value(rast, 1, 1, 1) from slope;<br>
ERROR: rt_raster_load_offline_data: Access to offline bands disabled<br>
<br>
-P.<br>
<br></span>
******************************<u></u>__****************************<u></u>**__**<span class=""><br>
Philip M. Hurvitz, PhD | Research Assistant Professor | UW-CBE<br>
Urban Form Lab | 1107 NE 45th Street, Suite 535 | Box 354802<br>
University of Washington, Seattle, Washington 98195-4802, USA<br></span>
<a href="mailto:phurvitz@u.washington.edu" target="_blank">phurvitz@u.washington.edu</a> <mailto:<a href="mailto:phurvitz@u.washington.edu" target="_blank">phurvitz@u.washington.<u></u>edu</a>> |<br>
<a href="http://gis.washington.edu/__phurvitz" target="_blank">http://gis.washington.edu/__<u></u>phurvitz</a><span class=""><br>
<<a href="http://gis.washington.edu/phurvitz" target="_blank">http://gis.washington.edu/<u></u>phurvitz</a>><br>
"What is essential is invisible to the eye." -de Saint-Exupéry<br></span>
******************************<u></u>__****************************<u></u>**__**<br>
<br>
<br>
Bborie Park <a href="mailto:dustymugs@gmail.com" target="_blank">dustymugs@gmail.com</a> <mailto:<a href="mailto:dustymugs@gmail.com" target="_blank">dustymugs@gmail.com</a>><span class=""><br>
Wed Feb 25 10:46:59 PST 2015<br>
<br>
><br>
<br>
Philip,<br>
<br>
POSTGIS_ENABLE_OUTDB_RASTERS=1 is an environment variable not to<br>
be in<br>
postgresql.conf.<br>
<br></span>
The same is true for POSTGIS_GDAL_ENABLED_DRIVERS=_<u></u>_ENABLE_ALL<br>
<br>
<a href="https://wiki.postgresql.org/__wiki/PostgreSQL_on_RedHat___Linux" target="_blank">https://wiki.postgresql.org/__<u></u>wiki/PostgreSQL_on_RedHat___<u></u>Linux</a><span class=""><br>
<<a href="https://wiki.postgresql.org/wiki/PostgreSQL_on_RedHat_Linux" target="_blank">https://wiki.postgresql.org/<u></u>wiki/PostgreSQL_on_RedHat_<u></u>Linux</a>><br>
<br>
Based upon the above, it looks like you should add<br>
<br>
POSTGIS_ENABLE_OUTDB_RASTERS=1<br></span>
POSTGIS_GDAL_ENABLED_DRIVERS=_<u></u>_ENABLE_ALL<br>
<br>
to /etc/sysconfig/pgsql/__<u></u>postgresql<span class=""><br>
<br>
The above assumes you're using the packages provided by PostgreSQL.<br>
<br></span>
<a href="http://www.postgresql.org/__download/linux/redhat/" target="_blank">http://www.postgresql.org/__<u></u>download/linux/redhat/</a><span class=""><br>
<<a href="http://www.postgresql.org/download/linux/redhat/" target="_blank">http://www.postgresql.org/<u></u>download/linux/redhat/</a>><br>
<br>
-bborie<br>
<br>
<br>
<br>
On 2/25/2015 10:10, Phil Hurvitz wrote:<br>
<br>
Hi all, I am having trouble starting PostGIS with out-db raster<br>
support<br>
<br></span>
In my /usr/local/pgsql/data/__<u></u>postgresql.conf file I include the<span class=""><br>
line<br>
<br>
POSTGIS_ENABLE_OUTDB_RASTERS=1<br>
<br>
after which PostGIS won't start (service postgresql start).<br>
<br>
Software is<br>
<br>
postgis_full_version<br></span>
------------------------------<u></u>__----------------------------<u></u>--__-----------<span class=""><br>
POSTGIS="2.1.3 r12547" GEOS="3.4.2-CAPI-1.8.2 r3921"<br>
PROJ="Rel. 4.7.1,<br>
23 September 2009" GDAL="GDAL 1.11.2, released 2015/02/10"<br>
LIBXML="2.7.6" TOPOLOGY RASTER<br>
<br>
<br>
Also PostGIS won't start when I specify<br>
<br></span>
POSTGIS_GDAL_ENABLED_DRIVERS=_<u></u>_ENABLE_ALL<span class=""><br>
<br>
Any help would be appreciated!<br>
<br>
</span></blockquote>
</blockquote></div><br></div>