[MapProxy] Two GetFeatureInfo issues

Anne Blankert anne.blankert at geodan.nl
Mon Oct 4 06:37:49 EDT 2010


 Hello Oliver,

Thanks for the response. My comments are in between the lines below.

On 10/4/2010 8:53 AM, Oliver Tonnhofer wrote:
> Hi Anne,
>
> On 01.10.2010, at 18:53, Anne Blankert wrote:
>> 1. For some reason MapProxy wants the WMS GetFeatureInfo client to provide some extra WMT parameters?
>> When sending a GetFeatureInfo request like:
>> http://192.168.25.189:8080/service?&SERVICE=wms&VERSION=1.1.0&REQUEST=GetFeatureInfo&EXCEPTIONS=application/vnd.ogc.se_xml&SRS=EPSG:900913&BBOX=515852.005913,6855223.828258,563395.837497,6885492.891453&X=205&Y=223&INFO_FORMAT=application/vnd.ogc.gml&FEATURE_COUNT=1&QUERY_LAYERS=dnk&LAYERS=dnk&WIDTH=622&HEIGHT=396
>>
>> The response is:
>> <WMTException version="1.0.0">missing parameters ['wmtver', 'styles', 'format']</WMTException> 
> At first, MapProxy does not support 1.1.0. So it seams there was a problem during version negotiation. MapProxy falls back to 1.0.0, hence the exception about the missing wmtver parameter. styles and format are also required by the WMS specification and the WMTException is the correct answer to this request.
>
> We are still not sure how to handle these clients in general: Sniffing the user-agent would be a solution, or just ignoring the missing parameters.
There can be many user-agents, many of which may be custom user-agents,
unknown to MapProxy. Wouldn't it be a good idea that MapProxy only
requires those parameters that are needed for proxying and let the
remote server decide on the other parameters? If the remote server does
not like the request, the resulting exception can be proxied to the
MapProxy client. What would be the benefit of a proxy that is more
strict than the proxied service?
> Until then, you could use the undocumented 'wms.non_strict' option. It will ignore styles and format parameters if you set it to True in the proxy.yaml.
I've tried this option in several ways 'non_strict: True' and
'wms.non_strict: True' in file proxy.yaml under 'param', and 'wms_opts'
but MapProxy keeps on telling me I should provide the remaining
parameters. When I force my client to add
"&wmtver=1.0&styles=&format=image/png" to the request, getFeatureInfo is
passed through MapProxy (but is not reprojected, see below)
>> If I am correct these parameters are not normally required for WMS GetFeatureInfo requests?
> The format, not so much, but the style can affect the request (e.g. x,y might hit a thick line, but not a thin line). Regardless of that, they are required by the spec.
>
What spec are you referring to? The spec at
http://portal.opengeospatial.org/files/?artifact_id=1081&version=1&format=pdf,
section 7.3.2, table 9, does not mention these parameters.

>> 2. If the remote WMS webservice uses an other projection than the MapProxy client, the MapProxy GetFeatureInfo request sends the BBOX parameters of the client projection instead of the remote projection to the remote server. The BBOX parameter probably should be reprojected from client to remote projection. I am not sure if the x, y, width and height parameters should be changed because of the re-projection.
> The width and height changes so that the request has square pixels. And with a different projection, x and y move in the image. The coordinates are transformed correctly in that case.
>
Mmm, for some reason, in my configuration, the GetFeatureinfo parameters
'bbox', 'x', 'y', 'width' and 'height' do not seem to be transformed at
all.

client-to-MapProxy-request:
http://myMapProxyserver:8080/service?&SERVICE=wms&VERSION=1.1.0&REQUEST=GetFeatureInfo&EXCEPTIONS=application/vnd.ogc.se_xml&SRS=EPSG:900913&BBOX=461981.874505,6780816.784384,651545.704618,6958150.689973&X=450&Y=321&INFO_FORMAT=application/vnd.ogc.gml&FEATURE_COUNT=1&QUERY_LAYERS=dnk&LAYERS=dnk&WIDTH=620&HEIGHT=580&wmtver=1.0&styles=&format=image/png

I have MapProxy configured to support EPSG:900913 client requests and to
use only EPSG:28992 requests for the remote WMS server

resulting MapProxy-to-WMS-server-request:
http://webservice.nieuwekaart.nl/cgi-bin/nkn?styles=&format=image%2Fpng&HEIGHT=580&EXCEPTIONS=application%2Fvnd.ogc.se_xml&BBOX=461981.874505,6780816.78438,651545.704618,6958150.68997&INFO_FORMAT=application%2Fvnd.ogc.gml&transparent=true&LAYERS=nieuwekaart&QUERY_LAYERS=nieuwekaart&SERVICE=WMS&WIDTH=620&FEATURE_COUNT=1&REQUEST=GetFeatureInfo&SRS=EPSG%3A900913&VERSION=1.1.1&Y=321&X=450

Some things to note:
1. The MapProxy-to-WMS-server-request does not use the wmtver parameter
(although MapProxy requires the client to provide it)
2. The bbox,width,height,x and y parameters were not transformed in the
MapProxy-to-WMS-server-request. I verified that the current MapProxy
configuration does transform GetMap requests. Is there a seperate
'supported_srs' parameter for GetFeatureInfo requests?

Regards,

Anne



More information about the MapProxy mailing list