[mapserver-users] Need mapfile example for Cascaded WMS GetFeatureInfo request

Basques, Bob (CI-StPaul) bob.basques at ci.stpaul.mn.us
Wed Sep 5 14:21:26 PDT 2018


Hi Daniel,

All remote layers originate as separate WMS services, and all are housed on the same server.  All are serving up HTML fragments for the GetFeatureInfo.  And they all work individually.

All request structure is the same.  The cascaded service Mapfile is script built, so all the requests are using the same settings for format and other params where the same.

A couple of sample layer defs in the Cascaded Mapfile are included below:

  LAYER
    NAME 'L283_all'

    STATUS ON
    TYPE RASTER

    CONNECTIONTYPE WMS
    CONNECTION "http://gis.ci.stpaul.mn.us/datasets/PUBLIC/SOCIAL_JUSTICE_EMERGENCY/ELM/elm_lilydale_public.map?"

    PROJECTION
      "init=epsg:26915"
    END

    METADATA
      # WMS client connection options (input)
      "wms_name" "all"
      "wms_srs" "EPSG:26915"
      "wms_server_version" "1.1.1"
      "wms_format" "image/png"

      # WMS Server options (output)
      "wms_enable_request" "GetCapabilities GetMap GetFeatureInfo GetLegendGraphic"
      "wms_title" "Emergency Location Markers"
      "wms_layer_group" "/Public Safety"
      #"wms_opaque" "0"
      "wms_formatlist" "image/png, image/jpeg"
      "wms_extent" "418325.75 4924105.58 524235.84 5029024.01"
      "gml_include_items" "all"

      "wms_metadataurl_format" "text/html"
      "wms_metadataurl_type"   "FGDC"
      "wms_metadataurl_href"   "http://gis.ci.stpaul.mn.us/apps/metadata/cgi-bin/md.02.pl?p_type=record&oid=283"

      "wms_style" "default"
      "wms_style_default_legendurl_width" "100"
      "wms_style_default_legendurl_height" "100"
      "wms_style_default_legendurl_format" "image/png"
      "wms_style_default_legendurl_href" "http://gis.ci.stpaul.mn.us/datasets/wms.map?version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=L283_all&format=image/png&STYLE=default&TRANSPARENT=true&SCALE=1"
     END

     TEMPLATE "dummy"
     PROCESSING "RESAMPLE=AVERAGE"
  END

###########################

  LAYER
    NAME 'L11_all'

    STATUS ON
    TYPE RASTER

    CONNECTIONTYPE WMS
    CONNECTION "http://gis.ci.stpaul.mn.us/datasets/PUBLIC/ADDRESS/stamp-active.map?"

    PROJECTION
      "init=epsg:26915"
    END

    METADATA
      # WMS client connection options (input)
      "wms_name" "all"
      "wms_srs" "EPSG:26915"
      "wms_server_version" "1.1.1"
      "wms_format" "image/png"

      # WMS Server options (output)
      "wms_enable_request" "GetCapabilities GetMap GetFeatureInfo GetLegendGraphic"
      "wms_title" "Address (STAMP) Points (active)"
      "wms_layer_group" "/Address"
      #"wms_opaque" "0"
      "wms_formatlist" "image/png, image/jpeg"
      "wms_extent" "418325.75 4924105.58 524235.84 5029024.01"
      "gml_include_items" "all"

      "wms_metadataurl_format" "text/html"
      "wms_metadataurl_type"   "FGDC"
      "wms_metadataurl_href"   "http://gis.ci.stpaul.mn.us/apps/metadata/cgi-bin/md.02.pl?p_type=record&oid=11"

      "wms_style" "default"
      "wms_style_default_legendurl_width" "100"
      "wms_style_default_legendurl_height" "100"
      "wms_style_default_legendurl_format" "image/png"
      "wms_style_default_legendurl_href" "http://gis.ci.stpaul.mn.us/datasets/wms.map?version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=L11_all&format=image/png&STYLE=default&TRANSPARENT=true&SCALE=1"
     END

     TEMPLATE "dummy"
     PROCESSING "RESAMPLE=AVERAGE"
  END



bobb





On Sep 5, 2018, at 4:02 PM, Daniel Morissette <dmorissette at mapgears.com<mailto:dmorissette at mapgears.com>> wrote:

If I remember correctly, cascading multi-layer WMS GetFeatureInfo is only supported if both layers point to the same remote WMS server, i.e. if the CONNECTION string is identical and the other params (version, etc) match.

Are both layers pointing to the same WMS server in your test mapfile?

Daniel


On 2018-09-05 4:58 PM, Basques, Bob (CI-StPaul) wrote:
All,
I’m not having any luck with getting a GetFeatureInfo request to work with more than one layer in the request.
All works fine with a single layer named, but as soon as more than one layer is listed in the request I’m getting a MapServer error:
<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.3.0"xsi:schemaLocation="http://www.opengis.net/ogchttp://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd">
<ServiceException code="LayerNotQueryable">
msWMSFeatureInfo(): WMS server error. Requested WMS layer(s) are not queryable: type or connection differ
</ServiceException>
</ServiceExceptionReport>
I’ve been told the “type or connection differ” chunk of message is the key part.  Again, individual layer requests (LAYERS/QUERY_LAYERS=Layer_01) work just fine, but multiple layers (LAYERS/QUERY_LAYERS=Layer_01, Layer_02) do not.
I’m not finding a lot of info on this online either.  Are there certain gothchas to be aware of here?  do I need to look at how each remote WMS is being serverd with regard to each GetFetureInfo TEMPLATE?  They all work independently, but not in groups.
Thoughts please.
Thanks
bobb
Even if you’re on the right track, you’ll get run over if you just sit there.
—Will Rogers
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/mapserver-users


--
Daniel Morissette
Mapgears Inc
T: +1 418-696-5056 #201
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/mapserver-users


We learn from history that we do not learn from history.

   ~ George Wilhelm Hegel



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20180905/f95b2da3/attachment-0001.html>


More information about the mapserver-users mailing list