Help on tiger, again.

Hermawan Sutantio hermawan_s at HOTMAIL.COM
Wed Mar 2 12:27:44 PST 2005


Thanks Stephen for your help.
It solved my problem.
I'm trying to make a simple 'mapquest' out of these tiger files and I have
several questions below:

1. When I label using the field "FENAME" it will only display the name of
the road object for example "main", is it possible to display using "FENAME"
+ "FETYPE" + "FEDIRS" so that it will be "south main st"?

2. Is it possible to get an interstate highway label symbol like the
inverted rectangle used to commonly denote interstate highways and put the
highway numbers inside it using mapserver? Does the road layer have highway
exit number in it?

Thanks again for all your help. I appreciate it.

Herman Teo





>>>>X-OriginalArrivalTime: 02 Mar 2005 14:01:43.0389 (UTC)
>>>>FILETIME=[5D4918D0:01C51F30]

Hermawan,

Sorry, you didn't post your mapfile last time so I didn't have the whole
picture. CLASSes are like a CASE statement in software and you need a
selector (aka: EXPRESSION) and then some cases (aka: CLASS), then the first
CLASS the gets executed stops evaluation of additional CLASSes for that
object.

So currently, you have no CLASSITEM and no EXPRESSION lines so mapserver is
happy to draw your lines with the first CLASS it encounters.

You will need to identify an attribute field that allows you to
differentiate streets from highways in the Tiger data. This is typically
done with the Tiger CFCC field, (I hope your data has this). Assuming it
does them you need to set "CLASSITEM 'CFCC'" in the layer and set
'EXPRESSION "A[123]"' in the CLASS for "highway". Since class order is
important, you need the "highway" first, then the "Michigan Roads" without
an EXPRESSION which will make if the default catch all class.

-Steve

Hermawan Sutantio wrote:
>Is there an identifier for 'highways' in the roads layer that I seem to be
>missing? I inserted those piece of code as shown below, but the highways
>are
>still drawn in black with size 1. Thanks.
>
>Herman
>
>LAYER
>  NAME "Michigan"
>  TYPE LINE
>  STATUS DEFAULT
>  TILEINDEX "C:\ms4w\apps\gmap\htdocs\michigan\roads-tile"
>  MAXSCALE 50000
>  CLASS
>    NAME "Michigan Roads"
>    COLOR 0 0 0
>    SIZE 1
>  END
>  CLASS
>    NAME "highway"
>    COLOR 255 0 0 # make it red
>    SYMBOL 0 # this is a built in circle symbol
>    SIZE 5 # make it 5 pixels wide
>    # if you want it fancy then add also
>    OVERLAYSYMBOL 0
>    OVERLAYCOLOR 255 255 255 # add a white down the center of the red
>    OVERLAYSIZE 1
>  END
>
>
>
>>>>
>Yes, you can specify thickness like this:
>
>CLASS
>   NAME "highway"
>   COLOR 255 0 0 # make it red
>   SYMBOL 0      # this is a built in circle symbol
>   SIZE 5        # make it 5 pixels wide
>   # if you want it fancy then add also
>   OVERLAYSYMBOL 0
>   OVERLAYCOLOR  255 255 255 # add a white down the center of the red
>   OVERLAYSIZE 1
>END
>
>You can also do this by adding multiple STYLE ... END blocks instead of
>using OVERLAY* where each STYLE is draw in turn to make a more complex
>styling of the line.
>
>-Steve
>
>Herman Teo wrote:
>
>>Hi there.
>>I have been working on tiger files for a while now. I manage to get the
>>feature labels working right now. I'm just wondering, in roads layer, are
>>there ways to make highways stand out in front of the normal roads, such
>>as
>>giving them thicker red lines?
>>Thanks again for all your help.
>>
>>Herman Teo
>>
>



More information about the MapServer-users mailing list