<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Consolas",serif;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>All drivers are disabled by default as a security precaution.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>However if you are running PostgreSQL 9.4 or above, you should be able to set these with ALTER SYSTEM, which is cross-platform way of doing it.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>The link that Brian provided does have an example of ALTER SYSTEM - <a href="http://postgis.net/docs/postgis_gdal_enabled_drivers.html">http://postgis.net/docs/postgis_gdal_enabled_drivers.html</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>So if  you run the below in psql or pgAdmin, you should be able to access all drivers permanently (since ALTER SYSTEM settings get stored in postgresql.auto.conf that gets loaded on each postgresq server startup)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>ALTER SYSTEM SET postgis.gdal_enabled_drivers TO 'ENABLE_ALL';<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>SELECT pg_reload_conf();<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>Then you can confirm it works by running this query:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>SELECT * FROM ST_GDALDrivers();<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Hope that helps,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Regina<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> Live-demo [mailto:live-demo-bounces@lists.osgeo.org] <b>On Behalf Of </b>Brian M Hamlin<br><b>Sent:</b> Saturday, January 23, 2016 2:02 PM<br><b>To:</b> live-demo@lists.osgeo.org; Pieter du Plooy <pjduplooy@zpanelcp.com><br><b>Subject:</b> Re: [Live-demo] Postgis questions<o:p></o:p></span></p></div></div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p><p style='margin-left:.5in'>Hi Pieter --<o:p></o:p></p><p style='margin-left:.5in'> <o:p></o:p></p><p style='margin-left:.5in'>  oh, ok.. thats new to me..<o:p></o:p></p><p style='margin-left:.5in'>  according to the PostGIS docs page..<o:p></o:p></p><p style='margin-left:.5in'>   <a href="http://postgis.net/docs/postgis_gdal_enabled_drivers.html">http://postgis.net/docs/postgis_gdal_enabled_drivers.html</a><o:p></o:p></p><p style='margin-left:.5in'> <o:p></o:p></p><p style='margin-left:.5in'>  those variables can be set at all levels..<o:p></o:p></p><p style='margin-left:.5in'>  cluster-wide -> postgresql.conf<o:p></o:p></p><p style='margin-left:.5in'>  database-persistant ->  ALTER DATABASE ...<o:p></o:p></p><p style='margin-left:.5in'>  database-temp, psql session temp  ->  set ....<o:p></o:p></p><p style='margin-left:.5in'> <o:p></o:p></p><p style='margin-left:.5in'>also apparently SHELL with bash-style environment vars, as in .bashrc<o:p></o:p></p><p style='margin-left:.5in'> <o:p></o:p></p><p style='margin-left:.5in'>I would think that all gdal drivers would be enabled by default, and that really you<o:p></o:p></p><p style='margin-left:.5in'>need  raster out_db set...  so I look here<o:p></o:p></p><p style='margin-left:.5in'>    <a href="http://postgis.net/docs/postgis_enable_outdb_rasters.html">http://postgis.net/docs/postgis_enable_outdb_rasters.html</a><o:p></o:p></p><p style='margin-left:.5in'> <o:p></o:p></p><p style='margin-left:.5in'>make sense ?<o:p></o:p></p><p style='margin-left:.5in'>  -Brian<o:p></o:p></p><p style='margin-left:.5in'><br><br>On Sat, 23 Jan 2016 19:51:42 +0200, Pieter du Plooy <<a href="mailto:pjduplooy@zpanelcp.com">pjduplooy@zpanelcp.com</a>> wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid black 1.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><div id=html-message><div><div><p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in'>Hi Brian<o:p></o:p></p></div><p class=MsoNormal style='margin-left:.5in'>Thx for the info, but what I really need is where to <o:p></o:p></p><pre style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in'>postgis.gdal_enabled_drivers = 'ENABLE_ALL'<o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in'>and postgis.enable_outdb_rasters=1<o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in'>in Ubuntu 14.04, and system wide<o:p></o:p></pre><pre style='margin-left:.5in'>I did it previously in my .bashrc, but for some reason its not<o:p></o:p></pre><pre style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in'>working now.<o:p></o:p></pre><pre style='margin-left:.5in'>Pieter<o:p></o:p></pre></div><div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p><div><p class=MsoNormal style='margin-left:.5in'>On Sat, Jan 23, 2016 at 6:58 PM, Brian M Hamlin <<a href="mailto:maplabs@light42.com" target="_blank">maplabs@light42.com</a>> wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><p style='margin-left:.5in'>Hi Pieter --<o:p></o:p></p><p style='margin-left:.5in'> <o:p></o:p></p><p style='margin-left:.5in'>  I have an a2 build running in a VM.<o:p></o:p></p><p style='margin-left:.5in'> <o:p></o:p></p><p style='margin-left:.5in'>user@live95a:~$ locate raster.tif        <= there is an example file for a QGis plugin called this<o:p></o:p></p><p style='margin-left:.5in'>user@live95a:~$ gdalinfo /path/to/raster.tif<o:p></o:p></p><p style='margin-left:.5in'>   hmm non-trivial .. open qgis to let qgis do the work<o:p></o:p></p><p style='margin-left:.5in'>   qgis shows the projection is EPSG:32633<o:p></o:p></p><p style='margin-left:.5in'> <o:p></o:p></p><p style='margin-left:.5in'>user@live95a:~$  createdb raster_test<o:p></o:p></p><p style='margin-left:.5in'>user@live95a:~$ psql -c 'create extension postgis' raster_test<o:p></o:p></p><p style='margin-left:.5in'>user@live95a:~$ psql -c 'select postgis_full_version()' raster_test<o:p></o:p></p><p style='margin-left:.5in'>    yes, RASTER is enabled<o:p></o:p></p><p style='margin-left:.5in'>    use raster2pgsql to load a raster, as per PostGIS raster manual<o:p></o:p></p><p style='margin-left:.5in'> <o:p></o:p></p><p style='margin-left:.5in'>user@live95a:~$ raster2pgsql -s 32633 -I -C /path/to/raster.tif  raster_test | less<o:p></o:p></p><p style='margin-left:.5in'>    inspect output, yes looks valid<o:p></o:p></p><p style='margin-left:.5in'> <o:p></o:p></p><p style='margin-left:.5in'>user@live95a:~$ raster2pgsql -s 32633 -I -C /path/to/raster.tif  raster_test | psql raster_test<o:p></o:p></p><p style='margin-left:.5in'>user@live95a:~$ psql -c '\d raster_test'<o:p></o:p></p><p style='margin-left:.5in'>    note rid, rast columns.. lots of other detail<o:p></o:p></p><p style='margin-left:.5in'>    better command line would name the tables, split into tiles, etc...<o:p></o:p></p><p style='margin-left:.5in'> <o:p></o:p></p><p style='margin-left:.5in'>  hth --Brian<o:p></o:p></p><div><div><p style='margin-left:.5in'> <o:p></o:p></p><p style='margin-left:.5in'><br><br>On Sat, 23 Jan 2016 16:45:50 +0200, Pieter du Plooy <<a href="mailto:pjduplooy@zpanelcp.com" target="_blank">pjduplooy@zpanelcp.com</a>> wrote:<o:p></o:p></p></div></div><blockquote style='border:none;border-left:solid black 1.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><div><div><div><div><div><div><p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in'>I am struggling to enable postgis gdal drivers and outdb rasters on Ubuntu (using postgis from the osgeolive nightly, so its for trusty.<br><br>How do I go about enabling them in Ubuntu Trusty?<br><br>I have tried setting it in .profile, as well as .bashrc systemwide etc..., but no luck.<br><br>Any help?<o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in'>Regards<o:p></o:p></p></div><p class=MsoNormal style='margin-left:.5in'>Pieter<o:p></o:p></p></div></div></div></div><div class=MsoNormal align=center style='margin-left:.5in;text-align:center'><hr size=2 width="100%" align=center></div><p class=MsoNormal style='margin-left:.5in'><br>_______________________________________________<br>Live-demo mailing list<br><a href="mailto:Live-demo@lists.osgeo.org" target="_blank">Live-demo@lists.osgeo.org</a><br><a href="http://../hwebmail/services/go.php?url=http%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Flive-demo" target="_blank">http://lists.osgeo.org/mailman/listinfo/live-demo</a><br><a href="http://../hwebmail/services/go.php?url=http%3A%2F%2Flive.osgeo.org" target="_blank">http://live.osgeo.org</a><br><a href="http://../hwebmail/services/go.php?url=http%3A%2F%2Fwiki.osgeo.org%2Fwiki%2FLive_GIS_Disc" target="_blank">http://wiki.osgeo.org/wiki/Live_GIS_Disc</a> <o:p></o:p></p></blockquote><p style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in'><o:p> </o:p></p><p style='margin-left:.5in'><br>--<br>Brian M Hamlin<br>OSGeo California Chapter<br><a href="http://blog.light42.com" target="_blank">blog.light42.com</a><o:p></o:p></p><p style='margin-left:.5in'> <o:p></o:p></p></div></blockquote></div></div></div></blockquote><p style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in'><o:p> </o:p></p><p style='margin-left:.5in'><br>--<br>Brian M Hamlin<br>OSGeo California Chapter<br>blog.light42.com<o:p></o:p></p><p style='margin-left:.5in'> <o:p></o:p></p></div></body></html>