# Point line intersection

• Jul 12th 2007, 05:39 AM
hwijaya
Point line intersection
Hi All,

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?

• Jul 14th 2007, 10:35 AM
janvdl
This is one way of doing it, but it wont exactly work on Google earth though :D

The curve above that purple line can be calculated using radians i think. :) And then you'll have the distance.
• Jul 15th 2007, 04:04 PM
hwijaya
Hi,

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.

• Jul 16th 2007, 05:40 AM
janvdl
Quote:

Originally Posted by hwijaya
Hi,

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.