Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67555 - in trunk/boost/geometry: algorithms core geometries multi/geometries ranges strategies/agnostic strategies/cartesian strategies/spherical strategies/transform views
From: barend.gehrels_at_[hidden]
Date: 2011-01-01 17:35:52


Author: barendgehrels
Date: 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
New Revision: 67555
URL: http://svn.boost.org/trac/boost/changeset/67555

Log:
Doc update (usually change from Doxygen group)
Changed some strategies from struct to class

Removed:
   trunk/boost/geometry/geometries/cartesian2d.hpp
   trunk/boost/geometry/geometries/cartesian3d.hpp
Text files modified:
   trunk/boost/geometry/algorithms/append.hpp | 2
   trunk/boost/geometry/algorithms/assign.hpp | 20 ++--
   trunk/boost/geometry/algorithms/clear.hpp | 2
   trunk/boost/geometry/algorithms/correct.hpp | 8 +
   trunk/boost/geometry/algorithms/make.hpp | 8
   trunk/boost/geometry/core/access.hpp | 8
   trunk/boost/geometry/core/exterior_ring.hpp | 16 ++-
   trunk/boost/geometry/core/interior_rings.hpp | 26 +++--
   trunk/boost/geometry/multi/geometries/multi_linestring.hpp | 2
   trunk/boost/geometry/multi/geometries/multi_point.hpp | 2
   trunk/boost/geometry/multi/geometries/multi_polygon.hpp | 2
   trunk/boost/geometry/ranges/box_range.hpp | 8 +
   trunk/boost/geometry/ranges/segment_range.hpp | 9 ++
   trunk/boost/geometry/strategies/agnostic/hull_graham_andrew.hpp | 11 +-
   trunk/boost/geometry/strategies/agnostic/point_in_poly_winding.hpp | 15 +-
   trunk/boost/geometry/strategies/agnostic/simplify_douglas_peucker.hpp | 26 ++--
   trunk/boost/geometry/strategies/cartesian/area_by_triangles.hpp | 7
   trunk/boost/geometry/strategies/cartesian/centroid_bashein_detmer.hpp | 123 +++++++++++++-------------
   trunk/boost/geometry/strategies/cartesian/distance_projected_point.hpp | 22 ++--
   trunk/boost/geometry/strategies/cartesian/distance_pythagoras.hpp | 28 +++---
   trunk/boost/geometry/strategies/cartesian/point_in_poly_crossings_multiply.hpp | 7
   trunk/boost/geometry/strategies/cartesian/point_in_poly_franklin.hpp | 13 +-
   trunk/boost/geometry/strategies/cartesian/side_by_triangle.hpp | 13 ++
   trunk/boost/geometry/strategies/spherical/area_huiller.hpp | 31 +++---
   trunk/boost/geometry/strategies/spherical/compare_circular.hpp | 8
   trunk/boost/geometry/strategies/spherical/distance_cross_track.hpp | 12 +-
   trunk/boost/geometry/strategies/spherical/distance_haversine.hpp | 30 +++---
   trunk/boost/geometry/strategies/spherical/side_by_cross_track.hpp | 26 +++--
   trunk/boost/geometry/strategies/transform/inverse_transformer.hpp | 13 +-
   trunk/boost/geometry/strategies/transform/map_transformer.hpp | 179 ++++++++++++++++++++-------------------
   trunk/boost/geometry/strategies/transform/matrix_transformers.hpp | 100 +++++++++++----------
   trunk/boost/geometry/views/closeable_view.hpp | 14 +++
   trunk/boost/geometry/views/identity_view.hpp | 5 +
   trunk/boost/geometry/views/reversible_view.hpp | 17 +++
   34 files changed, 451 insertions(+), 362 deletions(-)

Modified: trunk/boost/geometry/algorithms/append.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/append.hpp (original)
+++ trunk/boost/geometry/algorithms/append.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -147,7 +147,7 @@
 
 /*!
     \brief Appends one or more points to a linestring, ring, polygon, multi
- \ingroup access
+ \ingroup append
     \param geometry a geometry
     \param range_or_point the point or range to add
     \param ring_index the index of the ring in case of a polygon:

Modified: trunk/boost/geometry/algorithms/assign.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/assign.hpp (original)
+++ trunk/boost/geometry/algorithms/assign.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -60,7 +60,7 @@
 
 /*!
     \brief Assigns all coordinates of a specific point to a value
- \ingroup access
+ \ingroup assign
     \details
     \param p Point
     \param value Value which is assigned to all coordinates of point p
@@ -359,7 +359,7 @@
 
 /*!
     \brief assign two values to a 2D point
- \ingroup access
+ \ingroup assign
  */
 template <typename Geometry, typename Type>
 inline void assign(Geometry& geometry, Type const& c1, Type const& c2)
@@ -376,7 +376,7 @@
 
 /*!
     \brief assign three values to a 3D point [or the center + radius to a circle]
- \ingroup access
+ \ingroup assign
  */
 template <typename Geometry, typename Type>
 inline void assign(Geometry& geometry,
@@ -394,7 +394,7 @@
 
 /*!
     \brief assign center + radius to a sphere [for extension]
- \ingroup access
+ \ingroup assign
  */
 template <typename Geometry, typename Type>
 inline void assign(Geometry& geometry,
@@ -414,7 +414,7 @@
 /*!
     \brief assign a range of points to a linestring, ring or polygon
     \note The point-type of the range might be different from the point-type of the geometry
- \ingroup access
+ \ingroup assign
  */
 template <typename Geometry, typename Range>
 inline void assign(Geometry& geometry, Range const& range)
@@ -431,7 +431,7 @@
     \details The assign_inverse function initialize a 2D or 3D box with large coordinates, the
     min corner is very large, the max corner is very small. This is a convenient starting point to
     collect the minimum bounding box of a geometry.
- \ingroup access
+ \ingroup assign
  */
 template <typename Geometry>
 inline void assign_inverse(Geometry& geometry)
@@ -447,7 +447,7 @@
 
 /*!
     \brief assign zero values to a box, point
- \ingroup access
+ \ingroup assign
     \details The assign_zero function initializes a 2D or 3D point or box with coordinates of zero
     \tparam Geometry the geometry type
  */
@@ -466,7 +466,7 @@
 
 /*!
     \brief Assign the 4 points of a 2D box
- \ingroup access
+ \ingroup assign
     \note The order is crucial. Most logical is LOWER, UPPER and sub-order LEFT, RIGHT
         so this is how it is implemented.
 */
@@ -492,7 +492,7 @@
 
 /*!
     \brief Assign a box or segment with the value of a point
- \ingroup access
+ \ingroup assign
     \tparam Index indicates which box-corner, min_corner (0) or max_corner (1)
         or which point of segment (0/1)
 */
@@ -511,7 +511,7 @@
 
 /*!
     \brief Assign a point with a point of a box or segment
- \ingroup access
+ \ingroup assign
     \tparam Index indicates which box-corner, min_corner (0) or max_corner (1)
         or which point of segment (0/1)
 */

Modified: trunk/boost/geometry/algorithms/clear.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/clear.hpp (original)
+++ trunk/boost/geometry/algorithms/clear.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -112,7 +112,7 @@
 /*!
     \brief Clears a linestring, linear ring or polygon (exterior+interiors) or multi*
     \details Generic function to clear a geometry
- \ingroup access
+ \ingroup clear
     \note points and boxes cannot be cleared, instead they can be set to zero by "assign_zero"
 */
 template <typename Geometry>

Modified: trunk/boost/geometry/algorithms/correct.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/correct.hpp (original)
+++ trunk/boost/geometry/algorithms/correct.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -230,6 +230,14 @@
 } // namespace dispatch
 #endif // DOXYGEN_NO_DISPATCH
 
+
+/*!
+\brief Corrects a geometry
+\details Corrects a geometry
+\ingroup correct
+\tparam Geometry \tparam_geometry
+\param geometry \param_geometry
+*/
 template <typename Geometry>
 inline void correct(Geometry& geometry)
 {

Modified: trunk/boost/geometry/algorithms/make.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/make.hpp (original)
+++ trunk/boost/geometry/algorithms/make.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -18,7 +18,7 @@
 
 /*!
     \brief Make a geometry
- \ingroup access
+ \ingroup make
     \details the Generic Geometry Library uses concepts for all its geometries. Therefore it does not rely
     on constructors. The "make" functions are object generators creating geometries. There are overloads
     with two, three, four or six values, which are implemented depending on the geometry specified.
@@ -44,7 +44,7 @@
 
 /*!
     \brief Make a geometry
- \ingroup access
+ \ingroup make
     \return a 3D point
  */
 template <typename Geometry, typename T>
@@ -92,7 +92,7 @@
 
 /*!
     \brief Create a box with inverse infinite coordinates
- \ingroup access
+ \ingroup make
     \details The make_inverse function initialize a 2D or 3D box with large coordinates, the
     min corner is very large, the max corner is very small
     \tparam Geometry the geometry type
@@ -114,7 +114,7 @@
 
 /*!
     \brief Create a geometry with "zero" coordinates
- \ingroup access
+ \ingroup make
     \details The make_zero function initializes a 2D or 3D point or box with coordinates of zero
     \tparam Geometry the geometry type
     \return the geometry

Modified: trunk/boost/geometry/core/access.hpp
==============================================================================
--- trunk/boost/geometry/core/access.hpp (original)
+++ trunk/boost/geometry/core/access.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -170,7 +170,7 @@
 // Note the comments below tell Doxygen to create one function with doc for both
 
 /// @brief get coordinate value of a Point ( / Sphere)
-/// @ingroup access
+/// @ingroup get
 /// @tparam Dimension dimension
 /// @tparam Geometry geometry
 /// @param geometry geometry to query coordinate value from
@@ -203,7 +203,7 @@
 /// @tparam Geometry geometry
 /// @param geometry geometry to assign coordinate to
 /// @param value coordinate value to assign
-/// @ingroup access
+/// @ingroup set
 template <std::size_t Dimension, typename Geometry>
 inline void set(Geometry& geometry
         , typename coordinate_type<Geometry>::type const& value
@@ -238,7 +238,7 @@
 /// @tparam Geometry geometry
 /// @param geometry geometry to query coordinate value from
 /// @return coordinate value
-/// @ingroup access
+/// @ingroup get
 template <std::size_t Index, std::size_t Dimension, typename Geometry>
 inline typename coordinate_type<Geometry>::type get(Geometry const& geometry
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -271,7 +271,7 @@
 /// @tparam Geometry geometry
 /// @param geometry geometry to assign coordinate to
 /// @param value coordinate value to assign
-/// @ingroup access
+/// @ingroup set
 template <std::size_t Index, std::size_t Dimension, typename Geometry>
 inline void set(Geometry& geometry
         , typename coordinate_type<Geometry>::type const& value

Modified: trunk/boost/geometry/core/exterior_ring.hpp
==============================================================================
--- trunk/boost/geometry/core/exterior_ring.hpp (original)
+++ trunk/boost/geometry/core/exterior_ring.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -80,7 +80,7 @@
 
 /*!
     \brief Function to get the exterior_ring ring of a polygon
- \ingroup access
+ \ingroup exterior_ring
     \note OGC compliance: instead of ExteriorRing
     \tparam P polygon type
     \param polygon the polygon to get the exterior ring from
@@ -98,12 +98,14 @@
 
 
 /*!
- \brief Function to get the exterior ring of a polygon (const version)
- \ingroup access
- \note OGC compliance: instead of ExteriorRing
- \tparam Polygon polygon type
- \param polygon the polygon to get the exterior ring from
- \return a const reference to the exterior ring
+\brief Function to get the exterior ring of a polygon (const version)
+\ingroup exterior_ring
+\note OGC compliance: instead of ExteriorRing
+\tparam Polygon polygon type
+\param polygon the polygon to get the exterior ring from
+\return a const reference to the exterior ring
+
+\qbk{distinguish,const version}
 */
 template <typename Polygon>
 inline typename ring_return_type<Polygon const>::type exterior_ring(

Modified: trunk/boost/geometry/core/interior_rings.hpp
==============================================================================
--- trunk/boost/geometry/core/interior_rings.hpp (original)
+++ trunk/boost/geometry/core/interior_rings.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -118,12 +118,12 @@
 
 
 /*!
- \brief Function to get the interior rings of a polygon (non const version)
- \ingroup access
- \note OGC compliance: instead of InteriorRingN
- \tparam P polygon type
- \param polygon the polygon to get the interior rings from
- \return the interior rings (possibly a reference)
+\brief Function to get the interior rings of a polygon (non const version)
+\ingroup interior_rings
+\note OGC compliance: instead of InteriorRingN
+\tparam Polygon polygon type
+\param polygon the polygon to get the interior rings from
+\return the interior rings (possibly a reference)
 */
 
 template <typename Polygon>
@@ -138,12 +138,14 @@
 
 
 /*!
- \brief Function to get the interior rings of a polygon (const version)
- \ingroup access
- \note OGC compliance: instead of InteriorRingN
- \tparam P polygon type
- \param polygon the polygon to get the interior rings from
- \return the interior rings (possibly a const reference)
+\brief Function to get the interior rings of a polygon (const version)
+\ingroup interior_rings
+\note OGC compliance: instead of InteriorRingN
+\tparam Polygon polygon type
+\param polygon the polygon to get the interior rings from
+\return the interior rings (possibly a const reference)
+
+\qbk{distinguish,const version}
 */
 template <typename Polygon>
 inline typename interior_return_type<Polygon const>::type interior_rings(

Deleted: trunk/boost/geometry/geometries/cartesian2d.hpp
==============================================================================
--- trunk/boost/geometry/geometries/cartesian2d.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
+++ (empty file)
@@ -1,2 +0,0 @@
-// obsolete
-

Deleted: trunk/boost/geometry/geometries/cartesian3d.hpp
==============================================================================
--- trunk/boost/geometry/geometries/cartesian3d.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
+++ (empty file)
@@ -1 +0,0 @@
-// obsolete

Modified: trunk/boost/geometry/multi/geometries/multi_linestring.hpp
==============================================================================
--- trunk/boost/geometry/multi/geometries/multi_linestring.hpp (original)
+++ trunk/boost/geometry/multi/geometries/multi_linestring.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -37,7 +37,7 @@
     template<typename, typename> class V = std::vector,
     template<typename> class A = std::allocator
>
-struct multi_linestring : public V<L, A<L> >
+class multi_linestring : public V<L, A<L> >
 {
     BOOST_CONCEPT_ASSERT( (concept::Linestring<L>) );
 };

Modified: trunk/boost/geometry/multi/geometries/multi_point.hpp
==============================================================================
--- trunk/boost/geometry/multi/geometries/multi_point.hpp (original)
+++ trunk/boost/geometry/multi/geometries/multi_point.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -37,7 +37,7 @@
     template<typename, typename> class V = std::vector,
     template<typename> class A = std::allocator
>
-struct multi_point : public V<P, A<P> >
+class multi_point : public V<P, A<P> >
 {
     BOOST_CONCEPT_ASSERT( (concept::Point<P>) );
 };

Modified: trunk/boost/geometry/multi/geometries/multi_polygon.hpp
==============================================================================
--- trunk/boost/geometry/multi/geometries/multi_polygon.hpp (original)
+++ trunk/boost/geometry/multi/geometries/multi_polygon.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -36,7 +36,7 @@
     template<typename, typename> class V = std::vector,
     template<typename> class A = std::allocator
>
-struct multi_polygon : public V<P, A<P> >
+class multi_polygon : public V<P, A<P> >
 {
     BOOST_CONCEPT_ASSERT( (concept::Polygon<P>) );
 };

Modified: trunk/boost/geometry/ranges/box_range.hpp
==============================================================================
--- trunk/boost/geometry/ranges/box_range.hpp (original)
+++ trunk/boost/geometry/ranges/box_range.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -18,6 +18,11 @@
 {
 
 
+/*!
+\brief Range, walking over the four points of a box
+\tparam Box box type
+\ingroup ranges
+*/
 template <typename Box>
 class box_range
 {
@@ -43,6 +48,8 @@
 };
 
 
+#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
+
 // All box ranges can be handled as rings
 namespace traits
 {
@@ -53,6 +60,7 @@
     };
 }
 
+#endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS
 
 
 }} // namespace boost::geometry

Modified: trunk/boost/geometry/ranges/segment_range.hpp
==============================================================================
--- trunk/boost/geometry/ranges/segment_range.hpp (original)
+++ trunk/boost/geometry/ranges/segment_range.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -18,6 +18,11 @@
 {
 
 
+/*!
+\brief Range, walking over the two points of a segment
+\tparam Segment segment type
+\ingroup ranges
+*/
 template <typename Segment>
 class segment_range
 {
@@ -43,6 +48,8 @@
 };
 
 
+#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
+
 // All segment ranges can be handled as linestrings
 namespace traits
 {
@@ -53,6 +60,8 @@
     };
 }
 
+#endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS
+
 
 
 }} // namespace boost::geometry

Modified: trunk/boost/geometry/strategies/agnostic/hull_graham_andrew.hpp
==============================================================================
--- trunk/boost/geometry/strategies/agnostic/hull_graham_andrew.hpp (original)
+++ trunk/boost/geometry/strategies/agnostic/hull_graham_andrew.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -229,12 +229,11 @@
 
 
 /*!
- \brief Graham scan strategy to calculate convex hull
- \ingroup convex_hull
- \note Completely reworked version inspired on the sources listed below
- \see http://www.ddj.com/architect/201806315
- \see http://marknelson.us/2007/08/22/convex
-
+\brief Graham scan strategy to calculate convex hull
+\ingroup strategies
+\note Completely reworked version inspired on the sources listed below
+\see http://www.ddj.com/architect/201806315
+\see http://marknelson.us/2007/08/22/convex
  */
 template <typename InputGeometry, typename OutputPoint>
 class graham_andrew

Modified: trunk/boost/geometry/strategies/agnostic/point_in_poly_winding.hpp
==============================================================================
--- trunk/boost/geometry/strategies/agnostic/point_in_poly_winding.hpp (original)
+++ trunk/boost/geometry/strategies/agnostic/point_in_poly_winding.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -27,13 +27,14 @@
 {
 
 /*!
- \brief Within detection using winding rule
- \tparam Point point type of point to examine
- \tparam PointOfSegment point type of segments, defaults to Point
- \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
- \note Only dependant on "side", -> agnostic, suitable for spherical/latlong
+\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
+\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
+\note Only dependant on "side", -> agnostic, suitable for spherical/latlong
  */
 template
 <

Modified: trunk/boost/geometry/strategies/agnostic/simplify_douglas_peucker.hpp
==============================================================================
--- trunk/boost/geometry/strategies/agnostic/simplify_douglas_peucker.hpp (original)
+++ trunk/boost/geometry/strategies/agnostic/simplify_douglas_peucker.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -67,19 +67,19 @@
 
 
 /*!
- \brief Implements the simplify algorithm.
- \ingroup simplify
- \details The douglas_peucker strategy simplifies a linestring, ring or
- vector of points using the well-known Douglas-Peucker algorithm.
- For the algorithm, see for example:
- \see http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm
- \see http://www2.dcs.hull.ac.uk/CISRG/projects/Royal-Inst/demos/dp.html
- \tparam Point the point type
- \tparam PointDistanceStrategy point-segment distance strategy to be used
- \note This strategy uses itself a point-segment-distance strategy which
- can be specified
- \author Barend and Maarten, 1995/1996
- \author Barend, revised for Generic Geometry Library, 2008
+\brief Implements the simplify algorithm.
+\ingroup strategies
+\details The douglas_peucker strategy simplifies a linestring, ring or
+ vector of points using the well-known Douglas-Peucker algorithm.
+ For the algorithm, see for example:
+\see http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm
+\see http://www2.dcs.hull.ac.uk/CISRG/projects/Royal-Inst/demos/dp.html
+\tparam Point the point type
+\tparam PointDistanceStrategy point-segment distance strategy to be used
+\note This strategy uses itself a point-segment-distance strategy which
+ can be specified
+\author Barend and Maarten, 1995/1996
+\author Barend, revised for Generic Geometry Library, 2008
 */
 template
 <

Modified: trunk/boost/geometry/strategies/cartesian/area_by_triangles.hpp
==============================================================================
--- trunk/boost/geometry/strategies/cartesian/area_by_triangles.hpp (original)
+++ trunk/boost/geometry/strategies/cartesian/area_by_triangles.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -23,9 +23,10 @@
 {
 
 /*!
- \brief Strategy functor for area calculation on point_xy points
- \details Calculates area using well-known triangulation algorithm
- \tparam PointOfSegment point type of segments
+\brief Strategy functor for area calculation on point_xy points
+\ingroup strategies
+\details Calculates area using well-known triangulation algorithm
+\tparam PointOfSegment point type of segments
 */
 template
 <

Modified: trunk/boost/geometry/strategies/cartesian/centroid_bashein_detmer.hpp
==============================================================================
--- trunk/boost/geometry/strategies/cartesian/centroid_bashein_detmer.hpp (original)
+++ trunk/boost/geometry/strategies/cartesian/centroid_bashein_detmer.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -33,67 +33,68 @@
 
 
 /*!
- \brief Centroid calculation using algorith Bashein / Detmer
- \details Calculates centroid using triangulation method published by
- Bashein / Detmer
- \tparam Point point type of centroid to calculate
- \tparam PointOfSegment point type of segments, defaults to Point
- \par Concepts for Point and PointOfSegment:
- - specialized point_traits class
- \author Adapted from "Centroid of a Polygon" by
- Gerard Bashein and Paul R. Detmer<em>,
- in "Graphics Gems IV", Academic Press, 1994</em>
- \par Research notes
- The algorithm gives the same results as Oracle and PostGIS but
- differs from MySQL
- (tried 5.0.21 / 5.0.45 / 5.0.51a / 5.1.23).
-
- Without holes:
- - this: POINT(4.06923363095238 1.65055803571429)
- - geolib: POINT(4.07254 1.66819)
- - MySQL: POINT(3.6636363636364 1.6272727272727)'
- - PostGIS: POINT(4.06923363095238 1.65055803571429)
- - Oracle: 4.06923363095238 1.65055803571429
- - SQL Server: POINT(4.06923362245959 1.65055804168294)
-
- Statements:
- - \b MySQL/PostGIS: select AsText(Centroid(GeomFromText(
- 'POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 3,5.3 2.6
- ,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3))')))
- - \b Oracle: select sdo_geom.sdo_centroid(sdo_geometry(2003, null, null,
- sdo_elem_info_array(1, 1003, 1), sdo_ordinate_array(
- 2,1.3,2.4,1.7,2.8,1.8,3.4,1.2,3.7,1.6,3.4,2,4.1,3,5.3,2.6
- ,5.4,1.2,4.9,0.8,2.9,0.7,2,1.3))
- , mdsys.sdo_dim_array(mdsys.sdo_dim_element('x',0,10,.00000005)
- ,mdsys.sdo_dim_element('y',0,10,.00000005)))
- from dual
- - \b SQL Server 2008: select geometry::STGeomFromText(
- 'POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 3,5.3 2.6
- ,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3))',0)
- .STCentroid()
- .STAsText()
-
- With holes:
- - this: POINT(4.04663 1.6349)
- - geolib: POINT(4.04675 1.65735)
- - MySQL: POINT(3.6090580503834 1.607573932092)
- - PostGIS: POINT(4.0466265060241 1.63489959839357)
- - Oracle: 4.0466265060241 1.63489959839357
- - SQL Server: POINT(4.0466264962959677 1.6348996057331333)
-
- Statements:
- - \b MySQL/PostGIS: select AsText(Centroid(GeomFromText(
- 'POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2
- ,3.7 1.6,3.4 2,4.1 3,5.3 2.6,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3)
- ,(4 2,4.2 1.4,4.8 1.9,4.4 2.2,4 2))')));
- - \b Oracle: select sdo_geom.sdo_centroid(sdo_geometry(2003, null, null
- , sdo_elem_info_array(1, 1003, 1, 25, 2003, 1)
- , sdo_ordinate_array(2,1.3,2.4,1.7,2.8,1.8,3.4,1.2,3.7,1.6,3.4,
- 2,4.1,3,5.3,2.6,5.4,1.2,4.9,0.8,2.9,0.7,2,1.3,4,2, 4.2,1.4,
- 4.8,1.9, 4.4,2.2, 4,2))
- , mdsys.sdo_dim_array(mdsys.sdo_dim_element('x',0,10,.00000005)
- ,mdsys.sdo_dim_element('y',0,10,.00000005)))
- from dual
+\brief Centroid calculation using algorith Bashein / Detmer
+\ingroup strategies
+\details Calculates centroid using triangulation method published by
+ Bashein / Detmer
+\tparam Point point type of centroid to calculate
+\tparam PointOfSegment point type of segments, defaults to Point
+\par Concepts for Point and PointOfSegment:
+- specialized point_traits class
+\author Adapted from "Centroid of a Polygon" by
+ Gerard Bashein and Paul R. Detmer<em>,
+in "Graphics Gems IV", Academic Press, 1994</em>
+\par Research notes
+The algorithm gives the same results as Oracle and PostGIS but
+ differs from MySQL
+(tried 5.0.21 / 5.0.45 / 5.0.51a / 5.1.23).
+
+Without holes:
+- this: POINT(4.06923363095238 1.65055803571429)
+- geolib: POINT(4.07254 1.66819)
+- MySQL: POINT(3.6636363636364 1.6272727272727)'
+- PostGIS: POINT(4.06923363095238 1.65055803571429)
+- Oracle: 4.06923363095238 1.65055803571429
+- SQL Server: POINT(4.06923362245959 1.65055804168294)
+
+Statements:
+- \b MySQL/PostGIS: select AsText(Centroid(GeomFromText(
+ 'POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 3,5.3 2.6
+ ,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3))')))
+- \b Oracle: select sdo_geom.sdo_centroid(sdo_geometry(2003, null, null,
+ sdo_elem_info_array(1, 1003, 1), sdo_ordinate_array(
+ 2,1.3,2.4,1.7,2.8,1.8,3.4,1.2,3.7,1.6,3.4,2,4.1,3,5.3,2.6
+ ,5.4,1.2,4.9,0.8,2.9,0.7,2,1.3))
+ , mdsys.sdo_dim_array(mdsys.sdo_dim_element('x',0,10,.00000005)
+ ,mdsys.sdo_dim_element('y',0,10,.00000005)))
+ from dual
+- \b SQL Server 2008: select geometry::STGeomFromText(
+ 'POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 3,5.3 2.6
+ ,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3))',0)
+ .STCentroid()
+ .STAsText()
+
+With holes:
+- this: POINT(4.04663 1.6349)
+- geolib: POINT(4.04675 1.65735)
+- MySQL: POINT(3.6090580503834 1.607573932092)
+- PostGIS: POINT(4.0466265060241 1.63489959839357)
+- Oracle: 4.0466265060241 1.63489959839357
+- SQL Server: POINT(4.0466264962959677 1.6348996057331333)
+
+Statements:
+- \b MySQL/PostGIS: select AsText(Centroid(GeomFromText(
+ 'POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2
+ ,3.7 1.6,3.4 2,4.1 3,5.3 2.6,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3)
+ ,(4 2,4.2 1.4,4.8 1.9,4.4 2.2,4 2))')));
+- \b Oracle: select sdo_geom.sdo_centroid(sdo_geometry(2003, null, null
+ , sdo_elem_info_array(1, 1003, 1, 25, 2003, 1)
+ , sdo_ordinate_array(2,1.3,2.4,1.7,2.8,1.8,3.4,1.2,3.7,1.6,3.4,
+ 2,4.1,3,5.3,2.6,5.4,1.2,4.9,0.8,2.9,0.7,2,1.3,4,2, 4.2,1.4,
+ 4.8,1.9, 4.4,2.2, 4,2))
+ , mdsys.sdo_dim_array(mdsys.sdo_dim_element('x',0,10,.00000005)
+ ,mdsys.sdo_dim_element('y',0,10,.00000005)))
+ from dual
  */
 template
 <

Modified: trunk/boost/geometry/strategies/cartesian/distance_projected_point.hpp
==============================================================================
--- trunk/boost/geometry/strategies/cartesian/distance_projected_point.hpp (original)
+++ trunk/boost/geometry/strategies/cartesian/distance_projected_point.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -43,17 +43,17 @@
 
 
 /*!
- \brief Strategy for distance point to segment
- \ingroup distance
- \details Calculates distance using projected-point method, and (optionally) Pythagoras
- \author Adapted from: http://geometryalgorithms.com/Archive/algorithm_0102/algorithm_0102.htm
- \tparam P point type
- \tparam PointOfSegment segment type
- \tparam Strategy strategy, optional, defaults to pythagoras
- \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)
+\brief Strategy for distance point to segment
+\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 P point type
+\tparam PointOfSegment segment type
+\tparam Strategy strategy, optional, defaults to pythagoras
+\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)
 */
 template
 <

Modified: trunk/boost/geometry/strategies/cartesian/distance_pythagoras.hpp
==============================================================================
--- trunk/boost/geometry/strategies/cartesian/distance_pythagoras.hpp (original)
+++ trunk/boost/geometry/strategies/cartesian/distance_pythagoras.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -64,12 +64,11 @@
 {
 
 /*!
- \brief Strategy for comparable distance point to point: comparable_pythagoras
- \ingroup distance
- \tparam Point1 first point type
- \tparam Point2 optional, second point type, defaults to first point type
- \par Concepts for Point1 and Point2:
- - specialized point_traits class
+\brief Strategy for comparable distance point to point: comparable_pythagoras
+\ingroup strategies
+\tparam Point1 first point type
+\tparam Point2 optional, second point type, defaults to first point type
+\tparam CalculationType optional, specify type of calculation
 */
 template
 <
@@ -77,8 +76,9 @@
     typename Point2 = Point1,
     typename CalculationType = void
>
-struct pythagoras
+class pythagoras
 {
+public :
     typedef typename select_calculation_type
             <
                 Point1,
@@ -109,12 +109,11 @@
 
 
 /*!
- \brief Strategy for distance point to point: pythagoras
- \ingroup distance
- \tparam Point1 first point type
- \tparam Point2 optional, second point type, defaults to first point type
- \par Concepts for Point1 and Point2:
- - specialized point_traits class
+\brief Strategy for distance point to point: pythagoras
+\ingroup strategies
+\tparam Point1 first point type
+\tparam Point2 optional, second point type, defaults to first point type
+\tparam CalculationType optional, specify type of calculation
 */
 template
 <
@@ -122,9 +121,10 @@
     typename Point2 = Point1,
     typename CalculationType = void
>
-struct pythagoras
+class pythagoras
 {
     typedef comparable::pythagoras<Point1, Point2, CalculationType> comparable_type;
+public :
     typedef typename promote_floating_point
         <
             typename services::return_type<comparable_type>::type

Modified: trunk/boost/geometry/strategies/cartesian/point_in_poly_crossings_multiply.hpp
==============================================================================
--- trunk/boost/geometry/strategies/cartesian/point_in_poly_crossings_multiply.hpp (original)
+++ trunk/boost/geometry/strategies/cartesian/point_in_poly_crossings_multiply.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -20,9 +20,10 @@
 {
 
 /*!
- \brief Within detection using cross counting,
- \see http://tog.acm.org/resources/GraphicsGems/gemsiv/ptpoly_haines/ptinpoly.c
- \note Does NOT work correctly for point ON border
+\brief Within detection using cross counting,
+\ingroup strategies
+\see http://tog.acm.org/resources/GraphicsGems/gemsiv/ptpoly_haines/ptinpoly.c
+\note Does NOT work correctly for point ON border
  */
 
 template

Modified: trunk/boost/geometry/strategies/cartesian/point_in_poly_franklin.hpp
==============================================================================
--- trunk/boost/geometry/strategies/cartesian/point_in_poly_franklin.hpp (original)
+++ trunk/boost/geometry/strategies/cartesian/point_in_poly_franklin.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -21,13 +21,14 @@
 {
 
 /*!
- \brief Within detection using cross counting
+\brief Within detection using cross counting
+\ingroup strategies
+\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
 
- \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

Modified: trunk/boost/geometry/strategies/cartesian/side_by_triangle.hpp
==============================================================================
--- trunk/boost/geometry/strategies/cartesian/side_by_triangle.hpp (original)
+++ trunk/boost/geometry/strategies/cartesian/side_by_triangle.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -24,12 +24,17 @@
 namespace strategy { namespace side
 {
 
-// Check at which side of a segment a point lies:
-// left of segment (> 0), right of segment (< 0), on segment (0)
-// In fact this is twice the area of a triangle
+/*!
+\brief Check at which side of a segment a point lies:
+\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
+ */
 template <typename CalculationType>
-struct side_by_triangle
+class side_by_triangle
 {
+public :
 
     // Template member function, because it is not always trivial
     // or convenient to explicitly mention the typenames in the

Modified: trunk/boost/geometry/strategies/spherical/area_huiller.hpp
==============================================================================
--- trunk/boost/geometry/strategies/spherical/area_huiller.hpp (original)
+++ trunk/boost/geometry/strategies/spherical/area_huiller.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -27,21 +27,22 @@
 
 
 /*!
- \brief Area calculation by spherical excess / Huiller's formula
- \tparam P type of points of rings/polygons
- \author Barend Gehrels. Adapted from:
- - http://www.soe.ucsc.edu/~pang/160/f98/Gems/GemsIV/sph_poly.c
- - http://williams.best.vwh.net/avform.htm
- \note The version in Gems didn't account for polygons crossing the 180 meridian.
- \note This version works for convex and non-convex polygons, for 180 meridian
- crossing polygons and for polygons with holes. However, some cases (especially
- 180 meridian cases) must still be checked.
- \note The version which sums angles, which is often seen, doesn't handle non-convex
- polygons correctly.
- \note The version which sums longitudes, see
- 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.
+\brief Area calculation by spherical excess / Huiller's formula
+\ingroup strategies
+\tparam P type of points of rings/polygons
+\author Barend Gehrels. Adapted from:
+- http://www.soe.ucsc.edu/~pang/160/f98/Gems/GemsIV/sph_poly.c
+- http://williams.best.vwh.net/avform.htm
+\note The version in Gems didn't account for polygons crossing the 180 meridian.
+\note This version works for convex and non-convex polygons, for 180 meridian
+crossing polygons and for polygons with holes. However, some cases (especially
+180 meridian cases) must still be checked.
+\note The version which sums angles, which is often seen, doesn't handle non-convex
+polygons correctly.
+\note The version which sums longitudes, see
+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.
 */
 template
 <

Modified: trunk/boost/geometry/strategies/spherical/compare_circular.hpp
==============================================================================
--- trunk/boost/geometry/strategies/spherical/compare_circular.hpp (original)
+++ trunk/boost/geometry/strategies/spherical/compare_circular.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -51,10 +51,10 @@
 #endif
 
 /*!
- \brief Compare (in one direction) strategy for spherical coordinates
- \ingroup util
- \tparam Point point-type
- \tparam Dimension dimension
+\brief Compare (in one direction) strategy for spherical coordinates
+\ingroup strategies
+\tparam Point point-type
+\tparam Dimension dimension
 */
 template <typename CoordinateType, typename Units, typename Compare>
 struct circular_comparator

Modified: trunk/boost/geometry/strategies/spherical/distance_cross_track.hpp
==============================================================================
--- trunk/boost/geometry/strategies/spherical/distance_cross_track.hpp (original)
+++ trunk/boost/geometry/strategies/spherical/distance_cross_track.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -39,12 +39,12 @@
 {
 
 /*!
- \brief Strategy functor for distance point to segment calculation
- \ingroup 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 type of point-of-segment
+\brief Strategy functor for distance point to segment calculation
+\ingroup strategies
+\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 type of point-of-segment
 */
 template
 <

Modified: trunk/boost/geometry/strategies/spherical/distance_haversine.hpp
==============================================================================
--- trunk/boost/geometry/strategies/spherical/distance_haversine.hpp (original)
+++ trunk/boost/geometry/strategies/spherical/distance_haversine.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -93,21 +93,21 @@
 } // namespace comparable
 
 /*!
- \brief Distance calculation for spherical coordinates
- on a perfect sphere using haversine
- \ingroup distance
- \tparam P1 first point type
- \tparam P2 optional second point type
- \author Adapted from: http://williams.best.vwh.net/avform.htm
- \see http://en.wikipedia.org/wiki/Great-circle_distance
- \note It says: <em>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))
- </em>
+\brief Distance calculation for spherical coordinates
+on a perfect sphere using haversine
+\ingroup strategies
+\tparam P1 first point type
+\tparam P2 optional second point type
+\author Adapted from: http://williams.best.vwh.net/avform.htm
+\see http://en.wikipedia.org/wiki/Great-circle_distance
+\note It says: <em>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))
+ </em>
 */
 template
 <

Modified: trunk/boost/geometry/strategies/spherical/side_by_cross_track.hpp
==============================================================================
--- trunk/boost/geometry/strategies/spherical/side_by_cross_track.hpp (original)
+++ trunk/boost/geometry/strategies/spherical/side_by_cross_track.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -29,6 +29,10 @@
 namespace strategy { namespace side
 {
 
+#ifndef DOXYGEN_NO_DETAIL
+namespace detail
+{
+
 /// Calculate course (bearing) between two points. Might be moved to a "course formula" ...
 template <typename Point>
 static inline double course(Point const& p1, Point const& p2)
@@ -43,19 +47,23 @@
         - sin(get_as_radian<1>(p1)) * cos_p2lat * cos(dlon));
 }
 
+}
+#endif // DOXYGEN_NO_DETAIL
 
 
 
-// Check at which side of a segment a point lies
-// from a Great Circle segment between two points:
-// left of segment (> 0), right of segment (< 0), on segment (0)
+/*!
+\brief Check at which side of a segment a point lies:
+\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
+ */
 template <typename CalculationType>
-struct side_by_cross_track
+class side_by_cross_track
 {
 
- // Types can be all three different. Therefore it is
- // not implemented (anymore) as "segment"
-
+public :
     template <typename P1, typename P2, typename P>
     static inline int apply(P1 const& p1, P2 const& p2, P const& p)
     {
@@ -78,8 +86,8 @@
         // That is also applicable on the spherical earth. A radius is not necessary.
 
         double d1 = 0.001; // m_strategy.apply(sp1, p);
- double crs_AD = course(p1, p);
- double crs_AB = course(p1, p2);
+ double crs_AD = detail::course(p1, p);
+ double crs_AB = detail::course(p1, p2);
         double XTD = geometry::math::abs(asin(sin(d1) * sin(crs_AD - crs_AB)));
 
         return math::equals(XTD, 0) ? 0 : XTD > 0 ? 1 : -1;

Modified: trunk/boost/geometry/strategies/transform/inverse_transformer.hpp
==============================================================================
--- trunk/boost/geometry/strategies/transform/inverse_transformer.hpp (original)
+++ trunk/boost/geometry/strategies/transform/inverse_transformer.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -26,17 +26,18 @@
 {
 
 /*!
- \brief Transformation strategy to do an inverse ransformation in Cartesian system
- \ingroup transform
- \tparam P1 first point type
- \tparam P2 second point type
+\brief Transformation strategy to do an inverse ransformation in Cartesian system
+\ingroup strategies
+\tparam P1 first point type
+\tparam P2 second point type
  */
 template <typename P1, typename P2>
-struct inverse_transformer
- : ublas_transformer<P1, P2, dimension<P1>::type::value, dimension<P2>::type::value>
+class inverse_transformer
+ : public ublas_transformer<P1, P2, dimension<P1>::type::value, dimension<P2>::type::value>
 {
     typedef typename select_coordinate_type<P1, P2>::type T;
 
+public :
     template <typename Transformer>
     inline inverse_transformer(Transformer const& input)
     {

Modified: trunk/boost/geometry/strategies/transform/map_transformer.hpp
==============================================================================
--- trunk/boost/geometry/strategies/transform/map_transformer.hpp (original)
+++ trunk/boost/geometry/strategies/transform/map_transformer.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -22,12 +22,12 @@
 {
 
 /*!
- \brief Transformation strategy to do map from one to another Cartesian system
- \ingroup transform
- \tparam P1 first point type
- \tparam P2 second point type
- \tparam Mirror if true map is mirrored upside-down (in most cases pixels
- are from top to bottom, while map is from bottom to top)
+\brief Transformation strategy to do map from one to another Cartesian system
+\ingroup strategies
+\tparam P1 first point type
+\tparam P2 second point type
+\tparam Mirror if true map is mirrored upside-down (in most cases pixels
+ are from top to bottom, while map is from bottom to top)
  */
 template
 <
@@ -36,12 +36,13 @@
     std::size_t Dimension1 = dimension<P1>::type::value,
     std::size_t Dimension2 = dimension<P2>::type::value
>
-struct map_transformer
- : ublas_transformer<P1, P2, Dimension1, Dimension2>
+class map_transformer
+ : public ublas_transformer<P1, P2, Dimension1, Dimension2>
 {
     typedef typename select_coordinate_type<P1, P2>::type T;
     typedef boost::numeric::ublas::matrix<T> M;
 
+public :
     template <typename B, typename D>
     explicit inline map_transformer(B const& box, D const& width, D const& height)
     {
@@ -59,94 +60,94 @@
     }
 
 
- private :
- template <typename W, typename P, typename S>
- inline void set_transformation_point(W const& wx, W const& wy,
- P const& px, P const& py,
- S const& scalex, S const& scaley)
- {
+private :
+ template <typename W, typename P, typename S>
+ inline void set_transformation_point(W const& wx, W const& wy,
+ P const& px, P const& py,
+ S const& scalex, S const& scaley)
+ {
 
- // Translate to a coordinate system centered on world coordinates (-wx, -wy)
- M t1(3,3);
- t1(0,0) = 1; t1(0,1) = 0; t1(0,2) = -wx;
- t1(1,0) = 0; t1(1,1) = 1; t1(1,2) = -wy;
- t1(2,0) = 0; t1(2,1) = 0; t1(2,2) = 1;
-
- // Scale the map
- M s(3,3);
- s(0,0) = scalex; s(0,1) = 0; s(0,2) = 0;
- s(1,0) = 0; s(1,1) = scaley; s(1,2) = 0;
- s(2,0) = 0; s(2,1) = 0; s(2,2) = 1;
-
- // Translate to a coordinate system centered on the specified pixels (+px, +py)
- M t2(3, 3);
- t2(0,0) = 1; t2(0,1) = 0; t2(0,2) = px;
- t2(1,0) = 0; t2(1,1) = 1; t2(1,2) = py;
- t2(2,0) = 0; t2(2,1) = 0; t2(2,2) = 1;
+ // Translate to a coordinate system centered on world coordinates (-wx, -wy)
+ M t1(3,3);
+ t1(0,0) = 1; t1(0,1) = 0; t1(0,2) = -wx;
+ t1(1,0) = 0; t1(1,1) = 1; t1(1,2) = -wy;
+ t1(2,0) = 0; t1(2,1) = 0; t1(2,2) = 1;
+
+ // Scale the map
+ M s(3,3);
+ s(0,0) = scalex; s(0,1) = 0; s(0,2) = 0;
+ s(1,0) = 0; s(1,1) = scaley; s(1,2) = 0;
+ s(2,0) = 0; s(2,1) = 0; s(2,2) = 1;
+
+ // Translate to a coordinate system centered on the specified pixels (+px, +py)
+ M t2(3, 3);
+ t2(0,0) = 1; t2(0,1) = 0; t2(0,2) = px;
+ t2(1,0) = 0; t2(1,1) = 1; t2(1,2) = py;
+ t2(2,0) = 0; t2(2,1) = 0; t2(2,2) = 1;
+
+ // Calculate combination matrix in two steps
+ this->m_matrix = boost::numeric::ublas::prod(s, t1);
+ this->m_matrix = boost::numeric::ublas::prod(t2, this->m_matrix);
+ }
 
- // Calculate combination matrix in two steps
- this->m_matrix = boost::numeric::ublas::prod(s, t1);
- this->m_matrix = boost::numeric::ublas::prod(t2, this->m_matrix);
+
+ template <typename W, typename D>
+ void set_transformation(W const& wx1, W const& wy1, W const& wx2, W const& wy2,
+ D const& width, D const& height)
+ {
+ D px1 = 0;
+ D py1 = 0;
+ D px2 = width;
+ D py2 = height;
+
+ // Get the same type, but at least a double
+ typedef typename select_most_precise<D, double>::type type;
+
+
+ // Calculate appropriate scale, take min because whole box must fit
+ // Scale is in PIXELS/MAPUNITS (meters)
+ W wdx = wx2 - wx1;
+ W wdy = wy2 - wy1;
+ type sx = (px2 - px1) / boost::numeric_cast<type>(wdx);
+ type sy = (py2 - py1) / boost::numeric_cast<type>(wdy);
+
+ if (SameScale)
+ {
+ type scale = (std::min)(sx, sy);
+ sx = scale;
+ sy = scale;
         }
 
+ // Calculate centerpoints
+ W wtx = wx1 + wx2;
+ W wty = wy1 + wy2;
+ W two = 2;
+ W wmx = wtx / two;
+ W wmy = wty / two;
+ type pmx = (px1 + px2) / 2.0;
+ type pmy = (py1 + py2) / 2.0;
 
- template <typename W, typename D>
- void set_transformation(W const& wx1, W const& wy1, W const& wx2, W const& wy2,
- D const& width, D const& height)
+ set_transformation_point(wmx, wmy, pmx, pmy, sx, sy);
+
+ if (Mirror)
         {
- D px1 = 0;
- D py1 = 0;
- D px2 = width;
- D py2 = height;
-
- // Get the same type, but at least a double
- typedef typename select_most_precise<D, double>::type type;
-
-
- // Calculate appropriate scale, take min because whole box must fit
- // Scale is in PIXELS/MAPUNITS (meters)
- W wdx = wx2 - wx1;
- W wdy = wy2 - wy1;
- type sx = (px2 - px1) / boost::numeric_cast<type>(wdx);
- type sy = (py2 - py1) / boost::numeric_cast<type>(wdy);
-
- if (SameScale)
- {
- type scale = (std::min)(sx, sy);
- sx = scale;
- sy = scale;
- }
-
- // Calculate centerpoints
- W wtx = wx1 + wx2;
- W wty = wy1 + wy2;
- W two = 2;
- W wmx = wtx / two;
- W wmy = wty / two;
- type pmx = (px1 + px2) / 2.0;
- type pmy = (py1 + py2) / 2.0;
-
- set_transformation_point(wmx, wmy, pmx, pmy, sx, sy);
-
- if (Mirror)
- {
- // Mirror in y-direction
- M m(3,3);
- m(0,0) = 1; m(0,1) = 0; m(0,2) = 0;
- m(1,0) = 0; m(1,1) = -1; m(1,2) = 0;
- m(2,0) = 0; m(2,1) = 0; m(2,2) = 1;
-
- // Translate in y-direction such that it fits again
- M y(3, 3);
- y(0,0) = 1; y(0,1) = 0; y(0,2) = 0;
- y(1,0) = 0; y(1,1) = 1; y(1,2) = height;
- y(2,0) = 0; y(2,1) = 0; y(2,2) = 1;
-
- // Calculate combination matrix in two steps
- this->m_matrix = boost::numeric::ublas::prod(m, this->m_matrix);
- this->m_matrix = boost::numeric::ublas::prod(y, this->m_matrix);
- }
+ // Mirror in y-direction
+ M m(3,3);
+ m(0,0) = 1; m(0,1) = 0; m(0,2) = 0;
+ m(1,0) = 0; m(1,1) = -1; m(1,2) = 0;
+ m(2,0) = 0; m(2,1) = 0; m(2,2) = 1;
+
+ // Translate in y-direction such that it fits again
+ M y(3, 3);
+ y(0,0) = 1; y(0,1) = 0; y(0,2) = 0;
+ y(1,0) = 0; y(1,1) = 1; y(1,2) = height;
+ y(2,0) = 0; y(2,1) = 0; y(2,2) = 1;
+
+ // Calculate combination matrix in two steps
+ this->m_matrix = boost::numeric::ublas::prod(m, this->m_matrix);
+ this->m_matrix = boost::numeric::ublas::prod(y, this->m_matrix);
         }
+ }
 };
 
 

Modified: trunk/boost/geometry/strategies/transform/matrix_transformers.hpp
==============================================================================
--- trunk/boost/geometry/strategies/transform/matrix_transformers.hpp (original)
+++ trunk/boost/geometry/strategies/transform/matrix_transformers.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -35,16 +35,16 @@
 {
 
 /*!
- \brief Affine transformation strategy in Cartesian system.
- \details The strategy serves as a generic definition of affine transformation matrix
- and procedure of application it to given point.
- \see http://en.wikipedia.org/wiki/Affine_transformation
- and http://www.devmaster.net/wiki/Transformation_matrices
- \ingroup transform
- \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
+\brief Affine transformation strategy in Cartesian system.
+\details The strategy serves as a generic definition of affine transformation matrix
+ and procedure of application it to given point.
+\see http://en.wikipedia.org/wiki/Affine_transformation
+ and http://www.devmaster.net/wiki/Transformation_matrices
+\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
  */
 template
 <
@@ -111,11 +111,12 @@
 
 // It IS possible to go from 3 to 2 coordinates
 template <typename P1, typename P2>
-struct ublas_transformer<P1, P2, 3, 2> : public ublas_transformer<P1, P2, 2, 2>
+class ublas_transformer<P1, P2, 3, 2> : public ublas_transformer<P1, P2, 2, 2>
 {
     typedef typename select_coordinate_type<P1, P2>::type coordinate_type;
     typedef coordinate_type ct; // Abbreviation
 
+public :
     inline ublas_transformer(
                 ct const& m_0_0, ct const& m_0_1, ct const& m_0_2,
                 ct const& m_1_0, ct const& m_1_1, ct const& m_1_2,
@@ -182,14 +183,14 @@
 
 
 /*!
- \brief Strategy of translate transformation in Cartesian system.
- \details Translate moves a geometry a fixed distance in 2 or 3 dimensions.
- \see http://en.wikipedia.org/wiki/Translation_%28geometry%29
- \ingroup transform
- \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
+\brief Strategy of translate transformation in Cartesian system.
+\details Translate moves a geometry a fixed distance in 2 or 3 dimensions.
+\see http://en.wikipedia.org/wiki/Translation_%28geometry%29
+\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
  */
 template
 <
@@ -197,16 +198,17 @@
     std::size_t Dimension1 = geometry::dimension<P1>::type::value,
     std::size_t Dimension2 = geometry::dimension<P2>::type::value
>
-struct translate_transformer
+class translate_transformer
 {
 };
 
 
 template <typename P1, typename P2>
-struct translate_transformer<P1, P2, 2, 2> : ublas_transformer<P1, P2, 2, 2>
+class translate_transformer<P1, P2, 2, 2> : public ublas_transformer<P1, P2, 2, 2>
 {
     typedef typename select_coordinate_type<P1, P2>::type coordinate_type;
 
+public :
     // To have translate transformers compatible for 2/3 dimensions, the
     // constructor takes an optional third argument doing nothing.
     inline translate_transformer(coordinate_type const& translate_x,
@@ -221,10 +223,11 @@
 
 
 template <typename P1, typename P2>
-struct translate_transformer<P1, P2, 3, 3> : ublas_transformer<P1, P2, 3, 3>
+class translate_transformer<P1, P2, 3, 3> : public ublas_transformer<P1, P2, 3, 3>
 {
     typedef typename select_coordinate_type<P1, P2>::type coordinate_type;
 
+public :
     inline translate_transformer(coordinate_type const& translate_x,
                 coordinate_type const& translate_y,
                 coordinate_type const& translate_z)
@@ -239,14 +242,14 @@
 
 
 /*!
- \brief Strategy of scale transformation in Cartesian system.
- \details Scale scales a geometry up or down in all its dimensions.
- \see http://en.wikipedia.org/wiki/Scaling_%28geometry%29
- \ingroup transform
- \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
+\brief Strategy of scale transformation in Cartesian system.
+\details Scale scales a geometry up or down in all its dimensions.
+\see http://en.wikipedia.org/wiki/Scaling_%28geometry%29
+\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
 */
 template
 <
@@ -254,16 +257,17 @@
     std::size_t Dimension1 = geometry::dimension<P1>::type::value,
     std::size_t Dimension2 = geometry::dimension<P2>::type::value
>
-struct scale_transformer
+class scale_transformer
 {
 };
 
 
 template <typename P1, typename P2>
-struct scale_transformer<P1, P2, 2, 2> : ublas_transformer<P1, P2, 2, 2>
+class scale_transformer<P1, P2, 2, 2> : public ublas_transformer<P1, P2, 2, 2>
 {
     typedef typename select_coordinate_type<P1, P2>::type coordinate_type;
 
+public :
     inline scale_transformer(coordinate_type const& scale_x,
                 coordinate_type const& scale_y,
                 coordinate_type const& dummy = 0)
@@ -284,7 +288,7 @@
 
 
 template <typename P1, typename P2>
-struct scale_transformer<P1, P2, 3, 3> : ublas_transformer<P1, P2, 3, 3>
+class scale_transformer<P1, P2, 3, 3> : public ublas_transformer<P1, P2, 3, 3>
 {
     typedef typename select_coordinate_type<P1, P2>::type coordinate_type;
 
@@ -347,8 +351,8 @@
     std::size_t Dimension1 = geometry::dimension<P1>::type::value,
     std::size_t Dimension2 = geometry::dimension<P2>::type::value
>
-struct rad_rotate_transformer
- : ublas_transformer<P1, P2, Dimension1, Dimension2>
+class rad_rotate_transformer
+ : public ublas_transformer<P1, P2, Dimension1, Dimension2>
 {
     // Angle has type of coordinate type, but at least a double
     typedef typename select_most_precise
@@ -357,6 +361,7 @@
             double
>::type angle_type;
 
+public :
     inline rad_rotate_transformer(angle_type const& angle)
         : ublas_transformer<P1, P2, Dimension1, Dimension2>(
                  cos(angle), sin(angle), 0,
@@ -371,20 +376,20 @@
 
 
 /*!
- \brief Strategy of rotate transformation in Cartesian system.
- \details Rotate rotates a geometry of specified angle about a fixed point (e.g. origin).
- \see http://en.wikipedia.org/wiki/Rotation_%28mathematics%29
- \ingroup transform
- \tparam P1 first point type
- \tparam P2 second point type
- \tparam DegreeOrRadian degree/or/radian, type of rotation angle specification
- \note A single angle is needed to specify a rotation in 2D.
- Not yet in 3D, the 3D version requires special things to allow
- for rotation around X, Y, Z or arbitrary axis.
- \todo The 3D version will not compile.
+\brief Strategy of rotate transformation in Cartesian system.
+\details Rotate rotates a geometry of specified angle about a fixed point (e.g. origin).
+\see http://en.wikipedia.org/wiki/Rotation_%28mathematics%29
+\ingroup strategies
+\tparam P1 first point type
+\tparam P2 second point type
+\tparam DegreeOrRadian degree/or/radian, type of rotation angle specification
+\note A single angle is needed to specify a rotation in 2D.
+ Not yet in 3D, the 3D version requires special things to allow
+ for rotation around X, Y, Z or arbitrary axis.
+\todo The 3D version will not compile.
  */
 template <typename P1, typename P2, typename DegreeOrRadian>
-struct rotate_transformer : detail::rad_rotate_transformer<P1, P2>
+class rotate_transformer : public detail::rad_rotate_transformer<P1, P2>
 {
     // Angle has type of coordinate type, but at least a double
     typedef typename select_most_precise
@@ -393,6 +398,7 @@
             double
>::type angle_type;
 
+public :
     inline rotate_transformer(angle_type const& angle)
         : detail::rad_rotate_transformer
             <

Modified: trunk/boost/geometry/views/closeable_view.hpp
==============================================================================
--- trunk/boost/geometry/views/closeable_view.hpp (original)
+++ trunk/boost/geometry/views/closeable_view.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -22,6 +22,8 @@
 namespace boost { namespace geometry
 {
 
+#ifndef DOXYGEN_NO_DETAIL
+
 namespace detail
 {
 
@@ -48,11 +50,20 @@
 
 }
 
+#endif // DOXYGEN_NO_DETAIL
+
 
+/*!
+\brief View on a range, either closing or not closing
+\tparam Range original range
+\tparam Close specifying if it should be closed or not
+\ingroup ranges
+*/
 template <typename Range, closure_selector Close>
 struct closeable_view {};
 
 
+#ifndef DOXYGEN_NO_SPECIALIZATIONS
 
 template <typename Range>
 struct closeable_view<Range, closed>
@@ -67,6 +78,9 @@
     typedef detail::closing_view<Range> type;
 };
 
+#endif // DOXYGEN_NO_SPECIALIZATIONS
+
+
 
 }} // namespace boost::geometry
 

Modified: trunk/boost/geometry/views/identity_view.hpp
==============================================================================
--- trunk/boost/geometry/views/identity_view.hpp (original)
+++ trunk/boost/geometry/views/identity_view.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -16,6 +16,11 @@
 {
 
 
+/*!
+\brief View on a range, not modifying anything
+\tparam Range original range
+\ingroup ranges
+*/
 template <typename Range>
 struct identity_view
 {

Modified: trunk/boost/geometry/views/reversible_view.hpp
==============================================================================
--- trunk/boost/geometry/views/reversible_view.hpp (original)
+++ trunk/boost/geometry/views/reversible_view.hpp 2011-01-01 17:35:47 EST (Sat, 01 Jan 2011)
@@ -22,13 +22,25 @@
 namespace boost { namespace geometry
 {
 
+/*!
+\brief Flag for iterating a reversible_view in forward or reverse direction
+\ingroup ranges
+*/
 enum iterate_direction { iterate_forward, iterate_reverse };
 
-// BSG 13-12-2010, changed into meta-function
+/*!
+\brief View on a range, reversing direction if necessary
+\tparam Range original range
+\tparam Direction direction of iteration
+\ingroup ranges
+*/
 template <typename Range, iterate_direction Direction>
 struct reversible_view {};
 
 
+
+#ifndef DOXYGEN_NO_SPECIALIZATIONS
+
 template <typename Range>
 struct reversible_view<Range, iterate_forward>
 {
@@ -47,6 +59,9 @@
 #endif
 };
 
+#endif // DOXYGEN_NO_SPECIALIZATIONS
+
+
 }} // namespace boost::geometry
 
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk