From 5348291cc9bc0d0ae0158fdaa368364494dd54f5 Mon Sep 17 00:00:00 2001 From: Nigel Horne Date: Fri, 26 Jan 2024 10:21:43 -0500 Subject: [PATCH] Continued to refactor the OpenStreetMap parser - still debugging, do not use this version --- createdatabase.PL | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/createdatabase.PL b/createdatabase.PL index 899856b0..c7868fcf 100755 --- a/createdatabase.PL +++ b/createdatabase.PL @@ -3880,6 +3880,17 @@ sub extract_osm_home COUNTRY => $country } } + if(defined($name) && ($name !~ /,/) && defined($place) && ($name eq $place_fields[0]) && ($is_in eq 'Washington DC')) { + # name/place/is_in = Petworth/Petworth (Washington, D.C.)/Washington DC: TODO + # is_in will have been split into 2 by the space + my $country = 'US' if($file =~ /north-america/); # WA can be in US or Australia + die if(!defined($country)); + return { + CITY => $name, + STATE => 'DC', + COUNTRY => $country + } + } if(defined($name) && ($name !~ /,/) && ($is_in =~ /[,;]\sCanada/) && ($is_in =~ /[;,]/)) { if(scalar(@is_in_fields) == 3) { my $code;