Renamed linear_ring to ring (linear_ring is still available)

Doc update
Renamed some template parameters (for doc)

[SVN r68385]
This commit is contained in:
Barend Gehrels
2011-01-23 16:04:35 +00:00
parent 89aed2c3c8
commit 1e823499b6
34 changed files with 370 additions and 152 deletions

View File

@@ -249,18 +249,18 @@ inline typename area_result<Geometry>::type area(Geometry const& geometry)
\qbk{distinguish,with strategy}
\qbk_begin
\qbk{
[include ref/algorithms/area.qbk]
[heading Example]
[area_with_strategy]
[area_with_strategy_output]
[heading Available strategies]
[heading Available Strategies]
\* [link geometry.reference.strategies.strategy_area_surveyor Surveyor (cartesian)]
\* [link geometry.reference.strategies.strategy_area_huiller Huiller (spherical)]
\qbk_end
}
*/
template <typename Geometry, typename Strategy>
inline typename Strategy::return_type area(

View File

@@ -694,7 +694,7 @@ struct assign_null_policy
\tparam Point1 point type of first segment
\tparam Point2 point type of second segment
\tparam TurnInfo type of class getting intersection and turn info
\tparam AssignPolicy optional policy to assign extra info,
\tparam AssignPolicy policy to assign extra info,
e.g. to calculate distance from segment's first points
to intersection points
*/

View File

@@ -476,15 +476,14 @@ struct distance_reversed
\qbk{distinguish,with strategy}
\qbk_begin
[heading Available strategies]
\qbk{
[heading Available Strategies]
\* [link geometry.reference.strategies.strategy_distance_pythagoras Pythagoras (cartesian)]
\* [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)]
\qbk_end
\* [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)
}
*/
/*

View File

@@ -23,7 +23,7 @@
// TODO: take "const" into account
#include <boost/geometry/geometries/point.hpp>
#include <boost/geometry/geometries/linestring.hpp>
#include <boost/geometry/geometries/linear_ring.hpp>
#include <boost/geometry/geometries/ring.hpp>
#include <boost/geometry/geometries/polygon.hpp>
#include <boost/geometry/geometries/segment.hpp>
#include <boost/geometry/geometries/box.hpp>
@@ -59,7 +59,7 @@ struct replace_point_type<segment_tag, Geometry, NewPointType>
template <typename Geometry, typename NewPointType>
struct replace_point_type<ring_tag, Geometry, NewPointType>
{
typedef model::linear_ring<NewPointType> type;
typedef model::ring<NewPointType> type;
};
template <typename Geometry, typename NewPointType>

View File

@@ -262,7 +262,7 @@ struct remove_elongated_spikes
coordinate_type d1 = geometry::distance(prev, current);
if (d1 < m_distance_limit)
{
geometry::model::linear_ring<Point> triangle;
geometry::model::ring<Point> triangle;
triangle.push_back(prev);
triangle.push_back(current);
triangle.push_back(next);

View File

@@ -28,19 +28,20 @@ namespace strategy { namespace distance
/*!
\brief Point-point distance approximation taking flattening into account
\ingroup distance
\tparam Point1 first point type
\tparam Point2 optional second point type
\author After Andoyer, 19xx, republished 1950, republished by Meeus, 1999
\note Although not so well-known, the approximation is very good: in all cases the results
are about the same as Vincenty. In my (Barend's) testcases the results didn't differ more than 6 m
\see http://nacc.upc.es/tierra/node16.html
\see http://sci.tech-archive.net/Archive/sci.geo.satellite-nav/2004-12/2724.html
\see http://home.att.net/~srschmitt/great_circle_route.html (implementation)
\see http://www.codeguru.com/Cpp/Cpp/algorithms/article.php/c5115 (implementation)
\see http://futureboy.homeip.net/frinksamp/navigation.frink (implementation)
\see http://www.voidware.com/earthdist.htm (implementation)
\brief Point-point distance approximation taking flattening into account
\ingroup distance
\tparam Point1 \tparam_first_point
\tparam Point2 \tparam_second_point
\tparam CalculationType \tparam_calculation
\author After Andoyer, 19xx, republished 1950, republished by Meeus, 1999
\note Although not so well-known, the approximation is very good: in all cases the results
are about the same as Vincenty. In my (Barend's) testcases the results didn't differ more than 6 m
\see http://nacc.upc.es/tierra/node16.html
\see http://sci.tech-archive.net/Archive/sci.geo.satellite-nav/2004-12/2724.html
\see http://home.att.net/~srschmitt/great_circle_route.html (implementation)
\see http://www.codeguru.com/Cpp/Cpp/algorithms/article.php/c5115 (implementation)
\see http://futureboy.homeip.net/frinksamp/navigation.frink (implementation)
\see http://www.voidware.com/earthdist.htm (implementation)
*/
template
<
@@ -94,9 +95,9 @@ class andoyer
private :
geometry::detail::ellipsoid<calculation_type> m_ellipsoid;
inline calculation_type calc(calculation_type const& lon1,
calculation_type const& lat1,
calculation_type const& lon2,
inline calculation_type calc(calculation_type const& lon1,
calculation_type const& lat1,
calculation_type const& lon2,
calculation_type const& lat2) const
{
calculation_type const G = (lat1 - lat2) / 2.0;

View File

@@ -31,15 +31,16 @@ namespace strategy { namespace distance
{
/*!
\brief Distance calculation formulae on latlong coordinates, after Vincenty, 1975
\ingroup distance
\tparam Point1 first point type
\tparam Point2 optional second point type
\author See http://www.ngs.noaa.gov/PUBS_LIB/inverse.pdf
\author Adapted from various implementations to get it close to the original document
- http://www.movable-type.co.uk/scripts/LatLongVincenty.html
- http://exogen.case.edu/projects/geopy/source/geopy.distance.html
- http://futureboy.homeip.net/fsp/colorize.fsp?fileName=navigation.frink
\brief Distance calculation formulae on latlong coordinates, after Vincenty, 1975
\ingroup distance
\tparam Point1 \tparam_first_point
\tparam Point2 \tparam_second_point
\tparam CalculationType \tparam_calculation
\author See http://www.ngs.noaa.gov/PUBS_LIB/inverse.pdf
\author Adapted from various implementations to get it close to the original document
- http://www.movable-type.co.uk/scripts/LatLongVincenty.html
- http://exogen.case.edu/projects/geopy/source/geopy.distance.html
- http://futureboy.homeip.net/fsp/colorize.fsp?fileName=navigation.frink
*/
template

View File

@@ -22,7 +22,7 @@
#include <boost/geometry/core/ring_type.hpp>
#include <boost/geometry/geometries/concepts/check.hpp>
#include <boost/geometry/geometries/linear_ring.hpp>
#include <boost/geometry/geometries/ring.hpp>
#include <boost/geometry/extensions/gis/io/wkt/detail/wkt.hpp>
@@ -189,7 +189,7 @@ struct wkt_box
Box const& box)
{
// Convert to linear ring, then stream
typedef model::linear_ring<point_type> ring_type;
typedef model::ring<point_type> ring_type;
ring_type ring;
geometry::convert(box, ring);
os << "POLYGON(";

View File

@@ -39,9 +39,9 @@ namespace model { namespace ll
\tparam Units units,defaults to degree
\tparam CoordinateType coordinate type, double (the default) or float
(it might be int as well)
\tparam CoordinateSystem coordinate system, optional, should include NOT degree/radian
\tparam CoordinateSystem coordinate system, should include NOT degree/radian
indication, should be e.g. cs::geographic or cs::spherical
\tparam Dimensions dimensions, optional, defaults to 2
\tparam Dimensions number of dimensions
\note There is NO constructor with two values to avoid
exchanging lat and long
\note Construction with latitude and longitude can be done in both orders,

View File

@@ -30,7 +30,7 @@
#include <boost/geometry/geometries/box.hpp>
#include <boost/geometry/geometries/linestring.hpp>
#include <boost/geometry/geometries/linear_ring.hpp>
#include <boost/geometry/geometries/ring.hpp>
#include <boost/geometry/geometries/polygon.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
@@ -127,7 +127,7 @@ struct svg_map<segment_tag, false, Segment>
template <typename Ring>
struct svg_map<ring_tag, false, Ring>
: svg_map_range<Ring, model::linear_ring<model::d2::point_xy<int> > >
: svg_map_range<Ring, model::ring<model::d2::point_xy<int> > >
{};

View File

@@ -14,7 +14,7 @@
#include <boost/geometry/geometries/point.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
#include <boost/geometry/geometries/linear_ring.hpp>
#include <boost/geometry/geometries/ring.hpp>
#include <boost/geometry/geometries/linestring.hpp>
#include <boost/geometry/geometries/polygon.hpp>

View File

@@ -9,6 +9,14 @@
#ifndef BOOST_GEOMETRY_GEOMETRIES_LINEAR_RING_HPP
#define BOOST_GEOMETRY_GEOMETRIES_LINEAR_RING_HPP
#include <boost/config.hpp>
#if defined(BOOST_MSVC_FULL_VER)
#pragma message ("linear_ring is renamed to 'ring', so deprecated. Prefer using ring")
#else
#warning "linear_ring is renamed to 'ring', so deprecated. Prefer using ring"
#endif
#include <memory>
#include <vector>
@@ -31,8 +39,8 @@ namespace model
\brief A linear_ring (linear linear_ring) is a closed line which should not be selfintersecting
\ingroup geometries
\tparam Point point type
\tparam Container optional container type, for example std::vector, std::list, std::deque
\tparam Allocator optional container-allocator-type
\tparam Container container type, for example std::vector, std::deque
\tparam Allocator container-allocator-type
*/
template
<

View File

@@ -28,15 +28,17 @@ namespace model
{
/*!
\brief Allocator linestring (named so by OGC) is a collection (default a vector) of points.
\ingroup geometries
\tparam Point point type
\tparam Container optional container type, for example std::vector, std::list, std::deque
\tparam Allocator optional container-allocator-type
(see http://accu.org/index.php/journals/427#ftn.d0e249 )
\par Concepts:
All algorithms work on ranges, based on a container with point types fulfilling
the point concepts. They will take linestring, but also vector, std::pair, or other containers.
\brief A linestring (named so by OGC) is a collection (default a vector) of points.
\ingroup geometries
\tparam Point \tparam_point
\tparam Container \tparam_container
\tparam Allocator \tparam_allocator
\qbk{before.synopsis,
[heading Model of]
[link geometry.reference.concepts.concept_linestring Linestring Concept]
}
*/
template
<
@@ -51,10 +53,12 @@ class linestring : public Container<Point, Allocator<Point> >
typedef Container<Point, Allocator<Point> > base_type;
public :
/// \constructor_default{linestring}
inline linestring()
: base_type()
{}
/// \constructor_begin_end{linestring}
template <typename Iterator>
inline linestring(Iterator begin, Iterator end)
: base_type(begin, end)

View File

@@ -29,19 +29,21 @@ namespace model
/*!
\brief Basic point class, having coordinates defined in a neutral way
\details Defines a neutral point class, fulfilling the Point Concept.
Library users can use this point class, or use their own point classes.
This point class is used in most of the samples and tests of Boost.Geometry
This point class is used occasionally within the library, where a temporary
point class is necessary.
\ingroup geometries
\tparam CoordinateType \tparam_numeric
\tparam DimensionCount number of coordinates, usually 2 or 3
\tparam CoordinateSystem coordinate system, for example cs::cartesian
\qbk{[include ref/geometries/point.qbk]}
\qbk{before.synopsis, [heading Model of]}
\qbk{before.synopsis, [link geometry.reference.concepts.concept_point Point Concept]}
\details Defines a neutral point class, fulfilling the Point Concept.
Library users can use this point class, or use their own point classes.
This point class is used in most of the samples and tests of Boost.Geometry
This point class is used occasionally within the library, where a temporary
point class is necessary.
*/
template
<

View File

@@ -26,6 +26,11 @@ namespace model { namespace d2
\brief 2D point in Cartesian coordinate system
\tparam CoordinateType numeric type, for example, double, float, int
\tparam CoordinateSystem coordinate system, defaults to cs::cartesian
\qbk{before.synopsis
[heading Model of]
[link geometry.reference.concepts.concept_point Point Concept]
}
*/
template<typename CoordinateType, typename CoordinateSystem = cs::cartesian>
class point_xy : public model::point<CoordinateType, 2, CoordinateSystem>

View File

@@ -19,7 +19,7 @@
#include <boost/geometry/core/point_type.hpp>
#include <boost/geometry/core/ring_type.hpp>
#include <boost/geometry/geometries/concepts/point_concept.hpp>
#include <boost/geometry/geometries/linear_ring.hpp>
#include <boost/geometry/geometries/ring.hpp>
namespace boost { namespace geometry
{
@@ -28,21 +28,28 @@ namespace model
{
/*!
\brief The \b polygon contains an outer ring and zero or more inner rings.
\brief The polygon contains an outer ring and zero or more inner rings.
\ingroup geometries
\tparam P point type
\tparam ClockWise optional parameter, true for clockwise direction,
\tparam Point point type
\tparam ClockWise true for clockwise direction,
false for CounterClockWise direction
\tparam Closed optional parameter, true for closed polygons (last point == first point),
\tparam Closed true for closed polygons (last point == first point),
false open points
\tparam PointList optional container type for points,
\tparam PointList container type for points,
for example std::vector, std::list, std::deque
\tparam RingList optional container type for inner rings,
\tparam RingList container type for inner rings,
for example std::vector, std::list, std::deque
\tparam PointAlloc container-allocator-type
\tparam RingAlloc container-allocator-type
\tparam PointAlloc container-allocator-type, for the points
\tparam RingAlloc container-allocator-type, for the rings
\note The container collecting the points in the rings can be different
from the container collecting the inner rings. They all default to vector.
\qbk{before.synopsis,
[heading Model of]
[link geometry.reference.concepts.concept_polygon Polygon Concept]
}
*/
template
<
@@ -62,7 +69,7 @@ public:
// Member types
typedef Point point_type;
typedef linear_ring<Point, ClockWise, Closed, PointList, PointAlloc> ring_type;
typedef ring<Point, ClockWise, Closed, PointList, PointAlloc> ring_type;
typedef RingList<ring_type , RingAlloc<ring_type > > inner_container_type;
inline ring_type const& outer() const { return m_outer; }

View File

@@ -0,0 +1,148 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
//
// 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)
#ifndef BOOST_GEOMETRY_GEOMETRIES_RING_HPP
#define BOOST_GEOMETRY_GEOMETRIES_RING_HPP
#include <memory>
#include <vector>
#include <boost/concept/assert.hpp>
#include <boost/geometry/core/closure.hpp>
#include <boost/geometry/core/point_order.hpp>
#include <boost/geometry/core/tag.hpp>
#include <boost/geometry/core/tags.hpp>
#include <boost/geometry/geometries/concepts/point_concept.hpp>
namespace boost { namespace geometry
{
namespace model
{
/*!
\brief A ring (aka linear ring) is a closed line which should not be selfintersecting
\ingroup geometries
\tparam Point point type
\tparam ClockWise true for clockwise direction,
false for CounterClockWise direction
\tparam Closed true for closed polygons (last point == first point),
false open points
\tparam Container container type, for example std::vector, std::deque
\tparam Allocator container-allocator-type
\qbk{before.synopsis,
[heading Model of]
[link geometry.reference.concepts.concept_ring Ring Concept]
}
*/
template
<
typename Point,
bool ClockWise = true, bool Closed = true,
template<typename, typename> class Container = std::vector,
template<typename> class Allocator = std::allocator
>
class ring : public Container<Point, Allocator<Point> >
{
BOOST_CONCEPT_ASSERT( (concept::Point<Point>) );
typedef Container<Point, Allocator<Point> > base_type;
public :
/// \constructor_default{ring}
inline ring()
: base_type()
{}
/// \constructor_begin_end{ring}
template <typename Iterator>
inline ring(Iterator begin, Iterator end)
: base_type(begin, end)
{}
};
} // namespace model
#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
namespace traits
{
template
<
typename Point,
bool ClockWise, bool Closed,
template<typename, typename> class Container,
template<typename> class Allocator
>
struct tag<model::ring<Point, ClockWise, Closed, Container, Allocator> >
{
typedef ring_tag type;
};
template
<
typename Point,
bool Closed,
template<typename, typename> class Container,
template<typename> class Allocator
>
struct point_order<model::ring<Point, false, Closed, Container, Allocator> >
{
static const order_selector value = counterclockwise;
};
template
<
typename Point,
bool Closed,
template<typename, typename> class Container,
template<typename> class Allocator
>
struct point_order<model::ring<Point, true, Closed, Container, Allocator> >
{
static const order_selector value = clockwise;
};
template
<
typename Point,
bool PointOrder,
template<typename, typename> class Container,
template<typename> class Allocator
>
struct closure<model::ring<Point, PointOrder, true, Container, Allocator> >
{
static const closure_selector value = closed;
};
template
<
typename Point,
bool PointOrder,
template<typename, typename> class Container,
template<typename> class Allocator
>
struct closure<model::ring<Point, PointOrder, false, Container, Allocator> >
{
static const closure_selector value = open;
};
} // namespace traits
#endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS
}} // namespace boost::geometry
#endif // BOOST_GEOMETRY_GEOMETRIES_RING_HPP

View File

@@ -26,20 +26,25 @@ namespace model
{
/*!
\brief multi_line, a collection of linestring
\details Multi-linestring can be used to group lines belonging to each other,
e.g. a highway (with interruptions)
\ingroup geometries
\brief multi_line, a collection of linestring
\details Multi-linestring can be used to group lines belonging to each other,
e.g. a highway (with interruptions)
\ingroup geometries
\qbk{before.synopsis,
[heading Model of]
[link geometry.reference.concepts.concept_multi_linestring MultiLineString Concept]
}
*/
template
<
typename L,
template<typename, typename> class V = std::vector,
template<typename> class A = std::allocator
typename LineString,
template<typename, typename> class Container = std::vector,
template<typename> class Allocator = std::allocator
>
class multi_linestring : public V<L, A<L> >
class multi_linestring : public Container<LineString, Allocator<LineString> >
{
BOOST_CONCEPT_ASSERT( (concept::Linestring<L>) );
BOOST_CONCEPT_ASSERT( (concept::Linestring<LineString>) );
};
@@ -52,11 +57,11 @@ namespace traits
template
<
typename L,
template<typename, typename> class V,
template<typename> class A
typename LineString,
template<typename, typename> class Container,
template<typename> class Allocator
>
struct tag< model::multi_linestring<L, V, A> >
struct tag< model::multi_linestring<LineString, Container, Allocator> >
{
typedef multi_linestring_tag type;
};

View File

@@ -26,20 +26,41 @@ namespace model
/*!
\brief multi_point, a collection of points
\details Multipoint can be used to group points belonging to each other,
e.g. a constellation
\ingroup geometries
\brief multi_point, a collection of points
\ingroup geometries
\tparam Point \tparam_point
\tparam Container \tparam_container
\tparam Allocator \tparam_allocator
\details Multipoint can be used to group points belonging to each other,
e.g. a constellation, or the result set of an intersection
\qbk{before.synopsis,
[heading Model of]
[link geometry.reference.concepts.concept_multi_point MultiPoint Concept]
}
*/
template
<
typename P,
template<typename, typename> class V = std::vector,
template<typename> class A = std::allocator
typename Point,
template<typename, typename> class Container = std::vector,
template<typename> class Allocator = std::allocator
>
class multi_point : public V<P, A<P> >
class multi_point : public Container<Point, Allocator<Point> >
{
BOOST_CONCEPT_ASSERT( (concept::Point<P>) );
BOOST_CONCEPT_ASSERT( (concept::Point<Point>) );
typedef Container<Point, Allocator<Point> > base_type;
public :
/// \constructor_default{multi_point}
inline multi_point()
: base_type()
{}
/// \constructor_begin_end{multi_point}
template <typename Iterator>
inline multi_point(Iterator begin, Iterator end)
: base_type(begin, end)
{}
};
} // namespace model
@@ -51,11 +72,11 @@ namespace traits
template
<
typename P,
template<typename, typename> class V,
template<typename> class A
typename Point,
template<typename, typename> class Container,
template<typename> class Allocator
>
struct tag< model::multi_point<P, V, A> >
struct tag< model::multi_point<Point, Container, Allocator> >
{
typedef multi_point_tag type;
};

View File

@@ -25,20 +25,25 @@ namespace model
{
/*!
\brief multi_polygon, a collection of polygons
\details Multi-polygon can be used to group polygons belonging to each other,
e.g. Hawaii
\ingroup geometries
\brief multi_polygon, a collection of polygons
\details Multi-polygon can be used to group polygons belonging to each other,
e.g. Hawaii
\ingroup geometries
\qbk{before.synopsis,
[heading Model of]
[link geometry.reference.concepts.concept_multi_polygon MultiPolygon Concept]
}
*/
template
<
typename P,
template<typename, typename> class V = std::vector,
template<typename> class A = std::allocator
typename Polygon,
template<typename, typename> class Container = std::vector,
template<typename> class Allocator = std::allocator
>
class multi_polygon : public V<P, A<P> >
class multi_polygon : public Container<Polygon, Allocator<Polygon> >
{
BOOST_CONCEPT_ASSERT( (concept::Polygon<P>) );
BOOST_CONCEPT_ASSERT( (concept::Polygon<Polygon>) );
};
@@ -51,11 +56,11 @@ namespace traits
template
<
typename P,
template<typename, typename> class V,
template<typename> class A
typename Polygon,
template<typename, typename> class Container,
template<typename> class Allocator
>
struct tag< model::multi_polygon<P, V, A> >
struct tag< model::multi_polygon<Polygon, Container, Allocator> >
{
typedef multi_polygon_tag type;
};

View File

@@ -29,8 +29,9 @@ namespace strategy { namespace within
/*!
\brief Within detection using winding rule
\ingroup strategies
\tparam Point point type of point to examine
\tparam PointOfSegment point type of segments, defaults to Point
\tparam Point \tparam_point
\tparam PointOfSegment \tparam_segment_point
\tparam CalculationType \tparam_calculation
\author Barend Gehrels
\note The implementation is inspired by terralib http://www.terralib.org (LGPL)
\note but totally revised afterwards, especially for cases on segments

View File

@@ -27,13 +27,13 @@ namespace strategy { namespace area
\ingroup strategies
\details Calculates area using the Surveyor's formula, a well-known
triangulation algorithm
\tparam PointOfSegment point type of segments of rings/polygons
\tparam PointOfSegment \tparam_segment_point
\tparam CalculationType \tparam_calculation
\qbk_begin
\qbk{
[heading See also]
[link geometry.reference.algorithms.area.area_2_with_strategy area]
\qbk_end
}
*/
template

View File

@@ -47,25 +47,25 @@ namespace strategy { namespace distance
\ingroup strategies
\details Calculates distance using projected-point method, and (optionally) Pythagoras
\author Adapted from: http://geometryalgorithms.com/Archive/algorithm_0102/algorithm_0102.htm
\tparam Point point type
\tparam PointOfSegment \tparam_optional_segment_point
\tparam Point \tparam_point
\tparam PointOfSegment \tparam_segment_point
\tparam CalculationType \tparam_calculation
\tparam Strategy strategy, optional, underlying point-point distance strategy, defaults to pythagoras
\tparam Strategy underlying point-point distance strategy
\par Concepts for Strategy:
- cartesian_distance operator(Point,Point)
\note If the Strategy is a "comparable::pythagoras", this strategy
automatically is a comparable projected_point strategy (so without sqrt)
\qbk_begin
\qbk{
[heading See also]
[link geometry.reference.algorithms.distance.distance_3_with_strategy distance]
\qbk_end
}
*/
template
<
typename Point,
typename PointOfSegment,
typename PointOfSegment = Point,
typename CalculationType = void,
typename Strategy = pythagoras<Point, PointOfSegment, CalculationType>
>

View File

@@ -66,8 +66,8 @@ namespace comparable
/*!
\brief Strategy to calculate comparable distance between two points
\ingroup strategies
\tparam Point1 first point type
\tparam Point2 \tparam_optional_second_point
\tparam Point1 \tparam_first_point
\tparam Point2 \tparam_second_point
\tparam CalculationType \tparam_calculation
*/
template
@@ -111,16 +111,16 @@ public :
/*!
\brief Strategy to calculate the distance between two points
\ingroup strategies
\tparam Point1 first point type
\tparam Point2 \tparam_optional_second_point
\tparam Point1 \tparam_first_point
\tparam Point2 \tparam_second_point
\tparam CalculationType \tparam_calculation
\qbk_begin
\qbk{
[heading Notes]
[note Can be used for points with two, three or more dimensions]
[note Can be used for points with two\, three or more dimensions]
[heading See also]
[link geometry.reference.algorithms.distance.distance_3_with_strategy distance]
\qbk_end
}
*/
template

View File

@@ -22,6 +22,9 @@ namespace strategy { namespace within
/*!
\brief Within detection using cross counting,
\ingroup strategies
\tparam Point \tparam_point
\tparam PointOfSegment \tparam_segment_point
\tparam CalculationType \tparam_calculation
\see http://tog.acm.org/resources/GraphicsGems/gemsiv/ptpoly_haines/ptinpoly.c
\note Does NOT work correctly for point ON border
*/

View File

@@ -23,12 +23,16 @@ namespace strategy { namespace within
/*!
\brief Within detection using cross counting
\ingroup strategies
\tparam Point \tparam_point
\tparam PointOfSegment \tparam_segment_point
\tparam CalculationType \tparam_calculation
\author adapted from Randolph Franklin algorithm
\author Barend and Maarten, 1995
\author Revised for templatized library, Barend Gehrels, 2007
\return true if point is in ring, works for closed rings in both directions
\note Does NOT work correctly for point ON border
*/
template

View File

@@ -29,9 +29,9 @@ namespace strategy { namespace side
\details left of segment (> 0), right of segment (< 0), on segment (0)
In fact this is twice the area of a triangle
\ingroup strategies
\tparam CalculationType CalculationType
\tparam CalculationType \tparam_calculation
*/
template <typename CalculationType>
template <typename CalculationType = void>
class side_by_triangle
{
public :

View File

@@ -29,6 +29,9 @@ namespace boost { namespace geometry
// The intersection strategy is a "compound strategy",
// it contains a segment-intersection-strategy
// and a side-strategy
/*!
\tparam CalculationType \tparam_calculation
*/
template
<
typename Tag,

View File

@@ -18,9 +18,10 @@ namespace boost { namespace geometry
/*!
\brief Traits class binding a side determination strategy to a coordinate system
\ingroup util
\tparam Tag tag of coordinate system of point-type
\brief Traits class binding a side determination strategy to a coordinate system
\ingroup util
\tparam Tag tag of coordinate system of point-type
\tparam CalculationType \tparam_calculation
*/
template <typename Tag, typename CalculationType = void>
struct strategy_side

View File

@@ -45,7 +45,7 @@ http://trs-new.jpl.nasa.gov/dspace/bitstream/2014/40409/1/07-03.pdf, is simple
and works well in most cases but not in 180 meridian crossing cases. This probably
could be solved.
\qbk_begin
\qbk{
[heading Example]
[area_with_strategy]
@@ -54,7 +54,7 @@ could be solved.
[heading See also]
[link geometry.reference.algorithms.area.area_2_with_strategy area]
\qbk_end
}
*/
template

View File

@@ -43,14 +43,14 @@ namespace strategy { namespace distance
\details Class which calculates the distance of a point to a segment, using latlong points
\see http://williams.best.vwh.net/avform.htm
\tparam Point point type
\tparam PointOfSegment \tparam_optional_segment_point
\tparam PointOfSegment \tparam_segment_point
\tparam CalculationType \tparam_calculation
\tparam Strategy strategy, optional, underlying point-point distance strategy, defaults to haversine
\tparam Strategy underlying point-point distance strategy, defaults to haversine
\qbk_begin
\qbk{
[heading See also]
[link geometry.reference.algorithms.distance.distance_3_with_strategy distance]
\qbk_end
}
*/
template

View File

@@ -96,8 +96,8 @@ private :
\brief Distance calculation for spherical coordinates
on a perfect sphere using haversine
\ingroup strategies
\tparam Point1 first point type
\tparam Point2 \tparam_optional_second_point
\tparam Point1 \tparam_first_point
\tparam Point2 \tparam_second_point
\tparam CalculationType \tparam_calculation
\author Adapted from: http://williams.best.vwh.net/avform.htm
\see http://en.wikipedia.org/wiki/Great-circle_distance
@@ -110,10 +110,10 @@ A mathematically equivalent formula, which is less subject
+ cos(lat1)*cos(lat2)*(sin((lon1-lon2)/2))^2))
</em>
\qbk_begin
\qbk{
[heading See also]
[link geometry.reference.algorithms.distance.distance_3_with_strategy distance]
\qbk_end
}
*/
template

View File

@@ -57,9 +57,9 @@ static inline double course(Point const& p1, Point const& p2)
\details from a Great Circle segment between two points:
left of segment (> 0), right of segment (< 0), on segment (0)
\ingroup strategies
\tparam CalculationType CalculationType
\tparam CalculationType \tparam_calculation
*/
template <typename CalculationType>
template <typename CalculationType = void>
class side_by_cross_track
{

View File

@@ -43,8 +43,8 @@ namespace strategy { namespace transform
\ingroup strategies
\tparam P1 first point type (source)
\tparam P2 second point type (target)
\tparam Dimension1 number of dimensions to transform from first point, optional
\tparam Dimension1 number of dimensions to transform to second point, optional
\tparam Dimension1 number of dimensions to transform from first point
\tparam Dimension1 number of dimensions to transform to second point
*/
template
<
@@ -189,8 +189,8 @@ public :
\ingroup strategies
\tparam P1 first point type
\tparam P2 second point type
\tparam Dimension1 number of dimensions to transform from first point, optional
\tparam Dimension1 number of dimensions to transform to second point, optional
\tparam Dimension1 number of dimensions to transform from first point
\tparam Dimension1 number of dimensions to transform to second point
*/
template
<
@@ -248,8 +248,8 @@ public :
\ingroup strategies
\tparam P1 first point type
\tparam P2 second point type
\tparam Dimension1 number of dimensions to transform from first point, optional
\tparam Dimension1 number of dimensions to transform to second point, optional
\tparam Dimension1 number of dimensions to transform from first point
\tparam Dimension1 number of dimensions to transform to second point
*/
template
<