Explanation of BNA
The boundary files on this Archive are in BNA format, a generic ascii file structure. We typically compress the files using ZIP, which means FTP retrieval mode should be BINARY. All files on this Archive are zipped with the "-l" flag, meaning UNIX LF are transformed into DOS CR-LF. UNIX users should unzip the files with the "-a" flag (cmd: unzip -a filename).
The BNA file structure was chosen because it allows us to pack the most information into the header files. Simple scripts can quickly transform the BNA format into other formats using programming languages like Perl or C. We are in the process of developing C programs to do this, but have not finished this 'low-priority' task. Users can also use the SMI product Import/Export, for example, to import a BNA file and export many other formats (including Arc E00 export files).
The BNA files readily import into SMI's product Import/Export with the following command (unzip the files first):
ie b26145.bna /names 4
The option "names" informs the IE program that there are 4 names on the header file. Be sure to use version 2.0 (the DOS version) of the IE program. It will handle the "names 4" options and will not screw up the17-character POLID for census blocks. The windows version is NOT handling this properly. Once you have created DOS Atlas databases, open them up in Atlas/win and the conversion will take place automatically.
BNA file structure: A polygon is completely defined in the following manner (BNA also handles lines and circles but those features are not found in this Archive so I will skip them). Also, on this Archive, you may assume that there will always be 3 XY pairs per line(this is not a BNA requirement).
AX1, AY1 AX2, AY2 AX3,AY3
AXN, AXN AX1, AY1 BX1, BY1
BX2, BY2 BY3, BY3 ...
BXN, BYN AX1, AY1
Each polygon has a header record of 4 fields, enclosed in quotes(character) and a fifth numeric field. The fifth field is the total number of XY pairs used in describing a polygon. There will always be 3pairs per record, except for the last one, of course, which may have one, two or three. NAME1 is POLID (the polygon ID). The POLID width may vary depending on the geographic layer of interest, which is defined byNAME4. POLID is structured:
ss = state FIPS code
ccc = county FIPS code
tttt.tt = tract code
bbbb = block code, first b identifies blockgroup code, last b
is usually missing but may be ABC...etc.
Refer to the file "tracts.txt" for more information on the tract code, and file "water.txt" for more information on block codes. The files"stfips.txt" and "stcofips.txt" list the FIPS codes for state and counties.
NAME2 is either an english name, if appropriate (like Saginaw County) ora brief string from POLID (like 101 for block 101). NAME3 is identical to NAME1 prefixed with a numeric representation of NAME4. This is done since certain GIS packages need any feature to be unique within the entire database. NAME1 is unique within its entire layer of occurrence, not the entire database (although one could argue that because of the variable length it really is).
1=blk 2=blkgrp 3=tract 4=fmcd 5=county
6=fplace 7=tract80 8=mcd80 9=apuma 10=bpuma
0=state 11=metro 12=zip
The example above depicts a polygon description which consists of 2areas. First, a starting point of the first area is given AX1, AY1. This is followed by N X,Y pairs describing the polygon in counter clockwise orientation. The area is then closed by repeating the starting pointAX1, AY1.
If the area consists of only one geographical unit, the polygon description is complete and another header record follows for the next polygon. However, if the area contains an internal lake or an external area, the description of that area immediately follows. The second area is described in a similar manner by giving a starting point BX1, BY1. N number of XY pairs follow and the second area is closed by repeating that starting point BX1, BY1. Following this, the polygon itself is closed by repeating the very first starting point of the polygon AX1, AY1.
Notice that this will not handle true "figure-eights" since a single point is shared across two geographic areas. In order to avoid problems, if we did encounter this shape, we shifted the problem point over by0.000001 lat-or-long-or-both.
There are problems using AGIS/Windows when linking BNA to CSV files. Please consult the file "bnaprob.txt" . Look for this file in the /pub/census/usa/tiger/xx/bnablk/ directory (where xx is the state).