Merged Boost.Geometry from revision 71351 through 71709

Mainly registration macro (instead of calling header files) for Boost.Tuple, C-Array, Boost.Array, Boost.Fusion
Second the intersections check if geometries are valid
Further doc updates

[SVN r71710]
This commit is contained in:
Barend Gehrels
2011-05-04 12:15:07 +00:00
207 changed files with 2518 additions and 834 deletions

View File

@@ -23,7 +23,7 @@ A linestring is ['a Curve with linear interpolation between Points].
The Linestring Concept is defined as following:
* there must be a specialization of `traits::tag` defining `linestring_tag` as type
* it must behave like a Boost.Range
* it must behave like a Boost.Range Random Access Range
* The type defined by the metafunction `range_value<...>::type` must fulfill
the [link geometry.reference.concepts.concept_point Point Concept]

View File

@@ -20,7 +20,7 @@
The MultiLinestring Concept is defined as following:
* There must be a specialization of the metafunction `traits::tag`, defining `multi_linestring_tag` as type
* It must behave like a Boost.Range
* It must behave like a Boost.Range Random Access Range
* The type defined by the metafunction `range_value<...>::type` must fulfill
the [link geometry.reference.concepts.concept_linestring Linestring Concept]

View File

@@ -21,7 +21,7 @@
The MultiPoint Concept is defined as following:
* There must be a specialization of the metafunction `traits::tag`, defining `multi_point_tag` as type
* It must behave like a Boost.Range
* It must behave like a Boost.Range Random Access Range
* The type defined by the metafunction `range_value<...>::type` must fulfill the [link geometry.reference.concepts.concept_point Point Concept]
[heading Available Models]

View File

@@ -20,7 +20,7 @@
The MultiPolygon Concept is defined as following:
* There must be a specialization of the metafunction `traits::tag`, defining `multi_polygon_tag` as type
* It must behave like a Boost.Range
* It must behave like a Boost.Range Random Access Range
* The type defined by the metafunction `range_value<...>::type` must fulfill
the [link geometry.reference.concepts.concept_polygon Polygon Concept]

View File

@@ -37,12 +37,12 @@ The Point Concept is defined as following:
* [link geometry.reference.models.model_point model::point]
* [link geometry.reference.models.model_d2_point_xy model::d2::point_xy]
* a lat long point (currently in an extension)
* a C array (requires `#include boost/geometry/geometries/adapted/c_array.hpp>`)
* a Boost.Array (requires `#include <boost/geometry/geometries/adapted/boost_array.hpp>`)
* a Boost.Polygon point (requires `#include boost/geometry/geometries/adapted/boost_polygon/point.hpp>`)
* a Boost.Fusion adapted structure (requires `#include boost/geometry/geometries/adapted/fusion.hpp>`)
* a Boost.Tuple (requires `#include boost/geometry/geometries/adapted/tuple.hpp>`)
* an adapted point using one of the [link geometry.reference.register registration macro's]
* [link geometry.reference.adapted.c_array C array]
* [link geometry.reference.adapted.boost_array Boost.Array]
* [link geometry.reference.adapted.boost_fusion Boost.Fusion]
* [link geometry.reference.adapted.boost_polygon Boost.Polygon]
* [link geometry.reference.adapted.boost_tuple Boost.Tuple]
* other point types, adapted e.g. using one of the [link geometry.reference.adapted registration macro's]
[endsect]

View File

@@ -29,7 +29,8 @@ The Polygon Concept is defined as following:
* there must be a specialization of `traits::tag` defining `polygon_tag` as type
* there must be a specialization of `traits::ring_type` defining the type of its exterior ring and interior rings as type
* this type defined by `ring_type` must fulfill the [link geometry.reference.concepts.concept_ring Ring Concept]
* there must be a specialization of `traits::interior_type` defining the type of the collection of its interior rings as type
* there must be a specialization of `traits::interior_type` defining the type of the collection of its interior rings as type;
this collection itself must fulfill a Boost.Range Random Access Range Concept
* there must be a specialization of `traits::exterior_ring` with two functions named `get`, returning the exterior ring, one being const, the other being non const
* there must be a specialization of `traits::interior_rings` with two functions named `get`, returning the interior rings, one being const, the other being non const

View File

@@ -22,7 +22,7 @@
The Ring Concept is defined as following:
* there must be a specialization of `traits::tag` defining `ring_tag` as type
* it must behave like a Boost.Range
* it must behave like a Boost.Range Random Access Range
* The type defined by the metafunction `range_value<...>::type` must fulfill
the [link geometry.reference.concepts.concept_point Point Concept]
* there might be a specialization of `traits::point_order` defining the order or orientation of its points, `clockwise` or `counterclockwise`

View File

@@ -50,7 +50,7 @@ ALIASES = qbk{1}="\xmlonly <qbk>\1</qbk> \endxmlonly" \
brief_macro{1}="Macro to register a \1" \
brief_macro_const=" (const version)" \
brief_macro_getset=" (having separate get/set methods)" \
brief_meta{3}="Metafunction defining [*\1] as the specified \2 of the \3" \
brief_meta{3}="Metafunction defining [*\1] as the \2 of the \3" \
tparam_allocator="container-allocator-type" \
tparam_box="Any type fulfilling a Box Concept" \
tparam_box_or_segment="Any type fulfilling a Box Concept or a Segment Concept" \
@@ -95,9 +95,10 @@ ALIASES = qbk{1}="\xmlonly <qbk>\1</qbk> \endxmlonly" \
details_calc2{2}="The free function \1 calculates the \2 of two geometries" \
details_calc2{1}="The free function \1 calculates the \1 of two geometries" \
details_check12{2}="The free function \1 checks if the first geometry \2 the second geometry" \
details_macro{2}="The macro \1 registers a \2 such that it is recognized by Boost.Geometry and that Boost.Geometry functionality can used with the specified point type" \
details_macro{2}="The macro \1 registers a \2 such that it is recognized by Boost.Geometry and that Boost.Geometry functionality can used with the specified type." \
details_macro_const="The const version registers only read access to the fields, the point type is therefore read-only" \
details_macro_getset="The get/set version registers get and set methods separately and can be used for classes with protected member variables and get/set methods to change coordinates" \
details_macro_templated{1}="The type must have one template parameter, which should be a point type, and should not be specified. Boost.Geometry takes care of inserting the template parameter. Hence all types of this templated \1 are registered, regardless of their point type." \
details_default_strategy="It uses the default strategy, based on the coordinate system of the geometry." \
details_strategy_reasons="Reasons to specify a strategy include: use another coordinate system for calculations; construct the strategy beforehand (e.g. with the radius of the Earth); select a strategy when there are more than one available for a calculation." \
details_return{1}="This version with the return_ prefix returns the \1, and a template parameter must therefore be specified in the call." \

View File

@@ -157,7 +157,7 @@ Besides custom points, custom boxes are possible as shown in this example.
*/
//---------------------------------------------------------------------------------------------------
/*!
/*
\example c03_custom_linestring_example.cpp
GPS tracks are shown in this example: a custom linestring with GPS points
*/
@@ -219,14 +219,14 @@ Second example showing how to get polygons from a database using SOCI and put th
//---------------------------------------------------------------------------------------------------
/*!
/*
\example x03_c_soci_example.cpp
Example showing how to get polygons from PostGIS using SOCI and use them in GGL through WKB
*/
//---------------------------------------------------------------------------------------------------
/*!
/*
\example x03_d_soci_example.cpp
Example showing how to get polygons from PostGIS using SOCI and use them in GGL through WKB

View File

@@ -49,6 +49,9 @@
[def __other__ Other geometries]
[def __nyiversion__ Not yet supported in this version]
[def __not_in_boost_geometry_hpp__ The standard header `boost/geometry.hpp` does not include this header.]
[/Parts]
[def __ret_zero__ Returns zero]
[def __ret_one__ Returns 1]
@@ -62,8 +65,8 @@
All algorithms in Boost.Geometry will check any geometry arguments against the concept requirements.]
[def __boost_geometry__ Boost.Geometry]
[def __boost_gil__ [@http://www.boost.org/libs/gil/ Boost.GIL]]
[def __boost_geometry__ Boost.Geometry]
[def __boost_gil__ [@http://www.boost.org/libs/gil/ Boost.GIL]]
[heading Contributions]

View File

@@ -69,9 +69,29 @@
[import src/examples/core/set_box.cpp]
[import src/examples/core/degree_radian.cpp]
[import src/examples/core/interior_type.cpp]
[import src/examples/core/point_type.cpp]
[import src/examples/core/ring_type.cpp]
[import src/examples/core/rings.cpp]
[import src/examples/core/tag.cpp]
[import src/examples/core/tag_cast.cpp]
[import src/examples/geometries/point.cpp]
[import src/examples/geometries/adapted/c_array.cpp]
[import src/examples/geometries/adapted/boost_array.cpp]
[import src/examples/geometries/adapted/boost_fusion.cpp]
[import src/examples/geometries/adapted/boost_polygon.cpp]
[import src/examples/geometries/adapted/boost_tuple.cpp]
[import src/examples/geometries/adapted/boost_range/filtered.cpp]
[import src/examples/geometries/adapted/boost_range/reversed.cpp]
[import src/examples/geometries/adapted/boost_range/sliced.cpp]
[import src/examples/geometries/adapted/boost_range/strided.cpp]
[import src/examples/geometries/adapted/boost_range/uniqued.cpp]
[import src/examples/geometries/register/box.cpp]
[import src/examples/geometries/register/box_templated.cpp]
[import src/examples/geometries/register/box_2d_4values.cpp]
[import src/examples/geometries/register/point.cpp]

View File

@@ -100,16 +100,53 @@
</entry>
</row>
<row>
<entry valign="top" namest="a" nameend="c">
<bridgehead renderas="sect3">Macros</bridgehead>
<entry valign="top">
<bridgehead renderas="sect3">0-dimensional (adapted)</bridgehead>
<simplelist type="vert" columns="1">
<member><link linkend="geometry.reference.register.boost_geometry_register_point_2d">BOOST_GEOMETRY_REGISTER_POINT_2D</link></member>
<member><link linkend="geometry.reference.register.boost_geometry_register_point_2d_const">BOOST_GEOMETRY_REGISTER_POINT_2D_CONST</link></member>
<member><link linkend="geometry.reference.register.boost_geometry_register_point_2d_get_set">BOOST_GEOMETRY_REGISTER_POINT_2D_GET_SET</link></member>
<member><link linkend="geometry.reference.register.boost_geometry_register_point_3d">BOOST_GEOMETRY_REGISTER_POINT_3D</link></member>
<member><link linkend="geometry.reference.register.boost_geometry_register_point_3d_const">BOOST_GEOMETRY_REGISTER_POINT_3D_CONST</link></member>
<member><link linkend="geometry.reference.register.boost_geometry_register_point_3d_get_set">BOOST_GEOMETRY_REGISTER_POINT_3D_GET_SET</link></member>
<member><link linkend="geometry.reference.adapted.boost_array">Boost.Array</link></member>
<member><link linkend="geometry.reference.adapted.boost_fusion">Boost.Fusion</link></member>
<member><link linkend="geometry.reference.adapted.boost_polygon.point_data">Boost.Polygon's point_data</link></member>
<member><link linkend="geometry.reference.adapted.boost_tuple">Boost.Tuple</link></member>
<member><link linkend="geometry.reference.adapted.c_array">C arrays</link></member>
</simplelist>
</entry>
<entry valign="top">
<bridgehead renderas="sect3">1-dimensional (adapted)</bridgehead>
<simplelist type="vert" columns="1">
</simplelist>
</entry>
<entry valign="top">
<bridgehead renderas="sect3">2-dimensional (adapted)</bridgehead>
<simplelist type="vert" columns="1">
<member><link linkend="geometry.reference.adapted.boost_polygon.rectangle_data">Boost.Polygon's rectangle_data</link></member>
<member><link linkend="geometry.reference.adapted.boost_polygon.polygon_data">Boost.Polygon's polygon_data</link></member>
<member><link linkend="geometry.reference.adapted.boost_polygon.polygon_with_holes_data">Boost.Polygon's polygon_with_holes_data</link></member>
</simplelist>
</entry>
</row>
<row>
<entry valign="top">
<bridgehead renderas="sect3">0-dimensional (macro's for adaption)</bridgehead>
<simplelist type="vert" columns="1">
<member><link linkend="geometry.reference.adapted.register.boost_geometry_register_point_2d">BOOST_GEOMETRY_REGISTER_POINT_2D</link></member>
<member><link linkend="geometry.reference.adapted.register.boost_geometry_register_point_2d_const">BOOST_GEOMETRY_REGISTER_POINT_2D_CONST</link></member>
<member><link linkend="geometry.reference.adapted.register.boost_geometry_register_point_2d_get_set">BOOST_GEOMETRY_REGISTER_POINT_2D_GET_SET</link></member>
<member><link linkend="geometry.reference.adapted.register.boost_geometry_register_point_3d">BOOST_GEOMETRY_REGISTER_POINT_3D</link></member>
<member><link linkend="geometry.reference.adapted.register.boost_geometry_register_point_3d_const">BOOST_GEOMETRY_REGISTER_POINT_3D_CONST</link></member>
<member><link linkend="geometry.reference.adapted.register.boost_geometry_register_point_3d_get_set">BOOST_GEOMETRY_REGISTER_POINT_3D_GET_SET</link></member>
</simplelist>
</entry>
<entry valign="top">
<bridgehead renderas="sect3">1-dimensionial (macro's for adaption)</bridgehead>
<simplelist type="vert" columns="1">
</simplelist>
</entry>
<entry valign="top">
<bridgehead renderas="sect3">2-dimensional (macro's for adaption)</bridgehead>
<simplelist type="vert" columns="1">
<member><link linkend="geometry.reference.adapted.register.boost_geometry_register_box">BOOST_GEOMETRY_REGISTER_BOX</link></member>
<member><link linkend="geometry.reference.adapted.register.boost_geometry_register_box_2d_4values">BOOST_GEOMETRY_REGISTER_BOX_2D_4VALUES</link></member>
<member><link linkend="geometry.reference.adapted.register.boost_geometry_register_box_templated">BOOST_GEOMETRY_REGISTER_BOX_TEMPLATED</link></member>
</simplelist>
</entry>
</row>

View File

@@ -34,14 +34,30 @@
[include generated/interior_rings.qbk]
[endsect]
[endsect] [/access functions]
[section:register Adaption and adapted models]
[section:adapted Adapted models]
[include reference/geometries/adapted/c_array.qbk]
[include reference/geometries/adapted/boost_array.qbk]
[include reference/geometries/adapted/boost_fusion.qbk]
[include reference/geometries/adapted/boost_tuple.qbk]
[section:boost_polygon Boost.Polygon]
[include reference/geometries/adapted/boost_polygon/point_data.qbk]
[include reference/geometries/adapted/boost_polygon/rectangle_data.qbk]
[include reference/geometries/adapted/boost_polygon/polygon_data.qbk]
[include reference/geometries/adapted/boost_polygon/polygon_with_holes_data.qbk]
[endsect]
[section:boost_range Boost.Range]
[include reference/geometries/adapted/boost_range/filtered.qbk]
[include reference/geometries/adapted/boost_range/reversed.qbk]
[include reference/geometries/adapted/boost_range/sliced.qbk]
[include reference/geometries/adapted/boost_range/strided.qbk]
[/ include reference/geometries/adapted/boost_range/uniqued.qbk]
[endsect]
[section:register Macro's for adaption]
[include generated/register.qbk]
[endsect]
[endsect]
[section:algorithms Algorithms]
@@ -52,10 +68,8 @@
[section:assign assign]
[include generated/assign.qbk]
[endsect]
[/section:append append]
[include generated/append.qbk]
[/endsect]
[include generated/append.qbk]
[section:buffer buffer]
[include generated/buffer.qbk]
@@ -175,7 +189,6 @@
[include generated/cs_tag.qbk]
[include generated/degree.qbk]
[include generated/dimension.qbk]
[include generated/exception.qbk]
[include generated/interior_type.qbk]
[include generated/is_radian.qbk]
[include generated/point_order.qbk]

View File

@@ -0,0 +1,17 @@
[/============================================================================
Boost.Geometry (aka GGL, Generic Geometry Library)
Copyright (c) 2009-2011 Barend Gehrels, 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)
=============================================================================/]
[heading Complexity]
Compile time
[heading Example]
[interior_type]
[interior_type_output]

View File

@@ -0,0 +1,17 @@
[/============================================================================
Boost.Geometry (aka GGL, Generic Geometry Library)
Copyright (c) 2009-2011 Barend Gehrels, 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)
=============================================================================/]
[heading Complexity]
Compile time
[heading Example]
[ring_type]
[ring_type_output]

View File

@@ -8,9 +8,18 @@
http://www.boost.org/LICENSE_1_0.txt)
=============================================================================/]
[note With Boost.Geometry, tags are the driving force of the tag dispatching
mechanism. The tag metafunction is therefore used in every free function.
]
[heading Metafunction result type]
The metafunction tag defines [*type] as one of the following tags:
* point_tag
* linestring_tag
* polygon_tag
* multi_point_tag
* multi_linestring_tag
* multi_polygon_tag
* box_tag
* segment_tag
* ring_tag
[heading Complexity]
Compile time

View File

@@ -0,0 +1,38 @@
[/============================================================================
Boost.Geometry (aka GGL, Generic Geometry Library)
Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
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)
=============================================================================/]
[section:boost_array Boost.Array]
Boost.Array arrays are adapted to the Boost.Geometry point concept
[heading Description]
A boost::array is (optionally) adapted to the Boost.Geometry
point concept. It can therefore be used in all Boost.Geometry algorithms.
A boost::array can be the point type used by the models linestring, polygon, segment,
box, and ring
[heading Model of]
[link geometry.reference.concepts.concept_point Point Concept]
[heading Header]
`#include <boost/geometry/geometries/adapted/boost_array.hpp>`
The standard header `<boost/geometry.hpp>` does not include this header.
[heading Example]
[boost_array]
[boost_array_output]
[endsect]

View File

@@ -0,0 +1,35 @@
[/============================================================================
Boost.Geometry (aka GGL, Generic Geometry Library)
Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
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)
=============================================================================/]
[section:boost_fusion Boost.Fusion]
Boost.Fusion adapted structs or classes are adapted to the Boost.Geometry point concept
[heading Description]
Boost.Fusion adapted structs are (optionally) adapted to the Boost.Geometry
point concept. They can therefore be used in many Boost.Geometry algorithms.
[heading Model of]
[link geometry.reference.concepts.concept_point Point Concept]
[heading Header]
`#include <boost/geometry/geometries/adapted/boost_fusion.hpp>`
The standard header `<boost/geometry.hpp>` does not include this header.
[heading Example]
[boost_fusion]
[boost_fusion_output]
[endsect]

View File

@@ -0,0 +1,36 @@
[/============================================================================
Boost.Geometry (aka GGL, Generic Geometry Library)
Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
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)
=============================================================================/]
[section:point_data Boost.Polygon's point_data]
The Boost.Polygon point type (boost::polygon::point_data) is adapted to the Boost.Geometry Point Concept.
[heading Description]
Boost.Polygon's points (as well as polygons) can be used by Boost.Geometry. The
two libraries can therefore be used together. Using a boost::polygon::point_data<...>,
algorithms from both Boost.Polygon and Boost.Geometry can be called.
[heading Model of]
[link geometry.reference.concepts.concept_point Point Concept]
[heading Header]
`#include <boost/geometry/geometries/adapted/boost_polygon.hpp>`
__not_in_boost_geometry_hpp__
[heading Example]
[boost_polygon]
[boost_polygon_output]
[endsect]

View File

@@ -0,0 +1,36 @@
[/============================================================================
Boost.Geometry (aka GGL, Generic Geometry Library)
Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
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)
=============================================================================/]
[section:polygon_data Boost.Polygon's polygon_data]
Boost.Polygon's polygon type (boost::polygon::polygon_data) is adapted to the Boost.Geometry Ring Concept.
[heading Description]
Boost.Polygon's points (as well as polygons) can be used by Boost.Geometry. The
two libraries can therefore be used together. Using a boost::polygon::point_data<...>,
algorithms from both Boost.Polygon and Boost.Geometry can be called.
[heading Model of]
[link geometry.reference.concepts.concept_ring Ring Concept]
[heading Header]
`#include <boost/geometry/geometries/adapted/boost_polygon.hpp>`
__not_in_boost_geometry_hpp__
[heading Example]
[boost_polygon]
[boost_polygon_output]
[endsect]

View File

@@ -0,0 +1,37 @@
[/============================================================================
Boost.Geometry (aka GGL, Generic Geometry Library)
Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
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)
=============================================================================/]
[section:polygon_with_holes_data Boost.Polygon's polygon_with_holes_data]
Boost.Polygon's polygon type supporting holes (boost::polygon::polygon_with_holes_data)
is adapted to the Boost.Geometry Polygon Concept.
[heading Description]
Boost.Polygon's points (as well as polygons) can be used by Boost.Geometry. The
two libraries can therefore be used together. Using a boost::polygon::point_data<...>,
algorithms from both Boost.Polygon and Boost.Geometry can be called.
[heading Model of]
[link geometry.reference.concepts.concept_polygon Polygon Concept]
[heading Header]
`#include <boost/geometry/geometries/adapted/boost_polygon.hpp>`
__not_in_boost_geometry_hpp__
[heading Example]
[boost_polygon]
[boost_polygon_output]
[endsect]

View File

@@ -0,0 +1,36 @@
[/============================================================================
Boost.Geometry (aka GGL, Generic Geometry Library)
Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
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)
=============================================================================/]
[section:rectangle_data Boost.Polygon's rectangle_data]
Boost.Polygon's rectangle type (boost::polygon::rectangle_data) is adapted to the Boost.Geometry Point Concept.
[heading Description]
Boost.Polygon's points (as well as polygons) can be used by Boost.Geometry. The
two libraries can therefore be used together. Using a boost::polygon::point_data<...>,
algorithms from both Boost.Polygon and Boost.Geometry can be called.
[heading Model of]
[link geometry.reference.concepts.concept_box Box Concept]
[heading Header]
`#include <boost/geometry/geometries/adapted/boost_polygon.hpp>`
__not_in_boost_geometry_hpp__
[heading Example]
[boost_polygon]
[boost_polygon_output]
[endsect]

View File

@@ -0,0 +1,19 @@
[/============================================================================
Boost.Geometry (aka GGL, Generic Geometry Library)
Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
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)
=============================================================================/]
The __adaptor__ takes over the model of the original geometry, which might be:
* a linestring
* a ring
* a multi_point
* a multi_linestring
* a multi_polygon

View File

@@ -0,0 +1,36 @@
[/============================================================================
Boost.Geometry (aka GGL, Generic Geometry Library)
Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
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)
=============================================================================/]
[section:filtered Boost.Range filtered]
[def __adaptor__ Boost.Range filtered range adaptor]
__adaptor__ is adapted to Boost.Geometry
[heading Description]
__adaptor__ filters a range.
[heading Model of]
[include adapts_model.qbk]
[heading Header]
`#include <boost/geometry/geometries/adapted/boost_range/filtered.hpp>`
__not_in_boost_geometry_hpp__
[heading Example]
[boost_range_filtered]
[boost_range_filtered_output]
[endsect]

View File

@@ -0,0 +1,36 @@
[/============================================================================
Boost.Geometry (aka GGL, Generic Geometry Library)
Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
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)
=============================================================================/]
[section:reversed Boost.Range reversed]
[def __adaptor__ Boost.Range reversed range adaptor]
__adaptor__ is adapted to Boost.Geometry
[heading Description]
__adaptor__ reverses a range.
[heading Model of]
[include adapts_model.qbk]
[heading Header]
`#include <boost/geometry/geometries/adapted/boost_range/reversed.hpp>`
__not_in_boost_geometry_hpp__
[heading Example]
[boost_range_reversed]
[boost_range_reversed_output]
[endsect]

View File

@@ -0,0 +1,36 @@
[/============================================================================
Boost.Geometry (aka GGL, Generic Geometry Library)
Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
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)
=============================================================================/]
[section:sliced Boost.Range sliced]
[def __adaptor__ Boost.Range sliced range adaptor]
__adaptor__ is adapted to Boost.Geometry
[heading Description]
__adaptor__ creates a slice of a range (usually a linestring)
[heading Model of]
[include adapts_model.qbk]
[heading Header]
`#include <boost/geometry/geometries/adapted/boost_range/sliced.hpp>`
__not_in_boost_geometry_hpp__
[heading Example]
[boost_range_sliced]
[boost_range_sliced_output]
[endsect]

View File

@@ -0,0 +1,37 @@
[/============================================================================
Boost.Geometry (aka GGL, Generic Geometry Library)
Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
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)
=============================================================================/]
[section:strided Boost.Range strided]
[def __adaptor__ Boost.Range strided range adaptor]
__adaptor__ is adapted to Boost.Geometry
[heading Description]
__adaptor__ makes a strided range (usually begin a linestring or ring) such that
traversal is performed in steps of n.
[heading Model of]
[include adapts_model.qbk]
[heading Header]
`#include <boost/geometry/geometries/adapted/boost_range/strided.hpp>`
__not_in_boost_geometry_hpp__
[heading Example]
[boost_range_strided]
[boost_range_strided_output]
[endsect]

View File

@@ -0,0 +1,36 @@
[/============================================================================
Boost.Geometry (aka GGL, Generic Geometry Library)
Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
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)
=============================================================================/]
[section:uniqued Boost.Range uniqued]
[def __adaptor__ Boost.Range uniqued range adaptor]
__adaptor__ is adapted to Boost.Geometry
[heading Description]
__adaptor__ makes a range unique
[heading Model of]
[include adapts_model.qbk]
[heading Header]
`#include <boost/geometry/geometries/adapted/boost_range/uniqued.hpp>`
__not_in_boost_geometry_hpp__
[heading Example]
[boost_range_uniqued]
[boost_range_uniqued_output]
[endsect]

View File

@@ -0,0 +1,47 @@
[/============================================================================
Boost.Geometry (aka GGL, Generic Geometry Library)
Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
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)
=============================================================================/]
[section:boost_tuple Boost.Tuple]
Boost.Tuple tuples with arithmetic elements can be used as
points within Boost.Geometry
[heading Description]
Boost.Tuple fixed sized collections, such as boost::tuple<double, double>, are
(optionally) adapted to the Boost.Geometry point concept.
Boost.Tuple pairs or triples might have mutually different types, such as a
boost::tuple<float, double>. Boost.Geometry reports the first type as its
[link geometry.reference.core.coordinate_type coordinate_type].
Boost.Geometry supports Boost.Tuple pairs, triples, quadruples, etc up to
tuples with 10 elements (though most algorithms do not support so many
dimensions).
A tuple can be the point type used by the models linestring, polygon, segment,
box, and ring
[heading Model of]
[link geometry.reference.concepts.concept_point Point Concept]
[heading Header]
`#include <boost/geometry/geometries/adapted/boost_tuple.hpp>`
The standard header `<boost/geometry.hpp>` does not include this header.
[heading Example]
[boost_tuple]
[boost_tuple_output]
[endsect]

View File

@@ -0,0 +1,40 @@
[/============================================================================
Boost.Geometry (aka GGL, Generic Geometry Library)
Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
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)
=============================================================================/]
[section:c_array C array]
C arrays are adapted to the Boost.Geometry point concept
[heading Description]
C arrays, such as double[2] or int[3], are (optionally) adapted to the Boost.Geometry
point concept. They can therefore be used in many Boost.Geometry algorithms.
Note that a C array cannot be the point type of a linestring or a polygon. The reason
for that is that a std::vector does not allow containing C arrays
(this is not related to Boost.Geometry). The C array is therefore limited to
the point type.
[heading Model of]
[link geometry.reference.concepts.concept_point Point Concept]
[heading Header]
`#include <boost/geometry/geometries/adapted/c_array.hpp>`
The standard header `<boost/geometry.hpp>` does not include this header.
[heading Example]
[c_array]
[c_array_output]
[endsect]

View File

@@ -140,6 +140,7 @@ struct base_class
struct class_or_struct : public element
{
bool is_class; // true if class, false if struct
std::string name, fullname;
std::vector<function> functions;

View File

@@ -430,9 +430,16 @@ static void parse(rapidxml::xml_node<>* node, configuration const& config, docum
{
recurse = true;
}
if (kind == "struct" || kind == "class")
else if (kind == "struct")
{
recurse = true;
doc.cos.is_class = false;
parse_element(node->first_node(), config, "", doc.cos);
}
else if (kind == "class")
{
recurse = true;
doc.cos.is_class = true;
parse_element(node->first_node(), config, "", doc.cos);
}
}

View File

@@ -4,7 +4,7 @@
# xml=../../../../doxy/doxygen_output/xml/classboost_1_1geometry_1_1strategy_1_1distance_1_1pythagoras.xml
# xml=../../../../doxy/doxygen_output/xml/group__get.xml
xml=../../../../doxy/doxygen_output/xml/group__num__points.xml
xml=../../../../doxy/doxygen_output/xml/structboost_1_1geometry_1_1tag.xml
start_include=boost/geometry/
convenience_header_path=../../../../../../../boost/geometry/

View File

@@ -474,7 +474,8 @@ void quickbook_output(class_or_struct const& cos, configuration const& config, s
out << "[heading Synopsis]" << std::endl
<< "``";
quickbook_template_parameter_list(cos.template_parameters, out);
out << "class " << short_name << std::endl;
out << (cos.is_class ? "class" : "struct")
<< " " << short_name << std::endl;
if (! cos.base_classes.empty())
{

View File

@@ -12,12 +12,14 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/geometries/adapted/tuple_cartesian.hpp>
#include <boost/assign.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
int main()
{
using boost::assign::tuple_list_of;

View File

@@ -11,7 +11,7 @@
//` Calculate the area of a polygon
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/domains/gis/io/wkt/wkt.hpp>
namespace bg = boost::geometry; /*< Convenient namespace alias >*/

View File

@@ -11,7 +11,7 @@
//` Calculate the area of a polygon
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/domains/gis/io/wkt/wkt.hpp>
namespace bg = boost::geometry; /*< Convenient namespace alias >*/

View File

@@ -12,8 +12,10 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry/geometries/adapted/tuple_cartesian.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
int main()
{

View File

@@ -13,7 +13,7 @@
#include <iostream>
#include <iomanip>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#if defined(HAVE_TTMATH)

View File

@@ -13,7 +13,7 @@
#include <iostream>
#include <iomanip>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
int main()

View File

@@ -12,7 +12,7 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
using namespace boost::geometry;

View File

@@ -12,7 +12,7 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
using namespace boost::geometry;

View File

@@ -12,7 +12,7 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
using namespace boost::geometry;

View File

@@ -12,7 +12,7 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
using namespace boost::geometry;

View File

@@ -12,13 +12,15 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/geometries/adapted/tuple_cartesian.hpp>
#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
#include <boost/assign.hpp>
#include <boost/geometry/geometries/adapted/boost_range/filtered.hpp>
BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
template <typename T>
struct x_between
{

View File

@@ -13,7 +13,7 @@
#include <iostream>
#include <list>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/domains/gis/io/wkt/wkt.hpp>

View File

@@ -12,9 +12,11 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/geometries/adapted/tuple_cartesian.hpp>
#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
#include <boost/assign.hpp>

View File

@@ -12,7 +12,7 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/numeric/conversion/bounds.hpp>
#include <boost/foreach.hpp>

View File

@@ -13,7 +13,9 @@
#include <iostream>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/adapted/tuple_cartesian.hpp>
#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
int main()
{

View File

@@ -12,8 +12,10 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry/geometries/adapted/tuple_cartesian.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
/*<-*/ #include "create_svg_two.hpp" /*->*/
int main()

View File

@@ -12,8 +12,10 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry/geometries/adapted/tuple_cartesian.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
#include <boost/assign.hpp>

View File

@@ -13,7 +13,7 @@
#include <iostream>
#include <list>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/domains/gis/io/wkt/wkt.hpp>

View File

@@ -13,7 +13,7 @@
#include <iostream>
#include <vector>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/domains/gis/io/wkt/wkt.hpp>

View File

@@ -13,7 +13,7 @@
#include <iostream>
#include <list>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/multi/geometries/multi_point.hpp>

View File

@@ -12,7 +12,7 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/domains/gis/io/wkt/wkt.hpp>

View File

@@ -12,9 +12,11 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/geometries/adapted/tuple_cartesian.hpp>
#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
#include <boost/assign.hpp>

View File

@@ -13,7 +13,7 @@
#include <iostream>
#include <list>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
int main()
{

View File

@@ -12,7 +12,7 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/domains/gis/io/wkt/wkt.hpp>

View File

@@ -12,7 +12,7 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/domains/gis/io/wkt/wkt.hpp>

View File

@@ -12,7 +12,7 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/assign.hpp>

View File

@@ -13,7 +13,7 @@
#include <iostream>
#include <deque>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/domains/gis/io/wkt/wkt.hpp>
#include <boost/geometry/geometries/adapted/std_as_linestring.hpp> /*< Adapts std::vector to linestring concept >*/

View File

@@ -13,7 +13,7 @@
#include <iostream>
#include <deque>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/domains/gis/io/wkt/wkt.hpp>

View File

@@ -12,7 +12,7 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/domains/gis/io/wkt/wkt.hpp>
#include <boost/geometry/geometries/adapted/std_as_linestring.hpp> /*< Adapts std::vector to linestring concept >*/

View File

@@ -12,7 +12,7 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/domains/gis/io/wkt/wkt.hpp>
int main()

View File

@@ -12,7 +12,7 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/domains/gis/io/wkt/wkt.hpp>
int main()

View File

@@ -11,7 +11,7 @@
//` The following simple example shows the calculation of the length of a linestring containing three points
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/domains/gis/io/wkt/wkt.hpp>

View File

@@ -11,7 +11,7 @@
//`The following example shows the length measured over a sphere, expressed in kilometers. To do that the radius of the sphere must be specified in the constructor of the strategy.
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
int main()
{

View File

@@ -12,12 +12,14 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/geometries/register/point.hpp>
#include <boost/geometry/geometries/adapted/tuple_cartesian.hpp>
#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
#include <boost/geometry/geometries/adapted/boost_polygon/point.hpp>
BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
struct mypoint { float _x, _y; };
BOOST_GEOMETRY_REGISTER_POINT_2D(mypoint, float, cs::cartesian, _x, _y)

View File

@@ -12,7 +12,7 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
int main()

View File

@@ -12,7 +12,7 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
using namespace boost::geometry;

View File

@@ -12,24 +12,25 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/geometries/adapted/c_array_cartesian.hpp> /*< Necessary to register a C array like {1,2} as a point >*/
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/adapted/c_array.hpp>
BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian) /*< Necessary to register a C array like {1,2} as a point >*/
int main()
{
using boost::geometry::make;
using boost::geometry::detail::make::make_points;
typedef boost::geometry::model::d2::point_xy<double> point;
typedef boost::geometry::model::linestring<point> linestring;
double coordinates[][2] = {{1,2}, {3,4}, {5, 6}}; /*< Initialize with C array points >*/
linestring ls = make<linestring>(coordinates);
linestring ls = make_points<linestring>(coordinates);
std::cout << boost::geometry::dsv(ls) << std::endl;
point points[3] = { make<point>(9,8), make<point>(7,6), make<point>(5,4) }; /*< Construct array with points, using make which should work for any point type >*/
std::cout << boost::geometry::dsv(make<linestring>(points)) << std::endl; /*< Construct linestring with point-array and output it as Delimiter Separated Values >*/
std::cout << boost::geometry::dsv(make_points<linestring>(points)) << std::endl; /*< Construct linestring with point-array and output it as Delimiter Separated Values >*/
return 0;
}

View File

@@ -12,7 +12,7 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/multi/multi.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/multi/geometries/multi_polygon.hpp>

View File

@@ -12,7 +12,7 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/multi/multi.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/multi/geometries/multi_polygon.hpp>

View File

@@ -12,7 +12,7 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/multi/multi.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/multi/geometries/multi_polygon.hpp>

View File

@@ -13,7 +13,7 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/assign.hpp>

View File

@@ -12,9 +12,11 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/geometries/adapted/tuple_cartesian.hpp>
#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
#include <boost/assign.hpp>

View File

@@ -11,7 +11,7 @@
//` Example showing how to simplify a linestring
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
/*< For this example we use Boost.Assign to add points >*/
#include <boost/assign.hpp>

View File

@@ -11,7 +11,7 @@
//` Simplify a linestring using a back inserter
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
int main()
{

View File

@@ -11,7 +11,7 @@
//` Simplify a linestring using an output iterator
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/domains/gis/io/wkt/wkt.hpp>
#include <boost/geometry/domains/gis/io/wkt/stream_wkt.hpp>

View File

@@ -12,7 +12,7 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
#include <boost/geometry/domains/gis/io/wkt/wkt.hpp>

View File

@@ -11,7 +11,7 @@
//` Shows how points can be transformed using the default strategy
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
int main()

View File

@@ -11,7 +11,7 @@
//` Shows how points can be scaled, translated or rotated
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
int main()

View File

@@ -13,7 +13,7 @@
#include <iostream>
#include <vector>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/domains/gis/io/wkt/wkt.hpp>

View File

@@ -12,8 +12,10 @@
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry/geometries/adapted/tuple_cartesian.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
int main()
{

View File

@@ -13,7 +13,7 @@
#include <iostream>
#include <list>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/domains/gis/io/wkt/wkt.hpp>

View File

@@ -25,6 +25,9 @@ exe coordinate_dimension : coordinate_dimension.cpp ;
exe point_order : point_order.cpp ;
exe closure : closure.cpp ;
exe interior_type : interior_type.cpp ;
exe point_type : point_type.cpp ;
exe ring_type : ring_type.cpp ;
exe rings : rings.cpp ;
exe tag : tag.cpp ;
exe tag_cast : tag_cast.cpp ;

View File

@@ -11,7 +11,7 @@
//` Examine if a polygon is defined as "should be closed"
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
int main()
{

View File

@@ -11,15 +11,16 @@
//` Examine the number of coordinates making up the points in a linestring type
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry/geometries/adapted/tuple_cartesian.hpp>
#include <boost/geometry/geometries/adapted/std_as_linestring.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian);
int main()
{
int dim = boost::geometry::dimension
<
std::vector
boost::geometry::model::linestring
<
boost::tuple<float, float, float>
>

View File

@@ -12,7 +12,7 @@
#include <iostream>
#include <typeinfo>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
int main()
{

View File

@@ -12,7 +12,7 @@
#include <iostream>
#include <typeinfo>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
int main()
{

View File

@@ -11,7 +11,7 @@
//` Specify two coordinate systems, one in degrees, one in radians.
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
using namespace boost::geometry;

View File

@@ -11,7 +11,7 @@
//` Get the coordinate of a box
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
namespace bg = boost::geometry;
@@ -19,7 +19,7 @@ int main()
{
bg::model::box<bg::model::d2::point_xy<double> > box;
bg::assign(box, 1, 3, 5, 6);
bg::assign_values(box, 1, 3, 5, 6);
std::cout << "Box:"
<< " " << bg::get<bg::min_corner, 0>(box)

View File

@@ -11,7 +11,7 @@
//` Get the coordinate of a point
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
namespace bg = boost::geometry;

View File

@@ -0,0 +1,46 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// QuickBook Example
// Copyright (c) 2011 Barend Gehrels, 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)
//[interior_type
//`Shows how to use the interior_type metafunction
#include <iostream>
#include <typeinfo>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/adapted/boost_array.hpp>
BOOST_GEOMETRY_REGISTER_BOOST_ARRAY_CS(cs::cartesian)
int main()
{
// Define a polygon storing points in a deque and storing interior rings
// in a list (note that std::list is not supported by most algorithms
// because not supporting a random access iterator)
typedef boost::geometry::model::polygon
<
boost::array<short, 3>,
true, true,
std::deque, std::list
> polygon;
std::cout << typeid(boost::geometry::interior_type<polygon>::type).name() << std::endl;
return 0;
}
//]
//[interior_type_output
/*`
Output (using MSVC) is a long story (part manually replaced with ellipsis):
[pre
class std::list<class boost::geometry::model::ring<class boost::array<short,3>,1,1,class std::deque,class std::allocator>,class std::allocator<...> > >
]
*/
//]

View File

@@ -11,7 +11,7 @@
//` Examine the expected point order of a polygon type
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
int main()
{

View File

@@ -12,7 +12,7 @@
#include <iostream>
#include <typeinfo>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
int main()
{

View File

@@ -0,0 +1,53 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// QuickBook Example
// Copyright (c) 2011 Barend Gehrels, 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)
//[ring_type
//`Shows how to use the ring_type metafunction, as well as interior_type
#include <iostream>
#include <typeinfo>
#include <boost/geometry.hpp>
int main()
{
typedef boost::geometry::model::d2::point_xy<double> point;
typedef boost::geometry::model::polygon<point> polygon;
typedef boost::geometry::ring_type<polygon>::type ring_type;
typedef boost::geometry::interior_type<polygon>::type int_type;
std::cout << typeid(ring_type).name() << std::endl;
std::cout << typeid(int_type).name() << std::endl;
// So int_type defines a collection of rings,
// which is a Boost.Range compatible range
// The type of an element of the collection is the very same ring type again.
// We show that.
typedef boost::range_value<int_type>::type int_ring_type;
std::cout
<< std::boolalpha
<< boost::is_same<ring_type, int_ring_type>::value
<< std::endl;
return 0;
}
//]
//[ring_type_output
/*`
Output (using gcc):
[pre
N5boost8geometry5model4ringINS1_2d28point_xyIdNS0_2cs9cartesianEEELb1ELb1ESt6vectorSaEE
St6vectorIN5boost8geometry5model4ringINS2_2d28point_xyIdNS1_2cs9cartesianEEELb1ELb1ES_SaEESaIS9_EE
true
]
*/
//]

View File

@@ -0,0 +1,74 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// QuickBook Example
// Copyright (c) 2011 Barend Gehrels, 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)
//[rings
/*`
Shows how to access the exterior ring (one)
and interior rings (zero or more) of a polygon.
Also shows the related ring_type and interior_type.
*/
#include <iostream>
#include <boost/geometry.hpp>
int main()
{
typedef boost::geometry::model::d2::point_xy<double> point;
typedef boost::geometry::model::polygon<point> polygon_type;
polygon_type poly;
typedef boost::geometry::ring_type<polygon_type>::type ring_type;
ring_type& ring = boost::geometry::exterior_ring(poly);
// For a ring of model::polygon, you can call "push_back".
// (internally, it is done using a traits::push_back class)
ring.push_back(point(0, 0));
ring.push_back(point(0, 5));
ring.push_back(point(5, 4));
ring.push_back(point(0, 0));
ring_type inner;
inner.push_back(point(1, 1));
inner.push_back(point(2, 1));
inner.push_back(point(2, 2));
inner.push_back(point(1, 1));
typedef boost::geometry::interior_type<polygon_type>::type int_type;
int_type& interiors = boost::geometry::interior_rings(poly);
interiors.push_back(inner);
std::cout << boost::geometry::dsv(poly) << std::endl;
// So int_type defines a collection of rings,
// which is a Boost.Range compatible range
// The type of an element of the collection is the very same ring type again.
// We show that.
typedef boost::range_value<int_type>::type int_ring_type;
std::cout
<< std::boolalpha
<< boost::is_same<ring_type, int_ring_type>::value
<< std::endl;
return 0;
}
//]
//[rings_output
/*`
Output:
[pre
(((0, 0), (0, 5), (5, 4), (0, 0)), ((1, 1), (2, 1), (2, 2), (1, 1)))
true
]
*/
//]

View File

@@ -11,7 +11,7 @@
//` Set the coordinate of a box
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
namespace bg = boost::geometry;

View File

@@ -11,7 +11,7 @@
//` Set the coordinate of a point
#include <iostream>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry.hpp>
namespace bg = boost::geometry;

Some files were not shown because too many files have changed in this diff Show More