# 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 sdts2shp acting on # USGS SDTS DLG 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="SDTSRecId:LeftPoly:RightPoly:StartNode:EndNode:ENTITY_LAB:ARBITRARY_:RELATION_T:VERTICAL_R:OPERATIONA:ACCESS_RES:OLD_RAILRO:WITH_RAILR:COVERED:HISTORICAL:LIMITED_AC:PHOTOREVIS:LANES:ROAD_WIDTH:BEST_ESTIM:FUNCTIONAL:ROUTE_NUMB:ROUTE_TYPE"; # dbffields is which of the above fields we actually want to look at. dbffields="ENTITY_LAB:ROUTE_NUMB"; } # 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 /^ENTITY_LAB=1700201$/ {lanes=4; color=12;display_level=1024;next;} /^ENTITY_LAB=1700202$/ {lanes=4; color=12;display_level=1024;next;} /^ENTITY_LAB=1700203$/ {lanes=4; color=12;display_level=1024;next;} /^ENTITY_LAB=1700204$/ {lanes=4;color=12;display_level=1024;next;} # state roads and such /^ENTITY_LAB=1700205$/ {lanes=2;color=11;display_level=1024;next;} /^ENTITY_LAB=1700206$/ {lanes=2;color=11;display_level=1024;next;} /^ENTITY_LAB=1700207$/ {lanes=2;color=11;display_level=1024;next;} /^ENTITY_LAB=1700208$/ {lanes=2;color=11;display_level=1024;next;} # streets /^ENTITY_LAB=1700209$/ {lanes=1;color=8;display_level=128;next;} /^ENTITY_LAB=1700210$/ {lanes=1;color=8;display_level=128;next;} # hiking trails and jeep roads /^ENTITY_LAB=1700211$/ {lanes=2; pattern=1; color=4;display_level=128;next;} /^ENTITY_LAB=1700212$/ {lanes=2; pattern=1; color=24;display_level=128;next;} #/^ENTITY_LAB=(.*)$/ {name="$1";next;} #/^ENTITY_LAB=$/ {display_level=1;next;} #/^ROUTE_NUMB=$/ {skip;} /^ROUTE_NUMB=(.*)$/ {name="$1"; next;} #END_RECORD {name="$name ($key)";} #END {}