Opened 15 years ago

Closed 15 years ago

#1903 closed bug (fixed)

Wrong query to WMS (WMS.GetFeatureInfo)

Reported by: alexbruy Owned by: mhugent
Priority: major: does not work as expected Milestone: Version 1.3.0
Component: WMS Version: Trunk
Keywords: Cc:
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

Description

Seems that QGIS send wrong query to WMS when used Identify tool. Error message

Результат WMS-определения для 258, 213
---------------
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE ServiceExceptionReport SYSTEM "http://schemas.opengis.net/wms/1.1.1
/WMS_exception_1_1_1.dtd"> <ServiceExceptionReport version="1.1.1" >   <ServiceException>
      java.lang.NullPointerException
null
</ServiceException></ServiceExceptionReport>

When we look at query:

http://gis.gis-lab.info:8080/geoserver/wms
    ?SERVICE=WMS&SERVICE=WMS
    &VERSION=1.1.1&REQUEST=GetFeatureInfo
    &BBOX=77.305313,49.465485,89.865570,55.358971
    &SRS=EPSG:4326&WIDTH=500&HEIGHT=235
    &LAYERS=geosample%3Aoopt&STYLES=
    &FORMAT=image/gif&TRANSPARENT=TRUE
    &QUERY_LAYERS=geosample174Aoopt
    &INFO_FORMAT=text/plain&X=458&Y=174

In line QUERY_LAYERS instead of 174A must be semicolon (:). Also there is duplicated SERVICE=WMS

Discussion is Russian on GIS-Lab: http://gis-lab.info/forum/viewtopic.php?f=14&t=3838 (several last posts)

Tested on QGIS 1.2 (svn 11481M) and QGIS 1.3 (svn 11496, 11518M)

Change History (1)

in reply to:  description comment:1 by jef, 15 years ago

Resolution: fixed
Status: newclosed

Replying to alexbruy:

In line QUERY_LAYERS instead of 174A must be semicolon (:). Also there is duplicated SERVICE=WMS

Fixed in r11522

  • the double SERVICE=WMS is harmless. The WMS server probably shouldn't already include SERVICE=WMS in it's OnlineResource in the GetCapabilities response.
  • the other problem was that the percent encoding turned that colon in your layer into %3A and the %3 was in turn wrongly replaced with the x coordinate.
  • the WMS provider now also treats the WMS response a UTF-8. That should be harmless when it's plain ascii and helps in your case. I now get:
WMS identify result for 375, 289:
---------------
Results for FeatureType 'veg':
--------------------------------------------
the_geom = [GEOMETRY (MultiPolygon) with 6832 points]
TYPE = ЛУГОВЫЕ СТЕПИ И ОСТЕПНЕННЫЕ ЛУГА
SUBTYPE = Разнотравно-злаковые и злаиово-разнотравные мезофитное и ксеромезофитное разнотр
--------------------------------------------

Whatever that means ;)

Note: See TracTickets for help on using tickets.