Hi Chris,<br><br>The cluster-&gt;filter setting accepts mapserver expressions which should evaluate to a boolean value. This is something similar to the layer-&gt;filter option, provided the option to exclude certain features to be used in the clustering algoritm. I&#39;m not sure about you exact requirement, so I cannot decide whether it provides a solution or not.<br>
<br>Best regards,<br><br>Tamas<br><br><br><br><div class="gmail_quote">2011/6/21 Chris Green <span dir="ltr">&lt;<a href="mailto:chris.green@ibstv.co.uk">chris.green@ibstv.co.uk</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Jeff<br>
<br>
I&#39;d be happy to go down that path and document examples along the way as you suggest, but I have a feeling that there may be something about the way that the cluster algorithm works that makes it incompatible with the regex filtering that I would also like to do. If that turns out to be the case then I will need to restructure the way that I access my data, in effect to filter it myself before presenting it to the layer to be displayed with clustering. This will be quite a task - before I decide which way to go on this is there someone out there who can confirm (at least in principle) that it should be possible to simultaneously filter and cluster the data in a layer if I can only find the right mapscript syntax to make it happen?<br>

<div class="im"><br>
<br>
<br>
Chris<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>] On Behalf Of Jeff McKenna<br>

</div><div><div></div><div class="h5">Sent: 20 June 2011 22:30<br>
To: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
Subject: Re: [mapserver-users] PHP-Mapscript - clusterObj ?<br>
<br>
Hi Chris,<br>
<br>
Let&#39;s plan this for our next phase of attack.  As you travel down this<br>
cluster-php-mapscript path, document your full examples in the MapServer<br>
wiki:<br>
<br>
- login to the wiki (use your osgeo ID, which you can create at<br>
<a href="http://www.osgeo.org/osgeo_userid" target="_blank">http://www.osgeo.org/osgeo_userid</a>)<br>
- goto <a href="http://trac.osgeo.org/mapserver/wiki/PHPMapScript" target="_blank">http://trac.osgeo.org/mapserver/wiki/PHPMapScript</a><br>
- create a new page there, in the &quot;Examples&quot; section<br>
- add as many examples as you wish for the Cluster object<br>
- be sure to add &quot;this was added by [yourname] [email]&quot;<br>
- when you are satisfied with that, email the mapserver-dev mailing list<br>
- then I will change the CLUSTER example in<br>
<a href="http://www.mapserver.org/mapfile/cluster.html#php-mapscript-usage" target="_blank">http://www.mapserver.org/mapfile/cluster.html#php-mapscript-usage</a> to<br>
point to your page<br>
<br>
And you get all the glory! :)<br>
<br>
thanks!<br>
<br>
-jeff<br>
<br>
<br>
<br>
--<br>
Jeff McKenna<br>
MapServer Consulting and Training Services<br>
<a href="http://www.gatewaygeomatics.com/" target="_blank">http://www.gatewaygeomatics.com/</a><br>
<br>
<br>
<br>
<br>
On 11-06-20 4:47 PM, Chris Green wrote:<br>
&gt; Hi Jeff<br>
&gt;<br>
&gt; Thanks. Fame at last...!<br>
&gt;<br>
&gt; However I am still struggling with the combination of clustering and regex filtering. What I can say for sure is that clustering works if no regex filter is applied, and filtering works (using a regex filter in the form &quot;/target/&quot;) with no clustering. But I have so far failed to make the two work together.<br>

&gt;<br>
&gt; This is where I am currently (which does not work for me):<br>
&gt;<br>
&gt; $map = ms_newMapobj(&quot;/var/www/vhosts/mysite/httpdocs/test.map&quot;);<br>
&gt; $layer1=$map-&gt;getLayerByName(&quot;test1&quot;);<br>
&gt; $layer1-&gt;cluster;<br>
&gt; $layer1-&gt;set(&quot;filteritem&quot;, &quot;attribute 1&quot;);<br>
&gt; $layer1-&gt;setFilter(&quot;/target/&quot;);<br>
&gt;<br>
&gt; Any ideas?<br>
&gt;<br>
&gt;<br>
&gt; Chris<br>
&gt;<br>
&gt;<br>
&gt; -----Original Message-----<br>
&gt; From: <a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>] On Behalf Of Jeff McKenna<br>

&gt; Sent: 20 June 2011 20:31<br>
&gt; To: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
&gt; Subject: Re: [mapserver-users] PHP-Mapscript - clusterObj ?<br>
&gt;<br>
&gt; Hi Chris,<br>
&gt;<br>
&gt; I&#39;ve added your PHP MapScript example to the mapfile&#39;s CLUSTER page:<br>
&gt; <a href="http://www.mapserver.org/mapfile/cluster.html" target="_blank">http://www.mapserver.org/mapfile/cluster.html</a><br>
&gt;<br>
&gt; Thanks!<br>
&gt;<br>
&gt; -jeff<br>
&gt;<br>
&gt;<br>
&gt;<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
<br>
<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</div></div></blockquote></div><br>