Stephan,

This might be some newer syntax that I haven’t seen before, but I would try it 
a different way:

DATA “'locaux_etj6_poly”
FILTER (“[unite]” == “SCTA” AND “[dur_occ]” == “permanent”)

Note:  This is no longer using LIKE, but because you didn’t have any wildcards 
in your original expression, I am guessing that you just wanted the exact 
values.  I am not aware of  a ‘LIKE’ comparison in MapServer logical 
expressions, but you could definitely cook up a regular expression if you 
needed one.

You don’t want to use the ‘smart quotes’ like my email client inserted.  Just 
use plain double quotes.

Case sensitivity may apply to the column names, it will definitely apply to the 
values.

David.



From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stephan Legere
Sent: Monday, December 20, 2010 8:17 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] DATA and SUBSET keywords

Hi everyone,

I’m a newbie using MapServer and, writing my map file, I come to a problem 
which seems unsolvable to me: I would like to represent only some features from 
a shapefile, based on a simple SQL statement between the attributes of the 
respective shapefile. I tried to use the map file exported from Qgis which 
looks like:
…
LAYER
    NAME 'SCTA_perm_6'
    TYPE POLYGON
    DUMP true
    DATA 'locaux_etj6_poly.shp'|layerid=0|subset="unite" LIKE 'SCTA' AND 
"dur_occ" LIKE 'permanent''
    STATUS OFF
    TRANSPARENCY 100
…
but it is not working: loadLayer(): Unknown identifier. Parsing error near 
(|):(line 464)

I tried to find some detailed information or examples using DATA and(or) SUBSET 
keywords but I didn’t found something useful. So, can anyone explain me what is 
wrong, how to do this or where to find some documentation on this.

Thank you in advance.

Stephan


_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to