
Boost : 
Subject: Re: [boost] [GGL] Initial thoughts; how to register point types
From: Rutger ter Borg (rutger_at_[hidden])
Date: 20091115 02:38:19
Barend Gehrels wrote:
> This is indeed how it is implemented, "distance" everywhere. You can
> call "distance" for two points in a latlong 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 latlong
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 (latlong, 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