[mapserver-users] PHP-Mapscript - clusterObj ?

Tamas Szekeres szekerest at gmail.com
Tue Jun 21 08:31:59 EDT 2011


Hi Chris,

The cluster->filter setting accepts mapserver expressions which should
evaluate to a boolean value. This is something similar to the layer->filter
option, provided the option to exclude certain features to be used in the
clustering algoritm. I'm not sure about you exact requirement, so I cannot
decide whether it provides a solution or not.

Best regards,

Tamas



2011/6/21 Chris Green <chris.green at ibstv.co.uk>

> Hi Jeff
>
> I'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?
>
>
>
> Chris
>
> -----Original Message-----
> From: mapserver-users-bounces at lists.osgeo.org [mailto:
> mapserver-users-bounces at lists.osgeo.org] On Behalf Of Jeff McKenna
> Sent: 20 June 2011 22:30
> To: mapserver-users at lists.osgeo.org
> Subject: Re: [mapserver-users] PHP-Mapscript - clusterObj ?
>
> Hi Chris,
>
> Let's plan this for our next phase of attack.  As you travel down this
> cluster-php-mapscript path, document your full examples in the MapServer
> wiki:
>
> - login to the wiki (use your osgeo ID, which you can create at
> http://www.osgeo.org/osgeo_userid)
> - goto http://trac.osgeo.org/mapserver/wiki/PHPMapScript
> - create a new page there, in the "Examples" section
> - add as many examples as you wish for the Cluster object
> - be sure to add "this was added by [yourname] [email]"
> - when you are satisfied with that, email the mapserver-dev mailing list
> - then I will change the CLUSTER example in
> http://www.mapserver.org/mapfile/cluster.html#php-mapscript-usage to
> point to your page
>
> And you get all the glory! :)
>
> thanks!
>
> -jeff
>
>
>
> --
> Jeff McKenna
> MapServer Consulting and Training Services
> http://www.gatewaygeomatics.com/
>
>
>
>
> On 11-06-20 4:47 PM, Chris Green wrote:
> > Hi Jeff
> >
> > Thanks. Fame at last...!
> >
> > 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 "/target/") with no clustering. But I have so far failed to make the
> two work together.
> >
> > This is where I am currently (which does not work for me):
> >
> > $map = ms_newMapobj("/var/www/vhosts/mysite/httpdocs/test.map");
> > $layer1=$map->getLayerByName("test1");
> > $layer1->cluster;
> > $layer1->set("filteritem", "attribute 1");
> > $layer1->setFilter("/target/");
> >
> > Any ideas?
> >
> >
> > Chris
> >
> >
> > -----Original Message-----
> > From: mapserver-users-bounces at lists.osgeo.org [mailto:
> mapserver-users-bounces at lists.osgeo.org] On Behalf Of Jeff McKenna
> > Sent: 20 June 2011 20:31
> > To: mapserver-users at lists.osgeo.org
> > Subject: Re: [mapserver-users] PHP-Mapscript - clusterObj ?
> >
> > Hi Chris,
> >
> > I've added your PHP MapScript example to the mapfile's CLUSTER page:
> > http://www.mapserver.org/mapfile/cluster.html
> >
> > Thanks!
> >
> > -jeff
> >
> >
> >
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110621/54157c88/attachment.html


More information about the mapserver-users mailing list