AW: [UMN_MAPSERVER-USERS] Logical Expressions

Arnd Wippermann arndw at WTAL.DE
Thu Nov 16 17:02:36 EST 2006


Hello Eric,

You can change values in the mapfile, when you use substitutions:

Z.Bsp.: EXPRESSION ('[PRJNR]' = '%PRJNR%') in the mapfile

And this in the Mapserver-Request (not WMS-Request)

?mode=map&....&PRJNR=1001&...

Than Mapserver sustitute %PRJNR% with the value 1001.

Arnd Wippermann
http://gis.ibbeck.de/ginfo/ibbOLClient/OpenlayersClient.html



-----Ursprüngliche Nachricht-----
Von: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] Im
Auftrag von D. Eric Keefauver
Gesendet: Donnerstag, 16. November 2006 18:03
An: MAPSERVER-USERS at LISTS.UMN.EDU
Betreff: [UMN_MAPSERVER-USERS] Logical Expressions

New to MS. My question is this: I am wanting to use a logical expression
within a layer in my mapfile. The below expression will render the county
with the exact acreage of '438282.297'. How would I set it to display all
acreages in the field that are < 500,000 ? Syntax? I am running MS4W v
1.4.0.  Also, could this value (500,000) be set by a user through, say, via
a form?

Thanks much

Eric


LAYER
  NAME Michigan_county_eqip
  TYPE POLYGON
  STATUS OFF
  DATA Michigan_county_eqip

  CLASSITEM 'ACRES'
  CLASS
    NAME "ACREAGE" #This is read into the legend
    EXPRESSION '438282.297'
    OUTLINECOLOR 0 0 0
    COLOR 173 216 230
    TEMPLATE "county_eqip.html"
  END
  CLASS # every other county in the state
    NAME "COUNTIES"
    OUTLINECOLOR 211 211 211
    COLOR 119 136 153
    TEMPLATE "county_eqip.html"
  END


  HEADER "county_eqip_header.html"
  FOOTER "county_eqip_footer.html"

  TOLERANCE 3

  DUMP TRUE # allow GML export

END

Eric Keefauver
Research Scientist
Michigan Tech Research Institute (MTRI)
3520 Green Court, Suite 300
Ann Arbor, MI 48105-1579
Phone: 734-302-4724
Fax: 734-302-4991
eric.keefauver at mtu.edu
http://www.mtri.org



More information about the mapserver-users mailing list