Questions: bulk uploading of lighthouses / maritime navigation

Posted by Dolphin3900 on 28 March 2008 in English (English)

Background: I'm a retired software engineer and hobby sailor. I downloaded a file from CIL's (Commissioners of Irish Lights) website (, with their written permission, with tech data about the AtoNs (Aids to Navigation) that they maintain around the Irish coast, approx 80 lighthouses and 200 other navigation marks. I used this to create entries in Google Earth (again with CIL permission), using MS Office to massage the data into GE's KML format.
See GE posting (
and GE KMZ download (
and in Google Maps at (

I figured out the parts of KML that I needed by copying several examples from GE and pasting them into Notepad, but I don't see a similar facility in OSM.

I'd like to do a similar job in OSM, but am experiencing some difficulty in figuring out how to do it. I've gone through the FAQs and searched OSM help, but the best answer I can find (yet) is that I should probably use JOSM.

My question:
Part 1: Where can I find the file format, and some examples, for uploading waypoints (rather than tracks)?
Part 2: Can JOSM import bulk text data?


P.S. Some food for thought:

(1) GPS has been popular with sailors for much longer than with motorists/cyclists/trekkers, and I expect that there are plenty sailors with navigation and IT skills that would be interested in these answers.

(2) Maritime Navigators are interested in charts rather than maps, showing what's on (and under) the other 75% of planet earth (the seas), with details like lighthouses, navigation marks, water depth, hazards, tides, currents, harbours, anchorages, bottom type (different anchors for sand and rocks).

(3) Many modern boats can integrate PCs with GPS/radar/depth-sounders/logs(=speedometers)/weather instruments. Tracks that include depth data are common.

(4) The sailing community includes a significant numbers of IT specialists.

(5) Has OSM got any plans for charts (as distinct from maps), drawing on the skills of sailors during the winter months when the weather is too inclement for scraping barnacles and weed from the bottoms of boats?

(6) Some chart data (e.g. tidal current direction/strangth and water depth) varies with the tide, and therefore with the time. Would it be possible to include variable data (tide-dependent) in the waypoints (place-marks)?

(7) Weather forecasts (particularly important to sailors) are available online, and could also be linked to entries on the OSM database. Some land-lubbers might even be interested in this feature.

(8) Before you even ask, could I remind you that my programming languages are COBOL, ICL mainframe assembler, SAS, and some VB, which makes me an IT dinosaur, not capable of doing much programming on a PC.

Location: Bray, Bray No 2, The Municipal District of Bray, County Wicklow, Leinster, Ireland

Comment from robx on 28 March 2008 at 07:49

The easiest approach might be to convert your KML to GPX, then uploading through JOSM. Perhaps converting the GPX to a data layer will work?

Alternatively, you could create a .osm file suitable for uploading through JOSM, see for the format. To create a node with JOSM, it should have attributes lat, lon, a negative id and action=create, I believe. I'd suggest creating an appropriate node in JOSM without uploading, then saving, which should give you a nice template.

Comment from StefanB on 28 March 2008 at 08:39

Great to see some nautical initiative!

Is the CIL's permission compatible wirh OSM's CC-BY-SA license?

as with all imported data it would be nice to include other attributes, namely
source:id=1234567 (id of the object in the source DB, so that updates can be done later on if needed)

As for tagging the objects see
and maybe also man_made=beacon
and usual
name=Fastnet Lighthouse
+other attributes as needed
lighthouse:characteristics:morse=G (OSM's flexible XML schema allows you to invent tags as needed, but some discussion with OSM community might be needed sometime if things are overlapping)

For initial playing around I'd suggest Kosmos ( ), an OSM map viewer and renderer, whose rules can be eaily customized for whatever style (nautical in this case, yellow land, white sea, buoys, lighthouses with characteristics rather than name, no street names, only major roads...). Then you can also give it 2 .osm files to render at the same time, onto the same map. One would be extract of Ireland, and the other one would be osm file with CIL's lighthouses and other nautical navigation aids.

Once you are happy with the osm file from CIL's data (so that it includes most or possibly all data), and are sure that CIL's permission allows you to publish the data under CC-BY-SA you can just upload it with JOSM.

If you need some help with Kosmos, JOSM, Java and other novelties please say so. I (and probably others) will gladly help you.

Comment from Steve Hill on 28 March 2008 at 09:59

"Maritime Navigators are interested in charts rather than maps, showing what's on (and under) the other 75% of planet earth (the seas), with details like lighthouses, navigation marks, water depth, hazards, tides, currents, harbours, anchorages, bottom type (different anchors for sand and rocks)."

I've been considering mapping some of the local buoyage while windsurfing - should be easy enough to take my GPS out with me and drop way-marks for each buoy. I'm not sure how best to record other details such as buoy names, etc. since taking a camera or notepad to sea with me isn't really an option. :)

Recording water depth data in the OSM database (in a useful way) might be tricky - I think you should probably take this conversation to the mailing lists and try and get some input from people there as to how this could be achieved. The piste map and cycle map projects have been generating contours from Nasa's SRTM3 data - it is possible that the best option for water depths is to put point heights into the database as nodes and then use a similar method to render them into contour lines. However, you're going to need a lot of samples to make the data meaningful.

"Has OSM got any plans for charts"

I've not heard anything said about it, but the great thing about OSM is that you can go ahead and set this stuff up :)

"Some chart data (e.g. tidal current direction/strangth and water depth) varies with the tide, and therefore with the time. Would it be possible to include variable data (tide-dependent) in the waypoints (place-marks)?"

For water depth, I'm not sure what you gain by having "time dependent" data, rather than just recording depths relative to the chart datum (which is what the paper charts do).

Since you can have pretty much any tag keys and values you like, there is scope for placing time dependent data in the tags by putting the time reference in the key. For tides I guess you'd want the reference to be "minutes after low tide" or something, but I'm not sure how you would handle the many variations such as spring tides, neap tides, etc. Again, another one to discuss on the mailing lists I think.

"Before you even ask, could I remind you that my programming languages are COBOL, ICL mainframe assembler, SAS, and some VB, which makes me an IT dinosaur, not capable of doing much programming on a PC."

Time to learn then. :)

Comment from TomH on 28 March 2008 at 12:18

Converting the KML to GPX won't help as we don't import waypoints from GPX files, which also answers the original question about how to upload waypoints - you can't.

That's find thought, because it probably isn't really what you want to do as you will want these things to appear on the map, and GPX files (ie traces) are only used as source material - the map is drawn over the top of those.

What you want to do therefore is to convert your data to OSM XML format and then upload that with JOSM or the bulk upload script.

That all assumes that the license turns out to be compatible of course.

Comment from rorym 🏳️‍🌈 on 28 March 2008 at 12:29

Hi Dolphin3900,

Your idea sounds great. I'd second robx's suggestion of using the API to add the data. Just create the OSM file, then open it with JOSM and then click upload. This page: has some details on the OSM file format. It's XML. Download some existing map data to get a feel for it.

StefanB is right, openstreetmap is very flexible. You can tag things as needed. Just make sure you can use it under the openstreetmap licence!

Good to see a fellow Irish mapper here. :)

Comment from Dolphin3900 on 28 March 2008 at 14:52

Phew! Quite a few helpful suggestions there!
It will take some time to go through all the ideas and options.
It seems that my best approach , for starters, would be to use JOSM. I have GPS-Babel (with GPS Babel GUI, an excellent Windows front-end) and I have already used that to convert the AtoN data from KML to GPX XML.
Now - to get JOSM and
(1) download some examples and see what they contain, and
(2) import some GPX samples and see if they work.
(3) upload a few lighthouses and check them.
The CIL data is not copyright protected, but I contacted them anyhow (just in case that was an oversight on their website). Their original reply to my request was "There is no copyright issue with publishing data from our website." I'll take another look through the OSM copyright documentation to check that is OK.
Thank you all, your help is much appreciated.

Comment from OJW on 28 March 2008 at 21:59

Hi Dolphin.

I converted your KML file to an OSM file. You should be able to view this in JOSM (and perhaps upload it, after you've checked that all the data is correct)

if you need any changes, just ask...

Comment from mackerski on 28 March 2008 at 23:20

Excellent initiative. I was interested in doing the same thing, but never got around to requesting permission. I've looked at the OSM file and it looks pretty good to me. One thing that surprised me was that the Poolbeg lighthouse isn't present (nor is it in the CIR spreadsheet). Is it maintained independently?

Comment from smsm1 on 28 March 2008 at 23:49

OJW: do you have some script for that conversion that you would like to share?

Comment from OJW on 28 March 2008 at 23:53

I just updated that OSM file so it links to the the lighthouse history pages on CIL's website (e.g. ) rather than just to the spreadsheet URL.

Comment from Dolphin3900 on 29 March 2008 at 01:17

Wow, yet more responses!

Again, thank you all - much appreciated.

robx: first to comment, and I understood at least the first half of what you said - obviously I still have some learning to do.

StefanB: Kosmos sounds good, and I'll check it out, but first I want to get JOSM working (see comments below). And thank you for the offer to help.

Steve Hill: thank you for thinking ahead - I'll come back to your comments when I get over the basics. Gotta walk before I run.

TomH: I've looked in GPSbabel, and can't find any mention of OSM XML, but OJW has already solved that problem (see below)

rorym: I'll come back to that when I get over the JOSM hurdle. Go raibh míle maith agat (a thousand thanks)

OJW: thank you for the conversion - I had already converted the KML to GPS XML, and started work on installing JOSM: and then my problems started. No problem downloading JOSM, but when I tried to open (run) it, a Nokia application kicked in (for installing apps on mobiles). I stopped it, and looked for another way to install JOSM, but without success (so far). The download file is not self-executing, and I don't know what app will install it. You're also right about checking that the data is correct. There have been some changes published in "Notices to Mariners" that I need to incorporate. And thank you for the kind offer to help.

Mackerski: Poolbeg lighthouse (like several other AtoNs on the approaches to Dublin harbour) is maintained by Dublin Port Company. There are some other missing entries as well. Larne has a similar local organisation that "does its own thing", also Dun laoghaire, Dundalk, Galway, Limerick, Londonderry, Waterford, Rosslare and Wicklow. I can get the info from sources like Reed's Almanac, but that is copyright protected. :(

The install instructions for JOSM don't give any detail about what app to use - so I need to search a bit more to find that answer... Seems I need to install some Java first. Here goes, searching...


2nd Fav Quote: "the day you stop learning is the day they shovel six feet of earth over you"

Comment from StefanB on 29 March 2008 at 07:27

No problem downloading JOSM, but when I tried to open (run) it, a Nokia application kicked in (for installing apps on mobiles).

On your machine the .jar file extension is obviously taken by the Nokia application installer for mobile phones.

Try opening the jar explicitly in java with command:

C:\WINDOWS\system32\java.exe -jar -Duser.language=en -Xmx512M "C:\OpenStreetMap\josm\josm-latest.jar"

Just adjust your paths and max memory allocation (Xmx) as needed.

Comment from StefanB on 29 March 2008 at 08:07

Oh in the given OSM file the degree sign needs to be escaped with ° i presume. JOSM can't read it right (gets a � square) and Kosmos choaks on it.

v="RL355 range lantern with 6W lamps and 28° spreaders, powered by two 50W solar panels with a 600Ah battery."

Comment from StefanB on 29 March 2008 at 08:10

Oops, read "escaped with °" as "escaped with &<>deg<>;"

Comment from StefanB on 29 March 2008 at 08:15

bummer, third try: &deg;

Comment from Dolphin3900 on 29 March 2008 at 22:41

Thank you StefanB - that worked. I have JOSM up and running now - all I need to do is learn how to use it.

Thank you too OJW for the file conversions and the tag discussion.

I couldn't use JOSM to download OJW's converted file (got a message saying the max bbox size was 0.25), but I did download the file to my PC and JOSM was able to open it from there.

Now, back to learning more about using JOSM


Comment from Dolphin3900 on 29 March 2008 at 22:45

By the way, I discovered that when using Notepad to save .osm files, you have to use ANSI encoding (not UTF-8, which GE uses) or JOSM will give an error opening the file.
The data that I placed in the .osm file came from IE, using it to "download" OJW's file, then copying/pasting the contents into Notepad.

Comment from OJW on 30 March 2008 at 00:10

you should be able to "save page as" in your browser and save as an OSM file, rather than copy/pasting it into a text editor? (can some windows-user confirm the details for IE?). Or right-click on the link and "save link as" to store it on disk without any copy/pasting.

p.s. I didn't fix the degrees symbol - you'll need to do that manually after downloading it (search for RL355 to find one of the places it's used)

Comment from Dolphin3900 on 30 March 2008 at 00:30

I've tried "save as" in IE to save your .osm file, using a filename ending in .osm and also .txt, but when I open the file again with notepad, it looks wrong, with vertical bars instead of line-breaks, and JOSM cannot open the files. I also tried "Edit with notepad" (in IE "file" menu) and tried to save as txt and osm files, but same problem. I also tried (in IE) right-clicking on the URL and "save target as" - again the same problem (vertical bars instead of line breaks)
Copy & paste into Notepad is quite satisfactory, and allows the option to ensure the coding is ANSI

Comment from OJW on 30 March 2008 at 13:16

I have a few questions about the meaning of some descriptions - any chance we could get answers from someone who knows more about lighthouses/CIL than me?

Comment from Dolphin3900 on 30 March 2008 at 23:45


While I don't claim to be an expert on maritime navigation or lighthouses, I can probably answer some of your questions.

A little bit of background about maritime navigation: It is difficult to know one's position accurately out on the open seas where there are no fixed marks. The standard traditional navigation method (pre GPS) is by "dead reckoning", starting from a known position (departure harbour) and following a known direction (magnetic compass bearing) at a known speed (measured by throwing a log overboard and counting the knots on the cord while a 20-minute hourglass-style timer counted down - speed is measured in knots, nautical miles per hour). This gives vectors (direction and distance) which can be pencilled in on a chart (maritime map). Corrections are made to allow for tidal currents and for magnetic deviation (difference between magnetic north and true north) and for any known errors in the vessel's compass, and allowance is also made for leeway (a boat, particularly a sailing boat, attempting to sail, say, west in a south wind, keeps the bow pointed westwards, but the wind will cause some side-slip towards the north). So there is plenty of scope for error, and for cumulative error, requiring methods for double-checking.

Before the invention of accurate chronometers, you could verify your latitude by measuring the angular height of the sun over the horizon at noon, or using a known star, particularly Polaris (the North star). Later, when more accurate chronometers were available, accurate measurements of sunrise/sunset (and moonrise/set) allowed you to verify longitude.

Even since the arrival of GPS, mariners are encouraged to use dead reckoning as their primary navigation tool, in case of problems in the GPS system, which could be anything from a flat battery in the receiver to a GPS system shut-down due to American military priorities. It is recommended to use the GPS only as a verification system.

Mariners arrived at their destinations with quite a degree of uncertainty. Lighthouses were (and still are) the most important fixed reference marks, and must be identifiable by day or by night (whatever time you arrive).

Arrival during daylight hours allowed identification using a description of the lighthouse (structure, shape, height, colours).

Arrival during night-time hours is also catered for, because lighthouses have unique characters - the character of a lighthouse is a description of the light frequency and timing (and colour, if relevant). "Fl 5s" means "Flashing every 5 seconds"; "Q(3) 10s" means "quick groups of 3 flashes every 10 seconds"; "FL WRG 5s" means "Flashing white red green every 5 seconds"; "Occ" (occulting) means that the light is visible most of the time, but darkened (occulted) briefly.

So, the most important data about a lighthouse (or other navigation mark), in order of priority are:
1. Name (everything needs a handle)
2. lat and lon. location is paramount
3. Structure, for day-time identification
4. Character, for night-time identification
5. Range (distance from which the light is visible in normal conditions)

Most lighthouses have auxiliary/secondary lights that operate if there is a problem with the main/primary light.

Some lighthouses have colour filters fitted so that light in different directions shows as different colours. This is the "sector" information, and can be useful in identifying the correct approach line (channel) for a harbour.

AIS (Automatic Identification System) is used mainly in Vessel Traffic Schemes, whereby each vessel (or lighthouse) transmits details about its identity, location, heading and speed)

Someof the details shown for lighthouses are given purely as matters of interest (e.g. date built) but a few fields are due to more modern technology, for instance:

- DGPS (Differential GPS) gives improved accuracy (5-10 meters), by comparing the GPS-measured position against the known position, and transmitting the difference via MF RDF radio transmissions

- RACON (RAdar beaCON) is a system whereby transponders transmit extra radar "responses" when incoming radar signals are detected, easily identified on the sending radar system. Usually the extra response correspends to the morse code for a particular letter.

Hope this is some help. Please let me know if you have any further questions, and I'll do my best to get you an answer.


Comment from OJW on 31 March 2008 at 19:14

Thanks for those answers. I have some more questions though :(

Are the daymarks abbreviations for something, or just text?

What are the different numbers in 'Nominal_Range(s)'? And what units are they in?

When it says "Granite tower, green lantern" in the description, does that mean that it emits green light, or that the outside of the lantern-room is painted green?

When there's something with a "helicopter landing port" in its name (in the lighthouses section of data), is it a lighthouse too, or just a heliport?

Do you happen to know any way of converting "max sea level (spring)" heights to regular (e.g. "above mean sea level") heights?

Comment from OJW on 31 March 2008 at 19:22

I assume "VQ" means very quick. Any idea what "Iso" and "Dir" mean in the description of a character?

e.g. "Dir Iso WRG 5s" or "Iso WR 5s"

Also, "LFl", as in "LFl 10s" (long flash?)

Comment from Dolphin3900 on 1 April 2008 at 02:16

To answer most of your questions:

Daymarks describe the shapes of the buoys
- CAN Canister (cylindrical)
- CON Conical
- NUN cylindrical, but the topmost portion narrows to form a cone.
- HFP/ISDANG I will have to check out
- PEC/PNC/PSC/PWC East/Nort/South/West Cardinal marks (sorry I don't know what the "P" stands for)
- PreChMk I wonder if this is a typing error.
- Spher Spherical
- Special non-standard colour (not the red or green of channel markers or black & yellow of cardinal marks.

Multiple figures in nominal ranges: There is a number for each colour in multi-colour lights. Ranges are given in nautical miles (approx 1 minute of latitude, or exactly 1852 meters)

"Green lantern" the lantern is the frame or housing that contains the light. Lights are white, unless stated otherwise in the "Character" field.

Heliport: They do not include lights. Most of them are located near lighthouses

Converting sea levels is an extremely difficult process because the tide height varies around the world, and the difference between spring and neap tides also varies.

Abbreviations used describing a light's Character
- Fl: Flasing, lit <50% of the time
- Iso: 50/50 dark and light
- Occ: Occulting, lit >50% of the time
- Dir: sorry I don't know, will try to find out.
- VQ very quick
- LFl Long Flash
- Q Quick (50-79 per minute, usually 50/60)
- IQ (Interrupted Quick - bursts of Quick, with interruptions)
- VQ Very Quick (80-159 per minute, usually 100/120)
- IVQ Interrupted VQ
- UQ Ultra Quick (160 or more, usually 240-300)
- IUQ Interrupted UQ

Comment from Dolphin3900 on 1 April 2008 at 02:31

Wikipedia had an interesting chart/map showing tidal amplitude variations around the world, see, as part of the article on Tide, see

Comment from Dolphin3900 on 1 April 2008 at 14:19

Dir is an abbreviation of Direction light, which shines a white beam of light along a safe passage, with red and green to either side. There is a good description (in English) at, and (in German) at

Correction: I incorrectly gave the knot measurement time as 20 mins. Wikipedia says the time was 30 seconds, while 28 seconds is more accurate. But "Salty Dog Talk" (by Bill Beavis and Mike McCloskey, ISBN 0-7136-6400-2, published by Adlard Coles Nautical) gives the distance and time as 24'4" and 15 seconds, explaining that they are 1/240 of a nautical mile and of an hour, respectively.

There is also an excellent book called "The Barefoot Navigator" (by Jack Lagan, ISBN 0-7136-7429-6 and 987-0-7136-7429-3, also published by Adlard Coles Nautical) describing the methods and achievemnts of the Pacific Islanders, Vikings, Pharoahs & Phoenicians, Arabs, and Chinese, and giving detailed techniques and tools for "no-tech" and "lo-tech" navigation.

Comment from Steve Hill on 3 April 2008 at 13:10

I've also started a proposal for other kinds of buoys:

Comments would be appreciated.

I'm not sure where the chart makers (e.g. Admiralty, Imray, etc) get their data from for buoyage (do they survey it, or is it freely available from somewhere?) It would be nice to be able to import data for at least the laterals and cardinals from somewhere rather than surveying them ourselves.

Comment from OJW on 3 April 2008 at 19:44

Hi. I've done some changes to the tagging based on those comments (e.g. marking helicopter landing bases, tagging unlit buoys, etc.) and produced another OSM file:

That should be nearly ready to upload now? Are you going to upload?

Comment from Dolphin3900 on 3 April 2008 at 23:35

Hi OJW, Unfortunately I won't have time to finish preparing for upload, and will be away for over a week starting this weekend - sorry. I'm working through the notices to mariners to make sure it is as up-to-date as possible.

Steve: Excellent proposal, and it's good to see that you got the IALA-A/B difference. Talking about UK/US differences, should it mention variant spellings of colour/color?

Comment from Dolphin3900 on 4 April 2008 at 00:07

Steve, I've e-mailed my contact in CIL to find out where they get their data.

In the meantime, I've seen other collections of lighthouses in Google Earth, including:

Iceland has a pdf file at

New Zealand

And, best of all, Alex Trabas (webmaster/author of The Online List of Lights, which covers a large portion of the world) is interested, and I'm in contact with him about re-formatting his collection for OSM. See for the turf (correction: surf) that he covers. He is in process of re-building his website so don't hold your breath.

Comment from Dolphin3900 on 4 April 2008 at 00:32

Oops! The Online list of lights omits one of the most important pieces of data about lights: Lat and Lon

Comment from Steve Hill on 4 April 2008 at 10:08

Lat and Lon is given by the location of the node you're tagging.

Regarding the spelling of colour - people *should* be spelling a tag how it is specified in the proposal or Map Features (otherwise you have to make renderers, etc. understand all the possible spellings of each tag).

Comment from OJW on 4 April 2008 at 19:03

I think Dolphin means that Alex Trabas's data is missing lat/long, not the OSM file we're importing at the moment..

Comment from OJW on 4 April 2008 at 22:42

Regarding that list of icelandic lights, I did an OSM file of the lat/long extracted from the PDF:

I'll need some more help from a translator to actually use that file for real though.

Any chance someone could find out about licensing for it?

Comment from Dolphin3900 on 6 April 2008 at 01:48

Sorry Steve, and you're right OJW: When I said "The Online list of lights omits ... Lat & Lon", I meant the Trabas website, not the OSM file.

Comment from Dolphin3900 on 6 April 2008 at 01:49

New Zealand has three PDF files of lights at and and
But I cannot parse PDF files to extract useful data - what I get (when I copy and paste to Excel) is one Excel row per PDF field, with no reliable way of telling which column the data belongs to.

The good folks in NZ disclaimer/copyright notice ( says:
The information provided on this website is intended to be general information only. While considerable effort has been made to ensure that the information provided on this site is accurate, current and otherwise adequate in all respects, LINZ does not accept any responsibility for content and shall not be responsible for, and excludes all liability for any claims whatsoever arising from the use of this site.
Crown Copyright
Land Information New Zealand owns the Crown copyright in the material available for viewing or downloading from this website as provided in the Copyright Act 1994.
The material may be used, copied and re-distributed free of charge in any format or media. Where the material is redistributed to others the source and copyright status must be acknowledged."

Comment from Dolphin3900 on 6 April 2008 at 01:53

I'll be away for a week, but will bring my trusty Garmin eTrex and notebook, and make tracks as much as possible of Waterford and Tramore, which are (almost) virgin territory to OSM.

Comment from OJW on 10 May 2008 at 12:36

Hi. Have you uploaded this file yet?

Comment from rorym 🏳️‍🌈 on 4 December 2008 at 10:37

Hi all,

Was this lighthouse uploaded to the main OSM database? I don't think it was. (see mailing list discussion here:

Unless there's any objection, I'll upload it myself.


Comment from rorym 🏳️‍🌈 on 28 December 2008 at 13:37

I imported this data just now.

Login to leave a comment