Boost logo

Boost Users :

Subject: Re: [Boost-users] measuring distance between a point and a segment
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2016-04-21 09:42:41

Juliette Pera wrote:
> Thank you very much it works very well now!
> I was considering using a ring type at first but I was having a wrong
> result too.
> I was using the /append/ function and then the /correct /one.
> Maybe I was missing something to "close" the polygon?

correct() should reverse and close the Ring for you if needed so it
probably wasn't it.
What was wrong with the result?
Have in mind that for Points contained inside a Ring the distance is 0.

You could debug your code and see if the data stored in your objects is
correct before passing it into an algorithm.
In order to debug Boost.Geometry conveniently you could use debugging

Visual Studio 2015:

Visual Studio 2012-13:
How to use it:



Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at