Fix ZLOTA location lookup

This commit is contained in:
Ian Renton
2026-08-14 14:32:42 +01:00
parent 186f03a233
commit 605b629d43
10 changed files with 20 additions and 21 deletions
+5 -5
View File
@@ -22,16 +22,16 @@ class ZLOTA(FileDownloadSIGRefDataProvider):
if isinstance(data, list):
for ref in data:
ref_id = ref["code"]
latitude = ref["y"]
longitude = ref["x"]
latitude = ref["latitude"]
longitude = ref["longitude"]
ref = SIGRef(sig=self.SIG, id=ref_id, name=ref["name"],
new_ref = SIGRef(sig=self.SIG, id=ref_id, name=ref["name"],
url="https://ontheair.nz/assets/" + ref_id.replace("/", "_"),
latitude=latitude,
longitude=longitude)
if latitude and longitude:
ref.grid = latlong_to_locator(latitude, longitude, 6)
new_data.append(ref)
ref.new_ref = latlong_to_locator(latitude, longitude, 6)
new_data.append(new_ref)
# Bail out if a stop has been requested, i.e. the program is shutting down - no need to parse the rest
# of the data in this case