Hi, 1. For me, specifying
wcs_nilvalues" "-9999" 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. 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. 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. Cheers Aleš V čet., 17. avg. 2023, 21:01 je oseba < [email protected]> napisala: > Send MapServer-users mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.osgeo.org/mailman/listinfo/mapserver-users > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of MapServer-users digest..." > > > Today's Topics: > > 1. How to handle NoData in WCS Request? Continuation of [Speed > of WMS vs Speed of WCS; How to speed up WCS service?] > (Marcin Niemyjski) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 17 Aug 2023 08:41:09 +0000 > From: Marcin Niemyjski <[email protected]> > To: Marcin Niemyjski via MapServer-users > <[email protected]> > Subject: [MapServer-users] How to handle NoData in WCS Request? > Continuation of [Speed of WMS vs Speed of WCS; How to speed up WCS > service?] > Message-ID: > < > as1pr03mb8149999665d8bb6c998c3032a8...@as1pr03mb8149.eurprd03.prod.outlook.com > > > > Content-Type: text/plain; charset="utf-8" > > Hello, > > > Regarding the topic discussed in > https://marc.info/?l=mapserver-users&m=169049275409489&w=2, I have > implemented Jukka's suggestions. I created two new attributes, "start" and > "stop." Here's the improved mapfile: > > https://pastecode.io/s/myjemd1r > 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): > https://pastecode.io/s/af2tiwsj > > > What is the problem? > > 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). > > > 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 > > 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 :( > > > 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 > < > 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 > >5 > > 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. > > > 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 > > also, WCS seems to ignore MAXSCALEDENOM and MINSCALEDENOM ? > > > 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. > > > Best, > > Marcin > > > > > > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://lists.osgeo.org/pipermail/mapserver-users/attachments/20230817/96643687/attachment-0001.htm > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > MapServer-users mailing list > [email protected] > https://lists.osgeo.org/mailman/listinfo/mapserver-users > > > ------------------------------ > > End of MapServer-users Digest, Vol 187, Issue 4 > *********************************************** >
_______________________________________________ MapServer-users mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/mapserver-users
