[OSM-dev] Nearest way for a location

Stephan Plepelits skunk at xover.htu.tuwien.ac.at
Fri Jul 2 11:01:12 BST 2010


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)| = |-0.8,1.2| = sqrt(0.64+1.44) = sqrt(2.08) ~ 1.44
> 
The scalar product (or dot product) of the vectors (1, 2) * (-0.8, 0.6) is
-0.8 + 1.2 => 0.4. (And for sure it must be a scalar, that's why it's called
scalar product).

You are talking about a cross product, but that's not what we need in the
hesse normal form. The second approach with the intersection of the vectors
also showed, that 0.4 is the correct distance. The graphical approach which
I draw to check my result also showed ~0.5.

[1] http://en.wikipedia.org/wiki/Dot_product
-- 
Seid unbequem, seid Sand, nicht Öl im Getriebe der Welt! - Günther Eich
,---------------------------------------------------------------------.
| Stephan Plepelits,                                                  |
| Technische Universität Wien   -    Studien Informatik & Raumplanung |
| Projects:                                                           |
| > openstreetbrowser.org > couchsurfing.org > tubasis.at > bl.mud.at |
| Contact:                                                            |
| > Mail: skunk at xover.mud.at > Blog: plepe.at > Jabber: skunk at fsinf.at|
| > Twitter: twitter.com/plepe > Wave: plepelits at googlewave.com       |
`---------------------------------------------------------------------'




More information about the dev mailing list