<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=us-ascii">
<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;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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="EN-CA" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi all, <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have an issue with WMS GetFeatureInfo request on a rotated GRIB2 file. When I try to do a GetFeatureInfo request on a valid location on my map, I get: “Search returned no results”. I tried the GetFeatureInfo request, using mapscript and
the mapserv command, both give me the “Search returned no results”.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The file projection is “+proj=ob_tran +o_proj=longlat +o_lon_p=0 +o_lat_p=31.758312 +lon_0=-92.402969 +R=6371229 +no_defs”<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m using MapServer version 7.6.2, GDAL 3.1.3 (released 2020/09/01) and proj 7.2.0.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">But If I try to get the value with gdallocationinfo using the –wsg84 flag, I get a valid result, so I guess this issue is not with gdal ?:
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">```<o:p></o:p></p>
<p class="MsoNormal">gdallocationinfo -wgs84 rotated.grib2 -75 45<o:p></o:p></p>
<p class="MsoNormal">Report:<o:p></o:p></p>
<p class="MsoNormal"> Location: (578P,373L)<o:p></o:p></p>
<p class="MsoNormal"> Band 1:<o:p></o:p></p>
<p class="MsoNormal"> Value: 3.1022446478346e-07<o:p></o:p></p>
<p class="MsoNormal">```<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I can get a GetFeatureInfo request to work, but I have to define a custom EPSG code (for example: EPSG:102987), add this EPSG code (102987) to my epsg file and reference it in my mapfile. This way, the GetFeatureInfo only works if requested
in this custom EPSG using the rotated grid BBOX, if I do the request in another CRS, it still return no results:
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">```<o:p></o:p></p>
<p class="MsoNormal">mapserv -nh "QUERY_STRING=map= test.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&BBOX=0,0,1,1&CRS=EPSG:102987&WIDTH=1000&HEIGHT=1000&LAYERS=TEST&INFO_FORMAT=text/plain&QUERY_LAYERS=TEST&I=5&J=5&FORMAT=image/png"<o:p></o:p></p>
<p class="MsoNormal">```<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Here is a GetFeatureInfo request that returns no results using EPSG:4326:<o:p></o:p></p>
<p class="MsoNormal">```<o:p></o:p></p>
<p class="MsoNormal">mapserv -nh "QUERY_STRING=map=test.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&BBOX=45,-74,46,-73&CRS=EPSG:4326&WIDTH=1000&HEIGHT=1000&LAYERS=TEST&INFO_FORMAT=text/plain&QUERY_LAYERS=TEST&I=5&J=5"<o:p></o:p></p>
<p class="MsoNormal">```<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have included a small mapfile that shows the previous behavior, you can use this curl command to download a sample GRIB2 data:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">```<o:p></o:p></p>
<p class="MsoNormal">curl -o rotated.grib2 'https://dd.weather.gc.ca/model_raqdps/10km/grib2/00/013/20210709T00Z_MSC_RAQDPS_PM2.5_EATM_RLatLon0.09x0.09_P013.grib2'<o:p></o:p></p>
<p class="MsoNormal">```<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Do you have any ideas if I’m doing something wrong or if the issue is in MapServer ?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">LP<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>