From bb829d7a78d784b66efaf3fd05cbe17d08228fd0 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Tue, 17 Mar 2026 18:24:41 -0500 Subject: [PATCH] Refine airport layer data --- layers/airports/get_data.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/layers/airports/get_data.py b/layers/airports/get_data.py index 9a00e40..ec19efd 100755 --- a/layers/airports/get_data.py +++ b/layers/airports/get_data.py @@ -19,14 +19,26 @@ for airport_type in types: for airport in airports: if airport['type'] == airport_type: - geojson['features'].append({ + f = { "type": "Feature", "geometry": { "type": "Point", "coordinates": [float(airport['longitude_deg']), float(airport['latitude_deg'])] }, - "properties": airport, # TODO - }) + "properties": { + "ID": airport['ident'], + "Name": airport['name'], + "City": airport['municipality'], + "Country": airport['iso_country'], + "Region": airport['iso_region'], + "Elevation (ft)": airport['elevation_ft'], + } + } + if airport['wikipedia_link']: + f['properties']['Wikipedia'] = airport['wikipedia_link'] + if airport['home_link']: + f['properties']['Website'] = airport['home_link'] + geojson['features'].append(f) with open(f'data/{airport_type}.geojson', 'w') as f: f.write(json.dumps(geojson))