[Mapserver-users] Regular expression.

Vinko Vrsalovic vinko@cprsig.cl
Mon, 24 Feb 2003 17:14:05 -0300


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[|-@-|]vinko.cl>
http://www.cprsig.cl
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users