From an arbitrary origin point anywhere in the ocean, I want to find those coastline points that are in line of sight of the origin without having to cross another coastline point. For example, if the origin is on the west side of the UK, I would expect to get many coastline points of western Ireland and western UK but not from Denmark as it is "covered" by the UK.
I need advice on a fast algorithm that can "shoot out" rays and detect where those rays cross the first coastline (coastline map is available in binary format).
Alternatively, I could imagine to move along all coastline pixels, build the connecting line between the origin and the coastline point and check if there is no other coastline point on the connecting line. Does any algorithm comes to mind that could accomplish this check of coastline crossing efficiently?
I should add that the map is an array of dimensions 5000x10000 and the coastline is available in binary format (all pixel values are zero except for coastline pixels = 1).
I realize this question is a shot in the blue but maybe there is someone smart who has knowledge in this area. Any help is much appreciated.