Modify

Opened 4 months ago

Closed 3 months ago

Last modified 3 months ago

#13035 closed Bugs (fixed)

Assertion `lhs.denominator() != 0' failed

Reported by: Vissarion Fisikopoulos <fisikop@…> Owned by: Barend Gehrels
Milestone: Boost 1.65.0 Component: geometry
Version: Boost 1.64.0 Severity: Problem
Keywords: Cc:

Description

The following piece of code returns: Assertion `lhs.denominator() != 0' failed.

#include <boost/geometry.hpp>

namespace bg = boost::geometry;

int main()
{
    typedef bg::model::point<double, 2,
                       bg::cs::geographic<bg::radian> > point;

    typedef bg::model::polygon<point, false> polygon;

    polygon polygon1;
    bg::model::multi_polygon<polygon> multi_polygon1;

    bg::read_wkt("MULTIPOLYGON(((0.12217304763960294688995844580858829431235790252685546875 0.0349065850398865562542738416595966555178165435791015625,-1.4486232791552919874078497741720639169216156005859375 -0.157079632679489489266444479653728194534778594970703125,-0.7504915783575609733446754034957848489284515380859375 -0.1919862177193760732762939369422383606433868408203125,0.1745329251994327812713692082979832775890827178955078125 -1.4311699866353488896919543549302034080028533935546875,-1.413716694115405569931454010657034814357757568359375 -1.46607657167523530716835011844523251056671142578125,0.4537856055185252035499843259458430111408233642578125 -1.1868238913561428571341593851684592664241790771484375,-0.1047197551196596687628215249787899665534496307373046875 -1.500983156715121946689350806991569697856903076171875,0.907571211037050407099968651891686022281646728515625 0.558505360638184900068381466553546488285064697265625,-1.064650843716540062899866825318895280361175537109375 -0.61086523819801474832758003685739822685718536376953125,-0.645771823237901276826278262888081371784210205078125 -0.13962634015954622501709536663838662207126617431640625,0.645771823237901276826278262888081371784210205078125 -1.11701072127636980013676293310709297657012939453125,0.13962634015954622501709536663838662207126617431640625 -0.7504915783575609733446754034957848489284515380859375,-1.0995574287564264803762625888339243829250335693359375 0.8377580409572773501025721998303197324275970458984375,-0.01745329251994327812713692082979832775890827178955078125 0.78539816339744750184337362952646799385547637939453125,-0.5759586531581282198288818108267150819301605224609375 -0.383972435438752146552587873884476721286773681640625,0.296705972839035714283539846292114816606044769287109375 -0.383972435438752146552587873884476721286773681640625,1.0122909661567101036183657924993894994258880615234375 1.37881010907551893041045332211069762706756591796875,-0.907571211037050407099968651891686022281646728515625 0.6283185307179579570657779186149127781391143798828125,-0.1047197551196596687628215249787899665534496307373046875 1.1344640137963131198972632773802615702152252197265625,0.349065850398865562542738416595966555178165435791015625 1.11701072127636980013676293310709297657012939453125,-1.4486232791552919874078497741720639169216156005859375 1.256637061435915914131555837229825556278228759765625,0.41887902047863867505128609991515986621379852294921875 -0.61086523819801474832758003685739822685718536376953125,-1.0122909661567101036183657924993894994258880615234375 -0.52359877559829837156968324052286334335803985595703125,-1.1344640137963131198972632773802615702152252197265625 0.4537856055185252035499843259458430111408233642578125,-0.383972435438752146552587873884476721286773681640625 0.99483767363676689488016791074187494814395904541015625,-0.6283185307179579570657779186149127781391143798828125 0.59341194567807142856707969258422963321208953857421875,0.5410520681182415803078811222803778946399688720703125 1.5707963267948950036867472590529359877109527587890625,0.12217304763960294688995844580858829431235790252685546875 0.0349065850398865562542738416595966555178165435791015625)))", multi_polygon1);

    bg::read_wkt("POLYGON((0 0.13962634015954622501709536663838662207126617431640625,0.820304748437334030342071855557151138782501220703125 -0.89011791851710719836177077013417147099971771240234375,-1.37881010907551893041045332211069762706756591796875 1.2217304763960294966551600737147964537143707275390625,-0.31415926535897897853288895930745638906955718994140625 0.069813170079773112508547683319193311035633087158203125,0.2792526803190924500341907332767732441425323486328125 -1.4486232791552919874078497741720639169216156005859375,1.4486232791552919874078497741720639169216156005859375 -0.3665191429188088267920875296113081276416778564453125,0.52359877559829837156968324052286334335803985595703125 0.52359877559829837156968324052286334335803985595703125,1.5184364492350652664498511512647382915019989013671875 -0.471238898038468523310484670219011604785919189453125,-1.2740903539558592338920561815029941499233245849609375 0,-0.7504915783575609733446754034957848489284515380859375 -0.1919862177193760732762939369422383606433868408203125,-1.151917306316256439657763621653430163860321044921875 -0.8377580409572773501025721998303197324275970458984375,-0.6632251157578445965867786071612499654293060302734375 -0.31415926535897897853288895930745638906955718994140625,1.3962634015954622501709536663838662207126617431640625 0.2443460952792058937799168916171765886247158050537109375,0.3665191429188088267920875296113081276416778564453125 0.2792526803190924500341907332767732441425323486328125,0.80285145591739082160387397379963658750057220458984375 0.733038285837617653584175059222616255283355712890625,-0.89011791851710719836177077013417147099971771240234375 1.4311699866353488896919543549302034080028533935546875,0.558505360638184900068381466553546488285064697265625 -0.08726646259971639063568460414899163879454135894775390625,-0.261799387799149185784841620261431671679019927978515625 -1.4835298641951786269288504627184011042118072509765625,-0.13962634015954622501709536663838662207126617431640625 0.2792526803190924500341907332767732441425323486328125,0.209439510239319337525643049957579933106899261474609375 0.05235987755982983438141076248939498327672481536865234375,-1.5184364492350652664498511512647382915019989013671875 1.4311699866353488896919543549302034080028533935546875,1.46607657167523530716835011844523251056671142578125 -0.3665191429188088267920875296113081276416778564453125,-0.89011791851710719836177077013417147099971771240234375 1.0471975511965967431393664810457266867160797119140625,-0.97738438111682357511966756646870635449886322021484375 0.95993108859688025535916722219553776085376739501953125,0 0.645771823237901276826278262888081371784210205078125,-0.436332312998581939300635212930501438677310943603515625 -0.94247779607693704662096934043802320957183837890625,1.3439035240356325129340575585956685245037078857421875 -0.401425727958695410801936986899818293750286102294921875,0.069813170079773112508547683319193311035633087158203125 0.157079632679489489266444479653728194534778594970703125,-0.13962634015954622501709536663838662207126617431640625 -0.13962634015954622501709536663838662207126617431640625,0.558505360638184900068381466553546488285064697265625 -1.02974425867665342337886613677255809307098388671875,0.1919862177193760732762939369422383606433868408203125 -1.256637061435915914131555837229825556278228759765625,0.08726646259971639063568460414899163879454135894775390625 -0.7504915783575609733446754034957848489284515380859375,-0.1745329251994327812713692082979832775890827178955078125 -1.3439035240356325129340575585956685245037078857421875,0.41887902047863867505128609991515986621379852294921875 -0.61086523819801474832758003685739822685718536376953125,0.78539816339744750184337362952646799385547637939453125 1.29154364647580255365255652577616274356842041015625,1.46607657167523530716835011844523251056671142578125 0.80285145591739082160387397379963658750057220458984375,1.55334303427495168392624691477976739406585693359375 -0.0349065850398865562542738416595966555178165435791015625,0.05235987755982983438141076248939498327672481536865234375 1.37881010907551893041045332211069762706756591796875,0.78539816339744750184337362952646799385547637939453125 0.12217304763960294688995844580858829431235790252685546875,-1.37881010907551893041045332211069762706756591796875 0.59341194567807142856707969258422963321208953857421875,0.69813170079773112508547683319193311035633087158203125 0.01745329251994327812713692082979832775890827178955078125,0.22689280275926260177499216297292150557041168212890625 0.5410520681182415803078811222803778946399688720703125,0.78539816339744750184337362952646799385547637939453125 -0.50614548307835505180918289624969474971294403076171875,0.1919862177193760732762939369422383606433868408203125 1.11701072127636980013676293310709297657012939453125,1.1868238913561428571341593851684592664241790771484375 -0.01745329251994327812713692082979832775890827178955078125,0.69813170079773112508547683319193311035633087158203125 -1.2217304763960294966551600737147964537143707275390625,0.2443460952792058937799168916171765886247158050537109375 1.1868238913561428571341593851684592664241790771484375,-1.064650843716540062899866825318895280361175537109375 -0.31415926535897897853288895930745638906955718994140625,-0.9250245035569937268604689961648546159267425537109375 1.29154364647580255365255652577616274356842041015625,0.5410520681182415803078811222803778946399688720703125 0.069813170079773112508547683319193311035633087158203125,0.87266462599716387860127042586100287735462188720703125 -0.13962634015954622501709536663838662207126617431640625,-0.7504915783575609733446754034957848489284515380859375 1.326450231515689193173557214322499930858612060546875,-0.907571211037050407099968651891686022281646728515625 0.907571211037050407099968651891686022281646728515625,-0.33161255787892229829338930358062498271465301513671875 -0.296705972839035714283539846292114816606044769287109375,-1.3962634015954622501709536663838662207126617431640625 -0.157079632679489489266444479653728194534778594970703125,-1.02974425867665342337886613677255809307098388671875 -0.1745329251994327812713692082979832775890827178955078125,0.99483767363676689488016791074187494814395904541015625 1.5707963267948950036867472590529359877109527587890625,1.46607657167523530716835011844523251056671142578125 1.0122909661567101036183657924993894994258880615234375,-1.29154364647580255365255652577616274356842041015625 0.2792526803190924500341907332767732441425323486328125,0.383972435438752146552587873884476721286773681640625 -0.820304748437334030342071855557151138782501220703125,-0.488692190558411787559833783234353177249431610107421875 -0.12217304763960294688995844580858829431235790252685546875,1.0471975511965967431393664810457266867160797119140625 0.7504915783575609733446754034957848489284515380859375,0.80285145591739082160387397379963658750057220458984375 -1.3613568165555756106499529778375290334224700927734375,0.71558499331767444484597717746510170400142669677734375 0.13962634015954622501709536663838662207126617431640625,1.3089969389957458734130568700493313372135162353515625 -0.99483767363676689488016791074187494814395904541015625,-0.349065850398865562542738416595966555178165435791015625 -1.11701072127636980013676293310709297657012939453125,0.61086523819801474832758003685739822685718536376953125 0.05235987755982983438141076248939498327672481536865234375,-0.85521133347722066986307254410348832607269287109375 -1.0122909661567101036183657924993894994258880615234375,-0.85521133347722066986307254410348832607269287109375 -0.85521133347722066986307254410348832607269287109375,1.4486232791552919874078497741720639169216156005859375 -1.29154364647580255365255652577616274356842041015625,-0.80285145591739082160387397379963658750057220458984375 1.3089969389957458734130568700493313372135162353515625,-0.99483767363676689488016791074187494814395904541015625 1.4486232791552919874078497741720639169216156005859375,0.50614548307835505180918289624969474971294403076171875 -0.08726646259971639063568460414899163879454135894775390625,-1.0122909661567101036183657924993894994258880615234375 0.22689280275926260177499216297292150557041168212890625,0.85521133347722066986307254410348832607269287109375 -0.6283185307179579570657779186149127781391143798828125,-1.500983156715121946689350806991569697856903076171875 -1.29154364647580255365255652577616274356842041015625,0.99483767363676689488016791074187494814395904541015625 -0.52359877559829837156968324052286334335803985595703125,0.52359877559829837156968324052286334335803985595703125 -0.436332312998581939300635212930501438677310943603515625,-0.349065850398865562542738416595966555178165435791015625 -0.296705972839035714283539846292114816606044769287109375,1.3962634015954622501709536663838662207126617431640625 -0.488692190558411787559833783234353177249431610107421875,-0.33161255787892229829338930358062498271465301513671875 -0.6283185307179579570657779186149127781391143798828125,-0.87266462599716387860127042586100287735462188720703125 0.22689280275926260177499216297292150557041168212890625,-1.55334303427495168392624691477976739406585693359375 -1.0995574287564264803762625888339243829250335693359375,0.69813170079773112508547683319193311035633087158203125 -1.064650843716540062899866825318895280361175537109375,-0.209439510239319337525643049957579933106899261474609375 -0.33161255787892229829338930358062498271465301513671875,-0.94247779607693704662096934043802320957183837890625 -0.71558499331767444484597717746510170400142669677734375,0.89011791851710719836177077013417147099971771240234375 -1.46607657167523530716835011844523251056671142578125,1.151917306316256439657763621653430163860321044921875 0.3665191429188088267920875296113081276416778564453125,1.5358897417550085862103514955379068851470947265625 -0.157079632679489489266444479653728194534778594970703125,-0.157079632679489489266444479653728194534778594970703125 1.0471975511965967431393664810457266867160797119140625,1.500983156715121946689350806991569697856903076171875 -0.471238898038468523310484670219011604785919189453125,-1.02974425867665342337886613677255809307098388671875 -0.68067840827778780532497648891876451671123504638671875,-1.1868238913561428571341593851684592664241790771484375 -0.61086523819801474832758003685739822685718536376953125,0 -0.820304748437334030342071855557151138782501220703125,-1.2217304763960294966551600737147964537143707275390625 -0.558505360638184900068381466553546488285064697265625,0.3665191429188088267920875296113081276416778564453125 1.2217304763960294966551600737147964537143707275390625,-0.71558499331767444484597717746510170400142669677734375 1.20427718387608617689465972944162786006927490234375,-0.9250245035569937268604689961648546159267425537109375 -0.95993108859688025535916722219553776085376739501953125,0.157079632679489489266444479653728194534778594970703125 -1.29154364647580255365255652577616274356842041015625,0.645771823237901276826278262888081371784210205078125 1.4486232791552919874078497741720639169216156005859375,-1.3962634015954622501709536663838662207126617431640625 -1.2740903539558592338920561815029941499233245849609375,0.488692190558411787559833783234353177249431610107421875 -0.907571211037050407099968651891686022281646728515625,-0.01745329251994327812713692082979832775890827178955078125 0.33161255787892229829338930358062498271465301513671875,-1.3439035240356325129340575585956685245037078857421875 -0.733038285837617653584175059222616255283355712890625,-0.41887902047863867505128609991515986621379852294921875 0.50614548307835505180918289624969474971294403076171875,0.349065850398865562542738416595966555178165435791015625 -0.08726646259971639063568460414899163879454135894775390625,-0.8377580409572773501025721998303197324275970458984375 -0.436332312998581939300635212930501438677310943603515625,0.1919862177193760732762939369422383606433868408203125 -1.0995574287564264803762625888339243829250335693359375,1.256637061435915914131555837229825556278228759765625 0.95993108859688025535916722219553776085376739501953125,-0.95993108859688025535916722219553776085376739501953125 0.33161255787892229829338930358062498271465301513671875,1.256637061435915914131555837229825556278228759765625 1.5358897417550085862103514955379068851470947265625,0.471238898038468523310484670219011604785919189453125 0.8377580409572773501025721998303197324275970458984375,-1.3962634015954622501709536663838662207126617431640625 0.89011791851710719836177077013417147099971771240234375,1.4835298641951786269288504627184011042118072509765625 -0.41887902047863867505128609991515986621379852294921875,0.1047197551196596687628215249787899665534496307373046875 0.97738438111682357511966756646870635449886322021484375,-0.85521133347722066986307254410348832607269287109375 -1.082104136236483160615762244560755789279937744140625,-0.99483767363676689488016791074187494814395904541015625 -0.436332312998581939300635212930501438677310943603515625,0 -1.169370598836199537373659040895290672779083251953125,0.0349065850398865562542738416595966555178165435791015625 -1.064650843716540062899866825318895280361175537109375,0.76794487087750429310517574776895344257354736328125 -0.94247779607693704662096934043802320957183837890625,-0.9250245035569937268604689961648546159267425537109375 -1.326450231515689193173557214322499930858612060546875,-1.239183768915972816415660417987965047359466552734375 -0.5759586531581282198288818108267150819301605224609375,-0.349065850398865562542738416595966555178165435791015625 0.4537856055185252035499843259458430111408233642578125,0.95993108859688025535916722219553776085376739501953125 -0.01745329251994327812713692082979832775890827178955078125,0.50614548307835505180918289624969474971294403076171875 -0.1047197551196596687628215249787899665534496307373046875,-0.97738438111682357511966756646870635449886322021484375 0.5410520681182415803078811222803778946399688720703125,-1.29154364647580255365255652577616274356842041015625 -0.645771823237901276826278262888081371784210205078125,-1.4486232791552919874078497741720639169216156005859375 -1.5184364492350652664498511512647382915019989013671875,-1.326450231515689193173557214322499930858612060546875 -1.3439035240356325129340575585956685245037078857421875,0.80285145591739082160387397379963658750057220458984375 -0.296705972839035714283539846292114816606044769287109375,-0.0349065850398865562542738416595966555178165435791015625 0,-0.22689280275926260177499216297292150557041168212890625 0.8377580409572773501025721998303197324275970458984375,0.71558499331767444484597717746510170400142669677734375 -0.1919862177193760732762939369422383606433868408203125,-0.08726646259971639063568460414899163879454135894775390625 -0.9250245035569937268604689961648546159267425537109375,-0.471238898038468523310484670219011604785919189453125 1.3439035240356325129340575585956685245037078857421875,1.3439035240356325129340575585956685245037078857421875 -0.9250245035569937268604689961648546159267425537109375,0.8377580409572773501025721998303197324275970458984375 1.151917306316256439657763621653430163860321044921875,1.3962634015954622501709536663838662207126617431640625 -0.99483767363676689488016791074187494814395904541015625,0.50614548307835505180918289624969474971294403076171875 -0.733038285837617653584175059222616255283355712890625,0.2443460952792058937799168916171765886247158050537109375 0.22689280275926260177499216297292150557041168212890625,0.78539816339744750184337362952646799385547637939453125 -1.151917306316256439657763621653430163860321044921875,0.08726646259971639063568460414899163879454135894775390625 0.349065850398865562542738416595966555178165435791015625,-0.488692190558411787559833783234353177249431610107421875 1.02974425867665342337886613677255809307098388671875,1.151917306316256439657763621653430163860321044921875 -1.082104136236483160615762244560755789279937744140625,0.05235987755982983438141076248939498327672481536865234375 -1.4835298641951786269288504627184011042118072509765625,-0.401425727958695410801936986899818293750286102294921875 0.296705972839035714283539846292114816606044769287109375,-0.68067840827778780532497648891876451671123504638671875 -1.413716694115405569931454010657034814357757568359375,0.1047197551196596687628215249787899665534496307373046875 -0.558505360638184900068381466553546488285064697265625,-0.1047197551196596687628215249787899665534496307373046875 0.907571211037050407099968651891686022281646728515625,1.29154364647580255365255652577616274356842041015625 0.31415926535897897853288895930745638906955718994140625,1.0471975511965967431393664810457266867160797119140625 1.169370598836199537373659040895290672779083251953125,0.80285145591739082160387397379963658750057220458984375 0.08726646259971639063568460414899163879454135894775390625,-1.082104136236483160615762244560755789279937744140625 -0.22689280275926260177499216297292150557041168212890625,0.78539816339744750184337362952646799385547637939453125 1.064650843716540062899866825318895280361175537109375,0.31415926535897897853288895930745638906955718994140625 1.5184364492350652664498511512647382915019989013671875,0.558505360638184900068381466553546488285064697265625 -1.0995574287564264803762625888339243829250335693359375,-0.4537856055185252035499843259458430111408233642578125 1.239183768915972816415660417987965047359466552734375,1.151917306316256439657763621653430163860321044921875 0.1919862177193760732762939369422383606433868408203125,0.52359877559829837156968324052286334335803985595703125 1.326450231515689193173557214322499930858612060546875,-0.558505360638184900068381466553546488285064697265625 -1.064650843716540062899866825318895280361175537109375,-0.296705972839035714283539846292114816606044769287109375 -1.082104136236483160615762244560755789279937744140625,-0.85521133347722066986307254410348832607269287109375 -0.89011791851710719836177077013417147099971771240234375,-1.082104136236483160615762244560755789279937744140625 -1.239183768915972816415660417987965047359466552734375,1.239183768915972816415660417987965047359466552734375 0.87266462599716387860127042586100287735462188720703125,1.5707963267948950036867472590529359877109527587890625 -1.2740903539558592338920561815029941499233245849609375,0.820304748437334030342071855557151138782501220703125 -0.157079632679489489266444479653728194534778594970703125,-1.082104136236483160615762244560755789279937744140625 0.558505360638184900068381466553546488285064697265625,-0.1047197551196596687628215249787899665534496307373046875 1.239183768915972816415660417987965047359466552734375,-0.5759586531581282198288818108267150819301605224609375 -0.41887902047863867505128609991515986621379852294921875,0.69813170079773112508547683319193311035633087158203125 -1.4486232791552919874078497741720639169216156005859375,-1.239183768915972816415660417987965047359466552734375 -0.71558499331767444484597717746510170400142669677734375,1.4835298641951786269288504627184011042118072509765625 -0.261799387799149185784841620261431671679019927978515625,0 -1.4486232791552919874078497741720639169216156005859375,-0.22689280275926260177499216297292150557041168212890625 0.436332312998581939300635212930501438677310943603515625,-0.209439510239319337525643049957579933106899261474609375 0.33161255787892229829338930358062498271465301513671875,0.5410520681182415803078811222803778946399688720703125 -0.0349065850398865562542738416595966555178165435791015625,0.296705972839035714283539846292114816606044769287109375 -1.0122909661567101036183657924993894994258880615234375,-0.52359877559829837156968324052286334335803985595703125 -0.05235987755982983438141076248939498327672481536865234375,0.50614548307835505180918289624969474971294403076171875 1.5707963267948950036867472590529359877109527587890625,1.3439035240356325129340575585956685245037078857421875 0.261799387799149185784841620261431671679019927978515625,0.907571211037050407099968651891686022281646728515625 -0.7504915783575609733446754034957848489284515380859375,0.13962634015954622501709536663838662207126617431640625 1.064650843716540062899866825318895280361175537109375,0 0.13962634015954622501709536663838662207126617431640625))", polygon1);

    bg::union_(multi_polygon1, polygon1, multi_polygon1);

    return 0;
}

Attachments (0)

Change History (4)

comment:1 Changed 4 months ago by Vissarion Fisikopoulos <fisikop@…>

Produced on Ubuntu 14.04.3 with gcc 4.8.4

comment:2 Changed 4 months ago by Vissarion Fisikopoulos <fisikop@…>

The assertion fails in the following branch: https://github.com/awulkiew/geometry/tree/fix/mkaravel_setops

The assertion also fails with explicit geographic strategy bg::union_(multi_polygon1, polygon1, multi_polygon1, bg::strategy::intersection::geographic_segments<>());

comment:4 Changed 3 months ago by awulkiew

Milestone: To Be DeterminedBoost 1.65.0

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Barend Gehrels.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.