1

I'm trying to perform a GetFeatureInfo request to an ArcGIS server 10.x WMS service and would like to get a response in GeoJSON format including the feature geometry.

Here's the request: http://mapservices.gov.yk.ca/arcgis/services/GeoYukon/GY_OilGas/MapServer/WMSServer?REQUEST=GetFeatureInfo&EXCEPTIONS=application%2Fvnd.ogc.se_xml&BBOX=-140.742239%2C64.444492%2C-131.499347%2C69.721576&SERVICE=WMS&INFO_FORMAT=application%2Fgeojson&QUERY_LAYERS=1&FEATURE_COUNT=50&Layers=1&WIDTH=578&HEIGHT=330&styles=&srs=EPSG%3A4326&version=1.1.1&x=201&y=207&

and the response contains a null geometry.

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
       "geometry": null,
       "properties": {
       "OBJECTID": "7",
       "SHAPE": "Polygon",
       "SEDIMENT_BASIN_NAME": "Eagle Plain",
       "SEDIMENT_BASIN_ID": "E",
       "BASIN_LOCATION": "onshore",
       "DESCRIPTION": "Northern Yukon Fold Complex",
       "REGION_NAME": "North Yukon",
       "AREA_KILOMETRES": "20803.8",
       "AREA_ACRES": "5140816.4",
       "AREA_HECTARES": "2080375.7",
       "SHAPE.AREA": "20803756917.106998",
       "SHAPE.LEN": "1391344.050657"
     },
     "layerName": "1"   
  }
 ]
}

Is it possible to get the geometry in GeoJSON or another format, perhaps by configuring the ArcGIS Server?

1

My original answer is below the line but I am having second thoughts about it. This is because the ArcGIS Server 10 Help page entitled Customizing a WMS GetFeatureInfo response says:

ArcGIS Server comes with XSLT templates for the supported formats listed in the WMS's capabilities files. For example, if you open the directory of these templates at \Styles\WMS, you'll see the following:

  • featureinfo_application_geojson.xsl
  • etc

As their name implies, each template is used to produce a default GetFeatureInfo response in a readable format, such as GeoJSON, plain text, and XML.


You will not be able to retrieve feature geometry from an OGC Web Mapping Service (WMS) which is simply served as an image (raster).

In order to request a feature geometry (vector) from ArcGIS for Server I think you will need to use one of:

  • ArcGIS for Server Feature Service
  • ArcGIS for Server Geometry Service
  • OGC Web Feature Service (WFS)
  • With an OGC WMS provided by geoserver it is possible. Is there no way with ArcGIS server ? – Philippe G. Sep 11 '14 at 13:41
  • I would not have expected this to be possible to do using an OGC WMS served by GeoServer either, so if it is, then I think that is an important piece of information for you to edit into your question. – PolyGeo Sep 12 '14 at 1:36
  • It's possible if the data source is vector, and if the WMS server has been configured to supply the geometry, – nmtoken Oct 1 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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