Boost C++ Libraries: Ticket #12410: boost::geometry::correct on a polygon in a geographic cs doesn't work https://svn.boost.org/trac10/ticket/12410 <p> It doesn't compile. See this simple example (and yes, I know the polygon is empty. That doesn't matter) </p> <pre class="wiki">#include &lt;boost/geometry.hpp&gt; #include &lt;boost/geometry/geometries/polygon.hpp&gt; #include &lt;boost/geometry/geometries/geometries.hpp&gt; int main() { typedef boost::geometry::model::polygon &lt; boost::geometry::model::point&lt;double, 2, boost::geometry::cs::geographic&lt;boost::geometry::degree&gt;&gt; &gt; polygon_t; polygon_t poly; boost::geometry::correct( poly ); return 0; } </pre><p> Compiler output : </p> <p> 1&gt;------ Build started: Project: boostscratch10, Configuration: Debug Win32 ------ 1&gt; main.cpp 1&gt;d:\boost_1_61_0\boost_1_61_0\boost\geometry\strategies\area.hpp(41): error C2664: 'int boost::mpl::assertion_failed&lt;false&gt;(boost::mpl::assert&lt;false&gt;::type)': cannot convert argument 1 from 'boost::mpl::failed <strong></strong><strong></strong><strong></strong>(<span class="underline">thiscall boost::geometry::strategy::area::services::default_strategy&lt;boost::geometry::geographic_tag,boost::geometry::model::point&lt;double,2,boost::geometry::cs::geographic&lt;boost::geometry::degree&gt;&gt;&gt;::NOT_IMPLEMENTED_FOR_THIS_POINT_TYPE::* <strong></strong><strong></strong><strong>*)(boost::mpl::assert_::types&lt;<a class="missing wiki">PointOfSegment</a>,boost::mpl::na,boost::mpl::na,boost::mpl::na&gt;)' to 'boost::mpl::assert&lt;false&gt;::type' 1&gt; with 1&gt; [ 1&gt; <a class="missing wiki">PointOfSegment</a>=boost::geometry::model::point&lt;double,2,boost::geometry::cs::geographic&lt;boost::geometry::degree&gt;&gt; 1&gt; ] 1&gt; d:\boost_1_61_0\boost_1_61_0\boost\geometry\strategies\area.hpp(41): note: No constructor could take the source type, or constructor overload resolution was ambiguous 1&gt; d:\boost_1_61_0\boost_1_61_0\boost\geometry\strategies\default_area_result.hpp(42): note: see reference to class template instantiation 'boost::geometry::strategy::area::services::default_strategy&lt;boost::geometry::geographic_tag,boost::geometry::model::point&lt;double,2,boost::geometry::cs::geographic&lt;boost::geometry::degree&gt;&gt;&gt;' being compiled 1&gt; d:\boost_1_61_0\boost_1_61_0\boost\geometry\algorithms\correct.hpp(177): note: see reference to class template instantiation 'boost::geometry::default_area_result&lt;Polygon&gt;' being compiled 1&gt; with 1&gt; [ 1&gt; Polygon=polygon_t 1&gt; ] 1&gt; d:\boost_1_61_0\boost_1_61_0\boost\geometry\algorithms\correct.hpp(247): note: see reference to class template instantiation 'boost::geometry::detail::correct::correct_polygon&lt;Polygon&gt;' being compiled 1&gt; with 1&gt; [ 1&gt; Polygon=polygon_t 1&gt; ] 1&gt; d:\boost_1_61_0\boost_1_61_0\boost\geometry\algorithms\correct.hpp(287): note: see reference to class template instantiation 'boost::geometry::dispatch::correct&lt;Geometry,boost::geometry::polygon_tag&gt;' being compiled 1&gt; with 1&gt; [ 1&gt; Geometry=polygon_t 1&gt; ] 1&gt; d:\boost_1_61_0\boost_1_61_0\boost\geometry\algorithms\correct.hpp(285): note: while compiling class template member function 'void boost::geometry::resolve_variant::correct&lt;Geometry&gt;::apply(Geometry &amp;)' 1&gt; with 1&gt; [ 1&gt; Geometry=polygon_t 1&gt; ] 1&gt; d:\boost_1_61_0\boost_1_61_0\boost\geometry\algorithms\correct.hpp(328): note: see reference to function template instantiation 'void boost::geometry::resolve_variant::correct&lt;Geometry&gt;::apply(Geometry &amp;)' being compiled 1&gt; with 1&gt; [ 1&gt; Geometry=polygon_t 1&gt; ] 1&gt; d:\boost_1_61_0\boost_1_61_0\boost\geometry\algorithms\correct.hpp(328): note: see reference to class template instantiation 'boost::geometry::resolve_variant::correct&lt;Geometry&gt;' being compiled 1&gt; with 1&gt; [ 1&gt; Geometry=polygon_t 1&gt; ] 1&gt; c:\users\sesa408586\documents\visual studio 2015\projects\boostscratch10\main.cpp(14): note: see reference to function template instantiation 'void boost::geometry::correct&lt;polygon_t&gt;(Geometry &amp;)' being compiled 1&gt; with 1&gt; [ 1&gt; Geometry=polygon_t 1&gt; ] 1&gt;d:\boost_1_61_0\boost_1_61_0\boost\geometry\strategies\default_area_result.hpp(42): error C2039: 'type': is not a member of 'boost::geometry::strategy::area::services::default_strategy&lt;boost::geometry::geographic_tag,boost::geometry::model::point&lt;double,2,boost::geometry::cs::geographic&lt;boost::geometry::degree&gt;&gt;&gt;' 1&gt; d:\boost_1_61_0\boost_1_61_0\boost\geometry\strategies\default_area_result.hpp(38): note: see declaration of 'boost::geometry::strategy::area::services::default_strategy&lt;boost::geometry::geographic_tag,boost::geometry::model::point&lt;double,2,boost::geometry::cs::geographic&lt;boost::geometry::degree&gt;&gt;&gt;' 1&gt;d:\boost_1_61_0\boost_1_61_0\boost\geometry\strategies\default_area_result.hpp(44): error C2955: 'boost::type': use of class template requires template argument list 1&gt; d:\boost_1_61_0\boost_1_61_0\boost\type.hpp(14): note: see declaration of 'boost::type' 1&gt;d:\boost_1_61_0\boost_1_61_0\boost\geometry\strategies\default_area_result.hpp(44): error C2039: 'return_type': is not a member of 'boost::type' 1&gt; d:\boost_1_61_0\boost_1_61_0\boost\type.hpp(14): note: see declaration of 'boost::type' 1&gt;d:\boost_1_61_0\boost_1_61_0\boost\geometry\strategies\default_area_result.hpp(44): error C3646: 'type': unknown override specifier 1&gt;d:\boost_1_61_0\boost_1_61_0\boost\geometry\strategies\default_area_result.hpp(44): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1&gt;d:\boost_1_61_0\boost_1_61_0\boost\geometry\algorithms\correct.hpp(177): error C2039: 'type': is not a member of 'boost::geometry::default_area_result&lt;Polygon&gt;' 1&gt; with 1&gt; [ 1&gt; Polygon=polygon_t 1&gt; ] 1&gt; d:\boost_1_61_0\boost_1_61_0\boost\geometry\algorithms\correct.hpp(177): note: see declaration of 'boost::geometry::default_area_result&lt;Polygon&gt;' 1&gt; with 1&gt; [ 1&gt; Polygon=polygon_t 1&gt; ] ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== </strong></span></p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12410 Trac 1.4.3 awulkiew Thu, 20 Apr 2017 16:57:51 GMT status, type, milestone changed; keywords, resolution set https://svn.boost.org/trac10/ticket/12410#comment:1 https://svn.boost.org/trac10/ticket/12410#comment:1 <ul> <li><strong>keywords</strong> area correct geographic added </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Feature Requests</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.64.0</span> </li> </ul> <p> Added support for geographic CS in area() fixes compilation error in correct(): </p> <p> <a class="ext-link" href="https://github.com/boostorg/geometry/pull/359"><span class="icon">​</span>https://github.com/boostorg/geometry/pull/359</a> </p> Ticket