So I have around 500K x,y points as a dataset. This is the coastline polygon of UK. If I select any point in that set and assume I am facing offshore, I need to create an algorithm which helps me derive the direction I am facing.
One of the simple ideas I've been having is to drop a point in the centre of the land mass and extrapolate the directing by plotting a straight line from that centre-point through the selected coastal point. But that's not accurate enough given the many curves and inlets around the coastline which would be ignored by such a blunt instrument as that.
At the opposite end of the complexity curve is somehow shifting each point inland by a small margin to then extrapolate that same line through the coastal point. This would be much more accurate - but to do that, I then need to know the same 'orientation' to shift each point accurately. So hence a catch 22.
So right now, I'm looking for ideas about how to do this conceptually? I'm certain there will be a mathematical core to the solution hence posting here given my area of expertise is engineering and not mathematics.
Thanks for listening !


