# $Id: tgrwat.dbfawk,v 1.2 2003/09/09 13:56:57 n2ygk Exp $ # 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 meant to be used with the National Atlas shapefile map of # US States, "statesp020.shp", available from http://www.nationalatlas.gov/ # # 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:STATESP020: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="AREA:STATE"; } # 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=3; color=8; name=""; filled=0; pattern=0; display_level=65535; label_level=16384; label_color=12; symbol=""; font_size=3} #Do not label tiny areas except at smallest zoom level --- there are many # tiny polygons for islands that would look ridiculous, and some states that # are smaller than their names /^AREA=1\.(.*)$/ {label_level=4096;} /^AREA=0\.[5-9](.*)$/ {label_level=1024;} /^AREA=0\.[1-4](.*)$/ {label_level=2048;} /^AREA=0\.0(.*)$/ {label_level=0;} /^STATE=(.*)$/ {name="$1";} # Now each state needs to be colored so it doesn't border any other state of # the same color. This was done by hand. #These states get plum2 /^STATE=Maine$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=103; next;} /^STATE=New Y(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=103; next;} /^STATE=Rhode(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=103; next;} /^STATE=Dela(.*)/ {filled=1;fill_style=2;fill_stipple=0; fill_color=103; next;} /^STATE=Kent(.*)/ {filled=1;fill_style=2;fill_stipple=0; fill_color=103; next;} /^STATE=Mich(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=103; next;} /^STATE=Ill(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=103; next;} /^STATE=Ark(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=103; next;} /^STATE=M[io]n(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=103; next;} /^STATE=Wash(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=103; next;} /^STATE=Ala(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=103; next;} /^STATE=South C(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=103; next;} /^STATE=Kans(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=103; next;} /^STATE=New Me(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=103; next;} /^STATE=Nev(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=103; next;} # These states get cyan2 /^STATE=New H(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=102; next;} /^STATE=Conn(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=102; next;} /^STATE=Mary(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=102; next;} /^STATE=North C(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=102; next;} /^STATE=Ohio(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=102; next;} /^STATE=Wisc(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=102; next;} /^STATE=Miss(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=102; next;} /^STATE=Neb(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=102; next;} /^STATE=Ut(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=102; next;} /^STATE=Cal(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=102; next;} /^STATE=Tex(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=102; next;} /^STATE=Flo(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=102; next;} /^STATE=Mas(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=101; next;} #these states get MediumBlue /^STATE=New J(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=104; next;} /^STATE=West V(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=104; next;} /^STATE=Tenn(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=104; next;} /^STATE=South D(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=104; next;} /^STATE=Col(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=104; next;} /^STATE=Ida(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=104; next;} /^STATE=Ari(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=104; next;} /^STATE=Vermont/ {filled=1;fill_style=2;fill_stipple=0; fill_color=98; next;} /^STATE=Penn(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=98; next;} /^STATE=Vir(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=98; next;} /^STATE=India(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=98; next;} /^STATE=Iow(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=98; next;} /^STATE=Wyo(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=98; next;} /^STATE=Ore(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=98; next;} /^STATE=Geor(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=98; next;} /^STATE=Lou(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=98; next;} /^STATE=Okl(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=98; next;} /^STATE=North D(.*)$/ {filled=1;fill_style=2;fill_stipple=0; fill_color=98; next;}