[mapserver-users] RE: Real life sample of a Mapfile for shp files on WMS

Fawcett, David (MPCA) David.Fawcett at state.mn.us
Tue Nov 9 10:04:15 EST 2010


Matt, 

It looks like Steve Lime's regular expression example will get you what you are looking for.  

One strategy to think about with MapServer (and any other Web map server) is that when you are looking for the best performance, you want to pre-process your data as much as possible.  This means pre-classifying your data if complicated expressions are necessary, projecting your data to get it all in the same spatial reference system, etc.  

MapServer can do on-the-fly projection, complicated expressions, etc. pretty efficiently.  But, if you can do these tasks once in pre-processing, they won't have to be done every time someone makes a map request.  

In your case, if performance matters, I would consider creating a new column in your data source and splitting out the two 'tags'.  An expression that is an exact string match will be faster than a more complicated expression.  

David.

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of wildcolour
Sent: Monday, November 08, 2010 5:29 PM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] RE: Real life sample of a Mapfile for shp files on WMS


Thanks, this looks great.
I will try it tonight, but I think is looking just right.
One more related question.  The column we are using is called 'Tag'
and the seemed to have grouped the 'class' and the 'title' in the one
column.  For example all secondary roads have the tag
"TVOP2"
but roads with the name 'smith st' will look like this
"TVOP2,SMITH ST"
So my  question is in the expression can I do a 'is like' query??  I am
guessing somthing like this
EXPRESSION 'TVOP2%'

Thanks for the great support

Matt  :)

-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Real-life-sample-of-a-Mapfile-for-shp-files-on-WMS-tp5718787p5719102.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list