<div dir="ltr">Hi all<div><br></div><div>I'm using Postgresql 9.3 and PostGIS 2.1. I have uploaded all my files using <font face="courier new, monospace">raster2pgsql</font> as follow:</div><div><font face="courier new, monospace">/usr/lib/postgresql/9.3/bin/raster2pgsql -a -f {column!s} -s {srs:d} -N {nodata:f} -q -F -M {file!s} public.{table!s} | psql -h {host!s} -p {port:d} -d {database!s} -U {username!s}<br>
</font></div><div><br></div><div>When I try to use MapServer to generate a WMS layer all my <font face="courier new, monospace">NULL</font> values are interpreted as 0 which is not the nodata value I have set using the <font face="courier new, monospace">-N</font> flag in the <font face="courier new, monospace">raster2pgsql</font> script.</div>
<div><br></div><div>Checking it in the database using <font face="courier new, monospace">ST_DumpValues(rast, 1, true)</font> it will replace all <font face="courier new, monospace">NULL</font> values with the correct nodata value.</div>
<div><br></div><div>Also setting the <font face="courier new, monospace">NODATA=</font> in the map file is not working.</div><div><br></div><div>When I use AAGRID instead and configuring a output format it works (see here <a href="http://mapserver.org/mapfile/outputformat.html">http://mapserver.org/mapfile/outputformat.html</a>):</div>
<div><br></div><div><div><font face="courier new, monospace">  OUTPUTFORMAT</font></div><div><font face="courier new, monospace">    NAME "mytest"</font></div><div><font face="courier new, monospace">    DRIVER "GDAL/AAIGRID"<br>
</font></div><div><font face="courier new, monospace">    IMAGEMODE INT16<br></font></div><div><font face="courier new, monospace">    TRANSPARENT FALSE</font></div><div><font face="courier new, monospace">    FORMATOPTION "NULLVALUE=65535"</font></div>
<div><font face="courier new, monospace">  END # OUTPUTFORMAT</font></div></div><div><br></div><div><br></div><div>Is that a bug in MapServer when using image mode RGB or RGBA?</div><div>Does someone has a solution how to fix it?</div>
<div><br></div><div>Cheers</div></div>