I have two layers served via GeoServer: "locations and "forests".

I'm using GetFeatureInfo request to query the layers like this:


This works fine, but in cases where layers overlap, I get only the response for first layer (locations), and I need featureInfo for both layers. What am I missing?

  • 1
    Try to add &FEATURE_COUNT=10 – user30184 Oct 1 at 12:30
  • It worked, thanks. I suppose &FEATURE_COUNT=2 would suffice for two layers? – Marin Leontenko Oct 1 at 12:33
  • 2
    It's interesting that in the WMS 1.3.0 specification we have The optional FEATURE_COUNT parameter states the maximum number of features per layer for which feature information shall be returned. whilst in the WMS 1.1.1 specification it doesn't mention per layer – nmtoken Oct 1 at 12:40
  • 1
    Geoserver is using a buffer when it processes the GetFeatureInfo request. The buffer can be set in request, or it may be a fixed value that is configured on the server side, or server sets is automatically with complex heuristics, which is the default docs.geoserver.org/stable/en/user/services/wms/…. This means that GetFeatureInfo may find several hits from a layer and it may be safer to use a somewhat bigger value as FEATURE_COUNT. – user30184 Oct 1 at 13:30

Your Answer

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

Browse other questions tagged or ask your own question.