2

I have MapProxy Version 1.12 configured and working very well with QGIS Server 3.10.

I need to use cached layers suporting GetFeatureInfo requests. But I also need to pass to additional parameters to QGIS Server:

WITH_GEOMETRY=TRUE&
FI_POINT_TOLERANCE=10&

These additional parameters should only be added to the request for GetFeatureInfo requests.

But when I use a MapProxy cached layer, the additional GetFeatureInfo parameters are not passed back to the QGIS Server.

If I issue a GetFeatureInfo request against Mapproxy:

http://mapproxy.qgis.demo/mapproxy/service?
SERVICE=WMS&
VERSION=1.1.1&
REQUEST=GetFeatureInfo&
FORMAT=image%2Fpng&
TRANSPARENT=true&
QUERY_LAYERS=geotuga_costanova_short_house_numbers&
LAYERS=geotuga_costanova_short_house_numbers&
TILED=true&
INFO_FORMAT=application%2Fjson&
WITH_GEOMETRY=TRUE&
FI_POINT_TOLERANCE=10&
X=235&
Y=91&
WIDTH=256&
HEIGHT=256&
SRS=EPSG%3A3763&
STYLES=&
BBOX=-36975%2C120827%2C-36900%2C120902

The request if forwarded to QGIS Server as:

http://qgis.demo/postgresql/geotuga/public/costanova/cgi-bin/qgis_mapserv.fcgi?
transparent=True&
layers=short_house_numbers&
bbox=-36975.0,120827.0,-36900.0,120902.0&
width=256&
height=256&
x=235&
y=91&
query_layers=short_house_numbers&
info_format=application%2Fjson&
format=image%2Fpng&
srs=EPSG%3A3763&
request=GetFeatureInfo&
version=1.1.1&
service=WMS&
styles=

The additional parameters do not reach the server.

My source is configured with featureinfo: true in mapproxy.yaml:

  geotuga_costanova:
    type: wms
    wms_opts:
      featureinfo: true
      legendgraphic: true
    req:
      url: http://qgis.demo/postgresql/geotuga/public/costanova/cgi-bin/qgis_mapserv.fcgi
      transparent: true

How can I have all GetFeatureInfo requests going back to the server with additional parameters?

This is related to this Custom Vendor Parameters for WMS and Caches discussion. GetFeatureInfo requests are not cached, so it maybe easier to support.

1 Answer 1

1

Just put it in req part like that:

req:
  [...]
  WITH_GEOMETRY: TRUE
  FI_POINT_TOLERANCE : 10

All you request to this WMS GetFeatureInfo will have this parameters.

1
  • Is it possible to pass a URL parameter like this to the server?
    – Mario
    Commented Aug 31, 2023 at 7:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.