If I were you I would create script to place all lighthouses in emply locations.cf file. Then look to see if all are placed on land, correctly. If so, then move on to the piers.
Have you tried scripting this:
http://www.ucw.cz/~jerome/lighthouses.html
into locations.cfg?