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

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

Yes, LR, my initial idea had been to solve a quadratic equation and test the values of the two solutions. But I've found that Math::Geometry::Planar's DistanceToSegment() function works well with cartesian coordinates.

Jeff

I'm facing two problems, though: 1) I'm starting with lat/long coordinates, not cartesian coordinates; and 2) I'd like the algorithm to run in a mysql query. I already have a GEO_DISTANCE(lat1,lng1,lat2,lng2) function in mysql, and I can reproduce DistanceToSegment() in mysql, but I'm not confident that DistanceToSegment() works appropriately with lat/long coordinates. Any ideas here?

Jeff

`japhy`Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and

`perl`hacker

*Nos autem praedicamus Christum crucifixum*(1 Cor. 1:23) -

**The Cross Reference**(My Blog)

In Section
Seekers of Perl Wisdom