[mapserver-users] GetFetureInfo with rotated grid
Rousseau Lambert,Louis-Philippe (ECCC)
Louis-Philippe.RousseauLambert at ec.gc.ca
Fri Jul 9 08:13:10 PDT 2021
Hi all,
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".
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"
I'm using MapServer version 7.6.2, GDAL 3.1.3 (released 2020/09/01) and proj 7.2.0.
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 ?:
```
gdallocationinfo -wgs84 rotated.grib2 -75 45
Report:
Location: (578P,373L)
Band 1:
Value: 3.1022446478346e-07
```
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:
```
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"
```
Here is a GetFeatureInfo request that returns no results using EPSG:4326:
```
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"
```
I have included a small mapfile that shows the previous behavior, you can use this curl command to download a sample GRIB2 data:
```
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'
```
Do you have any ideas if I'm doing something wrong or if the issue is in MapServer ?
Thanks
LP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20210709/1d46d1f9/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.map
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20210709/1d46d1f9/attachment.ksh>
More information about the MapServer-users
mailing list