Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Algorithm: point with N distance of a line between two other points

by dHarry (Abbot)
on Nov 04, 2010 at 10:38 UTC ( [id://869430]=note: print w/replies, xml ) Need Help??


in reply to Algorithm: point with N distance of a line between two other points

There is tons off stuff around to do this for you. See for example opensource GIS. At work we used database extensions to prototype a "map based search" functionality. A user can look for features on a body, e.g. a certain crater on Mars. Another application is to draw a rectangle on a map and get all relevant measurements back. Because the extensions support different coordinate systems, projections etc. You can solve most geometry problems relatively easy. Are you already using some mySQL extension? The distance between two points sounds trivial to me. Like Limbic~Region already said if the distance is small, an approximation is good enough, i.e. use a straight line instead of an arc. In fact in my experience this is sufficient inmost cases.

Cheers

Harry

  • Comment on Re: Algorithm: point with N distance of a line between two other points

Replies are listed 'Best First'.
Re^2: Algorithm: point with N distance of a line between two other points
by LanX (Saint) on Nov 04, 2010 at 13:30 UTC
    > Like Limbic~Region already said if the distance is small, an approximation is good enough, i.e. use a straight line instead of an arc.

    IMHO one can choose a spherical projection around the point in question which keeps distances¹ fix, no matter how big the region is.

    Shouldn't be too difficult to find corresponding techniques in spherical geometry.

    Cheers Rolf

    1) maybe its even better to choose gnomonic projection, where "great circles are mapped to straight lines" as long as bigger distances have bigger projections.

    UPDATE: ah indeed "Thus the shortest route between two locations in reality corresponds to that on the map.". Of course the real distance on the sphere still has to be calculated after back projecting the "nearest" point.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://869430]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-18 22:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found