Help Please on Map File

Pericles S. Nacionales naci0002 at UMN.EDU
Fri Jan 20 09:35:22 PST 2006


Gary,

You'll need to use logical expressions to use multiple fields from your table:
LAYER #1
  ...
  CLASS
    ...
    EXPRESSION ('[CATEGORY]' eq 'TS' and '[ENSOPHASE]' eq 'El Nino' and 
'[MAJOR]' eq 'Minor')
  END
  CLASS
    ...
    EXPRESSION ('[CATEGORY]' eq 'H2' and '[ENSOPHASE]' eq 'El Nino' and 
'[MAJOR]' eq 'Minor')
  END
END # Layer 1
LAYER #2
  ...
  CLASS
    ...
    EXPRESSION ('[CATEGORY]' eq 'H4' and '[ENSOPHASE]' eq 'La Nina' and 
'[MAJOR]' eq 'Major')
  END
  CLASS
    ...
    EXPRESSION ('[CATEGORY]' eq 'H3' and '[ENSOPHASE]' eq 'La Nina' and 
'[MAJOR]' eq 'Major')
  END
END # Layer 2

More info on expressions here: 
http://mapserver.gis.umn.edu/docs/reference/mapfile/class

Cheers!
Perry

On Friday 20 January 2006 10:56, Gary Watry wrote:
> Here is what I have
> I have a database with the following
> Fields                Values
> Category              'TS' 'H1' 'H2' 'H3' 'H4' 'H5'
> ENSOPhase             'El Nino' 'La Nina' 'Neutral'
> Major                 'Major' 'Minor'
>
> I know how to filter using the
>
> CLASSITEM "CATERGORY"
>
> CLASS
>    EXPRESSION /H1/
>
> What I need to do is filter by ENSOPhase and Major as well as by Category
> ie.layer #1
> 'TS' 'El Nino' 'Minor'
> 'H2' 'El Nino' 'Minor'
>
> or layer #2
> 'H4' 'La Nina' 'Major'
> 'H3' 'La Nina' 'Major'
>
> I build my symbology off the Category Column

-- 
Pericles S. Nacionales
Conservation Biology Program
University of Minnesota
e-mail: naci0002 at umn.edu



More information about the MapServer-users mailing list