Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61463 - in sandbox/geometry: boost/geometry/extensions/algorithms boost/geometry/multi/algorithms libs/geometry/test libs/geometry/test/extensions/algorithms libs/geometry/test/multi/algorithms
From: barend.gehrels_at_[hidden]
Date: 2010-04-21 10:42:38


Author: barendgehrels
Date: 2010-04-21 10:42:35 EDT (Wed, 21 Apr 2010)
New Revision: 61463
URL: http://svn.boost.org/trac/boost/changeset/61463

Log:
Moved "dissolve multi_linestring" to separate algorithm "connect" (in Extension) because it is actually not dissolve, and will need separate strategies
Added:
   sandbox/geometry/boost/geometry/extensions/algorithms/connect.hpp (contents, props changed)
   sandbox/geometry/libs/geometry/test/extensions/algorithms/connect.cpp (contents, props changed)
   sandbox/geometry/libs/geometry/test/extensions/algorithms/connect.vcproj (contents, props changed)
Text files modified:
   sandbox/geometry/boost/geometry/multi/algorithms/dissolve.hpp | 194 ---------------------------------------
   sandbox/geometry/libs/geometry/test/boost.vsprops | 1
   sandbox/geometry/libs/geometry/test/extensions/algorithms/extension_algorithms.sln | 6 +
   sandbox/geometry/libs/geometry/test/multi/algorithms/multi_dissolve.cpp | 26 -----
   4 files changed, 10 insertions(+), 217 deletions(-)

Added: sandbox/geometry/boost/geometry/extensions/algorithms/connect.hpp
==============================================================================
--- (empty file)
+++ sandbox/geometry/boost/geometry/extensions/algorithms/connect.hpp 2010-04-21 10:42:35 EDT (Wed, 21 Apr 2010)
@@ -0,0 +1,282 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright Barend Gehrels 2010, Geodan, Amsterdam, the Netherlands.
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_ALGORITHMS_CONNECT_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_ALGORITHMS_CONNECT_HPP
+
+#include <map>
+
+
+#include <boost/range/functions.hpp>
+#include <boost/range/metafunctions.hpp>
+
+
+#include <boost/geometry/core/point_type.hpp>
+#include <boost/geometry/algorithms/distance.hpp>
+#include <boost/geometry/multi/core/tags.hpp>
+#include <boost/geometry/strategies/distance_result.hpp>
+#include <boost/geometry/policies/compare.hpp>
+
+#include <boost/geometry/geometries/concepts/check.hpp>
+
+
+
+namespace boost { namespace geometry
+{
+
+
+#ifndef DOXYGEN_NO_DETAIL
+namespace detail { namespace connect
+{
+
+// Dissolve on multi_linestring tries to create larger linestrings from input,
+// or closed rings.
+
+template <typename Multi, typename GeometryOut>
+struct connect_multi_linestring
+{
+ typedef typename point_type<Multi>::type point_type;
+ typedef typename boost::range_iterator<Multi const>::type iterator_type;
+ typedef typename boost::range_value<Multi>::type linestring_type;
+ typedef typename distance_result<point_type>::type distance_result_type;
+
+ struct mapped
+ {
+ int index;
+ bool is_from;
+ mapped(int i, bool f) : index(i), is_from(f)
+ {}
+ };
+
+ // Have a map<point, <index,start/end> > such that we can find
+ // the corresponding point on each end. Note that it uses the
+ // default "equals" for the point-type
+ typedef std::multimap
+ <
+ point_type,
+ mapped,
+ boost::geometry::less<point_type>
+ > map_type;
+
+ typedef typename map_type::const_iterator map_iterator_type;
+
+ static inline void copy(linestring_type const& ls,
+ GeometryOut& target,
+ bool copy_forward)
+ {
+ if (copy_forward)
+ {
+ std::copy(boost::begin(ls), boost::end(ls),
+ std::back_inserter(target));
+ }
+ else
+ {
+ std::reverse_copy(boost::begin(ls), boost::end(ls),
+ std::back_inserter(target));
+ }
+ }
+
+ static inline map_iterator_type find_start(map_type const& map,
+ std::map<int, bool>& included, int expected_count = 1)
+ {
+ for (map_iterator_type it = map.begin();
+ it != map.end();
+ ++it)
+ {
+ typename map_type::size_type count = map.count(it->first);
+ if (count == expected_count && ! included[it->second.index])
+ {
+ included[it->second.index] = true;
+ return it;
+ }
+ }
+
+ // Not found with one point, try one with two points
+ // to find rings
+ if (expected_count == 1)
+ {
+ return find_start(map, included, 2);
+ }
+
+ return map.end();
+ }
+
+ template <typename OutputIterator>
+ static inline OutputIterator apply(Multi const& multi, OutputIterator out)
+ {
+ if (boost::size(multi) <= 0)
+ {
+ return out;
+ }
+
+ map_type map;
+
+ // 1: fill the map.
+ int index = 0;
+ for (iterator_type it = boost::begin(multi);
+ it != boost::end(multi);
+ ++it, ++index)
+ {
+ linestring_type const& ls = *it;
+ if (boost::size(ls) > 0)
+ {
+ map.insert(std::make_pair(*boost::begin(ls), mapped(index, true)));
+ map.insert(std::make_pair(*(boost::end(ls) - 1), mapped(index, false)));
+ }
+ }
+
+ std::map<int, bool> included;
+
+ // 2: connect the lines
+
+ // 2a: start with one having a unique starting point
+ map_iterator_type first = find_start(map, included);
+ bool found = first != map.end();
+ if (! found)
+ {
+ return out;
+ }
+
+ int current_index = first->second.index;
+ GeometryOut current;
+ copy(multi[current_index], current, first->second.is_from);
+
+ while(found)
+ {
+ // 2b: get all candidates, by asking multi-map for range
+ point_type const& p = *(boost::end(current) - 1);
+ std::pair<map_iterator_type, map_iterator_type> range
+ = map.equal_range(p);
+
+ // Alternatively, we might look for the closest points
+ if (range.first == map.end())
+ {
+ std::cout << "nothing found" << std::endl;
+ }
+
+ // 2c: for all candidates get closest one
+ found = false;
+ int closest_index = -1;
+ bool from_is_closest = false;
+ // TODO: make utility to initalize distance result with large value
+ distance_result_type min_dist
+ = make_distance_result<distance_result_type>(100);
+ for (map_iterator_type it = range.first;
+ ! found && it != range.second;
+ ++it)
+ {
+ if (it->second.index != current_index
+ && ! included[it->second.index])
+ {
+ linestring_type const& ls = multi[it->second.index];
+ point_type const& p = it->second.is_from
+ ? *boost::begin(ls)
+ : *(boost::end(ls) - 1);
+
+ distance_result_type d = geometry::distance(it->first, p);
+ if (! found || d < min_dist)
+ {
+ closest_index = it->second.index;
+ from_is_closest = it->second.is_from;
+ min_dist = d;
+
+ //std::cout << "TO " << geometry::wkt(p) << std::endl;
+ }
+ found = true;
+ }
+ }
+ // 2d: if there is a closest one add it
+ if (found && closest_index >= 0)
+ {
+ current_index = closest_index;
+ included[current_index] = true;
+ copy(multi[current_index], current, from_is_closest);
+ }
+
+ if (! found && (included.size() != boost::size(multi)))
+ {
+ // Get one which is NOT found and go again
+ map_iterator_type next = find_start(map, included);
+ found = next != map.end();
+
+ if (found)
+ {
+ current_index = next->second.index;
+
+ *out++ = current;
+ geometry::clear(current);
+
+ copy(multi[current_index], current, next->second.is_from);
+ }
+ }
+ }
+ if (boost::size(current) > 0)
+ {
+ *out++ = current;
+ }
+
+ return out;
+ }
+};
+
+}} // namespace detail::connect
+#endif
+
+
+
+#ifndef DOXYGEN_NO_DISPATCH
+namespace dispatch
+{
+
+template
+<
+ typename GeometryTag,
+ typename GeometryOutTag,
+ typename Geometry,
+ typename GeometryOut
+>
+struct connect
+{};
+
+
+template<typename Multi, typename GeometryOut>
+struct connect<multi_linestring_tag, linestring_tag, Multi, GeometryOut>
+ : detail::connect::connect_multi_linestring<Multi, GeometryOut>
+{};
+
+
+} // namespace dispatch
+#endif // DOXYGEN_NO_DISPATCH
+
+
+template
+<
+ typename Geometry,
+ typename Collection
+>
+inline void connect(Geometry const& geometry, Collection& output_collection)
+{
+ concept::check<Geometry const>();
+
+ typedef typename boost::range_value<Collection>::type geometry_out;
+
+ concept::check<geometry_out>();
+
+ dispatch::connect
+ <
+ typename tag<Geometry>::type,
+ typename tag<geometry_out>::type,
+ Geometry,
+ geometry_out
+ >::apply(geometry, std::back_inserter(output_collection));
+}
+
+
+}} // namespace boost::geometry
+
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_ALGORITHMS_CONNECT_HPP

Modified: sandbox/geometry/boost/geometry/multi/algorithms/dissolve.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/multi/algorithms/dissolve.hpp (original)
+++ sandbox/geometry/boost/geometry/multi/algorithms/dissolve.hpp 2010-04-21 10:42:35 EDT (Wed, 21 Apr 2010)
@@ -63,191 +63,9 @@
     }
 };
 
-
-// Dissolve on multi_linestring tries to create larger linestrings from input,
-// or closed rings.
-
-template <typename Multi, typename GeometryOut>
-struct dissolve_multi_linestring
-{
- typedef typename point_type<Multi>::type point_type;
- typedef typename boost::range_iterator<Multi const>::type iterator_type;
- typedef typename boost::range_value<Multi>::type linestring_type;
- typedef typename distance_result<point_type>::type distance_result_type;
-
- struct mapped
- {
- int index;
- bool is_from;
- mapped(int i, bool f) : index(i), is_from(f)
- {}
- };
-
- // Have a map<point, <index,start/end> > such that we can find
- // the corresponding point on each end. Note that it uses the
- // default "equals" for the point-type
- typedef std::multimap
- <
- point_type,
- mapped,
- boost::geometry::less<point_type>
- > map_type;
-
- typedef typename map_type::const_iterator map_iterator_type;
-
- static inline void copy(linestring_type const& ls,
- GeometryOut& target,
- bool copy_forward)
- {
- if (copy_forward)
- {
- std::copy(boost::begin(ls), boost::end(ls),
- std::back_inserter(target));
- }
- else
- {
- std::reverse_copy(boost::begin(ls), boost::end(ls),
- std::back_inserter(target));
- }
- }
-
- static inline map_iterator_type find_start(map_type const& map,
- std::map<int, bool>& included, int expected_count = 1)
- {
- for (map_iterator_type it = map.begin();
- it != map.end();
- ++it)
- {
- int count = map.count(it->first);
- if (count == expected_count && ! included[it->second.index])
- {
- included[it->second.index] = true;
- return it;
- }
- }
-
- // Not found with one point, try one with two points
- // to find rings
- if (expected_count == 1)
- {
- return find_start(map, included, 2);
- }
-
- return map.end();
- }
-
- template <typename OutputIterator>
- static inline OutputIterator apply(Multi const& multi, OutputIterator out)
- {
- if (boost::size(multi) <= 0)
- {
- return out;
- }
-
- map_type map;
-
- // 1: fill the map.
- int index = 0;
- for (iterator_type it = boost::begin(multi);
- it != boost::end(multi);
- ++it, ++index)
- {
- linestring_type const& ls = *it;
- if (boost::size(ls) > 0)
- {
- map.insert(std::make_pair(*boost::begin(ls), mapped(index, true)));
- map.insert(std::make_pair(*(boost::end(ls) - 1), mapped(index, false)));
- }
- }
-
- std::map<int, bool> included;
-
- // 2: merge (dissolve) the lines
-
- // 2a: start with one having a unique starting point
- map_iterator_type first = find_start(map, included);
- bool found = first != map.end();
- if (! found)
- {
- return out;
- }
-
- int current_index = first->second.index;
- GeometryOut current;
- copy(multi[current_index], current, first->second.is_from);
-
- while(found)
- {
- // 2b: get all candidates, ask for range
- point_type const& p = *(boost::end(current) - 1);
- std::pair<map_iterator_type, map_iterator_type> range
- = map.equal_range(p);
-
- // 2c: for all candidates get closest one
- found = false;
- int closest_index = -1;
- bool from_is_closest = false;
- // TODO: make utility to initalize distance result with large value
- distance_result_type min_dist
- = make_distance_result<distance_result_type>(100);
- for (map_iterator_type it = range.first;
- ! found && it != range.second;
- ++it)
- {
- if (it->second.index != current_index
- && ! included[it->second.index])
- {
- linestring_type const& ls = multi[it->second.index];
- point_type const& p = it->second.is_from
- ? *boost::begin(ls)
- : *(boost::end(ls) - 1);
-
- distance_result_type d = geometry::distance(it->first, p);
- if (! found || d < min_dist)
- {
- closest_index = it->second.index;
- from_is_closest = it->second.is_from;
- min_dist = d;
-
- //std::cout << "TO " << geometry::wkt(p) << std::endl;
- }
- found = true;
- }
- }
- // 2d: if there is a closest one add it
- if (found && closest_index >= 0)
- {
- current_index = closest_index;
- included[current_index] = true;
- copy(multi[current_index], current, from_is_closest);
- }
-
- if (! found && (included.size() != boost::size(multi)))
- {
- // Get one which is NOT found and go again
- map_iterator_type next = find_start(map, included);
- found = next != map.end();
-
- if (found)
- {
- current_index = next->second.index;
-
- *out++ = current;
- geometry::clear(current);
-
- copy(multi[current_index], current, next->second.is_from);
- }
- }
- }
- if (boost::size(current) > 0)
- {
- *out++ = current;
- }
-
- return out;
- }
-};
-
+// Dissolving multi-linestring is currently moved to extensions/algorithms/connect,
+// because it is actually different from dissolving of polygons.
+// To be decided what the final behaviour/name is.
 
 }} // namespace detail::dissolve
 #endif
@@ -265,12 +83,6 @@
 {};
 
 
-template<typename Multi, typename GeometryOut>
-struct dissolve<multi_linestring_tag, linestring_tag, Multi, GeometryOut>
- : detail::dissolve::dissolve_multi_linestring<Multi, GeometryOut>
-{};
-
-
 
 } // namespace dispatch
 #endif // DOXYGEN_NO_DISPATCH

Modified: sandbox/geometry/libs/geometry/test/boost.vsprops
==============================================================================
--- sandbox/geometry/libs/geometry/test/boost.vsprops (original)
+++ sandbox/geometry/libs/geometry/test/boost.vsprops 2010-04-21 10:42:35 EDT (Wed, 21 Apr 2010)
@@ -7,6 +7,7 @@
         <Tool
                 Name="VCCLCompilerTool"
                 AdditionalIncludeDirectories="$(BOOST_ROOT);..\..\.."
+ PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
                 WarningLevel="3"
         />
         <Tool

Added: sandbox/geometry/libs/geometry/test/extensions/algorithms/connect.cpp
==============================================================================
--- (empty file)
+++ sandbox/geometry/libs/geometry/test/extensions/algorithms/connect.cpp 2010-04-21 10:42:35 EDT (Wed, 21 Apr 2010)
@@ -0,0 +1,181 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library) test file
+//
+// Copyright Barend Gehrels 2010, Geodan, Amsterdam, the Netherlands
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <iostream>
+#include <string>
+
+#include <geometry_test_common.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/algorithms/num_points.hpp>
+#include <boost/geometry/algorithms/unique.hpp>
+#include <boost/geometry/extensions/algorithms/connect.hpp>
+#include <boost/geometry/extensions/gis/io/wkt/read_wkt_multi.hpp>
+#include <boost/geometry/multi/algorithms/area.hpp>
+#include <boost/geometry/multi/algorithms/length.hpp>
+#include <boost/geometry/multi/algorithms/num_points.hpp>
+#include <boost/geometry/multi/algorithms/unique.hpp>
+#include <boost/geometry/multi/geometries/multi_linestring.hpp>
+#include <boost/geometry/strategies/strategies.hpp>
+
+
+#if defined(TEST_WITH_SVG)
+# include <boost/geometry/multi/algorithms/envelope.hpp>
+# include <boost/geometry/multi/core/is_multi.hpp>
+# include <boost/geometry/extensions/io/svg/svg_mapper.hpp>
+#endif
+
+
+template <typename GeometryOut, typename Geometry>
+void test_connect(std::string const& caseid, Geometry const& geometry,
+ std::size_t expected_point_count,
+ double expected_length, double percentage)
+{
+ namespace bg = boost::geometry;
+ typedef typename bg::coordinate_type<Geometry>::type coordinate_type;
+
+ std::vector<GeometryOut> connected_vector;
+ bg::connect(geometry, connected_vector);
+
+ typename bg::length_result<Geometry>::type length = 0;
+ std::size_t count = 0;
+
+ BOOST_FOREACH(GeometryOut& dissolved, connected_vector)
+ {
+ bg::unique(dissolved);
+ length += bg::length(dissolved);
+ count += bg::num_points(dissolved);
+ }
+
+ BOOST_CHECK_MESSAGE(count == expected_point_count,
+ "connect: " << caseid
+ << " #points expected: " << expected_point_count
+ << " detected: " << count
+ << " type: " << string_from_type<coordinate_type>::name()
+ );
+
+
+ //BOOST_CHECK_EQUAL(holes, expected_hole_count);
+ BOOST_CHECK_CLOSE(length, expected_length, percentage);
+
+
+#if defined(TEST_WITH_SVG)
+ {
+ std::ostringstream filename;
+ filename << "connect_"
+ << caseid << "_"
+ << string_from_type<coordinate_type>::name()
+ << ".svg";
+
+ std::ofstream svg(filename.str().c_str());
+
+ bg::svg_mapper
+ <
+ typename bg::point_type<Geometry>::type
+ > mapper(svg, 500, 500);
+ mapper.add(geometry);
+
+ mapper.map(geometry, "opacity:0.6;fill:rgb(0,0,255);stroke:rgb(0,0,0);stroke-width:1");
+ BOOST_FOREACH(GeometryOut& dissolved, connected_vector)
+ {
+ mapper.map(dissolved, "opacity:0.6;fill:none;stroke:rgb(255,0,0);stroke-width:5");
+ }
+ }
+#endif
+}
+
+
+template <typename Geometry, typename GeometryOut>
+void test_one(std::string const& caseid, std::string const& wkt,
+ std::size_t expected_point_count,
+ double expected_length, double percentage = 0.001)
+{
+ Geometry geometry;
+ boost::geometry::read_wkt(wkt, geometry);
+
+ test_connect<GeometryOut>(caseid, geometry,
+ expected_point_count,
+ expected_length, percentage);
+
+#ifdef BOOST_GEOMETRY_TEST_MULTI_PERMUTATIONS
+ // Test different combinations of a multi-polygon
+
+ int n = geometry.size();
+
+ // test them in all orders
+ std::vector<int> indices;
+ for (int i = 0; i < n; i++)
+ {
+ indices.push_back(i);
+ }
+ int permutation = 0;
+ do
+ {
+ std::ostringstream out;
+ out << caseid;
+ Geometry geometry2;
+ for (int i = 0; i < n; i++)
+ {
+ int index = indices[i];
+ out << "_" << index;
+ geometry2.push_back(geometry[index]);
+ }
+ test_connect<GeometryOut>(out.str(), geometry2,
+ expected_point_count, expected_length, percentage);
+ } while (std::next_permutation(indices.begin(), indices.end()));
+#endif
+
+}
+
+
+
+
+template <typename P>
+void test_all()
+{
+ namespace bg = boost::geometry;
+
+
+ typedef bg::linestring<P> linestring;
+ typedef bg::multi_linestring<linestring> multi_linestring;
+
+ test_one<multi_linestring, linestring>("ls_simplex",
+ "MULTILINESTRING((0 0,1 1),(1 1,2 2))",
+ 3, 2 * std::sqrt(2.0));
+
+ // Opposites, forming one line
+ test_one<multi_linestring, linestring>("ls_simplex_opposite_to",
+ "MULTILINESTRING((0 0,1 1),(2 2,1 1))",
+ 3, 2 * std::sqrt(2.0));
+ test_one<multi_linestring, linestring>("ls_simplex_opposite_from",
+ "MULTILINESTRING((1 1,0 0),(1 1,2 2))",
+ 3, 2 * std::sqrt(2.0));
+
+ // Two output linestrings
+ test_one<multi_linestring, linestring>("ls_simplex_two",
+ "MULTILINESTRING((0 0,1 1),(1 1,2 2),(3 3,4 4),(4 4,5 5))",
+ 6, 4 * std::sqrt(2.0));
+
+ // Linestrings forming a ring
+ test_one<multi_linestring, linestring>("ls_simplex_ring",
+ "MULTILINESTRING((0 0,0 1),(1 1,1 0),(0 1,1 1),(1 0,0 0))",
+ 5, 4.0);
+
+ // disconnected ring
+ test_one<multi_linestring, linestring>("ls_disconnected_ring",
+ "MULTILINESTRING((0 0,0 1.01),(1.02 1.03,0.99 0),(0 0.98,1.001 1),(1.01 0,0 0))",
+ 5, 4.0);
+}
+
+
+int test_main(int, char* [])
+{
+ test_all<boost::geometry::point_xy<double> >();
+
+ return 0;
+}

Added: sandbox/geometry/libs/geometry/test/extensions/algorithms/connect.vcproj
==============================================================================
--- (empty file)
+++ sandbox/geometry/libs/geometry/test/extensions/algorithms/connect.vcproj 2010-04-21 10:42:35 EDT (Wed, 21 Apr 2010)
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="connect"
+ ProjectGUID="{D502500F-AF66-4F24-8735-09DF8A7DF6AA}"
+ RootNamespace="connect"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)\connect"
+ ConfigurationType="1"
+ InheritedPropertySheets="..\..\boost.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../../..;../..;."
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;TEST_WITH_SVG;BOOST_GEOMETRY_TEST_MULTI_PERMUTATIONS___disabled"
+ MinimalRebuild="true"
+ ExceptionHandling="2"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="kernel32.lib $(NoInherit)"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)\connect"
+ ConfigurationType="1"
+ InheritedPropertySheets="..\..\boost.vsprops"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../../..;../..;."
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="2"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="kernel32.lib $(NoInherit)"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\connect.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Modified: sandbox/geometry/libs/geometry/test/extensions/algorithms/extension_algorithms.sln
==============================================================================
--- sandbox/geometry/libs/geometry/test/extensions/algorithms/extension_algorithms.sln (original)
+++ sandbox/geometry/libs/geometry/test/extensions/algorithms/extension_algorithms.sln 2010-04-21 10:42:35 EDT (Wed, 21 Apr 2010)
@@ -9,6 +9,8 @@
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "remove_spikes", "remove_spikes.vcproj", "{3EA21C81-DE4A-410D-AABE-CDC5091DAB6E}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "connect", "connect.vcproj", "{D502500F-AF66-4F24-8735-09DF8A7DF6AA}"
+EndProject
 Global
         GlobalSection(SolutionConfigurationPlatforms) = preSolution
                 Debug|Win32 = Debug|Win32
@@ -31,6 +33,10 @@
                 {3EA21C81-DE4A-410D-AABE-CDC5091DAB6E}.Debug|Win32.Build.0 = Debug|Win32
                 {3EA21C81-DE4A-410D-AABE-CDC5091DAB6E}.Release|Win32.ActiveCfg = Release|Win32
                 {3EA21C81-DE4A-410D-AABE-CDC5091DAB6E}.Release|Win32.Build.0 = Release|Win32
+ {D502500F-AF66-4F24-8735-09DF8A7DF6AA}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D502500F-AF66-4F24-8735-09DF8A7DF6AA}.Debug|Win32.Build.0 = Debug|Win32
+ {D502500F-AF66-4F24-8735-09DF8A7DF6AA}.Release|Win32.ActiveCfg = Release|Win32
+ {D502500F-AF66-4F24-8735-09DF8A7DF6AA}.Release|Win32.Build.0 = Release|Win32
         EndGlobalSection
         GlobalSection(SolutionProperties) = preSolution
                 HideSolutionNode = FALSE

Modified: sandbox/geometry/libs/geometry/test/multi/algorithms/multi_dissolve.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/test/multi/algorithms/multi_dissolve.cpp (original)
+++ sandbox/geometry/libs/geometry/test/multi/algorithms/multi_dissolve.cpp 2010-04-21 10:42:35 EDT (Wed, 21 Apr 2010)
@@ -58,32 +58,6 @@
         "MULTIPOLYGON(((0 0,1 4,4 1,0 0)),((2 2,3 6,6 3,2 2)),((3 4,5 6,6 2,3 4)),((3 1,5 4,8 4,3 1)))",
         1, 18, 19.5206);
 
- // Linestrings
- typedef bg::linestring<P> linestring;
- typedef bg::multi_linestring<linestring> multi_linestring;
-
- test_one<multi_linestring, linestring>("ls_simplex",
- "MULTILINESTRING((0 0,1 1),(1 1,2 2))",
- 0, 3, 2 * std::sqrt(2.0));
-
- // Opposites, forming one line
- test_one<multi_linestring, linestring>("ls_simplex_opposite_to",
- "MULTILINESTRING((0 0,1 1),(2 2,1 1))",
- 0, 3, 2 * std::sqrt(2.0));
- test_one<multi_linestring, linestring>("ls_simplex_opposite_from",
- "MULTILINESTRING((1 1,0 0),(1 1,2 2))",
- 0, 3, 2 * std::sqrt(2.0));
-
- // Two output linestrings
- test_one<multi_linestring, linestring>("ls_simplex_two",
- "MULTILINESTRING((0 0,1 1),(1 1,2 2),(3 3,4 4),(4 4,5 5))",
- 0, 6, 4 * std::sqrt(2.0));
-
- // Linestrings forming a ring
- test_one<multi_linestring, linestring>("ls_simplex_ring",
- "MULTILINESTRING((0 0,0 1),(1 1,1 0),(0 1,1 1),(1 0,0 0))",
- 0, 5, 4.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