0

I've got a sld globally inspired by those posts (and a lot of others):

I'm currently stuck by the GetFeatureInfo behavior on clustered points. Clicking on a single point give me the informations of this point, clicking on a cluster of points only give me the count of stacked points and the empty data structure. See the screenshot of a QGIS usage below. GetFeatureInfo on a single point GetFeatureInfo on stacked points

I saw that there is a ticket about this point but it seems to be resolved.

Let me know if I missed something !

nmtoken
  • 13,355
  • 5
  • 38
  • 87
FloCAD
  • 31
  • 6
  • 2
    The issue was closed, possibly not resolved. The issue I think is that GetFeatureInfo acts on a point (a pixel in an image) and returns the value of data at that point. In a layer that clusters data there may not be any data at the clicked point, because the cluster icons sit a location that is an average of the available points based on some tolerance. – nmtoken May 30 '23 at 11:13
  • Thx for your answer @nmtoken ! Do you know if there is a possible workaround, like using differents scales denominator to constrains unique symbol on big scale or something ? – FloCAD May 30 '23 at 12:37
  • This is ten years old https://geoserver-users.narkive.com/vrIOf2vu/pointstacker-getfeatureinfo-possible. This is newer, and suggest that it could be possible to get GFI from the data if the count in a cluster=1. This deals with the topic too https://sourceforge.net/p/geoserver/mailman/geoserver-users/thread/CAGpN5UnWJRT5OuPeR=myNxwQTryK2nuTPJdNygcn=bKHC52ctQ@mail.gmail.com/. But maybe it just does not work. If you compress a number of features into a cluster point with count as an attribute, maybe it is not reversible to find out which features were used for creating the cluster. – user30184 May 30 '23 at 13:32
  • Yeah, I was starting to implement a second style for the same layer but on a different scale... The point is that, in my data, some points have the same coords so it's impossible to not clusterize them.... that's why I can't do anything with the count filter i think – FloCAD May 30 '23 at 13:41
  • 1
    If points have the same coordinates and you send the GetFeatureInfo request with &feature_count=50 you will get information from up to 50 features. And by using the GeoServer vendor option &buffer= you do not need to hit exactly the right point https://docs.geoserver.org/latest/en/user/services/wms/vendor.html#buffer. – user30184 May 30 '23 at 14:36
  • I'll try this ! thx – FloCAD May 30 '23 at 15:25

0 Answers0