1 // Boost.Geometry (aka GGL, Generic Geometry Library) 2 // QuickBook Example 3 4 // Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands. 5 6 // Use, modification and distribution is subject to the Boost Software License, 7 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 8 // http://www.boost.org/LICENSE_1_0.txt) 9 10 //[coordinate_system 11 //` Examine the coordinate system of a point 12 13 #include <iostream> 14 #include <typeinfo> 15 16 #include <boost/geometry.hpp> 17 #include <boost/geometry/geometries/polygon.hpp> 18 #include <boost/geometry/geometries/point_xy.hpp> 19 main()20int main() 21 { 22 typedef boost::geometry::model::d2::point_xy<double> point_type; 23 typedef boost::geometry::model::polygon<point_type> polygon_type; 24 25 typedef boost::geometry::coordinate_system<polygon_type>::type system; 26 27 std::cout << "system: " << typeid(system).name() << std::endl; 28 29 return 0; 30 } 31 32 //] 33 34 35 //[coordinate_system_output 36 /*` 37 Output (using MSVC): 38 [pre 39 system: struct boost::geometry::cs::cartesian 40 ] 41 */ 42 //] 43