diff options
Diffstat (limited to 'Geocoding/Match.pm')
-rw-r--r-- | Geocoding/Match.pm | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/Geocoding/Match.pm b/Geocoding/Match.pm deleted file mode 100644 index b4a7675..0000000 --- a/Geocoding/Match.pm +++ /dev/null @@ -1,54 +0,0 @@ -package Geo::USCensus::Geocoding::Match; - -use strict; -use Data::Dumper; - -sub new { - my $class = shift; - my $address = shift; - my $census = shift; - - my $self = { %$address }; - bless $self, $class; -} - -sub matchedAddress { - my $self = shift; - $self->{matchedAddress}; -} - -sub coordinates { - my $self = shift; - $self->{coordinates}; -} - -sub addressComponents { - my $self = shift; - $self->{addressComponents}; -} - -sub geographies { - my $self = shift; - $self->{geographies}; -} - -sub block_info { - my $self = shift; - my $geo = $self->{geographies}; - my $block_info = $geo->{'2010 Census Blocks'}; # XXX change this in 2020 - if ($block_info and exists($block_info->[0])) { - return $block_info->[0]; - } else { - warn "2010 Census Blocks element not found in response\n"; - warn Dumper $self->{geographies}; - return ''; - } -} - -sub censustract { - my $self = shift; - my $block = $self->block_info or return ''; - return $block->{STATE} . $block->{COUNTY} . $block->{TRACT}; -} - -1; |