[mapserver-users] DATA and SUBSET keywords

Fawcett, David (MPCA) David.Fawcett at state.mn.us
Mon Dec 20 06:36:01 PST 2010


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-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Stephan Legere
Sent: Monday, December 20, 2010 8:17 AM
To: mapserver-users at 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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20101220/5f6e6d28/attachment.htm>


More information about the MapServer-users mailing list