FIXED] Re: [pgrouting-users] core dump in server while calling driving_distance function for generating a polygon

Dave Potts dave.potts at pinan.co.uk
Mon Feb 13 06:01:50 EST 2012


Hi Steve

A small problem, what the heck is a github?

I assume it some sort of source control system,  whats its address and is
there any documentation on it?


Dave
Stephen Woodbridge wrote:
> Hi Dave,
>
> Thank you for digging into this issue and finding a fix. The fix sounds
> reasonable. Can you open a ticket on this and attach a patch or a git
> pull request if you have the changes in github.
>
> Thank you for your effort on this.
>
> -Steve
>
> On 2/12/2012 7:17 AM, Dave Potts wrote:
>> Hello list
>>
>> Thanks to those that tried to help me
>>
>> Problem found
>>
>> I am calling the function driving_distance from the file
>> routing_dd_wrappers.sql at line 78.
>>
>>
>> This is my input data
>> 0 X 3000.000000   Y 3000.000000
>> 1 X 3000.000000   Y 3000.000000
>> 2 X 3000.000000   Y 3000.000000
>> 3 X 3000.000000   Y 3000.000000
>> 4 X 4000.000000   Y 2000.000000
>> 5 X 4000.000000   Y 2000.000000
>>
>> If you look at it careful, you will notice less than 3 different values
>> which is the source of the problem.  The Alpha_shape_2 routine blow up
>> with a core dump unless you have 3 or more different alpha values in it.
>>
>> This little problem is not described in the CGAL support.
>>
>> Attempts are made to catch it in the route source, but these fail
>> because
>> it overlooks the problem of the same data appearing twice.
>>
>> ie do
>> 0 X 3000.000000   Y 3000.000000
>> 1 X 3000.000000   Y 3000.000000
>> 2 X 3000.000000   Y 3000.000000
>> 3 X 3000.000000   Y 3000.000000
>>
>> Will pass the current checks.
>>
>> I think we need to add the following code at line 166 of
>> alpha_drivedist.cpp
>>
>>
>> Alpha_shape_2 A(points.begin(), points.end(),
>>                    coord_type(10000),
>>                    Alpha_shape_2::GENERAL);
>>
>>    // check that there are more than 3 values in A otherwise you get a
>> core
>>    // dump
>>    if( A.number_of_alphas()<  3){
>>
>>          *err_msg=(char*)"Driving distance requires at least 3



More information about the Pgrouting-users mailing list