
Hi, Sorry for the late but did you try GGL? http://geometrylibrary.geodan.nl This library contains geometry algorithms that can handle any type of point: C arrays, PODs, legacy points, user-defined points... A very basic use could be (using C arrays here): double p1[] = { 1.0, 2.0 }; double p2[] = { 3.0, 4.0 }; cout << "Distance: " << ggl::distance(p1, p2) << endl; cout << "Dot product: " << ggl::dot_product(p1, p2) << endl; Adapting your own point type is very simple using a few automagic macros (see c01_custom_point_example in the docs). Barend Gehrels, Mateusz Loskot and me are the current developers. It will be proposed to Boost. There's a dedicated mailing list on OSGeo: http://lists.osgeo.org/mailman/listinfo/ggl Regards Bruno