From 1e823499b6ef393feb73f02597f3039dedcac9ee Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Sun, 23 Jan 2011 16:04:35 +0000 Subject: [PATCH] Renamed linear_ring to ring (linear_ring is still available) Doc update Renamed some template parameters (for doc) [SVN r68385] --- include/boost/geometry/algorithms/area.hpp | 6 +- .../detail/overlay/get_turn_info.hpp | 2 +- .../boost/geometry/algorithms/distance.hpp | 13 +- .../geometry/core/replace_point_type.hpp | 4 +- .../extensions/algorithms/remove_spikes.hpp | 2 +- .../gis/geographic/strategies/andoyer.hpp | 33 ++-- .../gis/geographic/strategies/vincenty.hpp | 19 +-- .../extensions/gis/io/wkt/write_wkt.hpp | 4 +- .../extensions/gis/latlong/point_ll.hpp | 4 +- .../geometry/extensions/io/svg/svg_mapper.hpp | 4 +- .../boost/geometry/geometries/geometries.hpp | 2 +- .../boost/geometry/geometries/linear_ring.hpp | 12 +- .../boost/geometry/geometries/linestring.hpp | 22 +-- include/boost/geometry/geometries/point.hpp | 12 +- .../boost/geometry/geometries/point_xy.hpp | 5 + include/boost/geometry/geometries/polygon.hpp | 27 ++-- include/boost/geometry/geometries/ring.hpp | 148 ++++++++++++++++++ .../multi/geometries/multi_linestring.hpp | 31 ++-- .../geometry/multi/geometries/multi_point.hpp | 47 ++++-- .../multi/geometries/multi_polygon.hpp | 31 ++-- .../agnostic/point_in_poly_winding.hpp | 5 +- .../strategies/cartesian/area_surveyor.hpp | 6 +- .../cartesian/distance_projected_point.hpp | 12 +- .../cartesian/distance_pythagoras.hpp | 14 +- .../point_in_poly_crossings_multiply.hpp | 3 + .../cartesian/point_in_poly_franklin.hpp | 4 + .../strategies/cartesian/side_by_triangle.hpp | 4 +- .../geometry/strategies/intersection.hpp | 3 + include/boost/geometry/strategies/side.hpp | 7 +- .../strategies/spherical/area_huiller.hpp | 4 +- .../spherical/distance_cross_track.hpp | 8 +- .../spherical/distance_haversine.hpp | 8 +- .../spherical/side_by_cross_track.hpp | 4 +- .../transform/matrix_transformers.hpp | 12 +- 34 files changed, 370 insertions(+), 152 deletions(-) create mode 100644 include/boost/geometry/geometries/ring.hpp diff --git a/include/boost/geometry/algorithms/area.hpp b/include/boost/geometry/algorithms/area.hpp index f578f1c04..2fdc6d98b 100644 --- a/include/boost/geometry/algorithms/area.hpp +++ b/include/boost/geometry/algorithms/area.hpp @@ -249,18 +249,18 @@ inline typename area_result::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 inline typename Strategy::return_type area( diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp index 86c8c492c..50a911300 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp @@ -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 */ diff --git a/include/boost/geometry/algorithms/distance.hpp b/include/boost/geometry/algorithms/distance.hpp index 1622d9dfb..492765c0d 100644 --- a/include/boost/geometry/algorithms/distance.hpp +++ b/include/boost/geometry/algorithms/distance.hpp @@ -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) +} */ /* diff --git a/include/boost/geometry/core/replace_point_type.hpp b/include/boost/geometry/core/replace_point_type.hpp index 4e50041d7..035fd6c9f 100644 --- a/include/boost/geometry/core/replace_point_type.hpp +++ b/include/boost/geometry/core/replace_point_type.hpp @@ -23,7 +23,7 @@ // TODO: take "const" into account #include #include -#include +#include #include #include #include @@ -59,7 +59,7 @@ struct replace_point_type template struct replace_point_type { - typedef model::linear_ring type; + typedef model::ring type; }; template diff --git a/include/boost/geometry/extensions/algorithms/remove_spikes.hpp b/include/boost/geometry/extensions/algorithms/remove_spikes.hpp index 4edde86ec..11dc22cc7 100644 --- a/include/boost/geometry/extensions/algorithms/remove_spikes.hpp +++ b/include/boost/geometry/extensions/algorithms/remove_spikes.hpp @@ -262,7 +262,7 @@ struct remove_elongated_spikes coordinate_type d1 = geometry::distance(prev, current); if (d1 < m_distance_limit) { - geometry::model::linear_ring triangle; + geometry::model::ring triangle; triangle.push_back(prev); triangle.push_back(current); triangle.push_back(next); diff --git a/include/boost/geometry/extensions/gis/geographic/strategies/andoyer.hpp b/include/boost/geometry/extensions/gis/geographic/strategies/andoyer.hpp index 49430034c..3157d7190 100644 --- a/include/boost/geometry/extensions/gis/geographic/strategies/andoyer.hpp +++ b/include/boost/geometry/extensions/gis/geographic/strategies/andoyer.hpp @@ -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 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; diff --git a/include/boost/geometry/extensions/gis/geographic/strategies/vincenty.hpp b/include/boost/geometry/extensions/gis/geographic/strategies/vincenty.hpp index 112995b33..923a34d82 100644 --- a/include/boost/geometry/extensions/gis/geographic/strategies/vincenty.hpp +++ b/include/boost/geometry/extensions/gis/geographic/strategies/vincenty.hpp @@ -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 diff --git a/include/boost/geometry/extensions/gis/io/wkt/write_wkt.hpp b/include/boost/geometry/extensions/gis/io/wkt/write_wkt.hpp index 031cb305e..58eb413d6 100644 --- a/include/boost/geometry/extensions/gis/io/wkt/write_wkt.hpp +++ b/include/boost/geometry/extensions/gis/io/wkt/write_wkt.hpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include @@ -189,7 +189,7 @@ struct wkt_box Box const& box) { // Convert to linear ring, then stream - typedef model::linear_ring ring_type; + typedef model::ring ring_type; ring_type ring; geometry::convert(box, ring); os << "POLYGON("; diff --git a/include/boost/geometry/extensions/gis/latlong/point_ll.hpp b/include/boost/geometry/extensions/gis/latlong/point_ll.hpp index 7e39ff58f..dad431f27 100644 --- a/include/boost/geometry/extensions/gis/latlong/point_ll.hpp +++ b/include/boost/geometry/extensions/gis/latlong/point_ll.hpp @@ -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, diff --git a/include/boost/geometry/extensions/io/svg/svg_mapper.hpp b/include/boost/geometry/extensions/io/svg/svg_mapper.hpp index 0dbf4fb9c..0fdd4130d 100644 --- a/include/boost/geometry/extensions/io/svg/svg_mapper.hpp +++ b/include/boost/geometry/extensions/io/svg/svg_mapper.hpp @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include @@ -127,7 +127,7 @@ struct svg_map template struct svg_map - : svg_map_range > > + : svg_map_range > > {}; diff --git a/include/boost/geometry/geometries/geometries.hpp b/include/boost/geometry/geometries/geometries.hpp index 4362d1612..f78edc73c 100644 --- a/include/boost/geometry/geometries/geometries.hpp +++ b/include/boost/geometry/geometries/geometries.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/include/boost/geometry/geometries/linear_ring.hpp b/include/boost/geometry/geometries/linear_ring.hpp index 21c253ed5..6c0b3f6cb 100644 --- a/include/boost/geometry/geometries/linear_ring.hpp +++ b/include/boost/geometry/geometries/linear_ring.hpp @@ -9,6 +9,14 @@ #ifndef BOOST_GEOMETRY_GEOMETRIES_LINEAR_RING_HPP #define BOOST_GEOMETRY_GEOMETRIES_LINEAR_RING_HPP +#include + +#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 #include @@ -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 < diff --git a/include/boost/geometry/geometries/linestring.hpp b/include/boost/geometry/geometries/linestring.hpp index 0913fa51d..1a867b5b6 100644 --- a/include/boost/geometry/geometries/linestring.hpp +++ b/include/boost/geometry/geometries/linestring.hpp @@ -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 > typedef Container > base_type; public : + /// \constructor_default{linestring} inline linestring() : base_type() {} + /// \constructor_begin_end{linestring} template inline linestring(Iterator begin, Iterator end) : base_type(begin, end) diff --git a/include/boost/geometry/geometries/point.hpp b/include/boost/geometry/geometries/point.hpp index 25462ffc6..d31116603 100644 --- a/include/boost/geometry/geometries/point.hpp +++ b/include/boost/geometry/geometries/point.hpp @@ -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 < diff --git a/include/boost/geometry/geometries/point_xy.hpp b/include/boost/geometry/geometries/point_xy.hpp index 14ecc2230..7dd1028ab 100644 --- a/include/boost/geometry/geometries/point_xy.hpp +++ b/include/boost/geometry/geometries/point_xy.hpp @@ -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 class point_xy : public model::point diff --git a/include/boost/geometry/geometries/polygon.hpp b/include/boost/geometry/geometries/polygon.hpp index 35dc1cf4c..56c5f28a7 100644 --- a/include/boost/geometry/geometries/polygon.hpp +++ b/include/boost/geometry/geometries/polygon.hpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include 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 ring_type; + typedef ring ring_type; typedef RingList > inner_container_type; inline ring_type const& outer() const { return m_outer; } diff --git a/include/boost/geometry/geometries/ring.hpp b/include/boost/geometry/geometries/ring.hpp new file mode 100644 index 000000000..eec554d6f --- /dev/null +++ b/include/boost/geometry/geometries/ring.hpp @@ -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 +#include + +#include + +#include +#include +#include +#include + +#include + + +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 class Container = std::vector, + template class Allocator = std::allocator +> +class ring : public Container > +{ + BOOST_CONCEPT_ASSERT( (concept::Point) ); + + typedef Container > base_type; + +public : + /// \constructor_default{ring} + inline ring() + : base_type() + {} + + /// \constructor_begin_end{ring} + template + 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 class Container, + template class Allocator +> +struct tag > +{ + typedef ring_tag type; +}; + + +template +< + typename Point, + bool Closed, + template class Container, + template class Allocator +> +struct point_order > +{ + static const order_selector value = counterclockwise; +}; + + +template +< + typename Point, + bool Closed, + template class Container, + template class Allocator +> +struct point_order > +{ + static const order_selector value = clockwise; +}; + +template +< + typename Point, + bool PointOrder, + template class Container, + template class Allocator +> +struct closure > +{ + static const closure_selector value = closed; +}; + +template +< + typename Point, + bool PointOrder, + template class Container, + template class Allocator +> +struct closure > +{ + static const closure_selector value = open; +}; + + +} // namespace traits +#endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS + + +}} // namespace boost::geometry + +#endif // BOOST_GEOMETRY_GEOMETRIES_RING_HPP diff --git a/include/boost/geometry/multi/geometries/multi_linestring.hpp b/include/boost/geometry/multi/geometries/multi_linestring.hpp index 7b743ad32..58ab9fa85 100644 --- a/include/boost/geometry/multi/geometries/multi_linestring.hpp +++ b/include/boost/geometry/multi/geometries/multi_linestring.hpp @@ -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 class V = std::vector, - template class A = std::allocator + typename LineString, + template class Container = std::vector, + template class Allocator = std::allocator > -class multi_linestring : public V > +class multi_linestring : public Container > { - BOOST_CONCEPT_ASSERT( (concept::Linestring) ); + BOOST_CONCEPT_ASSERT( (concept::Linestring) ); }; @@ -52,11 +57,11 @@ namespace traits template < - typename L, - template class V, - template class A + typename LineString, + template class Container, + template class Allocator > -struct tag< model::multi_linestring > +struct tag< model::multi_linestring > { typedef multi_linestring_tag type; }; diff --git a/include/boost/geometry/multi/geometries/multi_point.hpp b/include/boost/geometry/multi/geometries/multi_point.hpp index b81d43cdf..25cc49442 100644 --- a/include/boost/geometry/multi/geometries/multi_point.hpp +++ b/include/boost/geometry/multi/geometries/multi_point.hpp @@ -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 class V = std::vector, - template class A = std::allocator + typename Point, + template class Container = std::vector, + template class Allocator = std::allocator > -class multi_point : public V > +class multi_point : public Container > { - BOOST_CONCEPT_ASSERT( (concept::Point

) ); + BOOST_CONCEPT_ASSERT( (concept::Point) ); + + typedef Container > base_type; + +public : + /// \constructor_default{multi_point} + inline multi_point() + : base_type() + {} + + /// \constructor_begin_end{multi_point} + template + inline multi_point(Iterator begin, Iterator end) + : base_type(begin, end) + {} }; } // namespace model @@ -51,11 +72,11 @@ namespace traits template < - typename P, - template class V, - template class A + typename Point, + template class Container, + template class Allocator > -struct tag< model::multi_point > +struct tag< model::multi_point > { typedef multi_point_tag type; }; diff --git a/include/boost/geometry/multi/geometries/multi_polygon.hpp b/include/boost/geometry/multi/geometries/multi_polygon.hpp index 095b8fb2c..727b3c3a9 100644 --- a/include/boost/geometry/multi/geometries/multi_polygon.hpp +++ b/include/boost/geometry/multi/geometries/multi_polygon.hpp @@ -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 class V = std::vector, - template class A = std::allocator + typename Polygon, + template class Container = std::vector, + template class Allocator = std::allocator > -class multi_polygon : public V > +class multi_polygon : public Container > { - BOOST_CONCEPT_ASSERT( (concept::Polygon

) ); + BOOST_CONCEPT_ASSERT( (concept::Polygon) ); }; @@ -51,11 +56,11 @@ namespace traits template < - typename P, - template class V, - template class A + typename Polygon, + template class Container, + template class Allocator > -struct tag< model::multi_polygon > +struct tag< model::multi_polygon > { typedef multi_polygon_tag type; }; diff --git a/include/boost/geometry/strategies/agnostic/point_in_poly_winding.hpp b/include/boost/geometry/strategies/agnostic/point_in_poly_winding.hpp index 5f0f3573b..245681ce9 100644 --- a/include/boost/geometry/strategies/agnostic/point_in_poly_winding.hpp +++ b/include/boost/geometry/strategies/agnostic/point_in_poly_winding.hpp @@ -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 diff --git a/include/boost/geometry/strategies/cartesian/area_surveyor.hpp b/include/boost/geometry/strategies/cartesian/area_surveyor.hpp index 4dba649da..6e050726c 100644 --- a/include/boost/geometry/strategies/cartesian/area_surveyor.hpp +++ b/include/boost/geometry/strategies/cartesian/area_surveyor.hpp @@ -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 diff --git a/include/boost/geometry/strategies/cartesian/distance_projected_point.hpp b/include/boost/geometry/strategies/cartesian/distance_projected_point.hpp index a76f38977..6b0db730d 100644 --- a/include/boost/geometry/strategies/cartesian/distance_projected_point.hpp +++ b/include/boost/geometry/strategies/cartesian/distance_projected_point.hpp @@ -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 > diff --git a/include/boost/geometry/strategies/cartesian/distance_pythagoras.hpp b/include/boost/geometry/strategies/cartesian/distance_pythagoras.hpp index 5f3553014..ba66ee2a0 100644 --- a/include/boost/geometry/strategies/cartesian/distance_pythagoras.hpp +++ b/include/boost/geometry/strategies/cartesian/distance_pythagoras.hpp @@ -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 diff --git a/include/boost/geometry/strategies/cartesian/point_in_poly_crossings_multiply.hpp b/include/boost/geometry/strategies/cartesian/point_in_poly_crossings_multiply.hpp index ce7b70ac0..62080092b 100644 --- a/include/boost/geometry/strategies/cartesian/point_in_poly_crossings_multiply.hpp +++ b/include/boost/geometry/strategies/cartesian/point_in_poly_crossings_multiply.hpp @@ -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 */ diff --git a/include/boost/geometry/strategies/cartesian/point_in_poly_franklin.hpp b/include/boost/geometry/strategies/cartesian/point_in_poly_franklin.hpp index e44c2c0dd..65df1bf09 100644 --- a/include/boost/geometry/strategies/cartesian/point_in_poly_franklin.hpp +++ b/include/boost/geometry/strategies/cartesian/point_in_poly_franklin.hpp @@ -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 diff --git a/include/boost/geometry/strategies/cartesian/side_by_triangle.hpp b/include/boost/geometry/strategies/cartesian/side_by_triangle.hpp index 82558be15..c37ca6cd0 100644 --- a/include/boost/geometry/strategies/cartesian/side_by_triangle.hpp +++ b/include/boost/geometry/strategies/cartesian/side_by_triangle.hpp @@ -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 +template class side_by_triangle { public : diff --git a/include/boost/geometry/strategies/intersection.hpp b/include/boost/geometry/strategies/intersection.hpp index 666d7e733..86de31f8c 100644 --- a/include/boost/geometry/strategies/intersection.hpp +++ b/include/boost/geometry/strategies/intersection.hpp @@ -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, diff --git a/include/boost/geometry/strategies/side.hpp b/include/boost/geometry/strategies/side.hpp index 6a012ece6..1073a83ec 100644 --- a/include/boost/geometry/strategies/side.hpp +++ b/include/boost/geometry/strategies/side.hpp @@ -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 struct strategy_side diff --git a/include/boost/geometry/strategies/spherical/area_huiller.hpp b/include/boost/geometry/strategies/spherical/area_huiller.hpp index 733722b07..5e48f3fba 100644 --- a/include/boost/geometry/strategies/spherical/area_huiller.hpp +++ b/include/boost/geometry/strategies/spherical/area_huiller.hpp @@ -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 diff --git a/include/boost/geometry/strategies/spherical/distance_cross_track.hpp b/include/boost/geometry/strategies/spherical/distance_cross_track.hpp index a8a4cc7c3..1a0ba1a4f 100644 --- a/include/boost/geometry/strategies/spherical/distance_cross_track.hpp +++ b/include/boost/geometry/strategies/spherical/distance_cross_track.hpp @@ -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 diff --git a/include/boost/geometry/strategies/spherical/distance_haversine.hpp b/include/boost/geometry/strategies/spherical/distance_haversine.hpp index ad7cbbdb1..8eae0ca57 100644 --- a/include/boost/geometry/strategies/spherical/distance_haversine.hpp +++ b/include/boost/geometry/strategies/spherical/distance_haversine.hpp @@ -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)) -\qbk_begin +\qbk{ [heading See also] [link geometry.reference.algorithms.distance.distance_3_with_strategy distance] -\qbk_end +} */ template diff --git a/include/boost/geometry/strategies/spherical/side_by_cross_track.hpp b/include/boost/geometry/strategies/spherical/side_by_cross_track.hpp index f2be73808..e363acc4b 100644 --- a/include/boost/geometry/strategies/spherical/side_by_cross_track.hpp +++ b/include/boost/geometry/strategies/spherical/side_by_cross_track.hpp @@ -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 +template class side_by_cross_track { diff --git a/include/boost/geometry/strategies/transform/matrix_transformers.hpp b/include/boost/geometry/strategies/transform/matrix_transformers.hpp index f43a5e1e8..c8feda664 100644 --- a/include/boost/geometry/strategies/transform/matrix_transformers.hpp +++ b/include/boost/geometry/strategies/transform/matrix_transformers.hpp @@ -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 <