[fix] a few qbk includes were missing

* also fixed frechet/haussdorff documentation
* removed ancient msvc support for doxygen_xml2qbk
* fixes #1309
This commit is contained in:
Barend Gehrels 2024-10-02 15:15:09 +02:00
parent 1ca9ac0bc3
commit 8ab8cb098d
25 changed files with 124 additions and 555 deletions

View File

@ -101,6 +101,7 @@ ALIASES = qbk{1}="\xmlonly <qbk>\1</qbk> \endxmlonly" \
details_calc{1}="The free function \1 calculates the \1 of a geometry" \
details_calc2{2}="The free function \1 calculates the \2 of two geometries" \
details_calc2{1}="The free function \1 calculates the \1 of two geometries" \
details_free_function{3}="The free function [^\1] calculates the \2 \3 two geometries" \
details_check12{2}="The free function \1 checks if the first geometry \2 the second geometry" \
details_macro{2}="The macro \1 registers a \2 such that it is recognized by Boost.Geometry and that Boost.Geometry functionality can used with the specified type." \
details_macro_const="The const version registers only read access to the fields, the point type is therefore read-only." \

View File

@ -11,8 +11,17 @@
[def __this_function__ discrete_frechet_distance]
[heading Behavior]
The algorithm calculate discrete frechet distance between two geometries.
[heading_conformance_no_ogc [^__this_function__]]
[note PostGIS contains an algorithm ST_FrechetDistance with similar functionality.
See the [@https://postgis.net/docs/ST_FrechetDistance.html PostGIS documentation].
]
[heading Supported geometries]
[table
[[Geometries][Status]]
[[Linestring-Linestring][ [$img/ok.png] ]]
]
[note The units of the distance depends on strategy. In order to change the
default behavior a user has to create a strategy and pass it explicitly into

View File

@ -11,8 +11,20 @@
[def __this_function__ discrete_hausdorff_distance]
[heading Behavior]
The algorithm calculate discrete hausdorff distance between two geometries.
[heading_conformance_no_ogc [^__this_function__]]
[note PostGIS contains an algorithm ST_HausdorffDistance with similar functionality.
See the [@https://postgis.net/docs/ST_HausdorffDistance.html PostGIS documentation].
]
[heading Supported geometries]
[table
[[Geometries][Status]]
[[Linestring-Linestring][ [$img/ok.png] ]]
[[MultiPoint-MultiPoint][ [$img/ok.png] ]]
[[Point-MultiPoint][ [$img/ok.png] ]]
[[MultiLineString-MultiLinestring][ [$img/ok.png] ]]
]
[note The units of the distance depends on strategy. In order to change the
default behavior a user has to create a strategy and pass it explicitly into

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="boost"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="$(BOOST_ROOT);..\..\.."
PreprocessorDefinitions="_SCL_SECURE_NO_WARNINGS"
/>
<Tool
Name="VCLinkerTool"
AdditionalLibraryDirectories="$(BOOST_ROOT)\lib"
/>
<UserMacro
Name="BOOST_ROOT"
Value="../../../../../../.."
/>
</VisualStudioPropertySheet>

View File

@ -1,4 +1,4 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Doxygen XML to Quickbook Converter
//
// Copyright (c) 2010-2013 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2012-2013 Adam Wulkiewicz, Lodz, Poland.

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="deployment_path"
>
<UserMacro
Name="DEPLOYMENT_PATH"
Value="c:\software"
PerformEnvironmentSet="true"
/>
</VisualStudioPropertySheet>

View File

@ -1,4 +1,4 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Doxygen XML to Quickbook Converter
//
// Copyright (c) 2010-2013 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2012-2013 Adam Wulkiewicz, Lodz, Poland.

View File

@ -1,6 +1,6 @@
// doxml2qbk (developed in the context of Boost.Geometry documentation)
// Doxygen XML to Quickbook Converter
//
// Copyright (c) 2010-2013 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2010-2024 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2012-2013 Adam Wulkiewicz, Lodz, Poland.
//
// This file was modified by Oracle on 2020.
@ -22,7 +22,6 @@
// using /xmlonly
// currently this is the element <qbk.example> which will make a reference
// to an example.
// - currently still in draft
#include <iostream>
#include <fstream>

View File

@ -1,20 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual C++ Express 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doxygen_xml2qbk", "doxygen_xml2qbk.vcproj", "{81BDA0FD-D3BC-4693-A389-D3ABFAD19214}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{81BDA0FD-D3BC-4693-A389-D3ABFAD19214}.Debug|Win32.ActiveCfg = Debug|Win32
{81BDA0FD-D3BC-4693-A389-D3ABFAD19214}.Debug|Win32.Build.0 = Debug|Win32
{81BDA0FD-D3BC-4693-A389-D3ABFAD19214}.Release|Win32.ActiveCfg = Release|Win32
{81BDA0FD-D3BC-4693-A389-D3ABFAD19214}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -1,226 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="doxygen_xml2qbk"
ProjectGUID="{81BDA0FD-D3BC-4693-A389-D3ABFAD19214}"
RootNamespace="doxygen_xml2qbk"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="1"
InheritedPropertySheets=".\boost.vsprops;.\deployment_path.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".;contrib/rapidxml-1.13"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;BOOST_ALL_NO_LIB"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
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"
CommandLine=""
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="1"
InheritedPropertySheets=".\boost.vsprops;.\deployment_path.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=".;contrib/rapidxml-1.13"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;BOOST_ALL_NO_LIB"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
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"
CommandLine="copy $(OutDir)\doxygen_xml2qbk.exe $(DEPLOYMENT_PATH)"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="program options"
>
<File
RelativePath="..\..\..\..\..\..\program_options\src\cmdline.cpp"
>
</File>
<File
RelativePath="..\..\..\..\..\..\program_options\src\config_file.cpp"
>
</File>
<File
RelativePath="..\..\..\..\..\..\program_options\src\convert.cpp"
>
</File>
<File
RelativePath="..\..\..\..\..\..\program_options\src\options_description.cpp"
>
</File>
<File
RelativePath="..\..\..\..\..\..\program_options\src\parsers.cpp"
>
</File>
<File
RelativePath="..\..\..\..\..\..\program_options\src\positional_options.cpp"
>
</File>
<File
RelativePath="..\..\..\..\..\..\program_options\src\split.cpp"
>
</File>
<File
RelativePath="..\..\..\..\..\..\program_options\src\utf8_codecvt_facet.cpp"
>
</File>
<File
RelativePath="..\..\..\..\..\..\program_options\src\value_semantic.cpp"
>
</File>
<File
RelativePath="..\..\..\..\..\..\program_options\src\variables_map.cpp"
>
</File>
</Filter>
<File
RelativePath=".\doxygen_xml2qbk.cpp"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,6 +1,6 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Doxygen XML to Quickbook Converter
//
// Copyright (c) 2010-2013 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2010-2024 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2012-2013 Adam Wulkiewicz, Lodz, Poland.
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@ -358,6 +358,7 @@ static void copy_parameters_properties(Parameters const& source, Parameters& tar
template <typename Element>
static void parse_element(rapidxml::xml_node<>* node, configuration const& config, std::string const& parent, Element& el)
{
bool parse_sub_nodes = true;
if (node != NULL)
{
std::string name = node->name();
@ -390,23 +391,6 @@ static void parse_element(rapidxml::xml_node<>* node, configuration const& confi
el.location = loc;
el.line = atol(get_attribute(node, "line").c_str());
}
else if (full == ".detaileddescription.para.qbk")
{
el.qbk_markup.push_back(markup(node->value()));
}
else if (full == ".detaileddescription.para.qbk.after.synopsis")
{
el.qbk_markup.push_back(markup(markup_after, markup_synopsis, node->value()));
}
else if (full == ".detaileddescription.para.qbk.before.synopsis")
{
el.qbk_markup.push_back(markup(markup_before, markup_synopsis, node->value()));
}
else if (full == ".detaileddescription.para.qbk.distinguish")
{
el.additional_description = node->value();
boost::trim(el.additional_description);
}
else if (full == ".templateparamlist")
{
parse_parameter_list(node->first_node(), config, el.template_parameters);
@ -458,9 +442,58 @@ static void parse_element(rapidxml::xml_node<>* node, configuration const& confi
parse_parameter(node->first_node(), config, p);
el.parameters.push_back(p);
}
else if (boost::contains(full, ".qbk."))
{
if (boost::ends_with(full, ".distinguish"))
{
// To distinguish betweeen function overloads
// Marked in the source code as, for example:
// \qbk{distinguish,with strategy}
// \qbk{distinguish, 2 coordinate values}
el.additional_description = node->value();
boost::trim(el.additional_description);
parse_sub_nodes = false;
}
else if (boost::ends_with(full, ".synopsis"))
{
// To place the extra quickbook section before or after the synopsis.
// Marked in the source code as, for example:
// \qbk{before.synopsis
if (boost::contains(full, ".before."))
{
el.qbk_markup.push_back(markup(markup_before, markup_synopsis, node->value()));
parse_sub_nodes = false;
}
else if (boost::contains(full, ".after."))
{
el.qbk_markup.push_back(markup(markup_after, markup_synopsis, node->value()));
parse_sub_nodes = false;
}
else
{
std::cerr << "WARNING: Skipping: " << full << " with " << node->value() << std::endl;
}
}
else
{
// To make a quickbook section
// Marked in the source code as, for example:
// \qbk{[include reference/algorithms/area.qbk]}
// \qbk{heading Example}
// \qbk{heading See also}
// \qbk{
// [include reference/algorithms/area.qbk]
// [heading Available Strategies]
// \* [link geometry.reference.strategies.strategy_area_cartesian Cartesian]
// ...
el.qbk_markup.push_back(markup(node->value()));
}
}
parse_element(node->first_node(), config, full, el);
if (parse_sub_nodes)
{
parse_element(node->first_node(), config, full, el);
}
parse_element(node->next_sibling(), config, parent, el);
}
}

View File

@ -1,4 +1,4 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Doxygen XML to Quickbook Converter
//
// Copyright (c) 2010-2013 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2012-2013 Adam Wulkiewicz, Lodz, Poland.

View File

@ -1,13 +0,0 @@
# xml=../../../../doxy/doxygen_output/xml/classboost_1_1geometry_1_1model_1_1d2_1_1point__xy.xml
# xml=../../../../doxy/doxygen_output/xml/classboost_1_1geometry_1_1model_1_1polygon.xml
# xml=../../../../doxy/doxygen_output/xml/group__area.xml
# xml=../../../../doxy/doxygen_output/xml/classboost_1_1geometry_1_1strategy_1_1distance_1_1pythagoras.xml
# xml=../../../../doxy/doxygen_output/xml/group__get.xml
xml=../../../../doxy/doxygen_output/xml/structboost_1_1geometry_1_1closeable__view.xml
start_include=boost/geometry/
convenience_header_path=../../../../../../../boost/geometry/
convenience_headers=geometry.hpp,geometries/geometries.hpp
skip_namespace=boost::geometry::

View File

@ -1,4 +1,4 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Doxygen XML to Quickbook Converter
//
// Copyright (c) 2010-2013 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2012-2013 Adam Wulkiewicz, Lodz, Poland.

View File

@ -1,4 +1,4 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Doxygen XML to Quickbook Converter
//
// Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2012-2015 Adam Wulkiewicz, Lodz, Poland.

View File

@ -1,4 +1,4 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Doxygen XML to Quickbook Converter
//
// Copyright (c) 2010-2013 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2012-2013 Adam Wulkiewicz, Lodz, Poland.

View File

@ -1,4 +1,4 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Doxygen XML to Quickbook Converter
// doxygen_xml2qbk Example
// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.

View File

@ -1,4 +1,4 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Doxygen XML to Quickbook Converter
// doxygen_xml2qbk Example
// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.

View File

@ -1,4 +1,4 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Doxygen XML to Quickbook Converter
// doxygen_xml2qbk Example
// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.

View File

@ -1,19 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual C++ Express 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fruit", "fruit.vcproj", "{CCC26650-0FD5-4DD9-8B76-43DC2B8B0870}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CCC26650-0FD5-4DD9-8B76-43DC2B8B0870}.Debug|Win32.ActiveCfg = Debug|Win32
{CCC26650-0FD5-4DD9-8B76-43DC2B8B0870}.Debug|Win32.Build.0 = Debug|Win32
{CCC26650-0FD5-4DD9-8B76-43DC2B8B0870}.Release|Win32.ActiveCfg = Release|Win32
{CCC26650-0FD5-4DD9-8B76-43DC2B8B0870}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -1,176 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="fruit"
ProjectGUID="{CCC26650-0FD5-4DD9-8B76-43DC2B8B0870}"
RootNamespace="fruit"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
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="Release"
IntermediateDirectory="Release"
ConfigurationType="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
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=".\fruit.cpp"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -297,7 +297,7 @@ struct distance<DynamicGeometry1, DynamicGeometry2, dynamic_geometry_tag, dynami
\* [link geometry.reference.strategies.strategy_distance_haversine Haversine (spherical)]
\* [link geometry.reference.strategies.strategy_distance_cross_track Cross track (spherical\, point-to-segment)]
\* [link geometry.reference.strategies.strategy_distance_projected_point Projected point (cartesian\, point-to-segment)]
\* more (currently extensions): Vincenty\, Andoyer (geographic)
\* One of the geographic point to point strategies
}
*/

View File

@ -225,15 +225,15 @@ struct discrete_frechet_distance<default_strategy, false>
/*!
\brief Calculate discrete Frechet distance between two geometries (currently
works for LineString-LineString) using specified strategy.
\brief \brief_calc2{discrete Frechet distance, between} \brief_strategy
\details \details_free_function{discrete_frechet_distance, discrete Frechet distance, between}.
\ingroup discrete_frechet_distance
\tparam Geometry1 \tparam_geometry
\tparam Geometry2 \tparam_geometry
\tparam Strategy A type fulfilling a DistanceStrategy concept
\param geometry1 Input geometry
\param geometry2 Input geometry
\param strategy Distance strategy to be used to calculate Pt-Pt distance
\tparam Strategy \tparam_strategy{Distance}
\param geometry1 \param_geometry
\param geometry2 \param_geometry
\param strategy \param_strategy{point to point distance}
\qbk{distinguish,with strategy}
\qbk{[include reference/algorithms/discrete_frechet_distance.qbk]}
@ -242,7 +242,8 @@ struct discrete_frechet_distance<default_strategy, false>
[heading Available Strategies]
\* [link geometry.reference.strategies.strategy_distance_pythagoras Pythagoras (cartesian)]
\* [link geometry.reference.strategies.strategy_distance_haversine Haversine (spherical)]
[/ \* more (currently extensions): Vincenty\, Andoyer (geographic) ]
\* One of the geographic point to point strategies
[heading Example]
[discrete_frechet_distance_strategy]
@ -263,13 +264,13 @@ inline auto discrete_frechet_distance(Geometry1 const& geometry1,
// Algorithm overload using default Pt-Pt distance strategy
/*!
\brief Calculate discrete Frechet distance between two geometries (currently
work for LineString-LineString).
\brief \brief_calc2{discrete Frechet distance, between}
\details \details_free_function{discrete_frechet_distance, discrete Frechet distance, between}.
\ingroup discrete_frechet_distance
\tparam Geometry1 \tparam_geometry
\tparam Geometry2 \tparam_geometry
\param geometry1 Input geometry
\param geometry2 Input geometry
\param geometry1 \param_geometry
\param geometry2 \param_geometry
\qbk{[include reference/algorithms/discrete_frechet_distance.qbk]}

View File

@ -314,16 +314,15 @@ struct discrete_hausdorff_distance<default_strategy, false>
/*!
\brief Calculate discrete Hausdorff distance between two geometries (currently
works for LineString-LineString, MultiPoint-MultiPoint, Point-MultiPoint,
MultiLineString-MultiLineString) using specified strategy.
\brief \brief_calc2{discrete Hausdorff distance, between} \brief_strategy
\details \details_free_function{discrete_hausdorff_distance, discrete Hausdorff distance, between}.
\ingroup discrete_hausdorff_distance
\tparam Geometry1 \tparam_geometry
\tparam Geometry2 \tparam_geometry
\tparam Strategy A type fulfilling a DistanceStrategy concept
\param geometry1 Input geometry
\param geometry2 Input geometry
\param strategy Distance strategy to be used to calculate Pt-Pt distance
\tparam Strategy \tparam_strategy{Distance}
\param geometry1 \param_geometry
\param geometry2 \param_geometry
\param strategy \param_strategy{point to point distance}
\qbk{distinguish,with strategy}
\qbk{[include reference/algorithms/discrete_hausdorff_distance.qbk]}
@ -332,7 +331,7 @@ struct discrete_hausdorff_distance<default_strategy, false>
[heading Available Strategies]
\* [link geometry.reference.strategies.strategy_distance_pythagoras Pythagoras (cartesian)]
\* [link geometry.reference.strategies.strategy_distance_haversine Haversine (spherical)]
[/ \* more (currently extensions): Vincenty\, Andoyer (geographic) ]
\* One of the geographic point to point strategies
[heading Example]
[discrete_hausdorff_distance_strategy]
@ -351,14 +350,13 @@ inline auto discrete_hausdorff_distance(Geometry1 const& geometry1,
}
/*!
\brief Calculate discrete Hausdorff distance between two geometries (currently
works for LineString-LineString, MultiPoint-MultiPoint, Point-MultiPoint,
MultiLineString-MultiLineString).
\brief \brief_calc2{discrete Hausdorff distance, between}
\details \details_free_function{discrete_hausdorff_distance, discrete Hausdorff distance, between}.
\ingroup discrete_hausdorff_distance
\tparam Geometry1 \tparam_geometry
\tparam Geometry2 \tparam_geometry
\param geometry1 Input geometry
\param geometry2 Input geometry
\param geometry1 \param_geometry
\param geometry2 \param_geometry
\qbk{[include reference/algorithms/discrete_hausdorff_distance.qbk]}

View File

@ -41,6 +41,15 @@ namespace strategy { namespace distance
namespace comparable
{
// Haversine:
// (from Wiki:) The great circle distance d between two
// points with coordinates {lat1,lon1} and {lat2,lon2} is given by:
// d=acos(sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos(lon1-lon2))
// A mathematically equivalent formula, which is less subject
// to rounding error for short distances is:
// d = 2 * asin(sqrt((sin((lat1-lat2) / 2))^2
// + cos(lat1)*cos(lat2)*(sin((lon1-lon2) / 2))^2))
//
// Comparable haversine.
// To compare distances, we can avoid:
// - multiplication with radius and 2.0
@ -124,13 +133,6 @@ on a perfect sphere using haversine
\tparam CalculationType \tparam_calculation
\author Adapted from: http://williams.best.vwh.net/avform.htm
\see http://en.wikipedia.org/wiki/Great-circle_distance
\note (from Wiki:) The great circle distance d between two
points with coordinates {lat1,lon1} and {lat2,lon2} is given by:
d=acos(sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos(lon1-lon2))
A mathematically equivalent formula, which is less subject
to rounding error for short distances is:
d=2*asin(sqrt((sin((lat1-lat2) / 2))^2
+ cos(lat1)*cos(lat2)*(sin((lon1-lon2) / 2))^2))
\qbk{
[heading See also]
[link geometry.reference.algorithms.distance.distance_3_with_strategy distance (with strategy)]