Boost logo

Geometry :

Subject: [ggl] Deriving from model::point<> and using distance(); seeing NOT_IMPLEMENTED_FOR_THIS_POINT_TYPE,
From: Eric Fowler (eric.fowler)
Date: 2011-07-26 03:33:20


Thanks, but I am still baffled.

What needs to be done? Do I need to create a traits class? If I am creating
type mappings, what do I need to map to? Can you cite an example of what I
need to do?

Eric

On Sun, Jul 24, 2011 at 2:30 PM, Barend Gehrels <barend_at_[hidden]> wrote:

> Hi Eric,
>
>
>
>
> On 24-7-2011 22:43, Eric Fowler wrote:
>
>> I wish to derive a class from a point<> type that can use either cartesian
>> or spherical or geographic coordinates.
>>
>> When I pass a derived point type to the distance() function, I am
>> horrified to get a long error that flags my type.
>>
>> What am I doing wrong? Do I need a traits class? What's going on here? The
>> code and error follow. I am using VC++ 8.0.
>>
>
> Yes, you need to specialize traits classes for your point type. Template
> specializations don't accept derived classes.
>
> For this, the BOOST_GEOMETRY_REGISTER macro's are convenient: they can
> define the necessary traits for you in one line. That is, in general, easier
> than do it by hand.
>
> But... in your case, you create a generic point yourself, so you will have
> to implement the traits specializations...
>
> Regards, Barend
>
>
>
> ______________________________**_________________
> ggl mailing list
> ggl_at_[hidden]
> http://lists.osgeo.org/**mailman/listinfo/ggl>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.osgeo.org/pipermail/ggl/attachments/20110725/3d0a7d86/attachment.html


Geometry list run by mateusz at loskot.net