1

I am displaying map using WMSlayer and implemented WMSGetFeatureInfo control on wms layer. Tap on a location and get the features using WMS getFeatureInfo service. This service is returning me all the features are located at given Point successfully with feature attributes.

My Requirement

Along with the Feature attributes, i need to have the feature geometry information too, which not geting as part of feature information from service.

So is there any way to capture the geometry information from OpenLayers GetFeatureInfo control?

Or

Is that a limitation in WMS GetFeatureInfo service?

1 Answer 1

2

It is up to the WMS server admin which formats the server is configured to support for GetFeatureInfo. Check from the GetCapabilities of the WMS server the list of supported INFO_FORMATs.

Geoservers by default support geojson and GML info formats and those include also geometries with GetFeatureInfo results. You can try with the following links:

https://ahocevar.com/geoserver/wms?bbox=-100.00,35.00,-99.99,35.01&styles=&format=jpeg&request=GetFeatureInfo&layers=topp:states&query_layers=topp:states&width=2&height=2&x=1&y=1&info_format=application/json

https://ahocevar.com/geoserver/wms?bbox=-100.00,35.00,-99.99,35.01&styles=&format=jpeg&request=GetFeatureInfo&layers=topp:states&query_layers=topp:states&width=2&height=2&x=1&y=1&info_format=application/vnd.ogc.gml

1
  • Thanks for quick response. my wms server is just returning all feature information except the geometry. Is the out put format configurable on WMS server? If yes please guide me ... Commented Aug 2, 2014 at 7:33

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.