[Xastir] Update on TIGER 2007 FE maps...

Richard Polivka, N6NKO r.polivka at sbcglobal.net
Sat Apr 12 09:24:15 EDT 2008


Here is an update.

Let's start with mapfile organization. For each state, I am putting each 
type of file at the county level into its own subdirectory, such as 
/usr/local/share/xastir/maps/US/states/WI/arealm and 
/usr/local/share/xastir/maps/US/states/WI/areawater. This makes setting 
up the map layering easier.

Layer      directory
1000       arealm
1001       place (state level file)
1002       areawater
1003       edges
1004       pointlm
1005       county (state level file)

The consistency of these files from county-to-county and state-to-state 
is all over the place, so for each state, you may have to do some pick'n 
choose. The layering is quite important here. As an example, if there is 
a lake within a park and both are colored, the lake is blue and the park 
is green, the wrong layering will hide the water.

Also, I recommend installing Quantum GIS (qgis) on your system. This is 
a good editor to use on the files. Layer them in the program in the same 
above sequence and editing, additions, and subtractions become easy. 
That is how I have been filling in all of the missing goodies for here 
in Milwaukee County.

Here are the current .dbfawk's that I have use. These are still a 
work-in-progress, so be warned.

tgr2007arealm.dbfawk:


# tgr2007arealm.dbfawk
#
# Copyright (C) 2003-2008  The Xastir Group
#
# Census.gov 2007-FE TigerMaps for AREALM
# Richard Polivka, N6NKO - April, 2008
#
#
# 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
#   fill_color - color to fill polygon with
#   pattern - line pattern for road, river, etc. (0 - solid; 1 - dash; 2 
- double dash)
#   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 to map US Census Tiger/Line Shapefiles as available at:
# http://www.census.gov/cgi-bin/geo/shapefiles/national-files
#

# 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="STATEFP:COUNTYFP:COUNTYNS:ANSICODE:AREAID:FULLNAME:MTFCC";
#dbffields is which of the above fields we actually want to look at.
# No point reading dbffields that are not looked at further.
dbffields="FULLNAME:MTFCC";
}

# BEGIN_RECORD is called once per dbf record which contains multiple fields.
# Use this rule to re-initialize variables between records.
# use color 11 to highlight stuff that isn't properly mapped.
BEGIN_RECORD {key=""; lanes=1; color=6; fill_color=11; name=""; 
filled=0; pattern=0; display_level=8192; label_level=64; label_color=8; 
font_size=0; symbol=""; fill_style=0 }

/^FULLNAME=(.*)$/ {name="$1";next}
# item locations
/^MTFCC=C3/ {display_level=64; next}
# water
/^MTFCC=H20/ {filled=1; fill_style=2; fill_stipple=1; color=97; 
fill_color=97; label_color=26; display_level=1024; next}
/^MTFCC=H30/ {filled=1; fill_style=2; fill_stipple=1; color=97; 
fill_color=97; label_color=26; display_level=1024; next}
# buildings
/^MTFCC=K1/ {filled=1; fill_style=2; fill_stipple=1; color=11; 
fill_color=11; label_color=8; label_level=64; display_level=1024; 
font_size=1; next}
# public university / school
/^MTFCC=K25/ {filled=1; fill_style=2; fill_stipple=1; color=4; 
fill_color=4; label_color=8; label_level=64; display_level=1024;  
font_size=1; next}
# airports
/^MTFCC=K24/ {filled=1; fill_style=2; fill_stipple=1; color=42; 
fill_color=42; label_color=8; label_level=64; display_level=1024;  
font_size=1; next}
# parks
/^MTFCC=K2/ {filled=1; fill_style=2; fill_stipple=1; color=35; 
fill_color=35; label_color=8; label_level=64; display_level=1024; 
font_size=1; next}
# private / religious school
/^MTFCC=K35/ {filled=1; fill_style=2; fill_stipple=1; color=4; 
fill_color=4; label_color=8; label_level=64; display_level=1024;  ; 
font_size=1; next}
# PLCC
/^MTFCC=L/ {display_level=64; next}
# legal / statistical boundary
/^MTFCC=P0001/ {display_level=64; next}
# water shoreline
/^MTFCC=P0002/ {display_level=1240; color=9; fill_color=9; next}
# water intermittent shoreline
/^MTFCC=P0003/ {display_level=1240; color=9; fill_color=9; next}
# non-visible boundary
/^MTFCC=P0004/ {display_level=64; next}
# railroad
/^MTFCC=R/ {lanes=1; color=8; pattern=1; display_level=128; next}
# Limited access road
/^MTFCC=S11/ {lanes=4; color=4; label_level=512; font_size=3; next}
# secondary road
/^MTFCC=S12/ {display_level=1024; lanes=3; color=8; label_level=256; 
font_size=2; next}
# local road
/^MTFCC=S14/ {display_level=256; label_level=16; color=40; lanes=1; next}
# 4WD off-road trail
/^MTFCC=S15/ {lanes=2; color=40; display_level=64; font_size=1; next}
# Freeway access / service drive
/^MTFCC=S16/ {color=40; display_level=64; next}
# walkway / stairway
/^MTFCC=S17[12]/ {lanes=1; color=12; pattern=2; display_level=64; next}
# alley / private road
/^MTFCC=S17[34]/ {lanes=1; color=40; pattern=2; display_level=64; next}
# bike / bridle path
/^MTFCC=S18/ {lanes=1; color=40; pattern=2; display_level=64; next}
# road median
/^MTFCC=S20/ {lanes=1; color=40; pattern=2; display_level=64; next}
# just a demo of the END_RECORD and END rules:
#END_RECORD {name="$name ($key)";}
#END {}

---------------------------------------------------------------

tgr2007place.dbfawk

# tgr2007place.dbfawk
#
# Copyright (C) 2003-2008  The Xastir Group
#
# Census.gov 2007-FE TigerMaps for PLACE
# Richard Polivka, N6NKO - April, 2008
#
#
# 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
#   fill_color - color to fill polygon with
#   pattern - line pattern for road, river, etc. (0 - solid; 1 - dash; 2 
- double dash)
#   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 to map US Census Tiger/Line Shapefiles as available at:
# http://www.census.gov/cgi-bin/geo/shapefiles/national-files
#

# 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="STATEFP:PLACEFP:PLACENS:PLCIDFP:NAME:NAMELSAD:LSAD:CLASSFP:CPI:PCICBSA:PCINECTA:MTFCC:UR:FUNCSTAT";
#dbffields is which of the above fields we actually want to look at.
# No point reading dbffields that are not looked at further.
dbffields="NAME:MTFCC";
}

# BEGIN_RECORD is called once per dbf record which contains multiple fields.
# Use this rule to re-initialize variables between records.
# use color 11 to highlight stuff that isn't properly mapped.
BEGIN_RECORD {key=""; lanes=1; color=6; fill_color=11; name=""; 
filled=0; pattern=0; display_level=8192; label_level=32; label_color=8; 
font_size=0; symbol=""; fill_style=0 }

/^NAME=(.*)$/ {name="$1";next}
# item locations
/^MTFCC=C3/ {display_level=32; next}
# places
/^MTFCC=G41/ {filled=0; fill_style=2; fill_stipple=2; label_color=8; 
fill_color=12; label_level=256; display_level=256; font_size=2; next}
/^MTFCC=G42/ {filled=1; fill_style=2; fill_stipple=2; label_color=13; 
fill_color=13; label_level=256; display_level=256; font_size=2; next}
# water
/^MTFCC=H20/ {filled=1; fill_style=2; fill_stipple=2; color=117; 
fill_color=117; label_color=26; display_level=1024; next}
/^MTFCC=H30/ {filled=1; fill_style=2; fill_stipple=2; color=117; 
fill_color=117; label_color=26; display_level=1024; next}
# buildings
/^MTFCC=K1/ {filled=1; fill_style=2; fill_stipple=2; color=11; 
fill_color=11; label_color=26; label_level=32; display_level=1024; next}
# parks
/^MTFCC=K2/ {filled=1; fill_style=2; fill_stipple=2; color=100; 
fill_color=100; label_color=26; label_level=32; display_level=1024; next}
# PLCC
/^MTFCC=L/ {display_level=32; next}
# legal / statistical boundary
/^MTFCC=P0001/ {display_level=32; next}
# water shoreline
/^MTFCC=P0002/ {display_level=1240; color=9; fill_color=9; next}
# water intermittent shoreline
/^MTFCC=P0003/ {display_level=1240; color=9; fill_color=9; next}
# non-visible boundary
/^MTFCC=P0004/ {display_level=32; next}
# railroad
/^MTFCC=R/ {lanes=1; color=8; pattern=1; display_level=128; next}
# Limited access road
/^MTFCC=S11/ {lanes=4; color=4; label_level=512; font_size=3; next}
# secondary road
/^MTFCC=S12/ {display_level=1024; lanes=3; color=8; label_level=256; 
font_size=2; next}
# local road
/^MTFCC=S14/ {display_level=256; label_level=16; color=40; lanes=1; next}
# 4WD off-road trail
/^MTFCC=S15/ {lanes=2; color=40; display_level=64; font_size=1; next}
# Freeway access / service drive
/^MTFCC=S16/ {color=40; display_level=64; next}
# walkway / stairway
/^MTFCC=S17[12]/ {lanes=1; color=12; pattern=2; display_level=64; next}
# alley / private road
/^MTFCC=S17[34]/ {lanes=1; color=40; pattern=2; display_level=64; next}
# bike / bridle path
/^MTFCC=S18/ {lanes=1; color=40; pattern=2; display_level=64; next}
# road median
/^MTFCC=S20/ {lanes=1; color=40; pattern=2; display_level=64; next}
# just a demo of the END_RECORD and END rules:
#END_RECORD {name="$name ($key)";}
#END {}

------------------------------------------------------

tgr2007areawater.dbfawk

# tgr2007areawater.dbfawk
#
# Copyright (C) 2003-2008  The Xastir Group
#
# Census.gov 2007-FE TigerMaps for AREAWATER
# Richard Polivka, N6NKO - April, 2008
#
#
# 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
#   fill_color - color to fill polygon with
#   pattern - line pattern for road, river, etc. (0 - solid; 1 - dash; 2 
- double dash)
#   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 to map US Census Tiger/Line Shapefiles as available at:
# http://www.census.gov/cgi-bin/geo/shapefiles/national-files
#

# 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="STATEFP:COUNTYFP:COUNTYNS:ANSICODE:HYDROID:FULLNAME:MTFCC";
#dbffields is which of the above fields we actually want to look at.
# No point reading dbffields that are not looked at further.
dbffields="FULLNAME:MTFCC";
}

# BEGIN_RECORD is called once per dbf record which contains multiple fields.
# Use this rule to re-initialize variables between records.
# use color 11 to highlight stuff that isn't properly mapped.
BEGIN_RECORD {key=""; lanes=1; color=26; fill_color=26; name=""; 
filled=0; pattern=0; display_level=8192; label_level=32; label_color=26; 
font_size=0; symbol=""; fill_style=0 }

/^FULLNAME=(.*)$/ {name="$1";next}
# item locations
/^MTFCC=C3/ {display_level=32; next}
# water
/^MTFCC=H20/ {filled=1; fill_style=2; fill_stipple=1; color=117; 
fill_color=117; label_color=8; label_level=64; display_level=1024; next}
/^MTFCC=H30/ {filled=1; fill_style=2; fill_stipple=1; color=117; 
fill_color=117; label_color=8; label_level=64; display_level=1024; next}
# buildings
/^MTFCC=K1/ {filled=1; fill_style=2; fill_stipple=2; color=11; 
fill_color=11; label_color=26; label_level=64; display_level=1024; next}
# parks
/^MTFCC=K2/ {filled=1; fill_style=2; fill_stipple=2; color=100; 
fill_color=100; label_color=26; label_level=64; display_level=1024; next}
# PLCC
/^MTFCC=L/ {display_level=32; next}
# legal / statistical boundary
/^MTFCC=P0001/ {display_level=32; next}
# water shoreline
/^MTFCC=P0002/ {display_level=1240; color=9; fill_color=9; next}
# water intermittent shoreline
/^MTFCC=P0003/ {display_level=1240; color=9; fill_color=9; next}
# non-visible boundary
/^MTFCC=P0004/ {display_level=32; next}
# railroad
/^MTFCC=R/ {lanes=1; color=8; pattern=1; display_level=128; next}
# Limited access road
/^MTFCC=S11/ {lanes=4; color=4; label_level=512; font_size=3; next}
# secondary road
/^MTFCC=S12/ {display_level=1024; lanes=3; color=8; label_level=256; 
font_size=2; next}
# local road
/^MTFCC=S14/ {display_level=256; label_level=16; color=40; lanes=1; next}
# 4WD off-road trail
/^MTFCC=S15/ {lanes=2; color=40; display_level=64; font_size=1; next}
# Freeway access / service drive
/^MTFCC=S16/ {color=40; display_level=64; next}
# walkway / stairway
/^MTFCC=S17[12]/ {lanes=1; color=12; pattern=2; display_level=64; next}
# alley / private road
/^MTFCC=S17[34]/ {lanes=1; color=40; pattern=2; display_level=64; next}
# bike / bridle path
/^MTFCC=S18/ {lanes=1; color=40; pattern=2; display_level=64; next}
# road median
/^MTFCC=S20/ {lanes=1; color=40; pattern=2; display_level=64; next}
# just a demo of the END_RECORD and END rules:
#END_RECORD {name="$name ($key)";}
#END {}

--------------------------------------------------

tgr2007edges.dbfawk

# tgr2007edge.dbfawk
#
# Copyright (C) 2003-2008  The Xastir Group
#
# Census.gov 2007-FE TigerMaps for EDGE
# Richard Polivka, N6NKO - April, 2008
#
#
# 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
#   fill_color - color to fill polygon with
#   pattern - line pattern for road, river, etc. (0 - solid; 1 - dash; 2 
- double dash)
#   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 to map US Census Tiger/Line Shapefiles as available at:
# http://www.census.gov/cgi-bin/geo/shapefiles/national-files
#

# 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="STATEFP:COUNTYFP:COUNTYNS:TLID:TFIDL:TFIDR:MTFCC:FULLNAME:SMID:LFROMADD:LTOADD:RFROMADD:RTOADD:ZIPL:ZIPR:FEATCAT:HYDROFLG:RAILFLG:ROADFLG:OLFFLG:PASSFLG:DIVROAD:EXTTYP:TTYP:DECKEDROAD:ARTPATH";
#dbffields is which of the above fields we actually want to look at.
# No point reading dbffields that are not looked at further.
dbffields="TLID:MTFCC:FULLNAME";
}

# BEGIN_RECORD is called once per dbf record which contains multiple fields.
# Use this rule to re-initialize variables between records.
# use color 11 to highlight stuff that isn't properly mapped.
BEGIN_RECORD {key=""; lanes=1; color=6; fill_color=11; name=""; 
filled=0; pattern=0; display_level=8192; label_level=32; label_color=8; 
font_size=0; symbol=""; fill_style=0 }

/^FULLNAME=(.*)$/ {name="$1";next}
# item locations
/^MTFCC=C3/ {display_level=32; next}
# water
/^MTFCC=H20/ {filled=1; fill_style=2; fill_stipple=2; color=117; 
fill_color=117; label_color=8; display_level=1024; next}
/^MTFCC=H30/ {filled=1; fill_style=2; fill_stipple=2; color=117; 
fill_color=117; label_color=8; display_level=1024; next}
# buildings
/^MTFCC=K1/ {filled=1; fill_style=2; fill_stipple=2; color=11; 
fill_color=11; label_color=8; label_level=32; display_level=1024; next}
# parks
/^MTFCC=K2/ {filled=1; fill_style=2; fill_stipple=2; color=100; 
fill_color=100; label_color=8; label_level=32; display_level=1024; next}
# PLCC
/^MTFCC=L4/ {filled=1; lanes=1; fill_style=2; fill_stipple=2; color=5; 
fill_color=5; label_color=8; label_level=64; display_level=64; next}
# legal / statistical boundary
/^MTFCC=P0001/ {display_level=0; next}
# water shoreline
/^MTFCC=P0002/ {display_level=1240; color=9; fill_color=9; next}
# water intermittent shoreline
/^MTFCC=P0003/ {display_level=1240; color=9; fill_color=9; next}
# non-visible boundary
/^MTFCC=P0004/ {display_level=0; next}
# railroad
/^MTFCC=R/ {lanes=1; color=8; pattern=1; display_level=128; next}
# Limited access road
/^MTFCC=S11/ {lanes=4; color=4; label_level=512; font_size=3; next}
# secondary road
/^MTFCC=S12/ {display_level=1024; lanes=3; color=8; label_level=256; 
font_size=2; next}
# local road
/^MTFCC=S14/ {display_level=256; label_level=16; color=40; lanes=1; next}
# 4WD off-road trail
/^MTFCC=S15/ {lanes=2; color=40; display_level=64; font_size=1; next}
# Freeway access / service drive
/^MTFCC=S16/ {color=40; display_level=64; next}
# walkway / stairway
/^MTFCC=S17[12]/ {lanes=1; color=12; pattern=2; display_level=64; next}
# alley / private road
/^MTFCC=S17[34]/ {lanes=1; color=40; pattern=2; display_level=64; next}
# bike / bridle path
/^MTFCC=S18/ {filled=1; lanes=3; fill_style=2; fill_stipple=2; color=12; 
fill_color=12; label_color=8; label_level=64; display_level=64; next}
# road median
/^MTFCC=S20/ {lanes=1; color=40; pattern=2; display_level=64; next}
# just a demo of the END_RECORD and END rules:
#END_RECORD {name="$name ($key)";}
#END {}

----------------------------------------------

tgr2007pointlm.dbfawk

# tgr2007pointlm.dbfawk
#
# Copyright (C) 2003-2008  The Xastir Group
#
# Census.gov 2007-FE TigerMaps for POINTLM
# Richard Polivka, N6NKO - April, 2008
#
#
# 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
#   fill_color - color to fill polygon with
#   pattern - line pattern for road, river, etc. (0 - solid; 1 - dash; 2 
- double dash)
#   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 to map US Census Tiger/Line Shapefiles as available at:
# http://www.census.gov/cgi-bin/geo/shapefiles/national-files
#

# 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="STATEFP:COUNTYFP:COUNTYNS:POINTID:FULLNAME:MTFCC";
#dbffields is which of the above fields we actually want to look at.
# No point reading dbffields that are not looked at further.
dbffields="FULLNAME:MTFCC";
}

# BEGIN_RECORD is called once per dbf record which contains multiple fields.
# Use this rule to re-initialize variables between records.
# use color 11 to highlight stuff that isn't properly mapped.
BEGIN_RECORD {key=""; lanes=1; color=6; fill_color=11; name=""; 
filled=0; pattern=0; display_level=8192; label_level=32; label_color=8; 
font_size=0; symbol=""; fill_style=0 }

/^FULLNAME=(.*)$/ {name="$1";next}
# item locations
/^MTFCC=C3/ {display_level=0; next}
# water
/^MTFCC=H20/ {filled=1; fill_style=2; fill_stipple=2; color=117; 
fill_color=117; label_color=26; display_level=1024; next}
/^MTFCC=H30/ {filled=1; fill_style=2; fill_stipple=2; color=117; 
fill_color=117; label_color=26; display_level=1024; next}
# buildings
/^MTFCC=K1/ {filled=1; fill_style=2; fill_stipple=2; color=11; 
fill_color=11; label_color=26; label_level=64; display_level=64; next}
# parks
/^MTFCC=K2/ {filled=1; fill_style=2; fill_stipple=2; color=100; 
fill_color=100; label_color=26; label_level=64; display_level=64; next}
# PLCC
/^MTFCC=L/ {display_level=32; next}
# legal / statistical boundary
/^MTFCC=P0001/ {display_level=32; next}
# water shoreline
/^MTFCC=P0002/ {display_level=1240; color=9; fill_color=9; next}
# water intermittent shoreline
/^MTFCC=P0003/ {display_level=1240; color=9; fill_color=9; next}
# non-visible boundary
/^MTFCC=P0004/ {display_level=32; next}
# railroad
/^MTFCC=R/ {lanes=1; color=8; pattern=1; display_level=128; next}
# Limited access road
/^MTFCC=S11/ {lanes=4; color=4; label_level=512; font_size=3; next}
# secondary road
/^MTFCC=S12/ {display_level=1024; lanes=3; color=8; label_level=256; 
font_size=2; next}
# local road
/^MTFCC=S14/ {display_level=256; label_level=16; color=40; lanes=1; next}
# 4WD off-road trail
/^MTFCC=S15/ {lanes=2; color=40; display_level=64; font_size=1; next}
# Freeway access / service drive
/^MTFCC=S16/ {color=40; display_level=64; next}
# walkway / stairway
/^MTFCC=S17[12]/ {lanes=1; color=12; pattern=2; display_level=64; next}
# alley / private road
/^MTFCC=S17[34]/ {lanes=1; color=40; pattern=2; display_level=64; next}
# bike / bridle path
/^MTFCC=S18/ {lanes=1; color=40; pattern=2; display_level=64; next}
# road median
/^MTFCC=S20/ {lanes=1; color=40; pattern=2; display_level=64; next}
# just a demo of the END_RECORD and END rules:
#END_RECORD {name="$name ($key)";}
#END {}

---------------------------------------------------

tgr2007county.dbfawk




# tgr2007county.dbfawk
#
# Copyright (C) 2003-2008  The Xastir Group
#
# Census.gov 2007-FE TigerMaps for COUNTY
# Richard Polivka, N6NKO - April, 2008
#
#
# 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
#   fill_color - color to fill polygon with
#   pattern - line pattern for road, river, etc. (0 - solid; 1 - dash; 2 
- double dash)
#   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 to map US Census Tiger/Line Shapefiles as available at:
# http://www.census.gov/cgi-bin/geo/shapefiles/national-files
#

# 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="STATEFP:COUNTYFP:COUNTYNS:CNTYIDFP:NAME:NAMELSAD:LSAD:CLASSFP:MTFCC:UR:FUNCSTAT";
#dbffields is which of the above fields we actually want to look at.
# No point reading dbffields that are not looked at further.
dbffields="NAME:MTFCC";
}

# BEGIN_RECORD is called once per dbf record which contains multiple fields.
# Use this rule to re-initialize variables between records.
# use color 11 to highlight stuff that isn't properly mapped.
BEGIN_RECORD {key=""; lanes=1; color=6; fill_color=11; name=""; 
filled=0; pattern=0; display_level=8192; label_level=32; label_color=8; 
font_size=0; symbol=""; fill_style=0 }

/^NAME=(.*)$/ {name="$1";next}
# item locations
/^MTFCC=C3/ {display_level=32; next}
# county name / borders
/^MTFCC=G4/ {lanes=4; color=12; label_level=1024; label_color=12; 
font_size=4; next}
# water
/^MTFCC=H20/ {filled=1; fill_style=2; fill_stipple=2; color=117; 
fill_color=117; label_color=26; display_level=1024; next}
/^MTFCC=H30/ {filled=1; fill_style=2; fill_stipple=2; color=117; 
fill_color=117; label_color=26; display_level=1024; next}
# buildings
/^MTFCC=K1/ {filled=1; fill_style=2; fill_stipple=2; color=11; 
fill_color=11; label_color=26; label_level=32; display_level=1024; next}
# parks
/^MTFCC=K2/ {filled=1; fill_style=2; fill_stipple=2; color=100; 
fill_color=100; label_color=26; label_level=32; display_level=1024; next}
# PLCC
/^MTFCC=L/ {display_level=32; next}
# legal / statistical boundary
/^MTFCC=P0001/ {display_level=32; next}
# water shoreline
/^MTFCC=P0002/ {display_level=1240; color=9; fill_color=9; next}
# water intermittent shoreline
/^MTFCC=P0003/ {display_level=1240; color=9; fill_color=9; next}
# non-visible boundary
/^MTFCC=P0004/ {display_level=32; next}
# railroad
/^MTFCC=R/ {lanes=1; color=8; pattern=1; display_level=128; next}
# Limited access road
/^MTFCC=S11/ {lanes=4; color=4; label_level=512; font_size=3; next}
# secondary road
/^MTFCC=S12/ {display_level=1024; lanes=3; color=8; label_level=256; 
font_size=2; next}
# local road
/^MTFCC=S14/ {display_level=256; label_level=16; color=40; lanes=1; next}
# 4WD off-road trail
/^MTFCC=S15/ {lanes=2; color=40; display_level=64; font_size=1; next}
# Freeway access / service drive
/^MTFCC=S16/ {color=40; display_level=64; next}
# walkway / stairway
/^MTFCC=S17[12]/ {lanes=1; color=12; pattern=2; display_level=64; next}
# alley / private road
/^MTFCC=S17[34]/ {lanes=1; color=40; pattern=2; display_level=64; next}
# bike / bridle path
/^MTFCC=S18/ {lanes=1; color=40; pattern=2; display_level=64; next}
# road median
/^MTFCC=S20/ {lanes=1; color=40; pattern=2; display_level=64; next}
# just a demo of the END_RECORD and END rules:
#END_RECORD {name="$name ($key)";}
#END {}

-------------------------------------------

73 from 807,

Richard, N6NKO




More information about the Xastir mailing list