Boost logo

Geometry :

Subject: Re: [geometry] intersects( polygon, box )
From: barend (barend_at_[hidden])
Date: 2012-06-01 12:55:43


 

>> Indeed that was expected to be impossible. Do you happen to have
a piece of source code or WKT which illustrates this problem?
>
> I
tried the intersections described by Volker.
> I used the following
code:
>
> #include
> #include
> #include
>
> int main(int argc,
char *argv[])
> {
> typedef boost::geometry::model::d2::point_xy
PointType;
>
> boost::geometry::model::polygon A, B2;
>
boost::geometry::model::box B1(PointType(1941,2066),
>
PointType(2055,2166));
>
> boost::geometry::read_wkt("POLYGON((1992
3240,1992 1440,3792 1800,3792
> 3240))", A);
>
boost::geometry::read_wkt("POLYGON((1941 2066,2055 2066,2055 2166,1941
>
2166))", B2);
>
> std::cout << boost::geometry::intersects( A, B1 ) <<
std::endl;
> std::cout << boost::geometry::intersects( A, B2 ) <<
std::endl;
> }
>
> The output should be 1 and 1 but it is 0 and
1.

Thanks, sorry I did not understand it was exactly the same.

Will
look and fix it.

Thanks, Barend

 



Geometry list run by mateusz at loskot.net