<!DOCTYPE html><html><head><title></title></head><body><div>HI Steve,</div><div><br></div><div>Yes, it is the MapServer logs that might have something useful. You can also increase the LAYER logging and add in GDAL logging by adding the following to the Mapfile:</div><div><br></div><div>  CONFIG "CPL_DEBUG" "ON"</div><div>  CONFIG "PROJ_DEBUG" "ON"</div><div>  DEBUG 5</div><div>   </div><div>   LAYER</div><div>      DEBUG 5</div><div><br></div><div>I wouldn't worry too much about the querying until you can see output in the map. I'd probably try a few things to narrow it down:</div><div><br></div><div>- does the LAYER work if you switch the data to the ssh layer?</div><div>- does the LAYER work if you use the image directly without the .vrt?</div><div>- maybe get the EXTENT from QGIS or GDAL in EPSG:4326 and add the EXTENT to the layer.</div><div><br></div><div>In my experience, blank layers are usually related to extent or projection, but it could be something else.</div><div><br></div><div>Seth</div><div><br></div><div id="sig62266145"><div class="signature">--</div><div class="signature">web:<a href="https://geographika.net">https://geographika.net</a> & <a href="https://mapserverstudio.net">https://mapserverstudio.net</a></div><div class="signature">mastodon: @<a href="mailto:geographika@mastodon.social">geographika@mastodon.social</a></div></div><div><br></div><div>On Thu, May 29, 2025, at 7:42 PM, Stephen Woodbridge wrote:</div><blockquote type="cite" id="qt" style=""><div class="qt-moz-cite-prefix"><div>Hi Seth,</div><div> <br></div><div> My mine finally engaged on mapserver logs. Here are the results of
      the query request:</div><div> <br></div><div> <a class="qt-moz-txt-link-freetext" href="https://map51.saltwatercentral.com/cgi-bin/mapserv?map=/maps/wms/hycom_2d_1.map&mode=query&type=mlt&layers=query&mapxy=-67+37">https://map51.saltwatercentral.com/cgi-bin/mapserv?map=/maps/wms/hycom_2d_1.map&mode=query&type=mlt&layers=query&mapxy=-67+37</a></div><div> <br></div><div> [Thu May 29 12:38:19.457606 2025] [cgi:error] [pid 848556] [client
      98.97.22.100:40842] AH01215: CGI Request 1 on process 904443:
      /usr/lib/cgi-bin/mapserv</div><div> [Thu May 29 12:38:19.457794 2025] [cgi:error] [pid 848556] [client
      98.97.22.100:40842] AH01215: msRasterQueryByRect(query):
      entering.: /usr/lib/cgi-bin/mapserv</div><div> [Thu May 29 12:38:19.460164 2025] [cgi:error] [pid 848556] [client
      98.97.22.100:40842] AH01215: msRasterQueryByRect(query):
      entering.: /usr/lib/cgi-bin/mapserv</div><div> [Thu May 29 12:38:19.460397 2025] [cgi:error] [pid 848556] [client
      98.97.22.100:40842] AH01215: msQueryByPoint(): Search returned no
      results. No matching record(s) found.: /usr/lib/cgi-bin/mapserv</div><div> [Thu May 29 12:38:19.460577 2025] [cgi:error] [pid 848556] [client
      98.97.22.100:40842] AH01215: mapserv request processing time
      (msLoadMap not incl.): 0.003s: /usr/lib/cgi-bin/mapserv</div><div> [Thu May 29 12:38:19.460707 2025] [cgi:error] [pid 848556] [client
      98.97.22.100:40842] AH01215: msFreeMap(): freeing map at
      0x5585ff1f65e0.: /usr/lib/cgi-bin/mapserv</div><div> <br></div><div> -Steve</div><div> <br></div><div> On 5/27/2025 1:41 PM, Seth G wrote:</div></div><blockquote type="cite" cite="mid:ddfa69ad-b496-4046-98bd-b7e158e7a3a4@app.fastmail.com"><div>Hi Steve,</div><div><br></div><div>Anything in the MapServer logs? And what is the actual
        network request to MapServer?</div><div>You do have a "visible: false" set in your OpenLayers code -
        I presume this gets changed by a legend at some point.</div><div><br></div><div>Seth</div><div><br></div><div id="qt-sig62266145"><div class="qt-signature">--</div><div class="qt-signature">mastodon: @<a href="mailto:geographika@mastodon.social" class="qt-moz-txt-link-freetext">geographika@mastodon.social</a></div><div><br></div></div><div>On Mon, May 26, 2025, at 10:28 PM, Stephen Woodbridge via
        gdal-dev wrote:</div><blockquote type="cite" id="qt-qt" style=""><div><span class="font" style="font-family:Courier New, Courier, monospace;">Hi all,<br> <br> I'm being pulled out of retirement to fix something I
            created years ago. I'm probably doing something stupid but I
            haven't been able to sort it out, so ask for some help.<br> <br> System: Ubuntu-22.04<br> GDAL 3.4.1, released 2021/12/27<br> OpenLayers 5.3.3<br> MapServer version 7.6.4 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML
            SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO
            SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV
            SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
            SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
            SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS
            SUPPORTS=GEOS SUPPORTS=POINT_Z_M SUPPORTS=PBF INPUT=JPEG
            INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE<br> <br> Right some of this is pretty old, but I suspect that is not
            the current issue.<br> <br> 1. I extract some data from HYCOM and generate a GTiff<br> 2. Manually generate a VRT to add a color table<br> 3. Have a mapserver mapfile to display it<br> <br> Step 1. seems to work fine, but when I do a mapserver query
            I get no results<br> Step 2. seems to look good and if a gdal_translate -of PNG
            -outsize 1% 1% source target the image displays<br> Step 3. just gives me empty transparent tiles in OpenLayers<br> <br> Here is the gdalinfo results for the GTif:<br> <br> $ gdalinfo -stats -hist HYCOM_tomorrow_mld.tif<br> Driver: GTiff/GeoTIFF<br> Files: HYCOM_tomorrow_mld.tif<br> Size is 4500, 4251<br> Coordinate System is:<br> GEOGCRS["WGS 84",<br>     DATUM["World Geodetic System 1984",<br>         ELLIPSOID["WGS 84",6378137,298.257223563,<br>             LENGTHUNIT["metre",1]]],<br>     PRIMEM["Greenwich",0,<br>         ANGLEUNIT["degree",0.0174532925199433]],<br>     CS[ellipsoidal,2],<br>         AXIS["geodetic latitude (Lat)",north,<br>             ORDER[1],<br>             ANGLEUNIT["degree",0.0174532925199433]],<br>         AXIS["geodetic longitude (Lon)",east,<br>             ORDER[2],<br>             ANGLEUNIT["degree",0.0174532925199433]],<br>     ID["EPSG",4326]]<br> Data axis to CRS axis mapping: 2,1<br> Origin = (-180.000000000000000,90.000000000000000)<br> Pixel Size = (0.080000000000000,-0.040000000000000)<br> Metadata:<br>   AREA_OR_POINT=Area<br> Image Structure Metadata:<br>   INTERLEAVE=BAND<br> Corner Coordinates:<br> Upper Left  (-180.0000000,  90.0000000) (180d 0' 0.00"W, 90d
            0' 0.00"N)<br> Lower Left  (-180.0000000, -80.0400000) (180d 0' 0.00"W, 80d
            2'24.00"S)<br> Upper Right ( 180.0000000,  90.0000000) (180d 0' 0.00"E, 90d
            0' 0.00"N)<br> Lower Right ( 180.0000000, -80.0400000) (180d 0' 0.00"E, 80d
            2'24.00"S)<br> Center      (   0.0000000,   4.9800000) (  0d 0' 0.01"E, 
            4d58'48.00"N)<br> Band 1 Block=4500x1 Type=Float32, ColorInterp=Gray<br>   Minimum=2.000, Maximum=5000.000, Mean=96.114,
            StdDev=346.786<br> 0...10...20...30...40...50...60...70...80...90...100 - done.<br>   256 buckets from -7.8 to 5009.8:<br>   1489490 2306537 1907189 2028756 996825 306674 493493 0
            196427 0 94515 0 0 33174 0 22423 0 0 11571 0 5892 0 0 0 0
            8326 0 0 0 0 0 8045 0 0 0 0 7615 0 0 0 0 6418 0 0 0 0 5695 0
            0 0 0 4944 0 0 0 0 0 0 0 0 0 0 0 0 13673 0 0 0 0 0 0 0 0 0 0
            0 17543 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
            31132 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 30109
            0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 40660 0 0
            0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
            0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 28594 0 0 0 0 0 0 0 0 0
            0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
            0 0 0 0 0 0 0 0 0 0 0 1702<br>   NoData Value=-30000<br>   Overviews: 2250x2126, 1125x1063, 563x532, 282x266,
            141x133, 71x67<br>   Metadata:<br>     STATISTICS_MAXIMUM=5000<br>     STATISTICS_MEAN=96.114400289494<br>     STATISTICS_MINIMUM=2<br>     STATISTICS_STDDEV=346.78571541402<br>     STATISTICS_VALID_PERCENT=52.78<br> <br> My assumption based on this is that I want to scale the 5000
            to 250 in the VRT which will be Type=Byte, So here is the
            VRT file.<br> <br> $ cat HYCOM_tomorrow_mld.vrt                <VRTDataset
            rasterXSize="72000" rasterYSize="68016"><br>   <SRS>GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS
84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]]</SRS><br>   <GeoTransform> -180.0 ,0.005 , 0 , 90.0 , 0 ,
            -0.0025 </GeoTransform><br>   <Metadata><br>   </Metadata><br>   <VRTRasterBand dataType="Byte" band="1"><br>     <ColorInterp>Palette</ColorInterp><br>     <ColorTable><br>       <Entry c1="0" c2="0" c3="0" c4="255"/><br> <br>       [Snip lots of entries]<br> <br>       <Entry c1="255" c2="255" c3="255" c4="255"/><br>     </ColorTable><br>     <ComplexSource resampling="bilinear"><br>       <SourceFilename
            relativeToVRT="1">HYCOM_tomorrow_mld.tif</SourceFilename><br>       <SourceBand>1</SourceBand><br>       <SrcRect xOff="0" yOff="0" xSize="4500"
            ySize="4251"/><br>       <DstRect xOff="0" yOff="0" xSize="72000"
            ySize="68016"/><br>       <ScaleRatio>1</ScaleRatio><br>       <NODATA>0</NODATA><br>     </ComplexSource><br>   </VRTRasterBand><br> </VRTDataset><br> <br> So to scale the data I set ScaleRatio to 0.05, but the PNG
            image doesn't look right and setting it to "1" does look
            correct. I'm also confused as to what to set NODATA value
            to. One source said/implied that the NoData of the source
            file would get set to NODATA value in the VRT, but seem to
            be countered by the GDAL online docs.<br> <br> Here is the gdalinfo for the VRT:<br> <br> $ gdalinfo -stats -hist HYCOM_tomorrow_mld.vrt<br> Driver: VRT/Virtual Raster<br> Files: HYCOM_tomorrow_mld.vrt<br>        HYCOM_tomorrow_mld.tif<br> Size is 72000, 68016<br> Coordinate System is:<br> GEOGCRS["WGS 84",<br>     DATUM["World Geodetic System 1984",<br>         ELLIPSOID["WGS 84",6378137,298.257223563,<br>             LENGTHUNIT["metre",1]]],<br>     PRIMEM["Greenwich",0,<br>         ANGLEUNIT["degree",0.0174532925199433]],<br>     CS[ellipsoidal,2],<br>         AXIS["geodetic latitude (Lat)",north,<br>             ORDER[1],<br>             ANGLEUNIT["degree",0.0174532925199433]],<br>         AXIS["geodetic longitude (Lon)",east,<br>             ORDER[2],<br>             ANGLEUNIT["degree",0.0174532925199433]],<br>     ID["EPSG",4326]]<br> Data axis to CRS axis mapping: 2,1<br> Origin = (-180.000000000000000,90.000000000000000)<br> Pixel Size = (0.005000000000000,-0.002500000000000)<br> Corner Coordinates:<br> Upper Left  (-180.0000000,  90.0000000) (180d 0' 0.00"W, 90d
            0' 0.00"N)<br> Lower Left  (-180.0000000, -80.0400000) (180d 0' 0.00"W, 80d
            2'24.00"S)<br> Upper Right ( 180.0000000,  90.0000000) (180d 0' 0.00"E, 90d
            0' 0.00"N)<br> Lower Right ( 180.0000000, -80.0400000) (180d 0' 0.00"E, 80d
            2'24.00"S)<br> Center      (   0.0000000,   4.9800000) (  0d 0' 0.01"E, 
            4d58'48.00"N)<br> Band 1 Block=128x128 Type=Byte, ColorInterp=Palette<br>   Minimum=2.000, Maximum=5000.000, Mean=96.114,
            StdDev=346.786<br> 0...10...20...30...40...50...60...70...80...90...100 - done.<br>   256 buckets from -0.5 to 255.5:<br>   0 0 534720 0 330663 0 149196 0 241797 0 233114 0 285113 0
            0 385666 0 0 0 0 574491 0 0 0 0 517919 0 0 0 0 543348 0 0 0
            0 455442 0 0 0 0 487763 0 0 0 0 530058 0 0 0 0 433926 0 0 0
            0 0 0 0 0 0 1117668 0 0 0 0 0 0 0 0 0 911088 0 0 0 0 0 0 0 0
            0 602087 0 0 0 0 0 0 0 0 0 394738 0 0 0 0 0 0 0 0 0 306674 0
            0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 493493 0 0 0 0
            0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 196427 0 0 0 0 0 0 0
            0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
            0 0 0 0 0 0 0 0 0 0 0 0 94515 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
            0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
            0 0 0 0 33174 0 0 0 0 244342<br>   Overviews: 36000x34016, 18000x17008, 9008x8512, 4512x4256,
            2256x2128, 1136x1072<br>   Metadata:<br>     STATISTICS_MAXIMUM=5000<br>     STATISTICS_MEAN=96.114400289494<br>     STATISTICS_MINIMUM=2<br>     STATISTICS_STDDEV=346.78571541402<br>   Color Table (RGB with 256 entries)<br>     0: 0,0,0,255<br>     [snip additional entries]<br> <br> And finally the mapfile that is getting used via OpenLayers:<br> <br> MAP<br>     NAME "HYCOM_2d_2"<br>     STATUS ON<br>     SIZE 950 600<br>     EXTENT -180 -90 180 90<br>     UNITS DD<br>     IMAGECOLOR "#000000"<br>     IMAGETYPE agg_qn<br>     MAXSIZE 4096<br> <br>     CONFIG ON_MISSING_DATA "IGNORE"<br> #    CONFIG MS_ERRORFILE "stderr"<br> #    DEBUG 10<br> <br>     OUTPUTFORMAT<br>         NAME "agg_qn"<br>         DRIVER "AGG/PNG"<br>         EXTENSION "png"<br>         MIMETYPE "image/png"<br>         IMAGEMODE RGBA<br>         FORMATOPTION "INTERLACE=false"<br>         FORMATOPTION "QUANTIZE_NEW=ON"<br>         FORMATOPTION "QUANTIZE_FORCE=ON"<br>         FORMATOPTION "QUANTIZE_DITHER=OFF"<br>         FORMATOPTION "QUANTIZE_COLORS=256"<br>         TRANSPARENT ON<br>         FORMATOPTION "TRANSPARENT=ON"<br>     END<br> <br>     OUTPUTFORMAT<br>         NAME aggpng24<br>         DRIVER AGG/PNG<br>         MIMETYPE "image/png"<br>         IMAGEMODE RGB<br>         EXTENSION "png"<br>     END<br> <br>     OUTPUTFORMAT<br>         NAME jpeg<br>         DRIVER AGG/JPEG<br>         MIMETYPE "image/jpeg"<br>         IMAGEMODE RGB<br>         EXTENSION "jpg"<br>         FORMATOPTION "GAMMA=0.75"<br>         FORMATOPTION "QUALITY=75"<br>     END<br> <br>     WEB<br>         METADATA<br>             labelcache_map_edge_buffer "-20"<br>             "ows_title"     "iMaptools - HYCOM data"<br>             "ows_onlineresource"    <a class="qt-qt-moz-txt-link-rfc2396E" href="http://map01.saltwatercentral.com/cgi-bin/mapserv?MAP=/maps/wms/hycom_2d_2.map">"http://map01.saltwatercentral.com/cgi-bin/mapserv?MAP=/maps/wms/hycom_2d_2.map"</a><br>             "ows_srs"       "EPSG:4326 EPSG:900913
            EPSG:3857"<br>             "ows_contactperson"     "Stephen Woodbridge"<br>             "ows_contactorganization" "iMaptools.com"<br>             "ows_contactposition"   "Owner"<br>             "ows_contactelectronicmailaddress" <a class="qt-qt-moz-txt-link-rfc2396E" href="mailto:info@imaptools.com">"info@imaptools.com"</a><br>             "ows_enable_request" "GetMap"<br>             "ows_http_max_age" "3200"<br>         END<br>     END<br> <br>     PROJECTION "init=epsg:4326" END<br> <br>     LAYER<br>         NAME "ssh"<br>         STATUS ON<br>         TYPE RASTER<br>         PROJECTION "init=epsg:4326" END<br>         DATA "/maps/wms/data/HYCOM/HYCOM_tomorrow_ssh.vrt"<br>         PROCESSING "NODATA=-30000"<br>         PROCESSING "SCALE=-1.0,1.0"<br>     END<br> <br>     LAYER<br>         NAME "mlt"<br>         STATUS ON<br>         TYPE RASTER<br>         PROJECTION "init=epsg:4326" END<br>         DATA "/maps/wms/data/HYCOM/HYCOM_tomorrow_mlt.vrt"<br>         #PROCESSING "NODATA=1.2676506002282294e+30"<br>         PROCESSING "NODATA=-30000"<br>         PROCESSING "SCALE=0,250"<br>     END<br> <br>     LAYER<br>         NAME "query"<br>         STATUS ON<br>         TYPE raster<br>         PROJECTION "init=epsg:4326" END<br>         VALIDATION 'type' '.' END<br>         TOLERANCE 0<br>         TOLERANCEUNITS pixels<br>         DATA
            "/maps/wms/data/HYCOM/HYCOM_tomorrow_%type%.tif"<br>         PROCESSING "NODATA=-30000"<br>         TEMPLATE "/maps/wms/pixel.value.html"<br>     END<br> <br> END<br> <br> I've tried various options of including PROCESSING "NODATA='
            and PROCESSING "SCALE=" to no success. And the "ssh" layer
            which is nearly identical seems to would fine.<br> <br> It get displayed via OpenLayers using a layer definition
            like:<br> <br>     hycom_mlt_2: new TileLayer({<br>         title: 'Mixed Layer Depth (0.3degC chg)',<br>         clickable: 'hycom_mlt_2',<br>         type: 'overlay',<br>         visible: false,<br>         source: new TileWMS({<br>             projection: 'EPSG:3857',<br>             urls: getMapUrls('//', map_hosts,
            '/cgi-bin/mapserv?map=/maps/wms/hycom_2d_2.map'),<br>             params: {<br>                 'LAYERS': 'mlt',<br>                 'format': 'image/png',<br>                 'version': '1.3.0'<br>             }<br>         })<br>     }),<br> <br> <br> I would appreciate any assistance in figuring out what I'm
            doing wrong.<br> <br> Thanks,<br>   Steve</span></div><div id="qt-qt-DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><div><br></div><table style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(211, 212, 222);"><tbody><tr><td style="width:55px;padding-top:13px;"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><img src="https://s-install.avcdn.net/ipm/preview/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width:46px;height:29px;" crossorigin="anonymous"></a><br></td><td style="width:470px;padding-top:12px;color:rgb(65, 66, 78);font-size:13px;font-family:Arial, Helvetica, sans-serif;line-height:18px;">Virus-free.<a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color:rgb(68, 83, 234);">www.avast.com</a></td></tr></tbody></table><div><br></div></div><div>_______________________________________________</div><div>gdal-dev mailing list</div><div><a href="mailto:gdal-dev@lists.osgeo.org" class="qt-moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a></div><div><a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" class="qt-moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a></div><div><br></div></blockquote><div><br></div></blockquote></blockquote><div><br></div></body></html>