<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi,</p>
<p>I'm learning to use PostGIS with PostgreSQL by way of the book <u>PostGIS
In Action, 2ed</u>. I'm working in Windows 10. Using the
following example from the book:</p>
<p>CREATE TABLE ch02.my_rasters (<br>
rid serial PRIMARY KEY,<br>
name varchar(100),<br>
rast raster);<br>
</p>
<p>I get the error in the subject line:</p>
<p>error: type "raster" does not exist</p>
<p>Searching for some help, I came across the note from
<a class="moz-txt-link-freetext" href="https://postgis.net/docs/manual-3.0/raster.html">https://postgis.net/docs/manual-3.0/raster.html</a></p>
<p>"[Raster] Requires PostGIS be compiled with GDAL support.
Currently rasters can be implicitly converted to geometry type,
but the conversion returns the <a class="xref"
href="https://postgis.net/docs/manual-3.0/RT_ST_ConvexHull.html"
title="ST_ConvexHull">ST_ConvexHull</a> of the raster. This auto
casting may be removed in the near future so don't rely on it."</p>
<p>I wasn't sure how to check PostGIS settings, but remembered that
Ch.1 of the book suggested to use</p>
<p>SELECT postgis_full_version();</p>
<p>And when I looked at the result from that the first time, I did
not notice that GDAL was missing. GDAL appeared to be installed,
it was in my system environment variables. I reinstalled PostGIS
and the select statement returns now:</p>
<p>POSTGIS="3.0.0 r17983" [EXTENSION] PGSQL="120"
GEOS="3.8.0-CAPI-1.13.1 " PROJ="Rel. 5.2.0, September 15th, 2018"
LIBXML="2.9.9" LIBJSON="0.12" LIBPROTOBUF="1.2.1" WAGYU="0.4.3
(Internal)"<br>
</p>
<p>When PostGIS installed, it requested to enable a couple of
setting regarding rasters and I said yes. Currently, the relevant
(I think) system variables are:</p>
<p>POSTGIS_ENABLE_OUTDB_RASTERS 1 <br>
POSTGIS_GDAL_ENABLED_DRIVERS GTiff PNG JPEG GIF XYZ DTED
USGSDEM AAIGrid<br>
GDAL_DATA C:\Program Files\PostgreSQL\12\gdal-data <br>
</p>
<p>I'm not sure why GDAL still doesn't register as part of the
PostGIS settings. I would appreciate help in trying to get PostGIS
and GDAL to work together for utilizing rasters. <br>
</p>
<p>best,</p>
<p>John<br>
</p>
<pre class="moz-signature" cols="72">--
Enlightenment is ego's ultimate disappointment.
-Chogyam Trungpa</pre>
</body>
</html>