When Geonames has no data for a ZIP, use patron data even if --believegn
authorBen Ostrowsky <ben@esilibrary.com>
Mon, 25 Jul 2011 16:28:50 +0000 (16:28 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 16 Jul 2012 15:32:35 +0000 (11:32 -0400)
enrich_zips

index 3c52e24..22fca06 100755 (executable)
@@ -69,7 +69,7 @@ while (<>) {
        }
 
        if ($makezips) {
-               if ($city ne $dbcity || $state ne $dbstate) {
+               if (defined $zips{$zip} && ($city ne $dbcity || $state ne $dbstate)) {
                        if ($believegn) {
                                $city  = $dbcity;
                                $state = $dbstate;