# $Id$ # 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 the hydrology shapefile from National Atlas # 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="AREA:PERIMETER:HYDROGM020:FEATURE:NAME:STATE:STATE_FIPS"; # dbffields is which of the above fields we actually want to look at. # Note that the order we list these is important since we are appending the # word County or Parish depending on what state the county is in. dbffields="FEATURE:NAME"; } # 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=8; fill_color=3; label_color=9; name=""; filled=0; pattern=0; display_level=262144; label_level=2048; symbol=""; font_size=2} # don't need special end case handling... # Only fill lakes, Reservoirs and "Bays, Estuaries or Oceans", not # "swamps or marshes" --- they tend to make all of CONUS cyan /^FEATURE.*=(L.*)/ {filled=1;fill_style=2; fill_stipple=0;} /^FEATURE=(B.*)/ {filled=1; fill_style=2; fill_stipple=0;} /^FEATURE=(R.*)/ {filled=1; fill_style=2; fill_stipple=0; } /^FEATURE=(Stream.*)/ {filled=1; fill_style=2; fill_stipple=0; } /^NAME=(.*)$/ {name="$1 ";} #END_RECORD {name="$name ($key)";} #END {}