# This dbfawk file is used to map arbitrary dbf data that accompanies # a shapefile into Xastir canoncical values of: # key - search key # lanes - width of feature (usually a road but applies to rivers, etc. too) # color - color to draw the road # name - name of the road for labels # filled - whether a polygon is drawn filled or not # pattern - line pattern for road, river, etc. # display_level - highest zoom level at which to display the feature # label_level - highest zoom level at which to display the label # symbol - 3 char 'TIO': table, ID, overlay # # NOTE: This file format is modeled after awk but is nowhere near awk # compatible. # # This file is used for shapefiles produced by FME Workbench acting on # USGS DLG (Optional) format transfers for road layers. # BEGIN is called once per dbf file which contains multiple records. BEGIN { # dbfinfo is the "signature" of the dbf file listing the column names in order. # dbfinfo should match the dbf file that we say this dbfawk file goes with. dbfinfo="NUMBER:DLG_TYPE:CODE_LIST:CATEGORY:DESCRIPTIO:COINCIDENT:NUMBEROFLA:ROUTENUMBE:ROUTETYPE"; # dbffields is which of the above fields we actually want to look at. dbffields="CODE_LIST:ROUTENUMBE"; } # BEGIN_RECORD is called once per dbf record which contains multiple fields. # Use this rule to re-initialize variables between records. BEGIN_RECORD {key=""; lanes=1; color=12; name=""; filled=0; pattern=0; display_level=1; label_level=128; label_color=8; symbol=""; font_size=3} # don't need special end case handling... # Highways /^CODE_LIST=.*170-201.*$/ {lanes=4; color=12;display_level=1024;} /^CODE_LIST=.*170-202.*$/ {lanes=4; color=12;display_level=1024;} /^CODE_LIST=.*170-203.*$/ {lanes=4; color=12;display_level=1024;} /^CODE_LIST=.*170-204.*$/ {lanes=4; color=12;display_level=1024;} # state roads and such /^CODE_LIST=.*170-205.*$/ {lanes=2; color=11;display_level=1024;} /^CODE_LIST=.*170-206.*$/ {lanes=2; color=11;display_level=1024;} /^CODE_LIST=.*170-207.*$/ {lanes=2; color=11;display_level=1024;} /^CODE_LIST=.*170-208.*$/ {lanes=2; color=11;display_level=1024;} # streets /^CODE_LIST=.*170-209.*$/ {lanes=1; color=8;display_level=128;} /^CODE_LIST=.*170-210.*$/ {lanes=1; color=8;display_level=128;} # hiking trails and jeep roads /^CODE_LIST=.*170-211.*$/ {lanes=2; color=4; pattern=1;display_level=128;} /^CODE_LIST=.*170-212.*$/ {lanes=2; color=24; pattern=1;display_level=128;} # Now look for a coded route number # State roads /^CODE_LIST=.*174-([\d]*).*$/ {name="S.R. $1";} # US Routes /^CODE_LIST=.*173-([\d]*).*$/ {name="US $1"; } # Interstate Highways /^CODE_LIST=.*172-([\d]*).*$/ {name="I-$1"; } # County roads /^CODE_LIST=.*176-([\d]*).*$/ {name="C.R. $1";} #END_RECORD {name="$name ($key)";} #END {}