Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67587 - in trunk: boost/geometry/algorithms boost/geometry/core boost/geometry/multi/strategies/cartesian libs/geometry/doc libs/geometry/doc/doxy libs/geometry/doc/reference libs/geometry/doc/snippets libs/geometry/doc/src/examples libs/geometry/doc/src/examples/algorithms
From: barend.gehrels_at_[hidden]
Date: 2011-01-02 15:23:49


Author: barendgehrels
Date: 2011-01-02 15:23:45 EST (Sun, 02 Jan 2011)
New Revision: 67587
URL: http://svn.boost.org/trac/boost/changeset/67587

Log:
Doc update
Added:
   trunk/libs/geometry/doc/reference/cartesian.qbk (contents, props changed)
   trunk/libs/geometry/doc/reference/centroid_average.qbk (contents, props changed)
   trunk/libs/geometry/doc/reference/geographic.qbk (contents, props changed)
   trunk/libs/geometry/doc/reference/polar.qbk (contents, props changed)
   trunk/libs/geometry/doc/reference/spherical.qbk (contents, props changed)
   trunk/libs/geometry/doc/src/examples/
   trunk/libs/geometry/doc/src/examples/algorithms/
   trunk/libs/geometry/doc/src/examples/algorithms/Jamfile.v2 (contents, props changed)
   trunk/libs/geometry/doc/src/examples/algorithms/area.cpp (contents, props changed)
Text files modified:
   trunk/boost/geometry/algorithms/area.hpp | 7 +-
   trunk/boost/geometry/core/cs.hpp | 97 +++++++++++++++++++++------------------
   trunk/boost/geometry/core/radian_access.hpp | 40 ++++++++--------
   trunk/boost/geometry/multi/strategies/cartesian/centroid_average.hpp | 10 ++-
   trunk/libs/geometry/doc/doxy/Doxyfile | 1
   trunk/libs/geometry/doc/geometry.qbk | 4 +
   trunk/libs/geometry/doc/make_qbk.py | 12 ++++
   trunk/libs/geometry/doc/quickref.xml | 14 ++--
   trunk/libs/geometry/doc/reference.qbk | 7 ++
   trunk/libs/geometry/doc/reference/area.qbk | 7 +-
   trunk/libs/geometry/doc/reference/get.qbk | 35 ++++++++++++++
   trunk/libs/geometry/doc/reference/set.qbk | 33 +++++++++++++
   trunk/libs/geometry/doc/snippets/qbk_1.cpp | 39 ----------------
   13 files changed, 184 insertions(+), 122 deletions(-)

Modified: trunk/boost/geometry/algorithms/area.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/area.hpp (original)
+++ trunk/boost/geometry/algorithms/area.hpp 2011-01-02 15:23:45 EST (Sun, 02 Jan 2011)
@@ -213,8 +213,8 @@
 \param geometry \param_geometry
 \return \return_calc{area}
 
-\qbk{example,area_polygon}
-\qbk{example,area_polygon_spherical}
+\qbk{example,area}
+\qbk{example,area_output}
 \qbk{behavior,__0dim__:[qbk_ret 0]}
 \qbk{behavior,__1dim__:[qbk_ret 0]}
 \qbk{behavior,__2dim__:[qbk_ret the area]}
@@ -255,7 +255,8 @@
 \return \return_calc{area}
 
 \qbk{distinguish,with strategy}
-\qbk{example,area_polygon_strategy}
+\qbk{example,area_with_strategy}
+\qbk{example,area_with_strategy_output}
  */
 template <typename Geometry, typename Strategy>
 inline typename Strategy::return_type area(

Modified: trunk/boost/geometry/core/cs.hpp
==============================================================================
--- trunk/boost/geometry/core/cs.hpp (original)
+++ trunk/boost/geometry/core/cs.hpp 2011-01-02 15:23:45 EST (Sun, 02 Jan 2011)
@@ -21,29 +21,31 @@
 {
 
 /*!
- \brief Unit of plane angle: Degrees
- \ingroup cs
+\brief Unit of plane angle: Degrees
+\ingroup cs
+\note Might be replaced by Boost.Units
 */
-class degree {};
+struct degree {};
 
 
 /*!
- \brief Unit of plane angle: Radians
- \ingroup cs
+\brief Unit of plane angle: Radians
+\ingroup cs
+\note Might be replaced by Boost.Units
 */
-class radian {};
+struct radian {};
 
 
 namespace cs
 {
 
 /*!
- \brief Cartesian coordinate system
- \details Defines the Cartesian or rectangular coordinate system
- where points are defined in 2 or 3 (or more)
- dimensions and usually (but not always) known as x,y,z
- \see http://en.wikipedia.org/wiki/Cartesian_coordinate_system
- \ingroup cs
+\brief Cartesian coordinate system
+\details Defines the Cartesian or rectangular coordinate system
+ where points are defined in 2 or 3 (or more)
+dimensions and usually (but not always) known as x,y,z
+\see http://en.wikipedia.org/wiki/Cartesian_coordinate_system
+\ingroup cs
 */
 struct cartesian {};
 
@@ -51,13 +53,13 @@
 
 
 /*!
- \brief Geographic coordinate system, in degree or in radian
- \details Defines the geographic coordinate system where points
- are defined in two angles and usually
- known as lat,long or lo,la or phi,lambda
- \see http://en.wikipedia.org/wiki/Geographic_coordinate_system
- \ingroup cs
- \note might be moved to extensions/gis/geographic
+\brief Geographic coordinate system, in degree or in radian
+\details Defines the geographic coordinate system where points
+ are defined in two angles and usually
+known as lat,long or lo,la or phi,lambda
+\see http://en.wikipedia.org/wiki/Geographic_coordinate_system
+\ingroup cs
+\note might be moved to extensions/gis/geographic
 */
 template<typename DegreeOrRadian>
 struct geographic
@@ -68,22 +70,22 @@
 
 
 /*!
- \brief Spherical coordinate system, in degree or in radian
- \details Defines the spherical coordinate system where points are
- defined in two angles
- and an optional radius usually known as r, theta, phi
- \par Coordinates:
- - coordinate 0:
- 0 <= phi < 2pi is the angle between the positive x-axis and the
- line from the origin to the P projected onto the xy-plane.
- - coordinate 1:
- 0 <= theta <= pi is the angle between the positive z-axis and the
- line formed between the origin and P.
- - coordinate 2 (if specified):
- r >= 0 is the distance from the origin to a given point P.
+\brief Spherical coordinate system, in degree or in radian
+\details Defines the spherical coordinate system where points are
+ defined in two angles
+ and an optional radius usually known as r, theta, phi
+\par Coordinates:
+- coordinate 0:
+ 0 <= phi < 2pi is the angle between the positive x-axis and the
+ line from the origin to the P projected onto the xy-plane.
+- coordinate 1:
+ 0 <= theta <= pi is the angle between the positive z-axis and the
+ line formed between the origin and P.
+- coordinate 2 (if specified):
+ r >= 0 is the distance from the origin to a given point P.
 
- \see http://en.wikipedia.org/wiki/Spherical_coordinates
- \ingroup cs
+\see http://en.wikipedia.org/wiki/Spherical_coordinates
+\ingroup cs
 */
 template<typename DegreeOrRadian>
 struct spherical
@@ -92,11 +94,11 @@
 };
 
 /*!
- \brief Polar coordinate system
- \details Defines the polar coordinate system "in which each point
- on a plane is determined by an angle and a distance"
- \see http://en.wikipedia.org/wiki/Polar_coordinates
- \ingroup cs
+\brief Polar coordinate system
+\details Defines the polar coordinate system "in which each point
+ on a plane is determined by an angle and a distance"
+\see http://en.wikipedia.org/wiki/Polar_coordinates
+\ingroup cs
 */
 template<typename DegreeOrRadian>
 struct polar
@@ -107,18 +109,21 @@
 
 } // namespace cs
 
+
 namespace traits
 {
+
 /*!
- \brief Traits class defining coordinate system tag, bound to coordinate system
- \ingroup traits
- \tparam CoordinateSystem coordinate system
+\brief Traits class defining coordinate system tag, bound to coordinate system
+\ingroup traits
+\tparam CoordinateSystem coordinate system
 */
 template <typename CoordinateSystem>
 struct cs_tag
 {
 };
 
+
 #ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
 
 template<typename DegreeOrRadian>
@@ -144,8 +149,8 @@
 } // namespace traits
 
 /*!
- \brief Meta-function returning coordinate system tag (cs family) of any geometry
- \ingroup core
+\brief Meta-function returning coordinate system tag (cs family) of any geometry
+\ingroup core
 */
 template <typename G>
 struct cs_tag
@@ -158,8 +163,8 @@
 
 
 /*!
- \brief Meta-function to verify if a coordinate system is radian
- \ingroup core
+\brief Meta-function to verify if a coordinate system is radian
+\ingroup core
 */
 template <typename CoordinateSystem>
 struct is_radian : boost::true_type {};

Modified: trunk/boost/geometry/core/radian_access.hpp
==============================================================================
--- trunk/boost/geometry/core/radian_access.hpp (original)
+++ trunk/boost/geometry/core/radian_access.hpp 2011-01-02 15:23:45 EST (Sun, 02 Jan 2011)
@@ -101,16 +101,16 @@
 
 
 /*!
- \brief get coordinate value of a point, result is in Radian
- \details Result is in Radian, even if source coordinate system
- is in Degrees
- \return coordinate value
- \ingroup access
- \tparam Dimension dimension
- \tparam Geometry geometry
- \param geometry geometry to get coordinate value from
- \note Only applicable to coordinate systems templatized by units,
- e.g. spherical or geographic coordinate systems
+\brief get coordinate value of a point, result is in Radian
+\details Result is in Radian, even if source coordinate system
+ is in Degrees
+\return coordinate value
+\ingroup get
+\tparam Dimension dimension
+\tparam Geometry geometry
+\param geometry geometry to get coordinate value from
+\note Only applicable to coordinate systems templatized by units,
+ e.g. spherical or geographic coordinate systems
 */
 template <std::size_t Dimension, typename Geometry>
 inline typename fp_coordinate_type<Geometry>::type get_as_radian(Geometry const& geometry)
@@ -121,16 +121,16 @@
 
 
 /*!
- \brief set coordinate value (in radian) to a point
- \details Coordinate value will be set correctly, if coordinate system of
- point is in Degree, Radian value will be converted to Degree
- \ingroup access
- \tparam Dimension dimension
- \tparam Geometry geometry
- \param geometry geometry to assign coordinate to
- \param radians coordinate value to assign
- \note Only applicable to coordinate systems templatized by units,
- e.g. spherical or geographic coordinate systems
+\brief set coordinate value (in radian) to a point
+\details Coordinate value will be set correctly, if coordinate system of
+ point is in Degree, Radian value will be converted to Degree
+\ingroup set
+\tparam Dimension dimension
+\tparam Geometry geometry
+\param geometry geometry to assign coordinate to
+\param radians coordinate value to assign
+\note Only applicable to coordinate systems templatized by units,
+ e.g. spherical or geographic coordinate systems
 */
 template <std::size_t Dimension, typename Geometry>
 inline void set_from_radian(Geometry& geometry,

Modified: trunk/boost/geometry/multi/strategies/cartesian/centroid_average.hpp
==============================================================================
--- trunk/boost/geometry/multi/strategies/cartesian/centroid_average.hpp (original)
+++ trunk/boost/geometry/multi/strategies/cartesian/centroid_average.hpp 2011-01-02 15:23:45 EST (Sun, 02 Jan 2011)
@@ -27,19 +27,23 @@
 {
 
 
+/*!
+\brief Centroid calculation taking average of points
+\ingroup strategies
+*/
 template
 <
     typename PointCentroid,
     typename Point = PointCentroid
>
-class centroid_average
+class average
 {
 private :
 
     /*! subclass to keep state */
     class sum
     {
- friend class centroid_average;
+ friend class average;
         int count;
         PointCentroid centroid;
 
@@ -80,7 +84,7 @@
 template <typename Point, typename Geometry>
 struct default_strategy<cartesian_tag, multi_point_tag, 2, Point, Geometry>
 {
- typedef centroid_average
+ typedef average
         <
             Point,
             typename point_type<Geometry>::type

Modified: trunk/libs/geometry/doc/doxy/Doxyfile
==============================================================================
--- trunk/libs/geometry/doc/doxy/Doxyfile (original)
+++ trunk/libs/geometry/doc/doxy/Doxyfile 2011-01-02 15:23:45 EST (Sun, 02 Jan 2011)
@@ -160,6 +160,7 @@
                         ../../../../boost/geometry/multi/geometries \
                         ../../../../boost/geometry/multi/geometries/concepts \
                         ../../../../boost/geometry/multi/iterators \
+ ../../../../boost/geometry/multi/strategies/cartesian \
                         ../../../../boost/geometry/policies \
                         ../../../../boost/geometry/policies/relate \
                         ../../../../boost/geometry/ranges \

Modified: trunk/libs/geometry/doc/geometry.qbk
==============================================================================
--- trunk/libs/geometry/doc/geometry.qbk (original)
+++ trunk/libs/geometry/doc/geometry.qbk 2011-01-02 15:23:45 EST (Sun, 02 Jan 2011)
@@ -60,6 +60,10 @@
 
 [*In progress]
 
+[import src/examples/algorithms/area.cpp]
+[import src/examples/algorithms/area_with_strategy.cpp]
+
+[/obsolete structure]
 [import snippets/qbk_1.cpp]
 [import snippets/qbk_2.cpp]
 [import snippets/qbk_3.cpp]

Modified: trunk/libs/geometry/doc/make_qbk.py
==============================================================================
--- trunk/libs/geometry/doc/make_qbk.py (original)
+++ trunk/libs/geometry/doc/make_qbk.py 2011-01-02 15:23:45 EST (Sun, 02 Jan 2011)
@@ -40,6 +40,10 @@
         os.system(cmd % ("classboost_1_1geometry_1_1strategy_1_1"
                 + ns.replace("_", "__") + "_1_1" + strategy.replace("_", "__"),
                 ns + "_" + strategy))
+
+def cs_to_quickbook(section):
+ os.system(cmd % ("structboost_1_1geometry_1_1cs_1_1" + section.replace("_", "__"), section))
+
 
 call_doxygen()
 
@@ -68,7 +72,7 @@
         , "distance::cross_track", "distance::projected_point"
         , "within::winding", "within::franklin", "within::crossings_multiply"
         , "area::by_triangles", "area::huiller"
- , "centroid::bashein_detmer"
+ , "centroid::bashein_detmer", "centroid::average"
         , "convex_hull::graham_andrew"
         , "simplify::douglas_peucker"
         , "side::side_by_triangle", "side::side_by_cross_track"
@@ -76,6 +80,9 @@
         , "transform::rotate_transformer", "transform::scale_transformer"
         , "transform::translate_transformer", "transform::ublas_transformer"
         ]
+
+coordinate_systems = ["cartesian", "geographic", "polar", "spherical"]
+
 
 
 for a in algorithms:
@@ -98,6 +105,9 @@
 
 for a in strategies:
         strategy_to_quickbook(a)
+
+for a in coordinate_systems:
+ cs_to_quickbook(a)
         
 
 group_to_quickbook("arithmetic")

Modified: trunk/libs/geometry/doc/quickref.xml
==============================================================================
--- trunk/libs/geometry/doc/quickref.xml (original)
+++ trunk/libs/geometry/doc/quickref.xml 2011-01-02 15:23:45 EST (Sun, 02 Jan 2011)
@@ -210,10 +210,9 @@
    <entry valign="top">
     <bridgehead renderas="sect3">Classes</bridgehead>
     <simplelist type="vert" columns="1">
- <member><link linkend="geometry.reference.cs__cartesian">cs::cartesian</link></member>
- <member><link linkend="geometry.reference.cs__geographic">cs::geographic</link></member>
- <member><link linkend="geometry.reference.cs__polar">cs::polar</link></member>
- <member><link linkend="geometry.reference.cs__spherical">cs::spherical</link></member>
+ <member><link linkend="geometry.reference.cs.cs_cartesian">cs::cartesian</link></member>
+ <member><link linkend="geometry.reference.cs.cs_spherical">cs::spherical</link></member>
+ <member><link linkend="geometry.reference.cs.cs_geographic">cs::geographic</link></member>
     </simplelist>
    </entry>
   </row>
@@ -395,6 +394,7 @@
 </tgroup>
 
 <!-- ###### POLICIES ########################################################################### -->
+<!-- to be documented (some of them)
 <tgroup cols="2">
  <colspec colname="a"/>
  <colspec colname="b"/>
@@ -428,7 +428,7 @@
   </row>
  </tbody>
 </tgroup>
-
+-->
 
 <!-- ###### STRATEGIES ######################################################################### -->
 <tgroup cols="3">
@@ -454,8 +454,8 @@
    <entry valign="top">
     <bridgehead renderas="sect3">Centroid</bridgehead>
     <simplelist type="vert" columns="1">
- <member><link linkend="geometry.reference.strategies.strategy_centroid_bashein_detmer">strategy::centroid_::bashein_detmer</link></member>
- <member><link linkend="geometry.reference.strategies.strategy_centroid_centroid_average">strategy::centroid_::centroid_average</link></member>
+ <member><link linkend="geometry.reference.strategies.strategy_centroid_bashein_detmer">strategy::centroid::bashein_detmer</link></member>
+ <member><link linkend="geometry.reference.strategies.strategy_centroid_average">strategy::centroid::centroid_average</link></member>
     </simplelist>
    </entry>
   </row>

Modified: trunk/libs/geometry/doc/reference.qbk
==============================================================================
--- trunk/libs/geometry/doc/reference.qbk (original)
+++ trunk/libs/geometry/doc/reference.qbk 2011-01-02 15:23:45 EST (Sun, 02 Jan 2011)
@@ -32,6 +32,12 @@
 [include reference/topological_dimension.qbk]
 [endsect] [/core metafunctions]
 
+[section:cs Coordinate Systems]
+[include reference/cartesian.qbk]
+[include reference/spherical.qbk]
+[include reference/geographic.qbk]
+[endsect] [/coordinate systems]
+
 
 [section:algorithms Algorithms]
 
@@ -214,6 +220,7 @@
 [include reference/distance_cross_track.qbk]
 [include reference/area_by_triangles.qbk]
 [include reference/area_huiller.qbk]
+[include reference/centroid_average.qbk]
 [include reference/centroid_bashein_detmer.qbk]
 [include reference/convex_hull_graham_andrew.qbk]
 [include reference/side_side_by_triangle.qbk]

Modified: trunk/libs/geometry/doc/reference/area.qbk
==============================================================================
--- trunk/libs/geometry/doc/reference/area.qbk (original)
+++ trunk/libs/geometry/doc/reference/area.qbk 2011-01-02 15:23:45 EST (Sun, 02 Jan 2011)
@@ -48,7 +48,8 @@
 Linear
 
 [heading Examples]
-[area_polygon_strategy]
+[area_with_strategy]
+[area_with_strategy_output]
 
 
 [endsect]
@@ -104,8 +105,8 @@
 Linear
 
 [heading Examples]
-[area_polygon]
-[area_polygon_spherical]
+[area]
+[area_output]
 
 
 [endsect]

Added: trunk/libs/geometry/doc/reference/cartesian.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/reference/cartesian.qbk 2011-01-02 15:23:45 EST (Sun, 02 Jan 2011)
@@ -0,0 +1,25 @@
+[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
+[/ Generated from doxy/doxygen_output/xml/structboost_1_1geometry_1_1cs_1_1cartesian.xml]
+[section:cs_cartesian cs::cartesian]
+
+[heading Description]
+Defines the Cartesian or rectangular coordinate system where points are defined in 2 or 3 (or more) dimensions and usually (but not always) known as x,y,z
+
+[heading Synopsis]
+``class cs::cartesian
+{
+ // ...
+};
+``
+
+[heading Header]
+Either
+
+`#include <boost/geometry/geometry.hpp>`
+
+Or
+
+`#include <boost/geometry/core/cs.hpp>`
+
+[endsect]
+

Added: trunk/libs/geometry/doc/reference/centroid_average.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/reference/centroid_average.qbk 2011-01-02 15:23:45 EST (Sun, 02 Jan 2011)
@@ -0,0 +1,55 @@
+[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
+[/ Generated from doxy/doxygen_output/xml/classboost_1_1geometry_1_1strategy_1_1centroid_1_1average.xml]
+[section:strategy_centroid_average strategy::centroid::average]
+
+[heading Synopsis]
+``template<typename PointCentroid, typename Point>
+class strategy::centroid::average
+{
+ // ...
+};
+``
+
+[heading Template parameter(s)]
+[table
+[[Parameter] [Description]]
+[[typename PointCentroid] []]
+[[typename Point] []]
+]
+
+[heading Member Function(s)]
+[table
+[[Function] [Description] [Parameters] [Returns] ]
+[[``void apply (Point const &p, sum &state)``
+
+] [] [[* Point const &]: ['p]:
+
+[* sum &]: ['state]:
+
+
+
+
+]]
+[[``void result (sum const &state, PointCentroid &centroid)``
+
+] [] [[* sum const &]: ['state]:
+
+[* PointCentroid &]: ['centroid]:
+
+
+
+
+]]
+]
+
+[heading Header]
+Either
+
+`#include <boost/geometry/multi/multi.hpp>`
+
+Or
+
+`#include <boost/geometry/multi/strategies/cartesian/centroid_average.hpp>`
+
+[endsect]
+

Added: trunk/libs/geometry/doc/reference/geographic.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/reference/geographic.qbk 2011-01-02 15:23:45 EST (Sun, 02 Jan 2011)
@@ -0,0 +1,32 @@
+[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
+[/ Generated from doxy/doxygen_output/xml/structboost_1_1geometry_1_1cs_1_1geographic.xml]
+[section:cs_geographic cs::geographic]
+
+[heading Description]
+Defines the geographic coordinate system where points are defined in two angles and usually known as lat,long or lo,la or phi,lambda
+
+[heading Synopsis]
+``template<typename DegreeOrRadian>
+class cs::geographic
+{
+ // ...
+};
+``
+
+[heading Template parameter(s)]
+[table
+[[Parameter] [Description]]
+[[typename DegreeOrRadian] []]
+]
+
+[heading Header]
+Either
+
+`#include <boost/geometry/geometry.hpp>`
+
+Or
+
+`#include <boost/geometry/core/cs.hpp>`
+
+[endsect]
+

Modified: trunk/libs/geometry/doc/reference/get.qbk
==============================================================================
--- trunk/libs/geometry/doc/reference/get.qbk (original)
+++ trunk/libs/geometry/doc/reference/get.qbk 2011-01-02 15:23:45 EST (Sun, 02 Jan 2011)
@@ -32,3 +32,38 @@
 
 [endsect]
 
+[section:get_as_radian get_as_radian]
+
+get coordinate value of a point, result is in Radian
+
+[heading Description]
+Result is in Radian, even if source coordinate system is in Degrees
+
+[heading Synopsis]
+``template<std::size_t Dimension, typename Geometry>
+fp_coordinate_type<Geometry>::type get_as_radian (Geometry const &geometry)``
+
+[heading Parameters]
+
+[table
+[[Type] [Concept] [Name] [Description] ]
+[[Dimension] [dimension ] [ - ] [Must be specified]]
+[[Geometry const &] [geometry ] [geometry] [geometry to get coordinate value from ]]
+]
+
+
+[heading Returns]
+coordinate value
+
+[heading Header]
+Either
+
+`#include <boost/geometry/geometry.hpp>`
+
+Or
+
+`#include <boost/geometry/core/radian_access.hpp>`
+
+
+[endsect]
+

Added: trunk/libs/geometry/doc/reference/polar.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/reference/polar.qbk 2011-01-02 15:23:45 EST (Sun, 02 Jan 2011)
@@ -0,0 +1,32 @@
+[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
+[/ Generated from doxy/doxygen_output/xml/structboost_1_1geometry_1_1cs_1_1polar.xml]
+[section:cs_polar cs::polar]
+
+[heading Description]
+Defines the polar coordinate system "in which each pointon a plane is determined by an angle and a distance"
+
+[heading Synopsis]
+``template<typename DegreeOrRadian>
+class cs::polar
+{
+ // ...
+};
+``
+
+[heading Template parameter(s)]
+[table
+[[Parameter] [Description]]
+[[typename DegreeOrRadian] []]
+]
+
+[heading Header]
+Either
+
+`#include <boost/geometry/geometry.hpp>`
+
+Or
+
+`#include <boost/geometry/core/cs.hpp>`
+
+[endsect]
+

Modified: trunk/libs/geometry/doc/reference/set.qbk
==============================================================================
--- trunk/libs/geometry/doc/reference/set.qbk (original)
+++ trunk/libs/geometry/doc/reference/set.qbk 2011-01-02 15:23:45 EST (Sun, 02 Jan 2011)
@@ -30,3 +30,36 @@
 
 [endsect]
 
+[section:set_from_radian set_from_radian]
+
+set coordinate value (in radian) to a point
+
+[heading Description]
+Coordinate value will be set correctly, if coordinate system of point is in Degree, Radian value will be converted to Degree
+
+[heading Synopsis]
+``template<std::size_t Dimension, typename Geometry>
+void set_from_radian (Geometry &geometry, typename fp_coordinate_type< Geometry >::type const &radians)``
+
+[heading Parameters]
+
+[table
+[[Type] [Concept] [Name] [Description] ]
+[[Dimension] [dimension ] [ - ] [Must be specified]]
+[[Geometry &] [geometry ] [geometry] [geometry to assign coordinate to ]]
+[[typename fp_coordinate_type< Geometry >::type const &] [] [radians] [coordinate value to assign ]]
+]
+
+
+[heading Header]
+Either
+
+`#include <boost/geometry/geometry.hpp>`
+
+Or
+
+`#include <boost/geometry/core/radian_access.hpp>`
+
+
+[endsect]
+

Added: trunk/libs/geometry/doc/reference/spherical.qbk
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/reference/spherical.qbk 2011-01-02 15:23:45 EST (Sun, 02 Jan 2011)
@@ -0,0 +1,32 @@
+[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
+[/ Generated from doxy/doxygen_output/xml/structboost_1_1geometry_1_1cs_1_1spherical.xml]
+[section:cs_spherical cs::spherical]
+
+[heading Description]
+Defines the spherical coordinate system where points are defined in two angles and an optional radius usually known as r, theta, phi
+
+[heading Synopsis]
+``template<typename DegreeOrRadian>
+class cs::spherical
+{
+ // ...
+};
+``
+
+[heading Template parameter(s)]
+[table
+[[Parameter] [Description]]
+[[typename DegreeOrRadian] []]
+]
+
+[heading Header]
+Either
+
+`#include <boost/geometry/geometry.hpp>`
+
+Or
+
+`#include <boost/geometry/core/cs.hpp>`
+
+[endsect]
+

Modified: trunk/libs/geometry/doc/snippets/qbk_1.cpp
==============================================================================
--- trunk/libs/geometry/doc/snippets/qbk_1.cpp (original)
+++ trunk/libs/geometry/doc/snippets/qbk_1.cpp 2011-01-02 15:23:45 EST (Sun, 02 Jan 2011)
@@ -65,45 +65,6 @@
 } // namespace
 
 
-void example_area_polygon()
-{
- //[area_polygon
- //` Calculate the area of a polygon
- namespace bg = boost::geometry;
- bg::model::polygon<bg::model::d2::point_xy<double> > poly; /*< Declare >*/
- bg::read_wkt("POLYGON((0 0,0 7,4 2,2 0,0 0))", poly); /*< Fill, in this case with WKT >*/
- double area = bg::area(poly); /*< Calculate area >*/
- //]
-}
-
-void example_area_polygon_spherical()
-{
- //[area_polygon_spherical
- //` Calculate the area of a [*spherical] polygon
- namespace bg = boost::geometry;
- bg::model::polygon<bg::model::point<float, 2, bg::cs::spherical<bg::degree> > > sph_poly;
- bg::read_wkt("POLYGON((0 0,0 45,45 0,0 0))", sph_poly);
- double area = bg::area(sph_poly);
- //]
-}
-
-void example_area_polygon_strategy()
-{
- //[area_polygon_strategy
- //` Calculate the area of a polygon specifying a strategy
- namespace bg = boost::geometry;
- typedef bg::model::point<float, 2, bg::cs::spherical<bg::degree> > pnt_type;
- bg::model::polygon<pnt_type> hawaii;
- bg::read_wkt("POLYGON((-155.86 18.93,-155.84 20.30,-154.80 19.52,-155.86 18.93))" /*< [@http://en.wikipedia.org/wiki/Hawaii_%28island%29 Rough appromation of Hawaii Island] >*/
- , hawaii);
- double const mean_radius = 6371.0; /*< [@http://en.wikipedia.org/wiki/Earth_radius Wiki] >*/
- bg::strategy::area::huiller<pnt_type> in_square_kilometers(mean_radius);
- double area = bg::area(hawaii, in_square_kilometers);
-
- //]
-}
-
-
 
 void example_as_wkt_point()
 {

Added: trunk/libs/geometry/doc/src/examples/algorithms/Jamfile.v2
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/src/examples/algorithms/Jamfile.v2 2011-01-02 15:23:45 EST (Sun, 02 Jan 2011)
@@ -0,0 +1,15 @@
+# Boost.Geometry (aka GGL, Generic Geometry Library)
+#
+# Copyright Barend Gehrels, Geodan Holding B.V. Amsterdam, the Netherlands.
+# Copyright (c) 2009 Mateusz Loskot <mateusz_at_[hidden]>
+# 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)
+
+
+project boost-geometry-doc-example
+ : # requirements
+ ;
+
+exe area : area.cpp ;
+exe area_with_strategy : area_with_strategy.cpp ;

Added: trunk/libs/geometry/doc/src/examples/algorithms/area.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/src/examples/algorithms/area.cpp 2011-01-02 15:23:45 EST (Sun, 02 Jan 2011)
@@ -0,0 +1,47 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright Barend Gehrels 2011, Geodan, Amsterdam, the Netherlands
+// 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)
+//
+// Quickbook Example
+
+//[area
+//` Calculate the area of a polygon
+
+#include <iostream>
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/extensions/gis/io/wkt/wkt.hpp>
+
+namespace bg = boost::geometry; /*< Convenient namespace alias >*/
+
+int main()
+{
+ // Calculate the area of a cartesian polygon
+ bg::model::polygon<bg::model::d2::point_xy<double> > poly;
+ bg::read_wkt("POLYGON((0 0,0 7,4 2,2 0,0 0))", poly);
+ double area = bg::area(poly);
+ std::cout << "Area: " << area << std::endl;
+
+ // Calculate the area of a spherical polygon
+ bg::model::polygon<bg::model::point<float, 2, bg::cs::spherical<bg::degree> > > sph_poly;
+ bg::read_wkt("POLYGON((0 0,0 45,45 0,0 0))", sph_poly);
+ area = bg::area(sph_poly);
+ std::cout << "Area: " << area << std::endl;
+
+ return 0;
+}
+
+//]
+
+
+//[area_output
+/*`
+Output:
+[pre
+Area: 16
+Area: 0.339837
+]
+*/
+//]


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