Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESRI WMS service ignores INFO_FORMAT=application/vnd.ogc.gml #845

Open
tchaddad opened this issue Aug 24, 2023 · 3 comments
Open

ESRI WMS service ignores INFO_FORMAT=application/vnd.ogc.gml #845

tchaddad opened this issue Aug 24, 2023 · 3 comments

Comments

@tchaddad
Copy link
Collaborator

The US Fish & Wildlife Service hosts a WMS service for the National Wetlands Inventory (served by an ArcServer) here:
https://fwspublicservices.wim.usgs.gov/wetlandsmapservice/services/Wetlands/MapServer/WMSServer?request=GetCapabilities&service=WMS

The supported INFO_FORMATS for GetFeatureInfo on this server are:

  • application/vnd.esri.wms_raw_xml
  • application/vnd.esri.wms_featureinfo_xml
  • application/vnd.ogc.wms_xml
  • application/geojson
  • text/xml
  • text/html
  • text/plain

For the WMS service, a GetFeatureInfo query from Geomoose looks like this:
https://fwspublicservices.wim.usgs.gov/wetlandsmapservice/services/Wetlands/MapServer/WMSServer?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&FORMAT=image/png&TRANSPARENT=true&QUERY_LAYERS=1&LAYERS=1&INFO_FORMAT=application/vnd.ogc.gml&FEATURE_COUNT=1000&X=50&Y=50&SRS=EPSG:3857&STYLES=&WIDTH=101&HEIGHT=101&BBOX=-13839639.247702612,5356713.648169963,-13839336.004626645,5357016.891245931

However the server doesn't support the requested INFO_FORMAT, so it ignores it, and instead returns an ESRI-specific XML format.

If the same request is made with INFO_FORMAT set to geojson, the server will return the requested format:
https://fwspublicservices.wim.usgs.gov/wetlandsmapservice/services/Wetlands/MapServer/WMSServer?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&QUERY_LAYERS=1&LAYERS=1&FEATURE_COUNT=1000&X=50&Y=50&SRS=EPSG:3857&STYLES=&WIDTH=101&HEIGHT=101&BBOX=-13839108.477351086,5363070.542952579,-13838970.344240246,5363208.676063421&INFO_FORMAT=application/geojson

GeoMoose should probably support asking for a format that the server advertises that it supports.

I think this means it would be good if GeoMoose allowed setting a param of INFO_FORMAT for WMS map sources, so that the default can be overwritten for servers that do not advertise "application/vnd.ogc.gml"

@brentfraser
Copy link
Contributor

You could set it in the mapsource's param in the mapbook, but the problem is GM does not have the code in place to handle the returned geojson (or the other formats) [yet].

@tchaddad
Copy link
Collaborator Author

Yep, I had tried setting the map-source param, but it seemed to be ignored (?), and instead the default value of "application/vnd.ogc.gml" is sent to the server.

This is what I had set:

<param name="INFO_FORMAT" value="application/geojson" />

Mostly I just wanted to record this for now, so that we could come back to it...

@brentfraser
Copy link
Contributor

Some similar info at #546

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants