Control the number of classes for a layer

Stephen Lime steve.lime at dnr.state.mn.us
Wed Sep 22 05:55:00 PDT 1999


Hi Wim: There is a hardcoded limit of 50 classes (which can be changed in map.h, look for MS_MAXCLASSES define) so your problem is most likely related to expression definition. Remember that MapServer expressions are regular expressions
and behave a bit differently. Consider the following 4 expressions:

"1"
"2"
"10"
"12"

Expressions 3 and 4 won't get used as anything containing a 1 or a 2 will get caught by the first 2 expressions. So if we really want to match numbers 1, 2, 10 and 12 as seperate classes we need something like

"^1$"
"^2$"
"^10$"
"^12$"

There are ton's of ways to write those expressions. Also note mapserv uses the first
match not the longest match.

Steve

<<< "Wim Brinkhof" <wbrinkhof at dlwc.nsw.gov.au>  9/21 10:32p >>>
I am a new user of the mapserver and have a problem defining classes for a layer.

I am trying to create a layer with 13 thematic classes using Mapserver version 3.217. Up to 10 it works fine. After that it repeats, displaying features using the first three class definitions again.

Has anybody encountered this problem before?
Is there a way to control the number of classes the mapserver can handle?


Regards,


Wim Brinkhof

Senior Internet Integrator
Information Integration and Coordination Branch
Information Management & Technology Division

Level 4
10 Valentine Avenue
Parramatta NSW 2150
PO Box 3720
Parramatta NSW 2124

Phone: (02) 9895 6193
Fax:      (02) 9895 7834
Email:    wbrinkhof at dlwc.nsw.gov.au
Internet: http://www.dlwc.nsw.gov.au
              http://www.nrims.nsw.gov.au/icmiss





More information about the MapServer-users mailing list