Boost logo

Boost :

Subject: Re: [boost] [GGL] Initial thoughts; how to register point types
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2009-11-15 02:38:19


Barend Gehrels wrote:

> This is indeed how it is implemented, "distance" everywhere. You can
> call "distance" for two points in a lat-long coordinate system and get
> back this great circle distance. Calling it for cartesian and you get
> back pythagorean distance.

Sure, but what if you would like to have both for points in a lat-long
coordinate system? I.e., distance( a, b ) gives great_circle_distance, but
how do I get the Euclidean distance for those same points?

Both coordinate systems (lat-long, cartesian) are defined for a Euclidean
space. Both spherical geometry and Euclidean geometry are applied on this
Euclidean space. However, the word "distance" usually is part of the very
definition of such a space. I.e., from a mathematical point of view, a
coordinate system can not influence distance.

Have you considered an approach looking like

distance( a, b, f );
angle( a, b, f );

where f would be a functor with the minimal required mathematical operation
needed to perform the required set of geometric operations? E.g., a dot-
product operator?

Thanks,
Cheers,

Rutger


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk