In fog or deep night, a lighthouse beam warns ships away from shoals and offers them a path to safety. Because the exact locations of lighthouses are marked on charts, the lights can help mariners fix their own locations. Lightships anchored in a harbor or channel serve the same purpose by marking shallow water or other underwater dangers.
Snag boats and dredges keep waterways open to navigation. Because there are always new obstructions like fallen trees in rivers, or fresh flows of silt clogging harbors, these workboats are rarely idle.