Imported Upstream version 1.57.0
[platform/upstream/boost.git] / libs / geometry / example / c10_custom_cs_example.cpp
index b71ad89..098916c 100644 (file)
@@ -8,7 +8,7 @@
 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 //
-// Example: Custom coordinate system example 
+// Example: Custom coordinate system example
 
 #include <iostream>
 
@@ -45,8 +45,8 @@ struct cs_tag<martian<DegreeOrRadian> >
 }}} // namespaces
 
 
-// NOTE: if the next steps would not be here, 
-// compiling a distance function call with martian coordinates 
+// NOTE: if the next steps would not be here,
+// compiling a distance function call with martian coordinates
 // would result in a MPL assertion
 
 // 4: so register a distance strategy as its default strategy
@@ -56,27 +56,27 @@ namespace boost { namespace geometry { namespace strategy { namespace distance {
 template <typename Point1, typename Point2>
 struct default_strategy<point_tag, Point1, Point2, martian_tag, martian_tag>
 {
-    typedef haversine<Point1, Point2> type;
+    typedef haversine<double> type;
 };
 
 }}}}} // namespaces
 
 // 5: not worked out. To implement a specific distance strategy for Mars,
-//    e.g. with the Mars radius given by default, 
+//    e.g. with the Mars radius given by default,
 //    you will have to implement (/register) several other metafunctions:
-//      tag, return_type, similar_type, comparable_type, 
+//      tag, return_type, similar_type, comparable_type,
 //    and structs:
 //      get_similar, get_comparable, result_from_distance
-//   See e.g. .../boost/geometry/extensions/gis/geographic/strategies/andoyer.hpp 
+//   See e.g. .../boost/geometry/extensions/gis/geographic/strategies/andoyer.hpp
 
 int main()
 {
     typedef boost::geometry::model::point
         <
-            double, 2, martian<boost::geometry::degree> 
+            double, 2, martian<boost::geometry::degree>
         > mars_point;
 
-    // Declare two points 
+    // Declare two points
     // (Source: http://nssdc.gsfc.nasa.gov/planetary/mars_mileage_guide.html)
     // (Other sources: Wiki and Google give slightly different coordinates, resulting
     //  in other distance, 20 km off)
@@ -87,11 +87,11 @@ int main()
 
     // Using the Mars mean radius
     // (Source: http://nssdc.gsfc.nasa.gov/planetary/factsheet/marsfact.html)
-    std::cout << "Distance between Viking1 and Pathfinder landing sites: " 
+    std::cout << "Distance between Viking1 and Pathfinder landing sites: "
         << d * 3389.5 << " km" << std::endl;
 
     // We would get 832.616 here, same order as the 835 (rounded on 5 km) listed
-    // on the mentioned site 
+    // on the mentioned site
 
 #ifdef OPTIONALLY_ELLIPSOIDAL
     // Optionally the distance can be calculated more accurate by an Ellipsoidal approach,