[Mapserver-users] Regular expression.
Jean-Francois.Doyon at CCRS.NRCan.gc.ca
Jean-Francois.Doyon at CCRS.NRCan.gc.ca
Mon Feb 24 09:19:04 PST 2003
If I rememebr correctly ( I could be wrong ), mapserver applies classes in
order, and a given feature can only belong to one class.
If I do rememebr this correctly, then you should be able to simple write out
your classes in the proper order in the mapfile with only one comparison and
get the same result:
[attr] < 2000
[attr] < 10000
[attr] < 20000
Here (hopefully) a feature would match a given class, and then processing
stops, giving you a "cumulative" effect.
The only potential problem with this way of doing it would be that you
couldn't have "gaps" below the top value (i.e. show ONLY 1000-1999 and
10000-19999).
If however my memory fails me right now and this is incorrect, I would
recommend you look at the spatial indexing tools (shptree*) that come with
MapServer, they can increase performance conciderably. Sorting the shapefile
with "sortshp" based on your attribute might also help?
J.F.
-----Original Message-----
From: krung [mailto:krung at cad.go.th]
Sent: Monday, February 24, 2003 12:25 PM
To: mapserver-users at lists.gis.umn.edu
Subject: [Mapserver-users] Regular expression.
Hi all,
I have a problem about using regexp. My dbf shapefile has one column with
number context. I would like to classify into range of number, e.g.
1000-1999, 10000-19999
How do I write this expression in map file?
CLASSITEM 'num_col'
CLASS
EXPRESSION /.../ <- 1,000 to 1,999
......
END
CLASS
EXPRESSION /.../ <- 10,000 to 19,999
....
END
I wouldn't like to use as:
EXPRESSION ([num_col] >=1000 and [num_col] <=1999)
......
because it is very slow in rendering the image.
Thanks in advance.
Krung
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list