boost::geometry::intersection bug?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

boost::geometry::intersection bug?

shalabuda
Hi,

I ran into an issue with boost::geometry::intersection when trying to intersect the following polygons:

    bg::model::ring<bg::model::d2::point_xy<double> > r1;
    bg::model::ring<bg::model::d2::point_xy<double> > r2;
    SimplePolygon r1;
    SimplePolygon r2;
    bg::read_wkt("POLYGON((-7.1621621621621605058294335322 43.228378378378366164724866394, -4.52438675915238786018335304107 30.5670564439314631499655661173, -4.16280147451538873326626344351 27.5407467090450168711868172977, -6.19047619047618891130468909978 36.7666666666666515084216371179, -7.1621621621621605058294335322 43.228378378378366164724866394))", r1);
    bg::read_wkt("POLYGON((-8.16216216216216139400785323232 49.8783783783783789544941100758, -3.16280147451538873326626344351 44.228378378378366164724866394, 1 -10.5499999999999971578290569596, -1 2.25, -8.16216216216216139400785323232 49.8783783783783789544941100758))", r2);
   
    vector<bg::model::ring<bg::model::d2::point_xy<double> > > out;
    bg::intersection(r1, r2, out);

The intersection calculated is not correct for me. I tried this on the latest version of the library from the trunk. Can you help me with that, please?
Reply | Threaded
Open this post in threaded view
|

Re: boost::geometry::intersection bug?

Barend
Hi,

shalabuda wrote On 23-2-2014 13:04:

> Hi,
>
> I ran into an issue with boost::geometry::intersection when trying to
> intersect the following polygons:
>
>      bg::model::ring<bg::model::d2::point_xy&lt;double> > r1;
>      bg::model::ring<bg::model::d2::point_xy&lt;double> > r2;
>      SimplePolygon r1;
>      SimplePolygon r2;
>      bg::read_wkt("POLYGON((-7.1621621621621605058294335322
> 43.228378378378366164724866394, -4.52438675915238786018335304107
> 30.5670564439314631499655661173, -4.16280147451538873326626344351
> 27.5407467090450168711868172977, -6.19047619047618891130468909978
> 36.7666666666666515084216371179, -7.1621621621621605058294335322
> 43.228378378378366164724866394))", r1);
>      bg::read_wkt("POLYGON((-8.16216216216216139400785323232
> 49.8783783783783789544941100758, -3.16280147451538873326626344351
> 44.228378378378366164724866394, 1 -10.5499999999999971578290569596, -1 2.25,
> -8.16216216216216139400785323232 49.8783783783783789544941100758))", r2);
>      
>      vector<bg::model::ring&lt;bg::model::d2::point_xy&lt;double> > > out;
>      bg::intersection(r1, r2, out);
>
> The intersection calculated is not correct for me. I tried this on the
> latest version of the library from the trunk. Can you help me with that,
> please?
>

Thanks for your report.

I can reproduce this problem. It is in the meantime fixed in a separate
branch, but not yet integrated.
Note that trunk is the SVN branch which is not being developed anymore.

Regards, Barend


_______________________________________________
Geometry mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/geometry