[Mapserver-users] Regular expression.

Vinko Vrsalovic vinko at cprsig.cl
Mon Feb 24 15:14:05 EST 2003


On Tue, Feb 25, 2003 at 12:25:26AM +0700, krung wrote:
> 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.

This was recently discussed on the list, and DBF indexes are not
supported yet in MapServer, a good alternative is to use PostGIS as
the indexes work there. BTW, how big is your shapefile?

-- 
Vinko Vrsalovic <el[|- at -|]vinko.cl>
http://www.cprsig.cl



More information about the mapserver-users mailing list