Advice on geometric calculations

  • Context: Undergrad 
  • Thread starter Thread starter kirk
  • Start date Start date
  • Tags Tags
    Calculations Geometric
Click For Summary

Discussion Overview

The discussion revolves around calculating the shortest distance from a point defined by latitude and longitude to an arbitrary line segment defined by its endpoints. Participants explore methods for determining this distance, particularly when the shortest path may not be a perpendicular line to the segment.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant seeks advice on calculating the shortest distance from a point to a line segment using latitude and longitude coordinates.
  • Another participant provides a formula for the distance from a point to a line defined by the equation Ax + By + C = 0, questioning if this is the method being sought.
  • A participant raises a question about whether the distance from a point to a line segment is always along a perpendicular path, suggesting that this may not be the case when endpoints are involved.
  • It is noted that if the line segment has endpoints, there may not always be a perpendicular line from the point to the segment.
  • The original poster clarifies that they are indeed discussing distances on a sphere (great circles) and expresses concern about calculating the distance from the point to the line segment, given its arbitrary orientation.
  • Another participant echoes the concern about calculating the distance from the point to the line segment, emphasizing the challenge posed by the segment's orientation and the need for coordinate transformations.

Areas of Agreement / Disagreement

Participants express uncertainty about the conditions under which the shortest distance is a perpendicular path to the line segment, indicating that multiple views on the problem exist. There is no consensus on the best method for calculating the distance given the complexities involved.

Contextual Notes

Participants mention the need for clarity regarding the definitions of distances on a sphere versus a plane, and the implications of the line segment's endpoints on the calculation of the shortest distance.

kirk
Messages
3
Reaction score
0
Hi, any advice out there on an interesting challenge (at least a challenge for me :-)?

I am trying to come up with the easiest way to calculate the shortest distance between a single point and an arbitrary line. I want to start with lattitude and longitude coordinates for single point and for the endpoints of line segment.

It is a straightforward calculation to get the distance from the single point to the end points of the line segment using the lat/long.

But sometimes the shortest distance will be a perpendicular path to the line segment. I'm rusty on my geometry and not seeing the simple way of doing the calculations. is the answer just in rotation and translation of coordinates?

Any advice or tips out there?
 
Physics news on Phys.org
If the line is Ax + By + C = 0 and the point is (m, n) then the distance is:

[tex]d = |\frac{Am + Bn + C}{\sqrt{A^2 + B^2}}|[/tex]

Or are you talking about a different method?
 
"It is a straightforward calculation to get the distance from the single point to the end points of the line segment using the lat/long."

lat/long? Are you talking about the distance from a point on a sphere to a great circle?

"But sometimes the shortest distance will be a perpendicular path to the line segment."
I would have thought it was always on a perpendicular path!
 
IF the line has end points there may not be a perpendicular that passes through the point off the line.
 
clarifications

good clarification questions.

yes, HallsofIvy, for the distance between two points, I was talking about great circles. I have used some formulas I found to get the distance between the two points using lattitude and longitude measures.

My concern is the shortest distance between the single A point and any point on the line segment BC.

As Matt points out, because of the end points of the line segment, there is not always a perpendicular. However, in that case, I will just use the great circles formula to get the distance to the nearest end point.

My big problem is thinking through how to calculate the distance from A to the randomly specified line segment BC when starting with the lattitude and longitude coordinates. Since the BC can have any orientation, I'm still struggling with a way to set up the formulas.

Thanks folks!
 
My big problem with the situation when there is a perpendicular. How do I calculate the distance from A to the randomly specified line segment BC when starting with the lattitude and longitude coordinates? Since the BC can have any orientation, I'm still struggling with a way to set up the formulas.

I'm trying to think through rotations and translation of coordinates because it seems to just like dropping a perpendicular from above an axis, but I'm too rusty with it. And then doing it starting with lattitude and longitude.


thanks!
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 40 ·
2
Replies
40
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 18 ·
Replies
18
Views
5K
  • · Replies 10 ·
Replies
10
Views
3K