<!DOCTYPE html><html><head><title></title><style type="text/css">#qt P{margin-top:0px;margin-bottom:0px;}

p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>HI Marcin,<br></div><div><br></div><div>For setting NODATA values in WCS I made a test repository showing the various options at <a href="https://github.com/geographika/wcs-test">https://github.com/geographika/wcs-test</a>, it may provide some ideas. <br></div><div><br></div><div>Seth<br></div><div><br></div><div id="sig62266145"><div class="signature">--<br></div><div class="signature">web:<a href="https://geographika.net">https://geographika.net</a> & <a href="https://mapserverstudio.net">https://mapserverstudio.net</a><br></div><div class="signature">twitter: @geographika<br></div></div><div><br></div><div>On Thu, Aug 17, 2023, at 10:41 AM, Marcin Niemyjski via MapServer-users wrote:<br></div><blockquote type="cite" id="qt" style=""><div style="font-family:Calibri, Arial, Helvetica, sans-serif;font-size:12pt;color:rgb(0, 0, 0);" class="qt-elementToProof">Hello,<br></div><div style="font-family:Calibri, Arial, Helvetica, sans-serif;font-size:12pt;color:rgb(0, 0, 0);" class="qt-elementToProof"><br></div><div style="font-family:Calibri, Arial, Helvetica, sans-serif;font-size:12pt;color:rgb(0, 0, 0);" class="qt-elementToProof"><div class="qt-flex qt-flex-grow qt-flex-col qt-gap-3"><div class="qt-min-h-[20px] qt-flex qt-flex-col qt-items-start qt-gap-3 qt-overflow-x-auto qt-whitespace-pre-wrap qt-break-words"><div class="qt-markdown qt-prose qt-w-full qt-break-words qt-dark:prose-invert qt-light"><p class="qt-ContentPasted0">Regarding the topic discussed in <a href="https://marc.info/?l=mapserver-users&m=169049275409489&w=2" target="_new" id="qt-OWA22be7c35-6a80-dc5b-a7ae-160833b7a3e9" class="qt-OWAAutoLink qt-ContentPasted0"> 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></p><div class="qt-ContentPasted0" style="margin-top:0px;margin-bottom:0px;"><a href="https://pastecode.io/s/myjemd1r" id="qt-LPlnk498777" class="qt-OWAAutoLink">https://pastecode.io/s/myjemd1r</a><br></div><div class="qt-ContentPasted0" style="margin-top:0px;margin-bottom:0px;"><div>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></div><div> <a href="https://pastecode.io/s/af2tiwsj" id="qt-LPlnk984081" class="qt-OWAAutoLink">https://pastecode.io/s/af2tiwsj</a><br></div></div><p class="qt-ContentPasted0">What is the problem?<br></p><ol><li class="qt-ContentPasted0"><div>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></div><div class="qt-ContentPasted0" style=""><br></div><div class="qt-ContentPasted0 qt-ContentPasted1" style=""><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" id="qt-LPlnk532669" class="qt-OWAAutoLink">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></div><div class="qt-ContentPasted0 qt-ContentPasted1" style=""><br></div></li><li class="qt-ContentPasted0"><div>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></div><div class="qt-ContentPasted0" style=""><div><br></div><div><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" id="qt-OWA331c2733-be40-1a8d-2f4d-c11e439e8916" class="qt-OWAAutoLink qt-ContentPasted2">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>5<br></div></div><div class="qt-ContentPasted0" style=""><br></div></li><li class="qt-ContentPasted0 qt-ContentPasted3"><div>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></div><div><br></div><div><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-0" id="qt-OWAc59a439a-8173-1b17-c31f-c3c7a2148614" class="qt-OWAAutoLink qt-ContentPasted2 qt-ContentPasted3">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-0</a>1<br></div></li></ol><div><br></div><div class="qt-ContentPasted4 qt-ContentPasted5">also, WCS seems to ignore MAXSCALEDENOM and MINSCALEDENOM <span id="qt-🙂">🙂</span><br></div><div class="qt-ContentPasted4 qt-ContentPasted5"><br></div><p class="qt-ContentPasted0">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></p><p class="qt-ContentPasted0"><br></p><p class="qt-ContentPasted0">Best,<br></p><div>Marcin<br></div><p><br></p></div></div></div></div><div class="qt-elementToProof"><div id="qt-Signature"><div><table style="margin-top:30px;margin-bottom:30px;width:95%;"><tbody><tr height="45"><td><br></td></tr><tr><td><br></td></tr><tr><td><br></td></tr><tr><td><span></span></td></tr></tbody></table><table id="qt-pbpsiglinktable"><tbody><tr><td><br></td><td><br></td><td><br></td><td><br></td></tr></tbody></table></div></div></div><div>_______________________________________________<br></div><div>MapServer-users mailing list<br></div><div><a href="mailto:MapServer-users@lists.osgeo.org">MapServer-users@lists.osgeo.org</a><br></div><div><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></div><div><br></div></blockquote><div><br></div></body></html>