This is one way of doing it, but it wont exactly work on Google earth though
The curve above that purple line can be calculated using radians i think. And then you'll have the distance.
I need some help on this problem.
Say, in Google Earth or Virtual Earth, we define 3 pair of longitude and latitude (or x and y).
We need 3 pair because:
- The first two pair is to define the start and end, therefore, form a direct line.
- Another pair is just a point that is located somewhere else. In most of my cases (99.99%), it is located somewhere between the line (sometimes fall under the path of the line, which means I don't need any further mathematical calculation).
My question is:
How do I find the longitude and latitude intersection in that line, that is a result of the projection from the point?
Thank you in advance for the answer.
So far, I have been able to do the job even though I don't fully understand the mathematics behind it.
The source that I use:
Distance between a Point and a Line
That source is to calculate the distance between a point and a line. I modified it a little bit to just get the intersection point (x, y) rather than the distance.
Thank you for the reply.