<div dir="auto"><div>Hi,<div dir="auto"><br></div><div dir="auto">1. For me, specifying</div><div dir="auto"><br></div><div dir="auto"><pre style="line-height:1.2em;padding:10px;background-color:rgb(255,255,255);color:rgb(34,34,34);border:1px solid rgb(198,201,203);margin-top:0px;margin-bottom:0px;font-family:consolas,menlo,"dejavu sans mono","bitstream vera sans mono";font-size:12.8px"><span style="color:rgb(64,112,160)">wcs_nilvalues"</span> <span style="color:rgb(64,112,160)">"-9999"</span></pre></div><div dir="auto"><br></div>in the mapfile layer metadata worked and WCS returns non-zero and transparent no data. -9999 is no data value of my rasters read from the database but it should work on other storages too.<br><br>2. MapServer will not aggregate mosaics for you as far as I know. It will respect the order in which rasters are called and present no data pixels even if they overlay valid data pixels from previous raster. And the same goes for vrts.</div><div dir="auto"><br></div><div dir="auto">If your rasters are stored in the database you could probably specify a simple query to do a maximum value aggregation on rasters before MapServer renders them as mosaic. That is if your no data value is lower than valid values and if this is applicable for your datasets of course. To my knowledge connection to raster database table is treated as regular path/url so you have to mind the length of the query. At least I had huge problems with this. </div><div dir="auto"><br></div><div dir="auto">Cheers</div><div dir="auto"><br></div><div dir="auto">Aleš</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">V čet., 17. avg. 2023, 21:01 je oseba  <<a href="mailto:mapserver-users-request@lists.osgeo.org">mapserver-users-request@lists.osgeo.org</a>> napisala:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send MapServer-users mailing list submissions to<br>
        <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank" rel="noreferrer">mapserver-users@lists.osgeo.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:mapserver-users-request@lists.osgeo.org" target="_blank" rel="noreferrer">mapserver-users-request@lists.osgeo.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:mapserver-users-owner@lists.osgeo.org" target="_blank" rel="noreferrer">mapserver-users-owner@lists.osgeo.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of MapServer-users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. How to handle NoData in WCS Request? Continuation of [Speed<br>
      of WMS vs Speed of WCS; How to speed up WCS service?]<br>
      (Marcin Niemyjski)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 17 Aug 2023 08:41:09 +0000<br>
From: Marcin Niemyjski <<a href="mailto:mniemyjski@cloudferro.com" target="_blank" rel="noreferrer">mniemyjski@cloudferro.com</a>><br>
To: Marcin Niemyjski via MapServer-users<br>
        <<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank" rel="noreferrer">mapserver-users@lists.osgeo.org</a>><br>
Subject: [MapServer-users] How to handle NoData in WCS Request?<br>
        Continuation of [Speed of WMS vs Speed of WCS; How to speed up WCS<br>
        service?]<br>
Message-ID:<br>
        <<a href="mailto:AS1PR03MB8149999665D8BB6C998C3032A81AA@AS1PR03MB8149.eurprd03.prod.outlook.com" target="_blank" rel="noreferrer">AS1PR03MB8149999665D8BB6C998C3032A81AA@AS1PR03MB8149.eurprd03.prod.outlook.com</a>><br>
<br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hello,<br>
<br>
<br>
Regarding the topic discussed in <a href="https://marc.info/?l=mapserver-users&m=169049275409489&w=2" rel="noreferrer noreferrer" target="_blank">https://marc.info/?l=mapserver-users&m=169049275409489&w=2</a>, I have implemented Jukka's suggestions. I created two new attributes, "start" and "stop." Here's the improved mapfile:<br>
<br>
<a href="https://pastecode.io/s/myjemd1r" rel="noreferrer noreferrer" target="_blank">https://pastecode.io/s/myjemd1r</a><br>
As you can see, there are 4 layers served from two tile indexes. The first layer consists of preprocessed OCGs with burned NoData, while the remaining three are served through VRT targeting different spatial resolutions depending on the requested zoom level, with the alpha channel set as a cloud mask. Here's an example of such a VRT (the others are similar):<br>
<a href="https://pastecode.io/s/af2tiwsj" rel="noreferrer noreferrer" target="_blank">https://pastecode.io/s/af2tiwsj</a><br>
<br>
<br>
What is the problem?<br>
<br>
  1.  When I try to create a cloudless mosaic using this request for data stored in COGs for a single day and there is data available for the requested area, the raster is returned. However, instead of transparent NoData, a value of 0 is burned in the place of transparent NoData, and I need NoData transparency (it's a must-have).<br>
<br>
<a href="http://localhost/cgi-bin/mapserv?map=/var/www/mapbender/piramida_cloudless2.map&service=WCS&version=1.0.0&request=GetCoverage&coverage=test3&BBOX=3180020.455126192886,5542878.218003957532,3184499.682433307637,5548362.511879335158&CRS=EPSG:3857&WIDTH=771&HEIGHT=944&FORMAT=GTiff&start=2023-07-01&stop=2023-07-01" rel="noreferrer noreferrer" target="_blank">http://localhost/cgi-bin/mapserv?map=/var/www/mapbender/piramida_cloudless2.map&service=WCS&version=1.0.0&request=GetCoverage&coverage=test3&BBOX=3180020.455126192886,5542878.218003957532,3184499.682433307637,5548362.511879335158&CRS=EPSG:3857&WIDTH=771&HEIGHT=944&FORMAT=GTiff&start=2023-07-01&stop=2023-07-01</a><br>
<br>
  2.  When I try to create a cloudless mosaic using this request for data stored in COGs for multiple days(!), a black tile filled with values of 0 is returned. This happens because there were no S2 revisions over that area for those days, except for 2023-07-01, but data from that day were covered with NoData from other days - this is an undesired effect :(<br>
<br>
<a href="http://localhost/cgi-bin/mapserv?map=/var/www/mapbender/piramida_cloudless2.map&service=WCS&version=1.0.0&request=GetCoverage&coverage=test3&BBOX=3180020.455126192886,5542878.218003957532,3184499.682433307637,5548362.511879335158&CRS=EPSG:3857&WIDTH=771&HEIGHT=944&FORMAT=GTiff&start=2023-07-01&stop=2023-07-0" rel="noreferrer noreferrer" target="_blank">http://localhost/cgi-bin/mapserv?map=/var/www/mapbender/piramida_cloudless2.map&service=WCS&version=1.0.0&request=GetCoverage&coverage=test3&BBOX=3180020.455126192886,5542878.218003957532,3184499.682433307637,5548362.511879335158&CRS=EPSG:3857&WIDTH=771&HEIGHT=944&FORMAT=GTiff&start=2023-07-01&stop=2023-07-0</a><<a href="http://localhost/cgi-bin/mapserv?map=/var/www/mapbender/piramida_cloudless2.map&service=WCS&version=1.0.0&request=GetCoverage&coverage=test3&BBOX=3180020.455126192886,5542878.218003957532,3184499.682433307637,5548362.511879335158&CRS=EPSG:3857&WIDTH=771&HEIGHT=944&FORMAT=GTiff&start=2023-07-01&stop=2023-07-01" rel="noreferrer noreferrer" target="_blank">http://localhost/cgi-bin/mapserv?map=/var/www/mapbender/piramida_cloudless2.map&service=WCS&version=1.0.0&request=GetCoverage&coverage=test3&BBOX=3180020.455126192886,5542878.218003957532,3184499.682433307637,5548362.511879335158&CRS=EPSG:3857&WIDTH=771&HEIGHT=944&FORMAT=GTiff&start=2023-07-01&stop=2023-07-01</a>>5<br>
<br>
  3.  When I try to request data stored in VRT for a single day using this request, data is returned, but the alpha channel is not taken into account, so once again, transparency information is omitted.<br>
<br>
<a href="http://localhost/cgi-bin/mapserv?map=/var/www/mapbender/piramida_cloudless2.map&service=WCS&version=1.0.0&request=GetCoverage&coverage=test&BBOX=3180020.455126192886,5542878.218003957532,3184499.682433307637,5548362.511879335158&CRS=EPSG:3857&WIDTH=771&HEIGHT=944&FORMAT=GTiff&start=2023-07-01&stop=2023-07-01" rel="noreferrer noreferrer" target="_blank">http://localhost/cgi-bin/mapserv?map=/var/www/mapbender/piramida_cloudless2.map&service=WCS&version=1.0.0&request=GetCoverage&coverage=test&BBOX=3180020.455126192886,5542878.218003957532,3184499.682433307637,5548362.511879335158&CRS=EPSG:3857&WIDTH=771&HEIGHT=944&FORMAT=GTiff&start=2023-07-01&stop=2023-07-01</a><br>
<br>
also, WCS seems to ignore MAXSCALEDENOM and MINSCALEDENOM ?<br>
<br>
<br>
Last time, I received a lot of good advice that greatly pushed and improved my service. This time, I hope my message will initiate an interesting discussion.<br>
<br>
<br>
Best,<br>
<br>
Marcin<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.osgeo.org/pipermail/mapserver-users/attachments/20230817/96643687/attachment-0001.htm" rel="noreferrer noreferrer" target="_blank">http://lists.osgeo.org/pipermail/mapserver-users/attachments/20230817/96643687/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
MapServer-users mailing list<br>
<a href="mailto:MapServer-users@lists.osgeo.org" target="_blank" rel="noreferrer">MapServer-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
<br>
<br>
------------------------------<br>
<br>
End of MapServer-users Digest, Vol 187, Issue 4<br>
***********************************************<br>
</blockquote></div></div></div>