Boost logo

Geometry :

Subject: [ggl] Deriving from model::point<> and using distance(); seeing NOT_IMPLEMENTED_FOR_THIS_POINT_TYPE,
From: Bruno Lalande (bruno.lalande)
Date: 2011-07-26 10:02:18


Hi Eric,

Having your point type use both coordinate systems alternately within the
same program might be tricky, since this is mostly a compile-time mechanism
(i.e. such point type is tied to such coordinate system). You can always
define 2 thin wrapper types (PointCart and PointGeo) that you can construct
at run-time from your PointType, and that will be tied to a specific CS
(using a coordinate_system traits specialization). There were recent
discussions about a general view_as function that would make that possible
out-of-the-box, but it's not implemented yet.

As for having template coordinates, this is obviously possible, and the most
common case actually. All you have to do is having your traits be template
classes themselves. In geometries/adapted/c_array.hpp, you will find an
example of such adaptation (and there are other examples in the same
directory).

Regards
Bruno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/ggl/attachments/20110726/4f71ceca/attachment.html


Geometry list run by mateusz at loskot.net