Juliette Pera wrote:Actually it was for point inside the polygon so it explains the problem.
But can I access the elements of the polygon if I declare it as ring?
Of course, bg::model::ring is adapted to Boost.Range concept and also has operator. If you had your own Ring type you could use any methods defined in it. E.g. in my eariler email if you adapted std::vector<Eigen::Vector2d> to a Ring concept you could of still call any method and operator defined in std::vector.
Then I can use the distance between the point and each segment to finally take the smallest value.
My point was that maybe you could avoid doing it manually. I don't know what you're planning to do exactly but since you're ignoring the interior of a Polygon when calculating distance then maybe a Linestring would be a better representation? You could e.g. use bg::model::linestring<Point>.
Boost-users mailing list