projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
strip address suffixes for better census coding, RT#86245
[freeside.git]
/
FS
/
FS
/
Misc
/
Geo.pm
diff --git
a/FS/FS/Misc/Geo.pm
b/FS/FS/Misc/Geo.pm
index
599b2a0
..
3beffc8
100644
(file)
--- a/
FS/FS/Misc/Geo.pm
+++ b/
FS/FS/Misc/Geo.pm
@@
-134,8
+134,11
@@
sub get_censustract_uscensus {
my $url = 'https://geocoding.geo.census.gov/geocoder/geographies/address?';
my $url = 'https://geocoding.geo.census.gov/geocoder/geographies/address?';
+ my $address1 = $location->{address1};
+ $address1 =~ s/(apt|ste|suite|unit)[\s\d]\w*\s*$//i;
+
my $query_hash = {
my $query_hash = {
- street => $
location->{address1}
,
+ street => $
address1
,
city => $location->{city},
state => $location->{state},
benchmark => 'Public_AR_Current',
city => $location->{city},
state => $location->{state},
benchmark => 'Public_AR_Current',