Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60673 - sandbox/geometry/libs/geometry/example/extensions/gis/latlong
From: barend.gehrels_at_[hidden]
Date: 2010-03-17 08:31:32


Author: barendgehrels
Date: 2010-03-17 08:31:31 EDT (Wed, 17 Mar 2010)
New Revision: 60673
URL: http://svn.boost.org/trac/boost/changeset/60673

Log:
Fix in example, multiply with earth radius
Text files modified:
   sandbox/geometry/libs/geometry/example/extensions/gis/latlong/distance_example.cpp | 7 +++++--
   sandbox/geometry/libs/geometry/example/extensions/gis/latlong/distance_example.vcproj | 8 ++++----
   2 files changed, 9 insertions(+), 6 deletions(-)

Modified: sandbox/geometry/libs/geometry/example/extensions/gis/latlong/distance_example.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/example/extensions/gis/latlong/distance_example.cpp (original)
+++ sandbox/geometry/libs/geometry/example/extensions/gis/latlong/distance_example.cpp 2010-03-17 08:31:31 EDT (Wed, 17 Mar 2010)
@@ -84,13 +84,16 @@
     double dr = distance(h_rd, ar_xy);
     std::cout << "in RD: " << 0.001 * dr << std::endl;
 
- dr = distance(h, segment_ll_deg(a, r));
+ // Temporary fix: multiply with Earth Radius. This will be refactored.
+ double const er = 6378137.0;
+
+ dr = er * distance(h, segment_ll_deg(a, r));
     std::cout << "in LL: " << 0.001 * dr << std::endl;
 
     std::cout << std::endl << "Rotterdam - line Amsterdam,the Hague" << std::endl;
     dr = distance(r_rd, segment_2d(a_rd, h_rd));
     std::cout << "in RD: " << 0.001 * dr << std::endl;
- dr = distance(r, segment_ll_deg(a, h));
+ dr = er * distance(r, segment_ll_deg(a, h));
     std::cout << "in LL: " << 0.001 * dr << std::endl;
     std::cout << std::endl;
 

Modified: sandbox/geometry/libs/geometry/example/extensions/gis/latlong/distance_example.vcproj
==============================================================================
--- sandbox/geometry/libs/geometry/example/extensions/gis/latlong/distance_example.vcproj (original)
+++ sandbox/geometry/libs/geometry/example/extensions/gis/latlong/distance_example.vcproj 2010-03-17 08:31:31 EDT (Wed, 17 Mar 2010)
@@ -20,7 +20,7 @@
                         OutputDirectory="$(SolutionDir)$(ConfigurationName)"
                         IntermediateDirectory="$(ConfigurationName)\distance_example"
                         ConfigurationType="1"
- InheritedPropertySheets="../../../boost.vsprops"
+ InheritedPropertySheets="..\..\..\boost.vsprops"
                         CharacterSet="1"
>
                         <Tool
@@ -41,7 +41,7 @@
                         <Tool
                                 Name="VCCLCompilerTool"
                                 Optimization="0"
- AdditionalIncludeDirectories="../../../../../../boost"
+ AdditionalIncludeDirectories="../../../../../.."
                                 PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS"
                                 MinimalRebuild="true"
                                 RuntimeLibrary="3"
@@ -96,7 +96,7 @@
                         OutputDirectory="$(SolutionDir)$(ConfigurationName)"
                         IntermediateDirectory="$(ConfigurationName)\distance_example"
                         ConfigurationType="1"
- InheritedPropertySheets="../../../boost.vsprops"
+ InheritedPropertySheets="..\..\..\boost.vsprops"
                         CharacterSet="1"
                         WholeProgramOptimization="1"
>
@@ -117,7 +117,7 @@
                         />
                         <Tool
                                 Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="../../../../../../boost"
+ AdditionalIncludeDirectories="../../../../../.."
                                 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS"
                                 RuntimeLibrary="2"
                                 UsePrecompiledHeader="0"


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk