Can anyone point me to a C++ class for representing coordinates that automatically handles projection transforms? What I'm thinking of is something that would allow me to create vars that incorporate a projection and have appropriate geographic operators such that comparisons make sense even when the coordinates are in different projections. Using template notation (though I can't figure out how to template on a projection)
Coord < SRID:1234> point1 (x1, y1); Coord < SRID:5678> point2 (x2, y2);
if (point1.east(point2)) ... // true if point1 is east of point2
point2 = point1 // This operation assigns the coordinates of point1 to point2, using the coordinate system of point2 (in this case SRID::5678).