id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 11917,geometry default geographic (andoyer) antipodal distance is zero,Ken Barker ,Barend Gehrels,"When calling the default (andoyer) `boost::geometry::distance()` function, with `boost::geometry::cs::geographic` points that are close to being antipodal (e.g. the North and South poles or points that are diametrically opposed around the equator), it returns reasonable results. However, when called with antipodal points it returns zero, e.g.: {{{ Andoyer distance near poles: 20003917.164970 near opposite equatorial points: 20037508.151445 Andoyer distance at poles: 0.000000 opposite equatorial points: 0.000000 }}} Here the code I used to obtain the results above: {{{#!c++ std::cout.setf(std::ios::fixed); typedef boost::geometry::cs::geographic Wgs84Coords; typedef boost::geometry::model::point GeographicPoint; // Min value for delta. 0.000000014 causes Andoyer to fail. const double DELTA(0.000000015); // Note boost points are Long & Lat NOT Lat & Long GeographicPoint near_north_pole (0.0, M_PI_2 - DELTA); GeographicPoint near_south_pole (0.0, -M_PI_2 + DELTA); double andoyer_minor(boost::geometry::distance(north_pole, south_pole)); std::cout << ""Andoyer distance near poles: "" << andoyer_minor << ""\n""; GeographicPoint near_equator_east ( M_PI_2 - DELTA, 0.0); GeographicPoint near_equator_west (-M_PI_2 + DELTA, 0.0); double andoyer_major(boost::geometry::distance(near_equator_east, near_equator_west)); std::cout << ""near opposite equatorial points: "" << andoyer_major << ""\n\n""; GeographicPoint north_pole (0.0, M_PI_2); GeographicPoint south_pole (0.0, -M_PI_2); andoyer_minor = boost::geometry::distance(north_pole, south_pole); std::cout << ""Andoyer distance at poles: "" << andoyer_minor << ""\n""; GeographicPoint equator_east ( M_PI_2, 0.0); GeographicPoint equator_west (-M_PI_2, 0.0); andoyer_major = boost::geometry::distance(equator_east, equator_west); std::cout << ""opposite equatorial points: "" << andoyer_major << std::endl; }}} This is clearly a bug. The distance between the antipodal points should be slightly larger than the distance between the other points, and definitely NOT zero!",Bugs,closed,Boost 1.61.0,geometry,Boost 1.60.0,Problem,fixed,wgs84 distance andoyer,