<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.gmail-html-tag
{mso-style-name:gmail-html-tag;}
span.gmail-html-attribute
{mso-style-name:gmail-html-attribute;}
span.gmail-html-attribute-name
{mso-style-name:gmail-html-attribute-name;}
span.gmail-html-attribute-value
{mso-style-name:gmail-html-attribute-value;}
span.Shkpostityyli23
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 70.85pt 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FI" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Sorry, I thought that our service is open. This should work
<a href="https://demo.mapserver.org/cgi-bin/wcs?SERVICE=wcs&VERSION=2.0.0&REQUEST=DescribeCoverage&COVERAGEID=modis">
https://demo.mapserver.org/cgi-bin/wcs?SERVICE=wcs&VERSION=2.0.0&REQUEST=DescribeCoverage&COVERAGEID=modis</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">The default value of uom is documented in
<a href="https://www.mapserver.org/ogc/wcs_server.html">https://www.mapserver.org/ogc/wcs_server.html</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">“If no specific or default value is given, the output is dependent on the metadata key. The UOM, for example will be set to ‘W.m-2.Sr-1’”<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">WCS metadata keywords, including “{band_name}_band_uom” work for us. I am sure that you will make it to work as well but if you won’t, show us your mapfile.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">-Jukka Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>Lähettäjä:</b> MapServer-users <mapserver-users-bounces@lists.osgeo.org>
<b>Puolesta </b>Carl Godkin<br>
<b>Lähetetty:</b> keskiviikko 12. tammikuuta 2022 17.13<br>
<b>Vastaanottaja:</b> Mapserver-Users (mapserver-users@lists.osgeo.org) <mapserver-users@lists.osgeo.org><br>
<b>Aihe:</b> Re: [mapserver-users] WCS layer units question...<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Thanks for the reply, Jukka. <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">I found "wcs_band_uom" in the docs but I can't seem to make the value I put into my map file appear in the DescribeCoverage output. (The link you sent doesn't work for me.)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I do see this though:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><span class="gmail-html-tag"><span style="font-size:10.0pt;font-family:"Courier New";color:black"><swe:field</span></span><span class="gmail-html-attribute"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span></span><span class="gmail-html-attribute-name"><span style="font-size:10.0pt;font-family:"Courier New";color:black">name</span></span><span class="gmail-html-attribute"><span style="font-size:10.0pt;font-family:"Courier New";color:black">="</span></span><span class="gmail-html-attribute-value"><span style="font-size:10.0pt;font-family:"Courier New";color:black">band</span></span><span class="gmail-html-attribute"><span style="font-size:10.0pt;font-family:"Courier New";color:black">"</span></span><span class="gmail-html-tag"><span style="font-size:10.0pt;font-family:"Courier New";color:black">></span></span><span style="font-size:10.0pt;font-family:"Courier New";color:black"><o:p></o:p></span></p>
</div>
<div style="margin-left:12.0pt">
<div id="gmail-folder13">
<div>
<p class="MsoNormal"><span class="gmail-html-tag"><span style="font-size:10.0pt;font-family:"Courier New";color:black"><swe:Quantity></span></span><span style="font-size:10.0pt;font-family:"Courier New";color:black"><o:p></o:p></span></p>
</div>
<div style="margin-left:12.0pt">
<div>
<p class="MsoNormal"><span class="gmail-html-tag"><span style="font-size:10.0pt;font-family:"Courier New";color:black"><swe:nilValues/></span></span><span style="font-size:10.0pt;font-family:"Courier New";color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span class="gmail-html-tag"><span style="font-size:10.0pt;font-family:"Courier New";color:red;background:#F3F3F3"><swe:uom</span></span><span class="gmail-html-attribute"><span style="font-size:10.0pt;font-family:"Courier New";color:red;background:#F3F3F3"> </span></span><span class="gmail-html-attribute-name"><span style="font-size:10.0pt;font-family:"Courier New";color:red;background:#F3F3F3">code</span></span><span class="gmail-html-attribute"><span style="font-size:10.0pt;font-family:"Courier New";color:red;background:#F3F3F3">="</span></span><span class="gmail-html-attribute-value"><span style="font-size:10.0pt;font-family:"Courier New";color:red;background:#F3F3F3">W.m-2.Sr-1</span></span><span class="gmail-html-attribute"><span style="font-size:10.0pt;font-family:"Courier New";color:red;background:#F3F3F3">"</span></span><span class="gmail-html-tag"><span style="font-size:10.0pt;font-family:"Courier New";color:red;background:#F3F3F3">/></span></span><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></p>
</div>
<div id="gmail-folder14">
<div>
<p class="MsoNormal"><span class="gmail-html-tag"><span style="font-size:10.0pt;font-family:"Courier New";color:black"><swe:constraint></span></span><span style="font-size:10.0pt;font-family:"Courier New";color:black"><o:p></o:p></span></p>
</div>
<div style="margin-left:12.0pt">
<div id="gmail-folder15">
<div>
<p class="MsoNormal"><span class="gmail-html-tag"><span style="font-size:10.0pt;font-family:"Courier New";color:black"><swe:AllowedValues></span></span><span style="font-size:10.0pt;font-family:"Courier New";color:black"><o:p></o:p></span></p>
</div>
<div style="margin-left:12.0pt">
<div>
<p class="MsoNormal"><span class="gmail-html-tag"><span style="font-size:10.0pt;font-family:"Courier New";color:black"><swe:interval></span></span><span style="font-size:10.0pt;font-family:"Courier New";color:black">-3.4028e+38 3.4028e+38<span class="gmail-html-tag"></swe:interval></span><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span class="gmail-html-tag"><span style="font-size:10.0pt;font-family:"Courier New";color:black"><swe:significantFigures></span></span><span style="font-size:10.0pt;font-family:"Courier New";color:black">12<span class="gmail-html-tag"></swe:significantFigures></span><o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span class="gmail-html-tag"><span style="font-size:10.0pt;font-family:"Courier New";color:black"></swe:AllowedValues></span></span><span style="font-size:10.0pt;font-family:"Courier New";color:black"><o:p></o:p></span></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><span class="gmail-html-tag"><span style="font-size:10.0pt;font-family:"Courier New";color:black"></swe:constraint></span></span><span style="font-size:10.0pt;font-family:"Courier New";color:black"><o:p></o:p></span></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><span class="gmail-html-tag"><span style="font-size:10.0pt;font-family:"Courier New";color:black"></swe:Quantity></span></span><span style="font-size:10.0pt;font-family:"Courier New";color:black"><o:p></o:p></span></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><span class="gmail-html-tag"><span style="font-size:10.0pt;font-family:"Courier New";color:black"></swe:field></span></span><span style="font-size:10.0pt;font-family:"Courier New";color:black"><o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">The "swe:uom code" would seem to be what I want to affect. For some reason I see the value "watts per square meter per steradian" which appears nowhere in my map file so I wonder if it's some sort of default baked into the code or something.
(I had seen that before but hadn't bothered to try to figure out what it was until just now. That's weird.)<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks for your help,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">carl<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, Jan 11, 2022 at 11:57 PM Rahkonen Jukka (MML) <<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi">jukka.rahkonen@maanmittauslaitos.fi</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">WCS users are supposed to read the metadata with DescribeCoverage, for example
<a href="https://avoin-visukuva.nls.fi/ortokuvat-ja-korkeusmallit/wcs/v1?service=WCS&version=2.0.1&request=DescribeCoverage&coverageID=ortokuva_vari" target="_blank">
https://avoin-visukuva.nls.fi/ortokuvat-ja-korkeusmallit/wcs/v1?service=WCS&version=2.0.1&request=DescribeCoverage&coverageID=ortokuva_vari</a></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">The units can be configured in the mapfile with “wcs_band_uom”. I do not know if it is possible to configure the outputformat to write uom also into the TIFF.
That is something that GDAL should do.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">-Jukka Rahkonen-</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b>Lähettäjä:</b> MapServer-users <<a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-bounces@lists.osgeo.org</a>>
<b>Puolesta </b>Carl Godkin<br>
<b>Lähetetty:</b> keskiviikko 12. tammikuuta 2022 3.58<br>
<b>Vastaanottaja:</b> Mapserver-Users (<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a>) <<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a>><br>
<b>Aihe:</b> [mapserver-users] WCS layer units question...<o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi,<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I have a local WCS & WMS server.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I am trying to figure out if I can somehow define the Z units of a terrain layer I'm serving.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">The single band from the individual GeoTIFF files providing the terrain data looks like this (from gdalinfo):<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Courier New"">Band 1 Block=512x512 Type=Float32, ColorInterp=Gray<br>
Description = Layer_1<br>
NoData Value=-999999<br>
Unit Type: m <===================================== units are meters<br>
Metadata:<br>
LAYER_TYPE=athematic<br>
RepresentationType=ATHEMATIC</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">but when I download a GeoTIFF using a WCS GetCoverage request on this layer, the GeoTIFF's single band just looks like this:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Courier New"">Band 1 Block=571x3 Type=Float32, ColorInterp=Gray</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">without "Unit Type." <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I also tried using <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Courier New""> UNITS Meters</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">in my LAYER definition in my map file (copying an example I found among the case studies on the web site) but it didn't seem to have any effect. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Is there some way to define and retrieve the Z units for a WCS server? <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks very much.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">carl<o:p></o:p></p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</body>
</html>