Boost logo

Boost Users :

Subject: Re: [Boost-users] making a geometry half closed
From: Barend Gehrels (barend_at_[hidden])
Date: 2014-01-27 12:11:07


Hi,

Mateusz Łoskot wrote On 27-1-2014 10:40:
> On 26 January 2014 23:00, Adam Wulkiewicz <adam.wulkiewicz_at_[hidden]> wrote:
>> The coordinates aren't floating points. Maybe using right-1 for <max_corner,
>> 0> and bottom-1 for <max_corner, 1> could work? It probably depends on the
>> use case.
> I also think offsetting right and bottom segments would do the trick,
> as long as the coordinates are discrete.

Yes, it is a good idea to consider but it really depends on the
use-case, indeed.

For example: calculating the area would then go quite wrong. And
calculating the perimeter would go a bit wrong. But within might succeed.

We follow OGC's model for all geometries, so there is an interior, there
is a boundary and there is an exterior. Points can be placed "on
boundary" or inside or outside. A segment-crossing goes via the
boundary. If there is at one side no boundary, the underlying
assumptions fail.

So that's why I wrote: "it's not implemented". But you can try to do
things of course, it will compile.

Regards, Barend


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net