Places: Add state name normalizations for AU and NZ

This commit is contained in:
Michael Mayer 2021-11-11 17:41:01 +01:00
parent 0575ab2276
commit 72d546f8c8

View file

@ -2,12 +2,36 @@ package txt
// StatesByCountry maps state names by country code.
var StatesByCountry = LookupTableMap{
"au": StatesAU,
"br": StatesBR,
"ca": StatesCA,
"de": StatesDE,
"nz": StatesNZ,
"us": StatesUS,
}
// StatesAU maps common abbreviations for Australian provinces and territories.
var StatesAU = LookupTable{
"Qld": "Queensland",
"QLD": "Queensland",
"NSW": "New South Wales",
"Vic": "Victoria",
"VIC": "Victoria",
"VI": "Victoria",
"ACT": "Australian Capital Territory",
"JBT": "Jervis Bay Territory",
"TAS": "Tasmania",
"WA": "Western Australia",
"NT": "Northern Territory",
"SA": "South Australia",
"AQ": "Australian Antarctic Territory",
"CX": "Christmas Island",
"CC": "Cocos Islands",
"HM": "Heard Island and McDonald Islands",
"NF": "Norfolk Island",
"AUS": "",
}
// StatesBR maps common abbreviations for Brazilian states.
var StatesBR = LookupTable{
"AC": "Acre",
@ -90,6 +114,28 @@ var StatesDE = LookupTable{
"Thuringen": "Thüringen",
}
// StatesNZ maps common abbreviations for provinces and territories in New Zealand.
var StatesNZ = LookupTable{
"AUK": "Auckland",
"BOP": "Bay of Plenty",
"CAN": "Canterbury",
"GIS": "Gisborne",
"HKB": "Hawke's Bay",
"MBH": "Marlborough",
"MWT": "Manawatu-Wanganui",
"NSN": "Nelson",
"NTL": "Northland",
"OTA": "Otago",
"STL": "Southland",
"TAS": "Tasman",
"TKI": "Taranaki",
"WKO": "Waikato",
"WGN": "Wellington",
"WTC": "West Coast",
"CIT": "Chatham Islands",
"NZ": "",
}
// StatesUS maps common abbreviations for US states.
var StatesUS = LookupTable{
"AL": "Alabama",
@ -140,6 +186,7 @@ var StatesUS = LookupTable{
"PW": "Palau",
"PA": "Pennsylvania",
"PR": "Puerto Rico",
"P.R": "Puerto Rico",
"RI": "Rhode Island",
"SK": "Saskatchewan",
"SC": "South Carolina",