
Barend Gehrels wrote:
I'm not convinced that overloading e.g. distance() so that it works with all combinations of geometries is a good idea. If I wanted to know the distance from a point to a polygon I'd be happy to write distance_pt_to_poly(a,b).
The whole library is designed like this and I think it is good and generic. You're now able to use all functions in template environments, where you don't know if you're handling a point or a line. If you write distance_pt_to_poly, you have to know the context...
I guess I have been referring to this overloading, too. IIRC, a different distance will be returned for points at the exact same location but in different coordinate systems? For example, I guess I would prefer great_circle_distance( a, b ); over a strategy-based overload of distance() returning the same, as long as the strategy is defined by a coordinate system (and not by a space or a metric). Cheers, Rutger