|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r77215 - trunk/libs/geometry/example_extensions/gis/projections
From: barend.gehrels_at_[hidden]
Date: 2012-03-04 07:57:08
Author: barendgehrels
Date: 2012-03-04 07:57:08 EST (Sun, 04 Mar 2012)
New Revision: 77215
URL: http://svn.boost.org/trac/boost/changeset/77215
Log:
[geometry] updates projection examples w.r.t. style/data location
Text files modified:
trunk/libs/geometry/example_extensions/gis/projections/p01_projection_example.cpp | 10 +++++-----
trunk/libs/geometry/example_extensions/gis/projections/p02_projfactory_example.cpp | 10 +++++-----
trunk/libs/geometry/example_extensions/gis/projections/p03_projmap_example.cpp | 8 ++++----
3 files changed, 14 insertions(+), 14 deletions(-)
Modified: trunk/libs/geometry/example_extensions/gis/projections/p01_projection_example.cpp
==============================================================================
--- trunk/libs/geometry/example_extensions/gis/projections/p01_projection_example.cpp (original)
+++ trunk/libs/geometry/example_extensions/gis/projections/p01_projection_example.cpp 2012-03-04 07:57:08 EST (Sun, 04 Mar 2012)
@@ -8,10 +8,10 @@
//
// Projection example 1, direct
-#include <boost/geometry/geometry.hpp>
+#include <boost/geometry.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
#include <boost/geometry/extensions/algorithms/parse.hpp>
-#include <boost/geometry/io/wkt/stream.hpp>
+
#include <boost/geometry/extensions/gis/latlong/latlong.hpp>
#include <boost/geometry/extensions/gis/projections/parameters.hpp>
#include <boost/geometry/extensions/gis/projections/proj/robin.hpp>
@@ -41,7 +41,7 @@
// Therefore the forward function does not throw but returns false)
if (prj.forward(amsterdam, pa) && prj.forward(barcelona, pb))
{
- std::cout << "Amsterdam: " << pa << std::endl << "Barcelona: " << pb << std::endl;
+ std::cout << "Amsterdam: " << wkt(pa) << std::endl << "Barcelona: " << wkt(pb) << std::endl;
std::cout << "Distance (unprojected):" << distance(amsterdam, barcelona) / 1000.0 << " km" << std::endl;
std::cout << "Distance ( projected):" << distance(pa, pb) / 1000.0 << " km" << std::endl;
@@ -52,8 +52,8 @@
point_ll_deg a1;
if (prj.inverse(pa, a1))
{
- std::cout << "Amsterdam (original): " << amsterdam << std::endl
- << "Amsterdam (projected, and back):" << a1 << std::endl;
+ std::cout << "Amsterdam (original): " << wkt(amsterdam) << std::endl
+ << "Amsterdam (projected, and back):" << wkt(a1) << std::endl;
std::cout << "Distance a-a': " << distance(amsterdam, a1) << " meter" << std::endl;
}
}
Modified: trunk/libs/geometry/example_extensions/gis/projections/p02_projfactory_example.cpp
==============================================================================
--- trunk/libs/geometry/example_extensions/gis/projections/p02_projfactory_example.cpp (original)
+++ trunk/libs/geometry/example_extensions/gis/projections/p02_projfactory_example.cpp 2012-03-04 07:57:08 EST (Sun, 04 Mar 2012)
@@ -8,9 +8,9 @@
//
// Projection example 2, using factory
-#include <boost/geometry/geometry.hpp>
+#include <boost/geometry.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/io/wkt/stream.hpp>
+
#include <boost/geometry/extensions/gis/latlong/latlong.hpp>
#include <boost/geometry/extensions/gis/projections/parameters.hpp>
#include <boost/geometry/extensions/gis/projections/factory.hpp>
@@ -45,7 +45,7 @@
// Do the forward projection
if (prj->forward(amsterdam, pa) && prj->forward(barcelona, pb))
{
- std::cout << "Amsterdam: " << pa << std::endl << "Barcelona: " << pb << std::endl;
+ std::cout << "Amsterdam: " << wkt(pa) << std::endl << "Barcelona: " << wkt(pb) << std::endl;
std::cout << "Distance (unprojected):" << distance(amsterdam, barcelona) / 1000.0 << " km" << std::endl;
std::cout << "Distance ( projected):" << distance(pa, pb) / 1000.0 << " km" << std::endl;
@@ -54,8 +54,8 @@
point_ll_deg a1;
if (prj->inverse(pa, a1))
{
- std::cout << "Amsterdam (original): " << amsterdam << std::endl
- << "Amsterdam (projected, and back):" << a1 << std::endl;
+ std::cout << "Amsterdam (original): " << wkt(amsterdam) << std::endl
+ << "Amsterdam (projected, and back):" << wkt(a1) << std::endl;
std::cout << "Distance a-a': " << distance(amsterdam, a1) << " meter" << std::endl;
}
}
Modified: trunk/libs/geometry/example_extensions/gis/projections/p03_projmap_example.cpp
==============================================================================
--- trunk/libs/geometry/example_extensions/gis/projections/p03_projmap_example.cpp (original)
+++ trunk/libs/geometry/example_extensions/gis/projections/p03_projmap_example.cpp 2012-03-04 07:57:08 EST (Sun, 04 Mar 2012)
@@ -6,16 +6,16 @@
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
-// Projection example 3, combined with shapelib and GD
+// Projection example 3, combined with shapelib and SVG
#include <fstream>
-#include <boost/geometry/geometry.hpp>
+#include <boost/geometry.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
#include <boost/geometry/geometries/register/point.hpp>
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
+
#include <boost/geometry/extensions/io/svg/write_svg.hpp>
-#include <boost/geometry/multi/io/wkt/read.hpp>
#include <boost/geometry/extensions/gis/latlong/latlong.hpp>
#include <boost/geometry/extensions/gis/projections/project_transformer.hpp>
@@ -132,7 +132,7 @@
// Note, file location: trunk/libs/geometry/example/data
// update path below if necessary
read_wkt_and_project_and_write_svg(
- "../../../data/world.wkt",
+ "../../../example/data/world.wkt",
"+proj=moll +ellps=clrk66",
"world.svg");
}
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