Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59778 - sandbox/geometry/libs/geometry/test/extensions/algorithms
From: barend.gehrels_at_[hidden]
Date: 2010-02-20 11:00:03


Author: barendgehrels
Date: 2010-02-20 11:00:02 EST (Sat, 20 Feb 2010)
New Revision: 59778
URL: http://svn.boost.org/trac/boost/changeset/59778

Log:
Added moved Extension algorithms
Added:
   sandbox/geometry/libs/geometry/test/extensions/algorithms/extension_algorithms.sln (contents, props changed)
   sandbox/geometry/libs/geometry/test/extensions/algorithms/midpoints.cpp (contents, props changed)
   sandbox/geometry/libs/geometry/test/extensions/algorithms/midpoints.vcproj (contents, props changed)
   sandbox/geometry/libs/geometry/test/extensions/algorithms/remove_holes_if.cpp (contents, props changed)
   sandbox/geometry/libs/geometry/test/extensions/algorithms/remove_holes_if.vcproj (contents, props changed)
   sandbox/geometry/libs/geometry/test/extensions/algorithms/selected.cpp (contents, props changed)
   sandbox/geometry/libs/geometry/test/extensions/algorithms/selected.vcproj (contents, props changed)

Added: sandbox/geometry/libs/geometry/test/extensions/algorithms/extension_algorithms.sln
==============================================================================
--- (empty file)
+++ sandbox/geometry/libs/geometry/test/extensions/algorithms/extension_algorithms.sln 2010-02-20 11:00:02 EST (Sat, 20 Feb 2010)
@@ -0,0 +1,32 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual C++ Express 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "remove_holes_if", "remove_holes_if.vcproj", "{A7E79D37-594F-4337-B748-DB40FAEF7505}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "midpoints", "midpoints.vcproj", "{CE23DFB5-0705-4F13-9FAB-C97F903B3F96}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "selected", "selected.vcproj", "{22DD12E5-4AAD-4066-9C4F-4C360F7759AA}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {A7E79D37-594F-4337-B748-DB40FAEF7505}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A7E79D37-594F-4337-B748-DB40FAEF7505}.Debug|Win32.Build.0 = Debug|Win32
+ {A7E79D37-594F-4337-B748-DB40FAEF7505}.Release|Win32.ActiveCfg = Release|Win32
+ {A7E79D37-594F-4337-B748-DB40FAEF7505}.Release|Win32.Build.0 = Release|Win32
+ {CE23DFB5-0705-4F13-9FAB-C97F903B3F96}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CE23DFB5-0705-4F13-9FAB-C97F903B3F96}.Debug|Win32.Build.0 = Debug|Win32
+ {CE23DFB5-0705-4F13-9FAB-C97F903B3F96}.Release|Win32.ActiveCfg = Release|Win32
+ {CE23DFB5-0705-4F13-9FAB-C97F903B3F96}.Release|Win32.Build.0 = Release|Win32
+ {22DD12E5-4AAD-4066-9C4F-4C360F7759AA}.Debug|Win32.ActiveCfg = Debug|Win32
+ {22DD12E5-4AAD-4066-9C4F-4C360F7759AA}.Debug|Win32.Build.0 = Debug|Win32
+ {22DD12E5-4AAD-4066-9C4F-4C360F7759AA}.Release|Win32.ActiveCfg = Release|Win32
+ {22DD12E5-4AAD-4066-9C4F-4C360F7759AA}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal

Added: sandbox/geometry/libs/geometry/test/extensions/algorithms/midpoints.cpp
==============================================================================
--- (empty file)
+++ sandbox/geometry/libs/geometry/test/extensions/algorithms/midpoints.cpp 2010-02-20 11:00:02 EST (Sat, 20 Feb 2010)
@@ -0,0 +1,57 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library) test file
+//
+// Copyright Barend Gehrels 2007-2009, Geodan, Amsterdam, the Netherlands
+// Copyright Bruno Lalande 2008, 2009
+// 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 <iterator>
+#include <string>
+
+
+#include <ggl_test_common.hpp>
+
+#include <boost/geometry/extensions/algorithms/midpoints.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+
+#include <boost/geometry/util/write_dsv.hpp>
+
+
+#include <boost/geometry/extensions/gis/io/wkt/wkt.hpp>
+
+
+#include <test_common/test_point.hpp>
+
+template <typename G>
+void test_midpoints(const G& g, bool start_and_end)
+{
+ G processed;
+ boost::geometry::midpoints(g, start_and_end, std::back_inserter(processed));
+ std::cout << dsv(processed) << std::endl;
+}
+
+template <typename G>
+void test_midpoints(const std::string& wkt)
+{
+ G g;
+ boost::geometry::read_wkt(wkt, g);
+ test_midpoints(g, true);
+ test_midpoints(g, false);
+}
+
+template <typename P>
+void test_all()
+{
+ test_midpoints<boost::geometry::linestring<P> >("LINESTRING(1 1,2 2,3 3)");
+}
+
+int test_main(int, char* [])
+{
+ //test_all<boost::geometry::point_xy<float> >();
+ test_all<boost::geometry::point_xy<double> >();
+
+ return 0;
+}

Added: sandbox/geometry/libs/geometry/test/extensions/algorithms/midpoints.vcproj
==============================================================================
--- (empty file)
+++ sandbox/geometry/libs/geometry/test/extensions/algorithms/midpoints.vcproj 2010-02-20 11:00:02 EST (Sat, 20 Feb 2010)
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="midpoints"
+ ProjectGUID="{CE23DFB5-0705-4F13-9FAB-C97F903B3F96}"
+ RootNamespace="midpoints"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)\midpoints"
+ 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"
+ MinimalRebuild="true"
+ RuntimeLibrary="3"
+ ExceptionHandling="2"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="4"
+ />
+ <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="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)\midpoints"
+ 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"
+ RuntimeLibrary="2"
+ ExceptionHandling="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="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\midpoints.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/geometry/libs/geometry/test/extensions/algorithms/remove_holes_if.cpp
==============================================================================
--- (empty file)
+++ sandbox/geometry/libs/geometry/test/extensions/algorithms/remove_holes_if.cpp 2010-02-20 11:00:02 EST (Sat, 20 Feb 2010)
@@ -0,0 +1,69 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library) test file
+//
+// Copyright Barend Gehrels 2007-2009, Geodan, Amsterdam, the Netherlands
+// Copyright Bruno Lalande 2008, 2009
+// 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 <iterator>
+#include <string>
+
+
+#include <ggl_test_common.hpp>
+
+#include <boost/geometry/algorithms/num_points.hpp>
+#include <boost/geometry/extensions/algorithms/remove_holes_if.hpp>
+#include <boost/geometry/algorithms/make.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/extensions/gis/io/wkt/read_wkt.hpp>
+
+#include <boost/geometry/strategies/strategies.hpp>
+
+#include <test_common/test_point.hpp>
+
+
+template <typename G, typename Predicate>
+void test_remove_holes_if(std::string const& wkt, Predicate const& predicate,
+ int expected_points)
+{
+ G g;
+ boost::geometry::read_wkt(wkt, g);
+ boost::geometry::remove_holes_if(g, predicate);
+ BOOST_CHECK_EQUAL(boost::geometry::num_points(g), expected_points);
+}
+
+template <typename P>
+void test_all()
+{
+ boost::geometry::elongated_hole<boost::geometry::linear_ring<P> > elongated(0.05);
+
+ // No holes
+ test_remove_holes_if<boost::geometry::polygon<P> >("POLYGON((0 0,0 4,4 4,4 0,0 0))", elongated, 5);
+
+ // Square hole (ratio 1/4), kept
+ test_remove_holes_if<boost::geometry::polygon<P> >("POLYGON((0 0,0 4,4 4,4 0,0 0), (1 1,1 2,2 2,2 1,1 1))", elongated, 10);
+
+ // Elongated hole
+ test_remove_holes_if<boost::geometry::polygon<P> >("POLYGON((0 0,0 4,4 4,4 0,0 0), (1 1,1 2,1.02 2,1.02 1,1 1))", elongated, 5);
+
+ // Invalid hole - removed by "elongated" predicate as well
+ test_remove_holes_if<boost::geometry::polygon<P> >("POLYGON((0 0,0 4,4 4,4 0,0 0), (1 1,1 2))", elongated, 5);
+
+ // Invalid hole
+ boost::geometry::invalid_hole<boost::geometry::linear_ring<P> > invalid;
+ test_remove_holes_if<boost::geometry::polygon<P> >("POLYGON((0 0,0 4,4 4,4 0,0 0), (1 1,1 2))", invalid, 5);
+
+ // Valid hole
+ test_remove_holes_if<boost::geometry::polygon<P> >("POLYGON((0 0,0 4,4 4,4 0,0 0), (1 1,1 2,1.02 2,1.02 1,1 1))", invalid, 10);
+
+}
+
+int test_main(int, char* [])
+{
+ //test_all<boost::geometry::point_xy<float> >();
+ test_all<boost::geometry::point_xy<double> >();
+
+ return 0;
+}

Added: sandbox/geometry/libs/geometry/test/extensions/algorithms/remove_holes_if.vcproj
==============================================================================
--- (empty file)
+++ sandbox/geometry/libs/geometry/test/extensions/algorithms/remove_holes_if.vcproj 2010-02-20 11:00:02 EST (Sat, 20 Feb 2010)
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="remove_holes_if"
+ ProjectGUID="{A7E79D37-594F-4337-B748-DB40FAEF7505}"
+ RootNamespace="remove_holes_if"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)\remove_holes_if"
+ 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"
+ MinimalRebuild="true"
+ ExceptionHandling="2"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="4"
+ />
+ <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)\remove_holes_if"
+ 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=".\remove_holes_if.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/geometry/libs/geometry/test/extensions/algorithms/selected.cpp
==============================================================================
--- (empty file)
+++ sandbox/geometry/libs/geometry/test/extensions/algorithms/selected.cpp 2010-02-20 11:00:02 EST (Sat, 20 Feb 2010)
@@ -0,0 +1,89 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library) test file
+//
+// Copyright Barend Gehrels 2007-2009, Geodan, Amsterdam, the Netherlands
+// Copyright Bruno Lalande 2008, 2009
+// 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)
+
+#if defined(_MSC_VER)
+// We deliberately mix float/double's here so turn off warning
+#pragma warning( disable : 4305 )
+#endif // defined(_MSC_VER)
+
+#include <string>
+
+#include <ggl_test_common.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/extensions/algorithms/selected.hpp>
+#include <boost/geometry/extensions/gis/io/wkt/read_wkt.hpp>
+
+
+#include <test_common/test_point.hpp>
+
+template <typename G, typename P>
+void test_selected(const G& g, const P& point, bool result, double dist)
+{
+ bool sel = boost::geometry::selected(g, point, dist);
+ BOOST_CHECK_EQUAL(sel, result);
+}
+
+template <typename G, typename P>
+void test_selected(const std::string& wkt, const P& point, bool result, double dist)
+{
+ G g;
+ boost::geometry::read_wkt(wkt, g);
+ test_selected(g, point, result, dist);
+}
+
+template <typename P>
+void test_all()
+{
+ test_selected<P>("POINT(1 1)", P(1,1), true, 0.001);
+ test_selected<P>("POINT(1 1)", P(3,3), false, 2);
+ test_selected<P>("POINT(1 1)", P(1,2.00001), false, 1);
+ test_selected<P>("POINT(1 1)", P(1,1.99999), true, 1);
+ test_selected<P>("POINT(1 1)", P(1.99999,1.99999), false, 1);
+
+ test_selected<boost::geometry::linestring<P> >("LINESTRING(1 1,2 2)", P(1,1), true, 0.0001);
+ test_selected<boost::geometry::linestring<P> >("LINESTRING(1 1,2 2)", P(2,2), true, 0.0001);
+ test_selected<boost::geometry::linestring<P> >("LINESTRING(1 1,2 2)", P(2.01,2.01), false, 0.0001);
+ test_selected<boost::geometry::linestring<P> >("LINESTRING(1 1,2 2)", P(1,0.9), false, 0.0001);
+ test_selected<boost::geometry::linestring<P> >("LINESTRING(1 1,2 2)", P(1.5,1.5), true, 0.0001);
+ test_selected<boost::geometry::linestring<P> >("LINESTRING(1 1,2 2)", P(1.5,1.6), false, 0.0001);
+ test_selected<boost::geometry::linestring<P> >("LINESTRING(1 1,2 2,3 0,5 0,5 8)", P(5,5.000001), true, 0.0001);
+
+ // Lines with zero,one points
+ test_selected<boost::geometry::linestring<P> >("LINESTRING( )", P(1,1), false, 0.0001);
+ test_selected<boost::geometry::linestring<P> >("LINESTRING(1 1)", P(1,1), true, 0.0001);
+ test_selected<boost::geometry::linestring<P> >("LINESTRING(1 2)", P(1,1), false, 0.0001);
+
+ // nyi
+ //test_selected<boost::geometry::linear_ring<P> >();
+
+ test_selected<boost::geometry::polygon<P> >("POLYGON((0 0,0 7,4 2,2 0,0 0))", P(0.001, 0.001), true, 0.0001);
+ test_selected<boost::geometry::polygon<P> >("POLYGON((0 0,0 7,4 2,2 0,0 0))", P(1, 1), true, 0.0001);
+ test_selected<boost::geometry::polygon<P> >("POLYGON((0 0,0 7,4 2,2 0,0 0))", P(2, 5), false, 0.0001);
+
+ typedef boost::geometry::box<P> B;
+ test_selected(boost::geometry::make<B>(0,0,4,4), P(2,2), true, 0.001);
+ test_selected(boost::geometry::make<B>(0,0,4,4), P(5,5), false, 0.001);
+ test_selected(boost::geometry::make<B>(0,0,4,4), P(0,0), false, 0.001);
+ test_selected(boost::geometry::make<B>(0,0,4,4), P(4,4), false, 0.001);
+
+ // nyi
+ //test_selected<boost::geometry::segment<P> >();
+ //test_selected<boost::geometry::segment<const P> >();
+}
+
+int test_main(int, char* [])
+{
+ // Integer not applicable here, just because of the tests using floating point
+ // test_all<boost::geometry::point_xy<int> >();
+
+ test_all<boost::geometry::point_xy<float> >();
+ test_all<boost::geometry::point_xy<double> >();
+
+ return 0;
+}

Added: sandbox/geometry/libs/geometry/test/extensions/algorithms/selected.vcproj
==============================================================================
--- (empty file)
+++ sandbox/geometry/libs/geometry/test/extensions/algorithms/selected.vcproj 2010-02-20 11:00:02 EST (Sat, 20 Feb 2010)
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="selected"
+ ProjectGUID="{22DD12E5-4AAD-4066-9C4F-4C360F7759AA}"
+ RootNamespace="selected"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)\selected"
+ 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"
+ MinimalRebuild="true"
+ RuntimeLibrary="3"
+ ExceptionHandling="2"
+ UsePrecompiledHeader="0"
+ DebugInformationFormat="4"
+ />
+ <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="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)\selected"
+ 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"
+ RuntimeLibrary="2"
+ ExceptionHandling="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="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\selected.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>


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