<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div>Dear users,</div>
<div> </div>
<div>I hope that somebody can tell me if I found a bug or simply don’t use the command correctly.</div>
<div> </div>
<div>Given:</div>
<ul style="margin:0;padding-left:36pt;">
<li>A directory with four GeoTIFF files </li><li>PostgreSQL 9.6.1, compiled by Visual C++ build 1800, 64-bit</li><li>POSTGIS="2.3.1 r15264" GEOS="3.6.0-CAPI-1.10.0 r4265" SFCGAL="1.3.0" PROJ="Rel. 4.9.1, 04 March 2015" GDAL="GDAL 2.1.1, released 2016/07/07" LIBXML="2.7.8" LIBJSON="0.12" RASTER</li><li>OS is Windows 7</li></ul>
<div> </div>
<div>I try to import the Tiff files as OUT_DB raster files using this command:</div>
<div> </div>
<ol style="margin:0;padding-left:36pt;">
<font face="Courier New">
<li>raster2pgsql.exe -s 25832 -I -R -n myFilename -C -M -F C:\_GEODATA_\*.tif raster2x2  > t:\DTK10.sql<br>

<br>

<font face="Calibri">Output:</font></li></font>
</ol>
<ol type="a" style="margin:0;padding-left:72pt;">
<li>Processing 1/4: C:\_GEODATA_\24_dtk10_32356_5608_2_nw_col.tif</li><li>Processing 2/4: C:\_GEODATA_\25_dtk10_32356_5610_2_nw_col.tif</li><li>Processing 3/4: C:\_GEODATA_\34_dtk10_32358_5608_2_nw_col.tif</li><li>Processing 4/4: C:\_GEODATA_\35_dtk10_32358_5610_2_nw_col.tif</li></ol>
<div style="padding-left:72pt;"> </div>
<ol start="2" style="margin:0;padding-left:36pt;">
<font face="Courier New">
<li>psql.exe --host=localhost --port=5432 --username=xxx --dbname=xxx -f t:\DTK10.sql</li></font>
</ol>
<div style="padding-left:36pt;"><br>

Output:</div>
<ol type="a" style="margin:0;padding-left:72pt;">
<li>BEGIN</li><li>CREATE TABLE</li><li>INSERT 0 1</li><li>INSERT 0 1</li><li>INSERT 0 1</li><li>INSERT 0 1</li><li>CREATE INDEX</li><li>ANALYZE</li><li>psql:t:/DTK10.sql:9: HINWEIS:  Adding SRID constraint</li><li>psql:t:/DTK10.sql:9: HINWEIS:  Adding scale-X constraint</li><li>psql:t:/DTK10.sql:9: HINWEIS:  Adding scale-Y constraint</li><li>psql:t:/DTK10.sql:9: HINWEIS:  Adding blocksize-X constraint</li><li>psql:t:/DTK10.sql:9: HINWEIS:  Adding blocksize-Y constraint</li><li>psql:t:/DTK10.sql:9: HINWEIS:  Adding alignment constraint</li><li>psql:t:/DTK10.sql:9: HINWEIS:  Adding number of bands constraint</li><li>psql:t:/DTK10.sql:9: HINWEIS:  Adding pixel type constraint</li><li>psql:t:/DTK10.sql:9: HINWEIS:  Adding nodata value constraint</li><li>psql:t:/DTK10.sql:9: HINWEIS:  Adding out-of-database constraint</li><li>psql:t:/DTK10.sql:9: HINWEIS:  Adding maximum extent constraint</li><li>addrasterconstraints</li><li>----------------------</li><li>t</li></ol>
<div> </div>
<div>Problem is that the view “raster_columns” always shows FALSE for out_db, even though I used the F flag:<br>

</div>
<table width="2648" style="width:1589.15pt;">
<col width="105" style="width:63.5pt;">
<col width="108" style="width:64.8pt;">
<col width="98" style="width:58.8pt;">
<col width="111" style="width:66.6pt;">
<col width="49" style="width:29.5pt;">
<col width="64" style="width:38.45pt;">
<col width="64" style="width:38.6pt;">
<col width="84" style="width:50.65pt;">
<col width="84" style="width:50.75pt;">
<col width="110" style="width:66.45pt;">
<col width="111" style="width:66.65pt;">
<col width="86" style="width:52.5pt;">
<col width="84" style="width:50.7pt;">
<col width="100" style="width:60.5pt;">
<col width="63" style="width:38.35pt;">
<col width="1227" style="width:736.5pt;">
<col width="93" style="width:56.3pt;">
<tr>
<td>"r_table_catalog"</td>
<td>"r_table_schema"</td>
<td>"r_table_name"</td>
<td>"r_raster_column"</td>
<td>"srid"</td>
<td>"scale_x"</td>
<td>"scale_y"</td>
<td>"blocksize_x"</td>
<td>"blocksize_y"</td>
<td>"same_alignment"</td>
<td>"regular_blocking"</td>
<td>"num_bands"</td>
<td>"pixel_types"</td>
<td>"nodata_values"</td>
<td>"out_db"</td>
<td>"extent"</td>
<td>"spatial_index"</td>
</tr>
<tr>
<td>"gismobile"</td>
<td>"public"</td>
<td>"raster2x2 "</td>
<td>"rast"</td>
<td>25832</td>
<td>0.5</td>
<td>-0.5</td>
<td>4000</td>
<td>4000</td>
<td>true</td>
<td>false</td>
<td>1</td>
<td>{8BUI}</td>
<td>{NULL}</td>
<td>{f}</td>
<td>0103000020E864000001000000050000000000000080BA154100000000906455410000000080BA154100000000786855410000000000F9154100000000786855410000000000F9154100000000906455410000000080BA15410000000090645541</td>
<td>true</td>
</tr>
</table>
<div> </div>
<div> </div>
<div> </div>
<table width="801" style="width:481.1pt;">
<col width="29" style="width:17.45pt;">
<col width="663" style="width:398.5pt;">
<col width="109" style="width:65.6pt;">
<tr>
<td>"rid"</td>
<td>"rast"</td>
<td>"filename"</td>
</tr>
<tr>
<td>1</td>
<td>0100000100000000000000E03F000000000000E0BF0000000080BA1541000000008466554100000000000000000000000000000000E8640000A00FA00F840000433A5C5F47454F444154415F5C32345F64746B31305F33323335365F353630385F325F6E775F636F6C2E74696600</td>
<td>"24_dtk10_32356_5608_2_nw_col.tif"</td>
</tr>
<tr>
<td>2</td>
<td>0100000100000000000000E03F000000000000E0BF0000000080BA1541000000007868554100000000000000000000000000000000E8640000A00FA00F840000433A5C5F47454F444154415F5C32355F64746B31305F33323335365F353631305F325F6E775F636F6C2E74696600</td>
<td>"25_dtk10_32356_5610_2_nw_col.tif"</td>
</tr>
<tr>
<td>3</td>
<td>0100000100000000000000E03F000000000000E0BF00000000C0D91541000000008466554100000000000000000000000000000000E8640000A00FA00F840000433A5C5F47454F444154415F5C33345F64746B31305F33323335385F353630385F325F6E775F636F6C2E74696600</td>
<td>"34_dtk10_32358_5608_2_nw_col.tif"</td>
</tr>
<tr>
<td>4</td>
<td>0100000100000000000000E03F000000000000E0BF00000000C0D91541000000007868554100000000000000000000000000000000E8640000A00FA00F840000433A5C5F47454F444154415F5C33355F64746B31305F33323335385F353631305F325F6E775F636F6C2E74696600</td>
<td>"35_dtk10_32358_5610_2_nw_col.tif"</td>
</tr>
</table>
<div> </div>
<div>What I found out: As soon as I omit the s flag (to provide a SRS) the column shows TRUE.</div>
<div> </div>
<div>I guess that this is not the intended behaviour is it?</div>
<div> </div>
<div>My QGIS 2.18 only shows black boxes for out_db rasters, the rasters themselves (pixel values) only appear for “in-DB” rasters. Did anybody succeed in showing out_db rasters in QGIS?</div>
<div> </div>
<div>Interestiung is also that gdalinfo is not showing any extents although it shows correct SRS and the “extent” column is populated (see above):</div>
<div> </div>
<div><font face="Courier New">C:\_PortableApps_\pgsql\bin>"c:\QGIS\bin\gdalinfo.exe" PG:"dbname='xxx' host='localhost' port='5432' user='mhaerte2' password='xxx' table='raster2x2'"</font></div>
<div> </div>
<div>Driver: PostGISRaster/PostGIS Raster driver</div>
<div>Files: none associated</div>
<div>Size is 0, 0</div>
<div>Coordinate System is:</div>
<div>PROJCS["ETRS89 / UTM zone 32N",</div>
<div>    GEOGCS["ETRS89",</div>
<div>        DATUM["European_Terrestrial_Reference_System_1989",</div>
<div>            SPHEROID["GRS 1980",6378137,298.257222101,</div>
<div>                AUTHORITY["EPSG","7019"]],</div>
<div>            TOWGS84[0,0,0,0,0,0,0],</div>
<div>            AUTHORITY["EPSG","6258"]],</div>
<div>        PRIMEM["Greenwich",0,</div>
<div>            AUTHORITY["EPSG","8901"]],</div>
<div>        UNIT["degree",0.0174532925199433,</div>
<div>            AUTHORITY["EPSG","9122"]],</div>
<div>        AUTHORITY["EPSG","4258"]],</div>
<div>    PROJECTION["Transverse_Mercator"],</div>
<div>    PARAMETER["latitude_of_origin",0],</div>
<div>    PARAMETER["central_meridian",9],</div>
<div>    PARAMETER["scale_factor",0.9996],</div>
<div>    PARAMETER["false_easting",500000],</div>
<div>    PARAMETER["false_northing",0],</div>
<div>    UNIT["metre",1,</div>
<div>        AUTHORITY["EPSG","9001"]],</div>
<div>    AXIS["Easting",EAST],</div>
<div>    AXIS["Northing",NORTH],</div>
<div>    AUTHORITY["EPSG","25832"]]</div>
<div>Subdatasets:</div>
<div>         --- snip! --</div>
<div>Corner Coordinates:</div>
<div>Upper Left  (    0.0,    0.0)</div>
<div>Lower Left  (    0.0,    0.0)</div>
<div>Upper Right (    0.0,    0.0)</div>
<div>Lower Right (    0.0,    0.0)</div>
<div>Center      (    0.0,    0.0)</div>
<div> </div>
<div>Does anyone have a clue? </div>
<div> </div>
<div>Thank you for your comments,</div>
<div> </div>
<div>Michael</div>
<div> </div>
</span></font>
</body>
</html>