Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68811 - in trunk/libs/geometry/doc: . ref/algorithms ref/core reference src/examples/algorithms src/examples/core
From: barend.gehrels_at_[hidden]
Date: 2011-02-12 11:23:36


Author: barendgehrels
Date: 2011-02-12 11:23:33 EST (Sat, 12 Feb 2011)
New Revision: 68811
URL: http://svn.boost.org/trac/boost/changeset/68811

Log:
Doc update, mainly with respect to num_{geometries, points, interior_rings}
Added:
   trunk/libs/geometry/doc/src/examples/algorithms/num_geometries.cpp (contents, props changed)
   trunk/libs/geometry/doc/src/examples/algorithms/num_interior_rings.cpp (contents, props changed)
   trunk/libs/geometry/doc/src/examples/algorithms/num_points.cpp (contents, props changed)
Text files modified:
   trunk/libs/geometry/doc/geometry.qbk | 5 +
   trunk/libs/geometry/doc/quickref.xml | 17 +++-
   trunk/libs/geometry/doc/ref/algorithms/num_geometries.qbk | 5 +
   trunk/libs/geometry/doc/ref/algorithms/num_interior_rings.qbk | 9 +
   trunk/libs/geometry/doc/ref/algorithms/num_points.qbk | 7 +
   trunk/libs/geometry/doc/ref/core/get_box.qbk | 4
   trunk/libs/geometry/doc/reference.qbk | 153 +++++++++++++++++++++------------------
   trunk/libs/geometry/doc/reference/num_geometries.qbk | 2
   trunk/libs/geometry/doc/reference/num_interior_rings.qbk | 2
   trunk/libs/geometry/doc/reference/tag.qbk | 2
   trunk/libs/geometry/doc/src/examples/algorithms/Jamfile.v2 | 5 +
   trunk/libs/geometry/doc/src/examples/core/get_box.cpp | 2
   12 files changed, 129 insertions(+), 84 deletions(-)

Modified: trunk/libs/geometry/doc/geometry.qbk
==============================================================================
--- trunk/libs/geometry/doc/geometry.qbk (original)
+++ trunk/libs/geometry/doc/geometry.qbk 2011-02-12 11:23:33 EST (Sat, 12 Feb 2011)
@@ -30,7 +30,7 @@
 [def __1dim__ linear (e.g. linestring)]
 [def __2dim__ areal (e.g. polygon)]
 [def __single__ single (e.g. point, polygon)]
-[def __multi__ single (e.g. multi_point, multi_polygon)]
+[def __multi__ multiple (e.g. multi_point, multi_polygon)]
 [def __cart__ Cartesian]
 [def __sph__ Spherical]
 [def __geo__ Geographic]
@@ -76,6 +76,9 @@
 [import src/examples/algorithms/intersection_ls_ls_point.cpp]
 [import src/examples/algorithms/intersection_segment.cpp]
 [import src/examples/algorithms/intersects_linestring.cpp]
+[import src/examples/algorithms/num_geometries.cpp]
+[import src/examples/algorithms/num_interior_rings.cpp]
+[import src/examples/algorithms/num_points.cpp]
 [import src/examples/algorithms/simplify.cpp]
 [import src/examples/algorithms/simplify_inserter.cpp]
 [import src/examples/core/get_point.cpp]

Modified: trunk/libs/geometry/doc/quickref.xml
==============================================================================
--- trunk/libs/geometry/doc/quickref.xml (original)
+++ trunk/libs/geometry/doc/quickref.xml 2011-02-12 11:23:33 EST (Sat, 12 Feb 2011)
@@ -157,12 +157,12 @@
    <entry valign="top">
     <bridgehead renderas="sect3">Access Functions</bridgehead>
     <simplelist type="vert" columns="1">
- <member><link linkend="geometry.reference.access.exterior_ring">exterior_ring</link></member>
+ <!-- This section is not ordered alfabetically
+ to have get/set first and then the rings -->
      <member><link linkend="geometry.reference.access.get">get</link></member>
- <member><link linkend="geometry.reference.access.interior_rings">interior_rings</link></member>
- <member><link linkend="geometry.reference.access.num_interior_rings">num_interior_rings</link></member>
- <member><link linkend="geometry.reference.access.num_points">num_points</link></member>
      <member><link linkend="geometry.reference.access.set">set</link></member>
+ <member><link linkend="geometry.reference.access.exterior_ring">exterior_ring</link></member>
+ <member><link linkend="geometry.reference.access.interior_rings">interior_rings</link></member>
     </simplelist>
     <bridgehead renderas="sect3">Classes</bridgehead>
     <simplelist type="vert" columns="1">
@@ -362,6 +362,15 @@
     <simplelist type="vert" columns="1">
      <member><link linkend="geometry.reference.algorithms.length">length</link></member>
     </simplelist>
+
+ <bridgehead renderas="sect3">Num_ (counting)</bridgehead>
+ <simplelist type="vert" columns="1">
+ <member><link linkend="geometry.reference.algorithms.num_interior_rings">num_interior_rings</link></member>
+ <member><link linkend="geometry.reference.algorithms.num_geometries">num_geometries</link></member>
+ <member><link linkend="geometry.reference.algorithms.num_points">num_points</link></member>
+ </simplelist>
+
+
     <bridgehead renderas="sect3">Perimeter</bridgehead>
     <simplelist type="vert" columns="1">
      <member><link linkend="geometry.reference.algorithms.perimeter">perimeter</link></member>

Modified: trunk/libs/geometry/doc/ref/algorithms/num_geometries.qbk
==============================================================================
--- trunk/libs/geometry/doc/ref/algorithms/num_geometries.qbk (original)
+++ trunk/libs/geometry/doc/ref/algorithms/num_geometries.qbk 2011-02-12 11:23:33 EST (Sat, 12 Feb 2011)
@@ -20,3 +20,8 @@
 
 [heading Complexity]
 Constant
+
+[heading Examples]
+[num_geometries]
+[num_geometries_output]
+

Modified: trunk/libs/geometry/doc/ref/algorithms/num_interior_rings.qbk
==============================================================================
--- trunk/libs/geometry/doc/ref/algorithms/num_interior_rings.qbk (original)
+++ trunk/libs/geometry/doc/ref/algorithms/num_interior_rings.qbk 2011-02-12 11:23:33 EST (Sat, 12 Feb 2011)
@@ -13,11 +13,16 @@
 [heading Behavior]
 [table
 [[Case] [Behavior] ]
-[[__polygon__][[qbk_ret number of its interior rings]]]
-[[__multi_polygon__][[qbk_ret number of the interior rings of all polygons]]]
+[[__polygon__][[qbk_ret the number of its interior rings]]]
+[[__multi_polygon__][[qbk_ret the number of the interior rings of all polygons]]]
 [[__other__][[qbk_ret 0]]]
 ]
 
 
 [heading Complexity]
 Constant
+
+[heading Examples]
+[num_interior_rings]
+[num_interior_rings_output]
+

Modified: trunk/libs/geometry/doc/ref/algorithms/num_points.qbk
==============================================================================
--- trunk/libs/geometry/doc/ref/algorithms/num_points.qbk (original)
+++ trunk/libs/geometry/doc/ref/algorithms/num_points.qbk 2011-02-12 11:23:33 EST (Sat, 12 Feb 2011)
@@ -18,8 +18,15 @@
 [[__box__][[qbk_ret 4]]]
 [[__range__][[qbk_ret boost::size(geometry)]]]
 [[__other__][[qbk_ret the sum of the number of points of its elements]]]
+[[Open geometries][[qbk_ret the sum of the number of points of its elements, it adds one for open if specified]]]
+[[Closed geometries][[qbk_ret the sum of the number of points of its elements]]]
 ]
 
 
 [heading Complexity]
 Constant or Linear
+
+[heading Examples]
+[num_points]
+[num_points_output]
+

Modified: trunk/libs/geometry/doc/ref/core/get_box.qbk
==============================================================================
--- trunk/libs/geometry/doc/ref/core/get_box.qbk (original)
+++ trunk/libs/geometry/doc/ref/core/get_box.qbk 2011-02-12 11:23:33 EST (Sat, 12 Feb 2011)
@@ -11,8 +11,8 @@
 [heading Behavior]
 [table
 [[Case] [Behavior] ]
-[[__box__][Returns the coordinate of a box (use min_corner, max_corner to specify which of the points to set) ]]
-[[__segment__][Returns the coordinate of a segment (use 0, 1 to specify which of the two points to set) ]]
+[[__box__][Returns the coordinate of a box (use min_corner, max_corner to specify which of the points to get) ]]
+[[__segment__][Returns the coordinate of a segment (use 0, 1 to specify which of the two points to get) ]]
 ]
 
 [heading Complexity]

Modified: trunk/libs/geometry/doc/reference.qbk
==============================================================================
--- trunk/libs/geometry/doc/reference.qbk (original)
+++ trunk/libs/geometry/doc/reference.qbk 2011-02-12 11:23:33 EST (Sat, 12 Feb 2011)
@@ -12,32 +12,36 @@
 
 [section:reference Reference]
 
-[section:core Core Metafunctions]
-[include reference/closure.qbk]
-[include reference/coordinate_system.qbk]
-[include reference/coordinate_type.qbk]
-[include reference/cs_tag.qbk]
-[include reference/dimension.qbk]
-[include reference/exception.qbk]
-[include reference/geometry_id.qbk]
-[include reference/interior_type.qbk]
-[include reference/is_areal.qbk]
-[include reference/is_linear.qbk]
-[include reference/is_multi.qbk]
-[include reference/is_radian.qbk]
-[include reference/point_order.qbk]
-[include reference/point_type.qbk]
-[include reference/ring_type.qbk]
-[include reference/tag.qbk]
-[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:access Access Functions]
+
+[/ This section is not ordered alfabetically
+ to have get/set first and then the rings]
 
+[section:get get]
+[include reference/get.qbk]
+[endsect]
+
+[section:set set]
+[include reference/set.qbk]
+[endsect]
+
+[section:exterior_ring exterior_ring]
+[include reference/exterior_ring.qbk]
+[endsect]
+
+[section:interior_rings interior_rings]
+[include reference/interior_rings.qbk]
+[endsect]
+
+
+[endsect] [/access functions]
+
+
+
+[section:register Adaption and adapted models]
+[include reference/register.qbk]
+[endsect]
 
 [section:algorithms Algorithms]
 
@@ -125,8 +129,11 @@
 [include reference/make.qbk]
 [endsect]
 
+[include reference/num_geometries.qbk]
+[include reference/num_interior_rings.qbk]
 [include reference/num_points.qbk]
 
+
 [section:overlaps overlaps]
 [include reference/overlaps.qbk]
 [endsect]
@@ -162,28 +169,11 @@
 
 [endsect] [/algorithms]
 
-[section:access Access Functions]
-
-[section:exterior_ring exterior_ring]
-[include reference/exterior_ring.qbk]
-[endsect]
 
-[section:get get]
-[include reference/get.qbk]
-[endsect]
-
-[section:interior_rings interior_rings]
-[include reference/interior_rings.qbk]
-[endsect]
-
-[include reference/num_points.qbk]
-[include reference/num_interior_rings.qbk]
-
-[section:set set]
-[include reference/set.qbk]
-[endsect]
+[section:arithmetic Arithmetic]
+[include reference/arithmetic.qbk]
+[endsect]
 
-[endsect] [/access functions]
 
 
 [section:concepts Concepts]
@@ -196,7 +186,54 @@
 [include concept/box.qbk]
 [include concept/ring.qbk]
 [include concept/segment.qbk]
-[endsect]
+[endsect] [/concepts]
+
+[section:cs Coordinate Systems]
+[include reference/cartesian.qbk]
+[include reference/spherical.qbk]
+[include reference/geographic.qbk]
+[endsect] [/coordinate systems]
+
+
+
+[section:core Core Metafunctions]
+[include reference/closure.qbk]
+[include reference/coordinate_system.qbk]
+[include reference/coordinate_type.qbk]
+[include reference/cs_tag.qbk]
+[include reference/dimension.qbk]
+[include reference/exception.qbk]
+[include reference/geometry_id.qbk]
+[include reference/interior_type.qbk]
+[include reference/is_areal.qbk]
+[include reference/is_linear.qbk]
+[include reference/is_multi.qbk]
+[include reference/is_radian.qbk]
+[include reference/point_order.qbk]
+[include reference/point_type.qbk]
+[include reference/ring_type.qbk]
+[include reference/tag.qbk]
+[include reference/topological_dimension.qbk]
+[endsect] [/core metafunctions]
+
+
+[section:enumerations Enumerations]
+[include reference/enum.qbk]
+[endsect]
+
+[section:exceptions Exceptions]
+[include reference/exception.qbk]
+[include reference/centroid_exception.qbk]
+[endsect]
+
+
+[section:iterators Iterators]
+[include reference/closing_iterator.qbk]
+[include reference/box_iterator.qbk]
+[include reference/circular_iterator.qbk]
+[include reference/ever_circling_iterator.qbk]
+[include reference/segment_range_iterator.qbk]
+[endsect]
 
 
 [section:models Models]
@@ -214,9 +251,6 @@
 [include reference/referring_segment.qbk]
 [endsect]
 
-[section:register Adaption and adapted models]
-[include reference/register.qbk]
-[endsect]
 
 [section:strategies Strategies]
 [include reference/distance_pythagoras.qbk]
@@ -243,16 +277,6 @@
 [endsect]
 
 
-
-
-[section:iterators Iterators]
-[include reference/closing_iterator.qbk]
-[include reference/box_iterator.qbk]
-[include reference/circular_iterator.qbk]
-[include reference/ever_circling_iterator.qbk]
-[include reference/segment_range_iterator.qbk]
-[endsect]
-
 [section:ranges Ranges]
 [include reference/box_range.qbk]
 [include reference/segment_range.qbk]
@@ -261,18 +285,5 @@
 [include reference/identity_view.qbk]
 [endsect]
 
-[section:arithmetic Arithmetic]
-[include reference/arithmetic.qbk]
-[endsect]
-
-[section:exceptions Exceptions]
-[include reference/exception.qbk]
-[include reference/centroid_exception.qbk]
-[endsect]
-
-[section:enumerations Enumerations]
-[include reference/enum.qbk]
-[endsect]
-
 
 [endsect] [/reference]

Modified: trunk/libs/geometry/doc/reference/num_geometries.qbk
==============================================================================
--- trunk/libs/geometry/doc/reference/num_geometries.qbk (original)
+++ trunk/libs/geometry/doc/reference/num_geometries.qbk 2011-02-12 11:23:33 EST (Sat, 12 Feb 2011)
@@ -42,7 +42,7 @@
 
 Or
 
-`#include <boost/geometry/core/num_geometries.hpp>`
+`#include <boost/geometry/algorithms/num_geometries.hpp>`
 
 [include ref/algorithms/num_geometries.qbk]
 

Modified: trunk/libs/geometry/doc/reference/num_interior_rings.qbk
==============================================================================
--- trunk/libs/geometry/doc/reference/num_interior_rings.qbk (original)
+++ trunk/libs/geometry/doc/reference/num_interior_rings.qbk 2011-02-12 11:23:33 EST (Sat, 12 Feb 2011)
@@ -42,7 +42,7 @@
 
 Or
 
-`#include <boost/geometry/core/interior_rings.hpp>`
+`#include <boost/geometry/algorithms/num_interior_rings.hpp>`
 
 [include ref/algorithms/num_interior_rings.qbk]
 

Modified: trunk/libs/geometry/doc/reference/tag.qbk
==============================================================================
--- trunk/libs/geometry/doc/reference/tag.qbk (original)
+++ trunk/libs/geometry/doc/reference/tag.qbk 2011-02-12 11:23:33 EST (Sat, 12 Feb 2011)
@@ -18,7 +18,7 @@
 Meta-function to get the tag of any geometry type.
 
 [heading Description]
-All geometries tell their geometry type (point, linestring, polygon, etc) by implementing a tag traits class. This meta-function uses that traits class to retrieve the tag. If the input type is not a geometry at all, a geometry_not_recognized_tag will be returned.
+All geometries tell their geometry type (point, linestring, polygon, etc) by implementing a tag traits class. This meta-function uses that traits class to retrieve the tag.
 
 [heading Synopsis]
 ``template<typename Geometry>

Modified: trunk/libs/geometry/doc/src/examples/algorithms/Jamfile.v2
==============================================================================
--- trunk/libs/geometry/doc/src/examples/algorithms/Jamfile.v2 (original)
+++ trunk/libs/geometry/doc/src/examples/algorithms/Jamfile.v2 2011-02-12 11:23:33 EST (Sat, 12 Feb 2011)
@@ -19,6 +19,11 @@
 
 exe intersects_linestring : intersects_linestring.cpp ;
 
+exe num_geometries : num_geometries.cpp ;
+exe num_interior_rings : num_interior_rings.cpp ;
+exe num_points : num_points.cpp ;
+
+
 exe length : length.cpp ;
 exe length_with_strategy : length_with_strategy.cpp ;
 

Added: trunk/libs/geometry/doc/src/examples/algorithms/num_geometries.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/src/examples/algorithms/num_geometries.cpp 2011-02-12 11:23:33 EST (Sat, 12 Feb 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
+
+//[num_geometries
+//` Get the number of geometries making up a multi-geometry
+
+#include <iostream>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/multi/multi.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/multi/geometries/multi_polygon.hpp>
+#include <boost/geometry/extensions/gis/io/wkt/wkt.hpp>
+
+
+int main()
+{
+ boost::geometry::model::multi_polygon
+ <
+ boost::geometry::model::polygon
+ <
+ boost::geometry::model::d2::point_xy<double>
+ >
+ > mp;
+ boost::geometry::read_wkt("MULTIPOLYGON(((0 0,0 10,10 0,0 0),(1 1,1 9,9 1,1 1)),((10 10,10 7,7 10,10 10)))", mp);
+ std::cout << "Number of geometries: " << boost::geometry::num_geometries(mp) << std::endl;
+
+ return 0;
+}
+
+//]
+
+
+//[num_geometries_output
+/*`
+Output:
+[pre
+ Number of geometries: 2
+]
+*/
+//]

Added: trunk/libs/geometry/doc/src/examples/algorithms/num_interior_rings.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/src/examples/algorithms/num_interior_rings.cpp 2011-02-12 11:23:33 EST (Sat, 12 Feb 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
+
+//[num_interior_rings
+//` Get the number of interior rings in a polygon or multi-polygon
+
+#include <iostream>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/multi/multi.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/multi/geometries/multi_polygon.hpp>
+#include <boost/geometry/extensions/gis/io/wkt/wkt.hpp>
+
+
+int main()
+{
+ boost::geometry::model::multi_polygon
+ <
+ boost::geometry::model::polygon
+ <
+ boost::geometry::model::d2::point_xy<double>
+ >
+ > mp;
+ boost::geometry::read_wkt("MULTIPOLYGON(((0 0,0 10,10 0,0 0),(1 1,1 9,9 1,1 1)),((10 10,10 7,7 10,10 10)))", mp);
+ std::cout << "Number of interior rings: " << boost::geometry::num_interior_rings(mp) << std::endl;
+
+ return 0;
+}
+
+//]
+
+
+//[num_interior_rings_output
+/*`
+Output:
+[pre
+ Number of interior rings: 1
+]
+*/
+//]

Added: trunk/libs/geometry/doc/src/examples/algorithms/num_points.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/geometry/doc/src/examples/algorithms/num_points.cpp 2011-02-12 11:23:33 EST (Sat, 12 Feb 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
+
+//[num_points
+//` Get the number of points in a geometry
+
+#include <iostream>
+
+#include <boost/geometry/geometry.hpp>
+#include <boost/geometry/multi/multi.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/multi/geometries/multi_polygon.hpp>
+#include <boost/geometry/extensions/gis/io/wkt/wkt.hpp>
+
+
+int main()
+{
+ boost::geometry::model::multi_polygon
+ <
+ boost::geometry::model::polygon
+ <
+ boost::geometry::model::d2::point_xy<double>
+ >
+ > mp;
+ boost::geometry::read_wkt("MULTIPOLYGON(((0 0,0 10,10 0,0 0),(1 1,1 9,9 1,1 1)),((10 10,10 7,7 10,10 10)))", mp);
+ std::cout << "Number of points: " << boost::geometry::num_points(mp) << std::endl;
+
+ return 0;
+}
+
+//]
+
+
+//[num_points_output
+/*`
+Output:
+[pre
+ Number of points: 12
+]
+*/
+//]

Modified: trunk/libs/geometry/doc/src/examples/core/get_box.cpp
==============================================================================
--- trunk/libs/geometry/doc/src/examples/core/get_box.cpp (original)
+++ trunk/libs/geometry/doc/src/examples/core/get_box.cpp 2011-02-12 11:23:33 EST (Sat, 12 Feb 2011)
@@ -8,7 +8,7 @@
 // Quickbook Example
 
 //[get_box
-//` Set the coordinate of a box
+//` Get the coordinate of a box
 
 #include <iostream>
 #include <boost/geometry/geometry.hpp>


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