From 763c86dcd4ab084f2459e9004bef8e6a8adf70c8 Mon Sep 17 00:00:00 2001 From: Al Date: Thu, 8 Dec 2016 02:30:37 -0500 Subject: [PATCH] [geoplanet] add County to the names of US counties outside of Louisiana and Alaska, add Parish in Lousiana --- .../geodata/geoplanet/cleanup_geoplanet_db.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/geodata/geoplanet/cleanup_geoplanet_db.sql b/scripts/geodata/geoplanet/cleanup_geoplanet_db.sql index c4fa8424..5f4e39c5 100644 --- a/scripts/geodata/geoplanet/cleanup_geoplanet_db.sql +++ b/scripts/geodata/geoplanet/cleanup_geoplanet_db.sql @@ -323,6 +323,21 @@ set county_id = 0 where state_id = 2347567; + -- Counties outside of Louisiana should be $name County + update places + set name = printf("%s County", name) + where country_code = "US" + and place_type = "County" + and name not like "% City" + and parent_id not in (2347577, 2347560); + + -- Counties outside of Louisiana should be $name County + update places + set name = printf("%s Parish", name) + where country_code = "US" + and place_type = "County" + and parent_id != 2347577; + -- Preferred name for New York update aliases set name_type = "P"