Hi Chris, The cluster->filter can only accept mapserver expressions, filteritem and regex at layer level does not affect this setting.
However I consider the layer level filter should probably work, could you file a ticket by adding some test data and a mapfile example? Best regards, Tamas 2011/6/21 Chris Green <[email protected]> > Hi Steve**** > > ** ** > > That’s a very constructive suggestion. With no mapscript involved and with > the mapfile set up without a cluster class I added into the layer section: > **** > > ** ** > > FILTERITEM ‘Groups’**** > > FILTER /group4/**** > > ** ** > > This worked: I got only group4 features.**** > > ** ** > > ** ** > > Then I changed the mapfile to use a cluster class, with no filter: this > worked, I got all features clustered and with labels showing the > FeatureCount for each cluster. **** > > ** ** > > Then I inserted the same FILTERITEM and FILTER into the layer as above, and > there is no output. Nada.**** > > ** ** > > So it seems to be not a mapscript problem, but some kind of conflict > between clustering and filtering in Mapserver?**** > > ** ** > > ** ** > > Chris**** > > ** ** > > *From:* Lime, Steve D (DNR) [mailto:[email protected]] > *Sent:* 21 June 2011 17:09 > *To:* Chris Green; [email protected] > *Subject:* RE: [mapserver-users] Mapserver 6.0 regex**** > > ** ** > > Hmmm… A plain ‘ol regex expression did not change between 5.6 and 6.0, so > this is still valid:**** > > ** ** > > FILTERITEM ‘myitem’**** > > FILTER /myregex/**** > > ** ** > > Where regex’s changed is *inside* logical expressions:**** > > ** ** > > FILTER (‘[myitem]’ ~= /myregex/) becomes FILTER (‘[myitem]’ ~ ‘myregex’) > **** > > ** ** > > There are regression tests for these cases (query/filters.map) so I’m > pretty sure MapServer proper is working ok. You might try setting the filter > and filteritem directly in the mapfile see if that works. If it does then > it’s likely a problem with PHP/MapScript.**** > > ** ** > > Steve**** > > ** ** > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Chris Green > *Sent:* Monday, June 20, 2011 12:39 PM > *To:* [email protected] > *Subject:* [mapserver-users] Mapserver 6.0 regex**** > > ** ** > > I have one (hopefully the last!) problem with migrating from Mapserver 4.6 > to 6.0, this time over the use of regex.**** > > ** ** > > Using Mapscript on a Fedora platform I have been setting a filter in this > manner:**** > > ** ** > > ** ** > > $map=newMapobj("/var/www/vhosts/mysite/httpdocs/test.map");**** > > $layer1=$map->getLayerByName("test1");**** > > $layer1->set("filteritem", "Attribute1");**** > > $layer1->setFilter("/target/");**** > > ** ** > > This worked fine, but not anymore. I see in the migration guide that a > regex should now be delineated as a string so I assume that “/target/” > should become “target”. But that doesn’t work either.**** > > ** ** > > ** ** > > I am wondering if part of the problem is that as well as going from > Mapserver 4.6 to 5.0 I also changed from Fedora to Ubuntu 10.04, and I see > from the Mapserver documentation on Expressions that the OS may affect regex > operation.**** > > ** ** > > Am I missing something obvious here? I am really tired of going in > circles over this…**** > > ** ** > > ** ** > > Chris**** > > ** ** > > ** ** > > ** ** > > ** ** > > ** ** > > **** > > ** ** > > ** ** > > _______________________________________________ > mapserver-users mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/mapserver-users > >
_______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
