Skip to main content
replaced http://gis.stackexchange.com/ with https://gis.stackexchange.com/
Source Link

I have added a WMS layer to the ArcGIS Server JSAPI and am attempting to query it using getFeatureInfo when the user clicks on the map.

This is mostly working, except that the accuracy of the results is very suspicious. If I click within a few hundred metres of a polygon boundary, I often get back the neighbouring polygon's results:

enter image description here

In this case I have clicked within Staffordshire Moorlands 010B (as shown by the infoWindow's anchor) but the result shows the neighbouring polygon 011C.

In order to run the getFeatureInfo, I am calculating the map extent in its native web mercator, converting this into the units of the WMS layer, and using this as the bounding box.

Is this a valid approach?

The question ArcGIS Server WMS GetFeatureInfo toleranceArcGIS Server WMS GetFeatureInfo tolerance implies that there may be some trickery required to get the tolerance right?

I have added a WMS layer to the ArcGIS Server JSAPI and am attempting to query it using getFeatureInfo when the user clicks on the map.

This is mostly working, except that the accuracy of the results is very suspicious. If I click within a few hundred metres of a polygon boundary, I often get back the neighbouring polygon's results:

enter image description here

In this case I have clicked within Staffordshire Moorlands 010B (as shown by the infoWindow's anchor) but the result shows the neighbouring polygon 011C.

In order to run the getFeatureInfo, I am calculating the map extent in its native web mercator, converting this into the units of the WMS layer, and using this as the bounding box.

Is this a valid approach?

The question ArcGIS Server WMS GetFeatureInfo tolerance implies that there may be some trickery required to get the tolerance right?

I have added a WMS layer to the ArcGIS Server JSAPI and am attempting to query it using getFeatureInfo when the user clicks on the map.

This is mostly working, except that the accuracy of the results is very suspicious. If I click within a few hundred metres of a polygon boundary, I often get back the neighbouring polygon's results:

enter image description here

In this case I have clicked within Staffordshire Moorlands 010B (as shown by the infoWindow's anchor) but the result shows the neighbouring polygon 011C.

In order to run the getFeatureInfo, I am calculating the map extent in its native web mercator, converting this into the units of the WMS layer, and using this as the bounding box.

Is this a valid approach?

The question ArcGIS Server WMS GetFeatureInfo tolerance implies that there may be some trickery required to get the tolerance right?

removed missing sample link
Source Link
Stephen Lead
  • 21.2k
  • 18
  • 114
  • 241

I have added a WMS layer to the ArcGIS Server JSAPI and am attempting to query it using getFeatureInfo when the user clicks on the map. A reproducible sample is available here.

This is mostly working, except that the accuracy of the results is very suspicious. If I click within a few hundred metres of a polygon boundary, I often get back the neighbouring polygon's results:

enter image description here

In this case I have clicked within Staffordshire Moorlands 010B (as shown by the infoWindow's anchor) but the result shows the neighbouring polygon 011C.

In order to run the getFeatureInfo, I am calculating the map extent in its native web mercator, converting this into the units of the WMS layer, and using this as the bounding box.

Is this a valid approach?

The question ArcGIS Server WMS GetFeatureInfo tolerance implies that there may be some trickery required to get the tolerance right?

Edit: here is a new sample which doesn't use any reprojection, so both requests use the same bbox, SRS, etc. Here is the GetMap request and the GetFeatureInfo request (the location of the click is about the same as the screenshot, ie within the 010B polygon, though the GetFeatureInfo result says 011C)

I have added a WMS layer to the ArcGIS Server JSAPI and am attempting to query it using getFeatureInfo when the user clicks on the map. A reproducible sample is available here.

This is mostly working, except that the accuracy of the results is very suspicious. If I click within a few hundred metres of a polygon boundary, I often get back the neighbouring polygon's results:

enter image description here

In this case I have clicked within Staffordshire Moorlands 010B (as shown by the infoWindow's anchor) but the result shows the neighbouring polygon 011C.

In order to run the getFeatureInfo, I am calculating the map extent in its native web mercator, converting this into the units of the WMS layer, and using this as the bounding box.

Is this a valid approach?

The question ArcGIS Server WMS GetFeatureInfo tolerance implies that there may be some trickery required to get the tolerance right?

Edit: here is a new sample which doesn't use any reprojection, so both requests use the same bbox, SRS, etc. Here is the GetMap request and the GetFeatureInfo request (the location of the click is about the same as the screenshot, ie within the 010B polygon, though the GetFeatureInfo result says 011C)

I have added a WMS layer to the ArcGIS Server JSAPI and am attempting to query it using getFeatureInfo when the user clicks on the map.

This is mostly working, except that the accuracy of the results is very suspicious. If I click within a few hundred metres of a polygon boundary, I often get back the neighbouring polygon's results:

enter image description here

In this case I have clicked within Staffordshire Moorlands 010B (as shown by the infoWindow's anchor) but the result shows the neighbouring polygon 011C.

In order to run the getFeatureInfo, I am calculating the map extent in its native web mercator, converting this into the units of the WMS layer, and using this as the bounding box.

Is this a valid approach?

The question ArcGIS Server WMS GetFeatureInfo tolerance implies that there may be some trickery required to get the tolerance right?

added new sample and request URLs
Source Link
Stephen Lead
  • 21.2k
  • 18
  • 114
  • 241

I have added a WMS layer to the ArcGIS Server JSAPI and am attempting to query it using getFeatureInfo when the user clicks on the map. A reproducible sample is available here.

This is mostly working, except that the accuracy of the results is very suspicious. If I click within a few hundred metres of a polygon boundary, I often get back the neighbouring polygon's results:

enter image description here

In this case I have clicked within Staffordshire Moorlands 010B (as shown by the infoWindow's anchor) but the result shows the neighbouring polygon 011C.

In order to run the getFeatureInfo, I am calculating the map extent in its native web mercator, converting this into the units of the WMS layer, and using this as the bounding box.

Is this a valid approach?

The question ArcGIS Server WMS GetFeatureInfo tolerance implies that there may be some trickery required to get the tolerance right?

Edit: here is a new sample which doesn't use any reprojection, so both requests use the same bbox, SRS, etc. Here is the GetMap request and the GetFeatureInfo request (the location of the click is about the same as the screenshot, ie within the 010B polygon, though the GetFeatureInfo result says 011C)

I have added a WMS layer to the ArcGIS Server JSAPI and am attempting to query it using getFeatureInfo when the user clicks on the map. A reproducible sample is available here.

This is mostly working, except that the accuracy of the results is very suspicious. If I click within a few hundred metres of a polygon boundary, I often get back the neighbouring polygon's results:

enter image description here

In this case I have clicked within Staffordshire Moorlands 010B (as shown by the infoWindow's anchor) but the result shows the neighbouring polygon 011C.

In order to run the getFeatureInfo, I am calculating the map extent in its native web mercator, converting this into the units of the WMS layer, and using this as the bounding box.

Is this a valid approach?

The question ArcGIS Server WMS GetFeatureInfo tolerance implies that there may be some trickery required to get the tolerance right?

Edit: here is a new sample which doesn't use any reprojection, so both requests use the same bbox, SRS, etc. Here is the GetMap request and the GetFeatureInfo request (the location of the click is about the same as the screenshot)

I have added a WMS layer to the ArcGIS Server JSAPI and am attempting to query it using getFeatureInfo when the user clicks on the map. A reproducible sample is available here.

This is mostly working, except that the accuracy of the results is very suspicious. If I click within a few hundred metres of a polygon boundary, I often get back the neighbouring polygon's results:

enter image description here

In this case I have clicked within Staffordshire Moorlands 010B (as shown by the infoWindow's anchor) but the result shows the neighbouring polygon 011C.

In order to run the getFeatureInfo, I am calculating the map extent in its native web mercator, converting this into the units of the WMS layer, and using this as the bounding box.

Is this a valid approach?

The question ArcGIS Server WMS GetFeatureInfo tolerance implies that there may be some trickery required to get the tolerance right?

Edit: here is a new sample which doesn't use any reprojection, so both requests use the same bbox, SRS, etc. Here is the GetMap request and the GetFeatureInfo request (the location of the click is about the same as the screenshot, ie within the 010B polygon, though the GetFeatureInfo result says 011C)

added 1027 characters in body
Source Link
Stephen Lead
  • 21.2k
  • 18
  • 114
  • 241
Loading
Source Link
Stephen Lead
  • 21.2k
  • 18
  • 114
  • 241
Loading