Boost logo

Geometry :

Subject: Re: [geometry] Segment to Segment Distance
From: Dan Chianucci (trump211dev_at_[hidden])
Date: 2012-05-25 00:12:08


Hey Barend,
Thanks for the quick reply.
I've been trying to see if I can add this functionality, however the
templates are killing me. I'm looking at how other algorithms are done,
but I can't seem to find any actual "code". All I can find is template
stuff. All trails I can find lead down to a call to apply(). Which I
can't find where it is actually defined because the class it is being
called on is defined in the template rather than explicitly. I guess what
I am asking is where is the actual implementation of the algorithms. For
instance, in the point to point distance operation, where is the sqrt(
(x2-x1)^2 + (y2-y1)^2 )?

Thanks,
Dan C

On Mon, May 21, 2012 at 3:46 PM, Barend Gehrels <barend_at_[hidden]> wrote:

> Hi Dan,
>
>
> On 19-5-2012 19:44, Dan Chianucci wrote:
>
>> Hey guys,
>>
>> I'm trying to find the minimum distance between two segments, however
>> this feature doesn't seem to be supported
>>
>> http://www.boost.org/doc/libs/**1_49_0/libs/geometry/doc/html/**
>> geometry/reference/algorithms/**distance/distance_2.html<http://www.boost.org/doc/libs/1_49_0/libs/geometry/doc/html/geometry/reference/algorithms/distance/distance_2.html>
>>
>> Shows that this is true, however replacing the 1_49_0 with a 1_48_0 shows
>> that it did in fact used to be supported. I am currious as to why this
>> support was removed. Or are the charts on the previous version
>> documentation incorrect?
>>
>
> Yes, sorry. The charts on previous version docs were not always correct.
> So segment-segment is not yet supported. Not that it is difficult, it is
> just not yet done. So it was also not yet there in 1.48
>
>
>
>> It seems like the latter may be the case as the tables on the previous
>> versions site seem to be incorrect.
>>
>
> Yes, there were more incorrections in the previous version docs. They are
> enhanced now using another system of generation (thanks to Bruno).
>
>
>
>> Eg. Going down the MultiLineString column says that the distance
>> operation for MultiLineString can be computed against all other geometries
>> except Segment, Box and Ring. However going across the MultiLineString row
>> says the only supported geometries are Point, MultiPoint, and
>> MultiLineString.
>>
>
> So yes, that was wrong too. If the matrix is not symmetric, it is
> (probably) incorrect. Currently the distance support matrix is symmetric
> and afaik correct.
>
> Thanks, Barend
>
>
> ______________________________**_________________
> Geometry mailing list
> Geometry_at_[hidden]
> http://lists.boost.org/**mailman/listinfo.cgi/geometry>
>



Geometry list run by mateusz at loskot.net