<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Aptos;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:12.0pt;
font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
p.qt-msonormal1, li.qt-msonormal1, div.qt-msonormal1
{mso-style-name:qt-msonormal1;
margin:0cm;
font-size:11.0pt;
font-family:"Aptos",sans-serif;}
span.font
{mso-style-name:font;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="NO-NYN" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">So, I've now confirmed that version 8.4 behaves the same way. Since I can't seem to find a solution for this, and because it appears to be a bug, I think I should create
an issue.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">Erik<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Fra:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> MapServer-users <<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>>
<b>På vegne av </b>Guldberg, Erik via MapServer-users<br>
<b>Sendt:</b> tirsdag 18. februar 2025 12:37<br>
<b>Til:</b> Seth G <<a href="mailto:sethg@geographika.co.uk">sethg@geographika.co.uk</a>><br>
<b>Kopi:</b> MapServer Users <<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>><br>
<b>Emne:</b> Re: [MapServer-users] Wrong and inconsistent GetFeatureInfo result for CLUSTER layer<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">I may try to see if I manage to get a v. 8.4 up and running, but as I read the issues that were fixed, it's quite another problem, related to the getCapabilities output.
I haven't noticed that I have any such problems.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Erik<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Fra:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Seth G <<a href="mailto:sethg@geographika.co.uk">sethg@geographika.co.uk</a>>
<br>
<b>Sendt:</b> tirsdag 18. februar 2025 11:04<br>
<b>Til:</b> Guldberg, Erik <<a href="mailto:Erik.Guldberg@ra.no">Erik.Guldberg@ra.no</a>>; MapServer Users <<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>><br>
<b>Emne:</b> Re: [MapServer-users] Wrong and inconsistent GetFeatureInfo result for CLUSTER layer<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Hi Erik,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Are you able to confirm the issue still exists on newer versions of MapServer (8.4 or 8.2.2)?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">There was a fix related to CLUSTER and PostGIS added to the newer versions, see <a href="https://github.com/MapServer/MapServer/pull/7111">https://github.com/MapServer/MapServer/pull/7111</a>.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Seth<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div id="sig62266145">
<div>
<p class="MsoNormal">--<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">web:<a href="https://geographika.net">https://geographika.net</a> & <a href="https://mapserverstudio.net">https://mapserverstudio.net</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">mastodon: @<a href="mailto:geographika@mastodon.social">geographika@mastodon.social</a><o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">On Tue, Feb 18, 2025, at 10:16 AM, Guldberg, Erik via MapServer-users wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt;overflow-wrap:break-word" id="qt">
<div>
<p class="qt-msonormal1"><span lang="EN-US">It's interesting to note that, if I set a label, like the name of the object ("tittel"), it's always correct. It's only the getFeatureInfo that is wrong.</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">Also, I've tried to create a cluster layer from another dataset, where the main different is, I believe, that the projection is different, and I don't have the same problem there. Using the same cluster settings.</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm;border-right-color:currentcolor;border-bottom-color:currentcolor;border-left-color:currentcolor;border-image-outset:0;border-image-repeat:stretch;border-image-slice:100%;border-image-source:none;border-image-width:1">
<p class="qt-msonormal1"><span class="font"><b><span style="font-family:"Calibri",sans-serif">Fra:</span></b></span><span class="font"><span style="font-family:"Calibri",sans-serif"> MapServer-users <<a href="mailto:mapserver-users-bounces@lists.osgeo.org"><span style="color:#467886">mapserver-users-bounces@lists.osgeo.org</span></a>>
<b>På vegne av </b>Guldberg, Erik via MapServer-users</span></span><span style="font-family:"Calibri",sans-serif"><br>
<span class="font"><b>Sendt:</b> fredag 14. februar 2025 14:51</span><br>
<span class="font"><b>Til:</b> <a href="mailto:mapserver-users@lists.osgeo.org"><span style="color:#467886">mapserver-users@lists.osgeo.org</span></a></span><br>
<span class="font"><b>Emne:</b> [MapServer-users] Wrong and inconsistent GetFeatureInfo result for CLUSTER layer</span></span><o:p></o:p></p>
</div>
</div>
<p class="qt-msonormal1"> <o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">Hi,</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">I have a WMS service, </span><a href="https://kart.ra.no/wms/brukerminner"><span lang="EN-US" style="color:#467886">https://kart.ra.no/wms/brukerminner</span></a><span lang="EN-US">, where I have problems getting
correct getFeatureInfo results from a layer with CLUSTER content.</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">It contains the cluster layer and a regular point layer for the same data. The regular point layer is shown at 1:50 000.</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">For single objects in both the cluster layer, I want to be able to use getFeatureInfo. This works, but the problem is that the results most of the time are wrong, and that they change for time to time, likely due
to change in zoom level. For the regular point layer, the result is always correct. I've also created a test cluster layer without the scale limit, and that also gives the correct result if I zoom in enough.</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">All the symbols are placed correctly in the map, for all layers. I've used the database, and also this OGC API service (that uses the same data source as the WMS) as a reference:
</span><a href="https://api.ra.no/brukerminner"><span lang="EN-US" style="color:#467886">https://api.ra.no/brukerminner</span></a><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">I'm using MapServer version 7.6.4.</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">Some example queries, using QGIS.</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">Wrong result. The object I get in the getfeatureinfo is 64 km away from where I clicked.</span><o:p></o:p></p>
<p class="qt-msonormal1"><a href="https://kart.ra.no/wms/brukerminner?language=nor&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&BBOX=760392.02671199827454984%2C8263040.88853696268051863%2C1033357.36004533339291811%2C8407916.1385369636118412&CRS=EPSG%3A3857&WIDTH=1984&HEIGHT=1053&LAYERS=Brukerminner&STYLES=&FORMAT=image%2Fpng&QUERY_LAYERS=Brukerminner&INFO_FORMAT=text%2Fhtml&I=1069&J=616&FEATURE_COUNT=10"><span lang="EN-US" style="color:#467886">https://kart.ra.no/wms/brukerminner?language=nor&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&BBOX=760392.02671199827454984%2C8263040.88853696268051863%2C1033357.36004533339291811%2C8407916.1385369636118412&CRS=EPSG%3A3857&WIDTH=1984&HEIGHT=1053&LAYERS=Brukerminner&STYLES=&FORMAT=image%2Fpng&QUERY_LAYERS=Brukerminner&INFO_FORMAT=text%2Fhtml&I=1069&J=616&FEATURE_COUNT=10</span></a><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">Zoomed in a bit more gives another, wrong result. This is 8.7 km away from where I clicked:</span><o:p></o:p></p>
<p class="qt-msonormal1"><a href="https://kart.ra.no/wms/brukerminner?language=nor&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&BBOX=871972.11004533257801086%2C8307721.07603696547448635%2C940213.44337866583373398%2C8343939.88853696547448635&CRS=EPSG%3A3857&WIDTH=1984&HEIGHT=1053&LAYERS=Brukerminner&STYLES=&FORMAT=image%2Fpng&QUERY_LAYERS=Brukerminner&INFO_FORMAT=text%2Fhtml&I=1022&J=627&FEATURE_COUNT=10"><span lang="EN-US" style="color:#467886">https://kart.ra.no/wms/brukerminner?language=nor&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&BBOX=871972.11004533257801086%2C8307721.07603696547448635%2C940213.44337866583373398%2C8343939.88853696547448635&CRS=EPSG%3A3857&WIDTH=1984&HEIGHT=1053&LAYERS=Brukerminner&STYLES=&FORMAT=image%2Fpng&QUERY_LAYERS=Brukerminner&INFO_FORMAT=text%2Fhtml&I=1022&J=627&FEATURE_COUNT=10</span></a><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="NO-BOK"> </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">This is the Test-layer, how it looks now. I've tried different variations of PROCESSING settings.</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">LAYER</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> NAME "TEST"</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> DEBUG 5</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> TYPE POINT</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> STATUS ON</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> TEMPLATE "../templates/brukerminner.html"</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> HEADER "../templates/header.html"</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> FOOTER "../templates/footer.html"</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> TOLERANCEUNITS pixels</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> TOLERANCE 25</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> # MINSCALEDENOM 50000</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> METADATA</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> "wms_enable_request" "*"</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> "wms_include_items" "tittel"</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> "wms_title" "TEST"</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> "wms_feature_info_mime_type" "text/html"</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">END </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">PROJECTION</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> "init=epsg:4326"</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">END</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">EXTENT -19.76 54.57 45.57 82.67 #4326</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">PROCESSING "CLOSE_CONNECTION=DEFER"</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">CONNECTIONTYPE POSTGIS</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">CONNECTION "host=host dbname=db user=user password=password port=5432"</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">DATA "geom from xx.xx using unique id using srid=4326"</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">LABELITEM "Cluster_FeatureCount"</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"># PROCESSING "CLUSTER_ALGORITHM=SIMPLE"</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">PROCESSING "CLUSTER_GET_ALL_SHAPES=ON"</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">PROCESSING "ITEMS=tittel,beskrivelse,fylke,kommune,opprettet,endret,opprettet_av,linkkulturminnesok,gpsposisjon"</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"># PROCESSING "CLUSTER_KEEP_LOCATIONS=ON"</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">CLUSTER</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">MAXDISTANCE 50</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">REGION "ellipse"</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">END</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">CLASS</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> NAME "Brukerminne"</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> EXPRESSION ("[Cluster_FeatureCount]" = "1")</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> STYLE</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> SYMBOL "brukerminne"</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> COLOR 200 0 0</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> SIZE 27</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> OFFSET 0 -13.5</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> END</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">END</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">END </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">Anyone with ideas on what's wrong?</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">Thanks,</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US">Erik</span><o:p></o:p></p>
<p class="qt-msonormal1"><span lang="EN-US"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">_______________________________________________<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">MapServer-users mailing list<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="mailto:MapServer-users@lists.osgeo.org"><span style="color:#467886">MapServer-users@lists.osgeo.org</span></a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users"><span style="color:#467886">https://lists.osgeo.org/mailman/listinfo/mapserver-users</span></a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>