Re: [OSM-dev] Nearest way for a location

2010-07-03 Thread andrzej zaborowski
On 2 July 2010 08:52, Stephan Plepelits sk...@xover.htu.tuwien.ac.at wrote: On Mon, Jun 28, 2010 at 12:06:04PM -0400, Matthias Julius wrote: Stephan Plepelits sk...@xover.htu.tuwien.ac.at writes: On Sun, Jun 27, 2010 at 07:11:53PM -0500, Nolan Darilek wrote: 3. In dusting off my disused

Re: [OSM-dev] Nearest way for a location

2010-07-02 Thread Stephan Plepelits
On Mon, Jun 28, 2010 at 12:06:04PM -0400, Matthias Julius wrote: Stephan Plepelits sk...@xover.htu.tuwien.ac.at writes: On Sun, Jun 27, 2010 at 07:11:53PM -0500, Nolan Darilek wrote: 3. In dusting off my disused (and never that good to begin with :) math skills from over a decade in my

Re: [OSM-dev] Nearest way for a location

2010-07-02 Thread Marc Schütz
Example: Your coordinates (G): (2, 3) Your road segment (AB): (1, 1) - (4, 5) Therefore you get: Function for all points on AB: (1, 1) + t*(3, 4) (for 0=t=1) Normal vector to AB (n): (-4, 3) Unified normal vector to AB (n0): (-4/5, 3/5) = (-0.8, 0.6) You can use the

Re: [OSM-dev] Nearest way for a location

2010-07-02 Thread Stephan Plepelits
On Fri, Jul 02, 2010 at 11:24:19AM +0200, Marc Schütz wrote: Distance form: | AG * n0 | ( * being a scalar product ) Our distance: | (1, 2) * (-0.8, 0.6) | = | -0.8 + 1.2 | - distance: 0.4 The length of a vector (a,b) is sqrt(a^2 + b^2), not abs(a+b)! Thus |(1,2) * (-0.8,0.6)|

Re: [OSM-dev] Nearest way for a location

2010-06-28 Thread Matthias Julius
Stephan Plepelits sk...@xover.htu.tuwien.ac.at writes: On Sun, Jun 27, 2010 at 07:11:53PM -0500, Nolan Darilek wrote: 3. In dusting off my disused (and never that good to begin with :) math skills from over a decade in my past, I'm thinking that a vector-based solution might work. I am

Re: [OSM-dev] Nearest way for a location

2010-06-27 Thread Eric Marsden
nd == Nolan Darilek no...@thewordnerd.info writes: nd Basically, if a user reaches an intersection and turns onto a new nd street, I'd like to provide feedback that he is on a new way as soon as nd I can. Granted, GPS inaccuracy makes instantly doing so impossible, but nd when the user

Re: [OSM-dev] Nearest way for a location

2010-06-27 Thread Nolan Darilek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, thanks for giving me something to google. :) I have a few more questions now that I've had more time to sit with this problem, also after having read your message. 1. My problem isn't routing, but rather providing accurate street-level

Re: [OSM-dev] Nearest way for a location

2010-06-27 Thread Stephan Plepelits
On Sun, Jun 27, 2010 at 07:11:53PM -0500, Nolan Darilek wrote: 2. As a blind pedestrian, I'm not likely to travel faster or slower on streets of different types. Vehicular navigation of course is another story, but in this instance, vehicular nav is secondary. Also, whether or not a street is