mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-11 13:34:10 +00:00
Doc update, mainly with respect to num_{geometries, points, interior_rings}
[SVN r68811]
This commit is contained in:
parent
e7d222e929
commit
2b76b1018b
@ -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 @@ Simplify algorithm [link geometry.reference.algorithms.simplify.simplify_3 here]
|
||||
[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]
|
||||
|
@ -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>
|
||||
|
@ -20,3 +20,8 @@
|
||||
|
||||
[heading Complexity]
|
||||
Constant
|
||||
|
||||
[heading Examples]
|
||||
[num_geometries]
|
||||
[num_geometries_output]
|
||||
|
||||
|
@ -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]
|
||||
|
||||
|
@ -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]
|
||||
|
||||
|
@ -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]
|
||||
|
@ -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:arithmetic Arithmetic]
|
||||
[include reference/arithmetic.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]
|
||||
|
||||
[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]
|
||||
|
@ -42,7 +42,7 @@ Either
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/core/num_geometries.hpp>`
|
||||
`#include <boost/geometry/algorithms/num_geometries.hpp>`
|
||||
|
||||
[include ref/algorithms/num_geometries.qbk]
|
||||
|
||||
|
@ -42,7 +42,7 @@ Either
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/core/interior_rings.hpp>`
|
||||
`#include <boost/geometry/algorithms/num_interior_rings.hpp>`
|
||||
|
||||
[include ref/algorithms/num_interior_rings.qbk]
|
||||
|
||||
|
@ -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>
|
||||
|
@ -19,6 +19,11 @@ exe intersection_segment : intersection_segment.cpp ;
|
||||
|
||||
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 ;
|
||||
|
||||
|
47
doc/src/examples/algorithms/num_geometries.cpp
Normal file
47
doc/src/examples/algorithms/num_geometries.cpp
Normal file
@ -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
|
||||
]
|
||||
*/
|
||||
//]
|
47
doc/src/examples/algorithms/num_interior_rings.cpp
Normal file
47
doc/src/examples/algorithms/num_interior_rings.cpp
Normal file
@ -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
|
||||
]
|
||||
*/
|
||||
//]
|
47
doc/src/examples/algorithms/num_points.cpp
Normal file
47
doc/src/examples/algorithms/num_points.cpp
Normal file
@ -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
|
||||
]
|
||||
*/
|
||||
//]
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user