What is this?
The International Lighthouse and Lightship Weekend (ILLW) is an amateur radio activity that happens every August. Here is a map of all the lighthouses in the world.
Open Street Map data [man_made=lighthouse], extracted to a CSV and visualised using a Python Basemap showing lighthouses across the globe.
Note: The linked image is 19149 x 11585 and shows ~ 30.000 lights. It appears that some browsers are not able to display an image of this size. If you see a black screen, save the file and open it in an image editing tool.
Note: The yellow circle around each light is not representative of the pattern of the light.
Last edited: 16 June 2019
This map was created using the Open Street Map database. I searched for man_made=lighthouse, used overpass turbo to extract the data, then clicking on "Data", extracted the lat/lon for each result and plotted that onto a global map.
The overpass turbo script is:
This query looks for nodes, ways and relations
with the given key/value combination.
Choose your region and hit the Run button above!
// gather results
// query part for: “man_made=lighthouse”
// print results
out skel qt;
If you use the bounding box as the whole world, it will timeout, so I extracted it into multiple passes, copy/pasted the data into multiple .json files and stored them together in a single directory.
I then used several bash commands to extract the lat/lon data from the json files.
The bash to extract the raw data to a csv is:
egrep -h '"(lat|lon)"' *.json | tr -d "\n :,\"" | sed 's|lat|\n|g;s|lon|,|g' | sort -u > lighthouses.csv
You can download the resulting CSV file.
Based on the example code published by Joshua Hrisko at: https://makersportal.com/blog/2018/7/20/geographic-mapping-from-a-csv-file-using-python-and-basemap, I edited it to use my data file, changed some parameters, removed labels and updated the markers.
The python is: [Source]
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import numpy as np
plt.rcParams['agg.path.chunksize'] = 10000
lats, lons = ,
with open('lighthouses.csv') as csvfile:
reader = csv.DictReader(csvfile,delimiter=',')
for data in reader:
# How much to zoom from coordinates (in degrees)
zoom_scale = 0
# Setup the bounding box for the zoom and bounds of the map
bbox = [np.min(lats)-zoom_scale,np.max(lats)+zoom_scale,\
# Define the projection, scale, the corners of the map, and the resolution.
m = Basemap(projection='merc',llcrnrlat=bbox,urcrnrlat=bbox,\
# Draw coastlines and fill continents and water with color
# draw parallels, meridians, and color boundaries
# build and plot coordinates onto map
x,y = m(lons,lats)
plt.title("Lighthouses across the Globe [OSM - June 2019]")
plt.savefig('lighthouses.png', format='png', dpi=2500)
I then opened that in Gimp, removed the borders, added the label and uploaded it here.
73, de Onno VK6FLAB