-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmappit.py
More file actions
24 lines (19 loc) · 935 Bytes
/
mappit.py
File metadata and controls
24 lines (19 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import json
from geolocate_callsigns import geolocate_callsigns
from map_callsigns import create_folium_map
def generate_ham_radio_map(callsigns, origin, config_file, output_file='map.html'):
# Geolocate the call signs
locations = geolocate_callsigns(callsigns, config_file)
# Check if any locations were found
if not locations:
print("No locations found for the provided call signs.")
return
# Create the map with the geolocated call signs and origin
create_folium_map(locations, origin, output_file)
print(f"Ham radio map created and saved to {output_file}")
# Example usage
callsigns = ['WA3MH','K3MLH','EA4T','W4KD','K2XE','K9NN','K4RGN','WD4OOZ','EA5ST','KL5NS','K4VHE','AD9AR']
origin = {'name': 'US-8375', 'lat': 27.9824 , 'lon': -80.7549}
config_file = 'config.json'
output_file = 'ham_radio_map.html'
generate_ham_radio_map(callsigns, origin, config_file, output_file)