1#
2# Copyright (C) 2000-2019 The Xastir Group
3#
4# This dbfawk file is used to map arbitrary dbf data that accompanies
5# a shapefile into Xastir canoncical values of:
6#   key     - search key
7#   lanes   - width of feature (usually a road but applies to rivers, etc. too)
8#   color   - color to draw the road
9#   name    - name of the road for labels
10#   filled  - whether a polygon is drawn filled or not
11#   fill_color - color to fill polygon with
12#   pattern - line pattern for road, river, etc.
13#   display_level - highest zoom level at which to display the feature
14#   label_level - highest zoom level at which to display the label
15#   symbol  - 3 char 'TIO': table, ID, overlay
16# NOTE: This file format is modeled after awk but is nowhere near awk
17#  compatible.
18#
19# This file is used to map US Census Tiger/Line "plc" shapefiles which are
20# named tgrSSCCCplc00.dbf, where SSCCC are the FIPS state and county codes.
21
22# BEGIN is called once per dbf file which contains multiple records.
23BEGIN {
24# dbfinfo is the "signature" of the dbf file listing the column names in order.
25# dbfinfo should match the dbf file that we say this dbfawk file goes with.
26dbfinfo="ID:COUNTY:PLACE:NAME";
27# dbffields is which of the above fields we actually want to look at.
28# No point reading dbffields that are not looked at further.
29dbffields="NAME";
30}
31
32# BEGIN_RECORD is called once per dbf record which contains multiple fields.
33# Use this rule to re-initialize variables between records.
34# use color 11 to highlight stuff that isn't properly mapped.
35BEGIN_RECORD {key=""; lanes=3; color=4; fill_color=103; name=""; filled=1; pattern=0; display_level=8192; label_level=256; label_color=8; font_size=2; symbol=""}
36
37/^NAME=(.*)$/ {name="$1"; next}
38