Geo::TigerLine::Record::1 - TIGER/Line 2006 Complete Chain Basic Data Record
use Geo::TigerLine::Record::1; @records = Geo::TigerLine::Record::1->parse_file($fh); @records = Geo::TigerLine::Record::1->parse_file($fh, \&callback); $record = Geo::TigerLine::Record::1->new(\%fields); $record->rt(); $record->version(); $record->tlid(); $record->side1(); $record->source(); $record->fedirp(); $record->fename(); $record->fetype(); $record->fedirs(); $record->cfcc(); $record->fraddl(); $record->toaddl(); $record->fraddr(); $record->toaddr(); $record->friaddl(); $record->toiaddl(); $record->friaddr(); $record->toiaddr(); $record->zipl(); $record->zipr(); $record->aianhhfpl(); $record->aianhhfpr(); $record->aihhtlil(); $record->aihhtlir(); $record->census1(); $record->census2(); $record->statel(); $record->stater(); $record->countyl(); $record->countyr(); $record->cousubl(); $record->cousubr(); $record->submcdl(); $record->submcdr(); $record->placel(); $record->placer(); $record->tractl(); $record->tractr(); $record->blockl(); $record->blockr(); $record->frlong(); $record->frlat(); $record->tolong(); $record->tolat();
This is a class representing record type 1 of the TIGER/Line 2006 census geographic database. Each object is one record. It also contains methods to parse TIGER/Line record type 1 files and turn them into objects.
This is intended as an intermediate format between pulling the raw data out of the simplistic TIGER/Line data files into something more sophisticated (a process you should only have to do once). As such, it's not very fast, but its careful, easy to use and performs some verifications on the data being read.
As this class is autogenerated by mk_parsers, think before you modify this file. It's OO, so consider sub-classing instead.
These are simple get/set accessors for each field of a record generated from the TIGER/Line 2006 data dictionary. They perform some data validation.
$data = $record->rt(); $record->rt($data);
Record Type.
Expects alphanumeric data of no more than 1 characters. $data cannot be blank and should be left justified.
$data = $record->version(); $record->version($data);
Version Number.
Expects numeric data of no more than 4 characters. $data cannot be blank and should be left justified.
$data = $record->tlid(); $record->tlid($data);
TIGER/Line ID, Permanent 1-Cell Number.
Expects numeric data of no more than 10 characters. $data cannot be blank and should be right justified.
$data = $record->side1(); $record->side1($data);
Single-Side Source Code.
Expects numeric data of no more than 1 characters. $data can be blank and should be right justified.
$data = $record->source(); $record->source($data);
Linear Segment Source Code.
Expects alphanumeric data of no more than 1 characters. $data can be blank and should be left justified.
$data = $record->fedirp(); $record->fedirp($data);
Feature Direction, Prefix.
Expects alphanumeric data of no more than 2 characters. $data can be blank and should be left justified.
$data = $record->fename(); $record->fename($data);
Feature Name.
Expects alphanumeric data of no more than 30 characters. $data can be blank and should be left justified.
$data = $record->fetype(); $record->fetype($data);
Feature Type.
Expects alphanumeric data of no more than 4 characters. $data can be blank and should be left justified.
$data = $record->fedirs(); $record->fedirs($data);
Feature Direction, Suffix.
$data = $record->cfcc(); $record->cfcc($data);
Census Feature Class Code.
Expects alphanumeric data of no more than 3 characters. $data cannot be blank and should be left justified.
$data = $record->fraddl(); $record->fraddl($data);
Start Address, Left.
Expects alphanumeric data of no more than 11 characters. $data can be blank and should be right justified.
$data = $record->toaddl(); $record->toaddl($data);
End Address, Left.
$data = $record->fraddr(); $record->fraddr($data);
Start Address, Right.
$data = $record->toaddr(); $record->toaddr($data);
End Address, Right.
$data = $record->friaddl(); $record->friaddl($data);
Start Imputed Address Flag, Left.
$data = $record->toiaddl(); $record->toiaddl($data);
End Imputed Address Flag, Left.
$data = $record->friaddr(); $record->friaddr($data);
Start Imputed Address Flag, Right.
$data = $record->toiaddr(); $record->toiaddr($data);
End Imputed Address Flag, Right.
$data = $record->zipl(); $record->zipl($data);
ZIP Code, Left.
Expects numeric data of no more than 5 characters. $data can be blank and should be left justified.
$data = $record->zipr(); $record->zipr($data);
ZIP Code, Right.
$data = $record->aianhhfpl(); $record->aianhhfpl($data);
FIPS 55 Code (American Indian/Alaska Native Area/Hawaiian Home Land), 2000 Left.
$data = $record->aianhhfpr(); $record->aianhhfpr($data);
FIPS 55 Code (American Indian/Alaska Native Area/Hawaiian Home Land), 2000 Right.
$data = $record->aihhtlil(); $record->aihhtlil($data);
American Indian/Hawaiian Home Land Trust Land Indicator, 2000 Left.
$data = $record->aihhtlir(); $record->aihhtlir($data);
American Indian/Hawaiian Home Land Trust Land Indicator, 2000 Right.
$data = $record->census1(); $record->census1($data);
Census Use 1.
$data = $record->census2(); $record->census2($data);
Census Use 2.
$data = $record->statel(); $record->statel($data);
FIPS State Code, 2000 Left (always filled both sides, except at U.S. boundaries).
Expects numeric data of no more than 2 characters. $data can be blank and should be left justified.
$data = $record->stater(); $record->stater($data);
FIPS State Code, 2000 Right (always filled both sides, except at U.S. boundaries).
$data = $record->countyl(); $record->countyl($data);
FIPS County Code, 2000 Left (always filled both sides, except at U.S. boundaries).
Expects numeric data of no more than 3 characters. $data can be blank and should be left justified.
$data = $record->countyr(); $record->countyr($data);
FIPS County Code, 2000 Right (always filled both sides, except at U.S. boundaries).
$data = $record->cousubl(); $record->cousubl($data);
FIPS 55 Code (County Subdivision), 2000 Left.
$data = $record->cousubr(); $record->cousubr($data);
FIPS 55 Code (County Subdivision), 2000 Right.
$data = $record->submcdl(); $record->submcdl($data);
FIPS 55 Code (Subbarrio), 2000 Left.
$data = $record->submcdr(); $record->submcdr($data);
FIPS 55 Code (Subbarrio), 2000 Right.
$data = $record->placel(); $record->placel($data);
FIPS 55 Code (Place/CDP), 2000 Left.
$data = $record->placer(); $record->placer($data);
FIPS 55 Code (Place/CDP), 2000 Right.
$data = $record->tractl(); $record->tractl($data);
Census Tract, 2000 Left.
Expects numeric data of no more than 6 characters. $data can be blank and should be left justified.
$data = $record->tractr(); $record->tractr($data);
Census Tract, 2000 Right.
$data = $record->blockl(); $record->blockl($data);
Census Block Number, 2000 Left.
Expects numeric data of no more than 4 characters. $data can be blank and should be left justified.
$data = $record->blockr(); $record->blockr($data);
Census Block Number, 2000 Right.
$data = $record->frlong(); $record->frlong($data);
Start Longitude.
$data = $record->frlat(); $record->frlat($data);
Start Latitude.
Expects numeric data of no more than 9 characters. $data cannot be blank and should be right justified.
$data = $record->tolong(); $record->tolong($data);
End Longitude.
$data = $record->tolat(); $record->tolat($data);
End Latitude.
This is the original TIGER/Line 2006 data dictionary from which this class was generated.
Record Type 1 - Complete Chain Basic Data Record Field BV Fmt Type Beg End Len Description RT No L A 1 1 1 Record Type VERSION No L N 2 5 4 Version Number TLID No R N 6 15 10 TIGER/Line ID, Permanent 1-Cell Number SIDE1 Yes R N 16 16 1 Single-Side Source Code SOURCE Yes L A 17 17 1 Linear Segment Source Code FEDIRP Yes L A 18 19 2 Feature Direction, Prefix FENAME Yes L A 20 49 30 Feature Name FETYPE Yes L A 50 53 4 Feature Type FEDIRS Yes L A 54 55 2 Feature Direction, Suffix CFCC No L A 56 58 3 Census Feature Class Code FRADDL Yes R A 59 69 11 Start Address, Left TOADDL Yes R A 70 80 11 End Address, Left FRADDR Yes R A 81 91 11 Start Address, Right TOADDR Yes R A 92 102 11 End Address, Right FRIADDL Yes L A 103 103 1 Start Imputed Address Flag, Left TOIADDL Yes L A 104 104 1 End Imputed Address Flag, Left FRIADDR Yes L A 105 105 1 Start Imputed Address Flag, Right TOIADDR Yes L A 106 106 1 End Imputed Address Flag, Right ZIPL Yes L N 107 111 5 ZIP Code, Left ZIPR Yes L N 112 116 5 ZIP Code, Right AIANHHFPR Yes L N 122 126 5 FIPS 55 Code (American Indian/Alaska Native Area/Hawaiian Home Land), 2000 Right AIANHHFPL Yes L N 117 121 5 FIPS 55 Code (American Indian/Alaska Native Area/Hawaiian Home Land), 2000 Left AIHHTLIL Yes L A 127 127 1 American Indian/Hawaiian Home Land Trust Land Indicator, 2000 Left AIHHTLIR Yes L A 128 128 1 American Indian/Hawaiian Home Land Trust Land Indicator, 2000 Right CENSUS1 Yes L A 129 129 1 Census Use 1 CENSUS2 Yes L A 130 130 1 Census Use 2 STATEL Yes L N 131 132 2 FIPS State Code, 2000 Left (always filled both sides, except at U.S. boundaries) STATER Yes L N 133 134 2 FIPS State Code, 2000 Right (always filled both sides, except at U.S. boundaries) COUNTYL Yes L N 135 137 3 FIPS County Code, 2000 Left (always filled both sides, except at U.S. boundaries) COUNTYR Yes L N 138 140 3 FIPS County Code, 2000 Right (always filled both sides, except at U.S. boundaries) COUSUBL Yes L N 141 145 5 FIPS 55 Code (County Subdivision), 2000 Left COUSUBR Yes L N 146 150 5 FIPS 55 Code (County Subdivision), 2000 Right SUBMCDL Yes L N 151 155 5 FIPS 55 Code (Subbarrio), 2000 Left SUBMCDR Yes L N 156 160 5 FIPS 55 Code (Subbarrio), 2000 Right PLACEL Yes L N 161 165 5 FIPS 55 Code (Place/CDP), 2000 Left PLACER Yes L N 166 170 5 FIPS 55 Code (Place/CDP), 2000 Right TRACTL Yes L N 171 176 6 Census Tract, 2000 Left TRACTR Yes L N 177 182 6 Census Tract, 2000 Right BLOCKL Yes L N 183 186 4 Census Block Number, 2000 Left BLOCKR Yes L N 187 190 4 Census Block Number, 2000 Right FRLONG No R N 191 200 10 Start Longitude FRLAT No R N 201 209 9 Start Latitude TOLONG No R N 210 219 10 End Longitude TOLAT No R N 220 228 9 End Latitude
Michael G Schwern <schwern@pobox.com>
Geo::TigerLine, mk_parsers
To install Geo::TigerLine, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Geo::TigerLine
CPAN shell
perl -MCPAN -e shell install Geo::TigerLine
For more information on module installation, please visit the detailed CPAN module installation guide.