id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 11789,Boost 1.59.0: geometry::intersection() asserts for spherical_equatorial coordinate system,Dave Stacey ,Barend Gehrels,"For disjoint polygons, geometry::intersection() assert()s when used with the spherical_equatorial coordinate system. assert() comes from geometry::math::detail::normalize_spheroidal_coordinates<>::apply(), as shown by the following code: {{{ #include #include #include #include #include #include #include typedef boost::geometry::cs::spherical_equatorial coordinate_system; BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(coordinate_system) int main() { typedef boost::geometry::model::point point_t; typedef boost::geometry::model::polygon polygon_t; double green_pts[][2] = { {-4.5726431789237223,52.142932977753595}, {-4.5743166242433153,52.143359442355219}, {-4.5739141406075410,52.143957260988416}, {-4.5722406991324354,52.143530796430468}, {-4.5726431789237223,52.142932977753595}}; polygon_t green; boost::geometry::append(green, green_pts); double blue_pts[][2] = { {-4.5714644516017975,52.143819810922480}, {-4.5670821923630358,52.143819810922480}, {-4.5670821923630358,52.143649055226163}, {-4.5714644516017975,52.143649055226163}, {-4.5714644516017975,52.143819810922480}}; polygon_t blue; boost::geometry::append(blue, green_pts); std::deque output; // assert() comes from the following call... boost::geometry::intersection(green, blue, output); int i = 0; std::cout << ""green && blue:"" << std::endl; BOOST_FOREACH(polygon_t const& p, output) { std::cout << i++ << "": "" << boost::geometry::area(p) << std::endl; } return 0; } }}} assert() is generated in the call to geometry::intersection(). Tested with both g++-4.9.3 and MSVC 2005 SP1. This is a regression on Boost 1.57.0, where the assert() is not produced. assert() is only generated when using the cs::spherical_equatorial coordinate system; if cs::cartesian is used instead then the assert() is not generated. Many thanks for your work on Boost and for looking at this ticket.",Bugs,closed,Boost 1.61.0,geometry,Boost 1.59.0,Problem,fixed,,