class expressions in PHP/Mapscript

Jeff Portwine jdport at VERITIME.COM
Mon Mar 28 14:22:09 EST 2005


I am trying to add a more "general" version of a "roads" layer to my maps that I could use instead of the Tiger line data while the maps being generated are not zoomed in.    When the maps are zoomed in closer I want to switch to the Tiger data and go from there.    I've downloaded a major roads layer from the national map website called "roadtrl20".   The problem is that it doesn't use fields like "CFCC" like tiger does, it simply has a "NAME" field and a "Feature" field.   The Feature field has strings like "Limited Access Highway Alternate Route", "Other Through HIghway", "Principle Highway", etc.... descriptions that are vague at best as they don't tell me if it is an interstate or  what.... and there are several descriptions that could be the same thing.

In the "Name" field, it has things like  "Interstate Route 1",  "State Route", "US Route", etc... which is a little more useful except again there are several versions of things like "Interstate"  (Alternate Interstate, Business Interstate, etc)  and to make it more complicated many of them show several names separated by comma's.      

So, it's difficult to come up with a good expression to separate the different types of roads... I thought I could do it in mapscript just reading the different "Names" into a variable and manipulating that variable to give me one word like "Interstate", "State", "US" that I could then use in my "expression" clause.     

I thought I could do something similar to get the route number alone to use for labeling purposes (I'd like to superimpose the route # on a graphic of an interstate sign, etc).     I can't see any methods though that allow me to access the information from the shapefile to do this..    Is this possible, or am I just making this a lot more complicated that I need to?

Thanks, 
Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050328/635b558e/attachment.html


More information about the mapserver-users mailing list