mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-11 13:34:10 +00:00
Major doc upgrade
[SVN r64820]
This commit is contained in:
parent
8753236b6d
commit
4741a9e479
17
doc/Doxyfile
17
doc/Doxyfile
@ -25,7 +25,9 @@ MULTILINE_CPP_IS_BRIEF = NO
|
||||
INHERIT_DOCS = YES
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
TAB_SIZE = 8
|
||||
ALIASES =
|
||||
ALIASES = qbk{2}="\xmlonly <qbk.\1>\2</qbk.\1> \endxmlonly" \
|
||||
geometry_concept="Any geometry fulfilling the any Geometry concept" \
|
||||
template_numerical="Numerical type (int, double, ttmath, ...)"
|
||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
OPTIMIZE_FOR_FORTRAN = NO
|
||||
@ -83,7 +85,9 @@ WARN_LOGFILE =
|
||||
INPUT = . .. ../../../boost/geometry/core \
|
||||
../../../boost/geometry/algorithms \
|
||||
../../../boost/geometry/algorithms/detail \
|
||||
../../../boost/geometry/algorithms/overlay \
|
||||
../../../boost/geometry/algorithms/detail\overlay \
|
||||
../../../boost/geometry/algorithms/detail\equals \
|
||||
../../../boost/geometry/algorithms/detail\sections \
|
||||
../../../boost/geometry/arithmetic \
|
||||
../../../boost/geometry/geometries/concepts \
|
||||
../../../boost/geometry/geometries/concepts/detail \
|
||||
@ -99,6 +103,7 @@ INPUT = . .. ../../../boost/geometry/core \
|
||||
../../../boost/geometry/multi/iterators \
|
||||
../../../boost/geometry/policies \
|
||||
../../../boost/geometry/policies/relate \
|
||||
../../../boost/geometry/ranges \
|
||||
../../../boost/geometry/strategies \
|
||||
../../../boost/geometry/strategies/concepts \
|
||||
../../../boost/geometry/strategies/agnostic \
|
||||
@ -106,8 +111,10 @@ INPUT = . .. ../../../boost/geometry/core \
|
||||
../../../boost/geometry/strategies/spherical \
|
||||
../../../boost/geometry/strategies/transform \
|
||||
../../../boost/geometry/util \
|
||||
../../../boost/geometry/views \
|
||||
../../../boost/geometry/extensions/io/svg \
|
||||
./doxygen_input/pages
|
||||
./doxygen_input/pages \
|
||||
./doxygen_input/groups
|
||||
INPUT_ENCODING = UTF-8
|
||||
FILE_PATTERNS = *.hpp
|
||||
RECURSIVE = NO
|
||||
@ -206,11 +213,11 @@ MAN_LINKS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = NO
|
||||
GENERATE_XML = YES
|
||||
XML_OUTPUT = xml
|
||||
XML_SCHEMA =
|
||||
XML_DTD =
|
||||
XML_PROGRAMLISTING = YES
|
||||
XML_PROGRAMLISTING = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
|
@ -3,12 +3,12 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="left"><small>
|
||||
<p>December 1, 2009</p>
|
||||
<p>August 14, 2010</p>
|
||||
</small></td>
|
||||
<td align="right">
|
||||
<small>Copyright © 1995-2009 Barend Gehrels, Geodan, Amsterdam<br>
|
||||
Copyright © 2008-2009 Bruno Lalande, Paris<br>
|
||||
Copyright © 2009 Mateusz Loskot, Cadcorp, London<br>
|
||||
<small>Copyright © 1995-2010 Barend Gehrels, Geodan, Amsterdam<br>
|
||||
Copyright © 2008-2010 Bruno Lalande, Paris<br>
|
||||
Copyright © 2010 Mateusz Loskot, Cadcorp, London<br>
|
||||
</small>
|
||||
</td>
|
||||
</tr>
|
||||
|
27
doc/doxygen_input/groups/access.hpp
Normal file
27
doc/doxygen_input/groups/access.hpp
Normal file
@ -0,0 +1,27 @@
|
||||
/*!
|
||||
\defgroup access access: get/set coordinate values, make objects, clear geometries, append point(s)
|
||||
\details There are many ways to edit geometries. It is possible to:
|
||||
|
||||
\li use the geometries themselves, so access point.x(). This is not done
|
||||
inside the library because it is agnostic to geometry type. However,
|
||||
library users can use this as it is intuitive.
|
||||
\li use the standard library, so use .push_back(point) or use inserters.
|
||||
This is also avoided inside the library. However, library users can use
|
||||
it if they are used to the standard library
|
||||
\li use the functionality provided in this geometry library. These are
|
||||
the functions in this module.
|
||||
|
||||
The library provides the following functions to edit geometries:
|
||||
\li set to set one coordinate value
|
||||
\li assign to set two or more coordinate values
|
||||
\li make to construct and return geometries with specified coordinates.
|
||||
\li append to append one or more points to a geometry
|
||||
\li clear to remove all points from a geometry
|
||||
|
||||
For getting coordinates it is similar:
|
||||
\li get to get a coordinate value
|
||||
\li or use the standard library
|
||||
\li or use the geometries themselves
|
||||
*/
|
||||
|
||||
|
25
doc/doxygen_input/groups/area.hpp
Normal file
25
doc/doxygen_input/groups/area.hpp
Normal file
@ -0,0 +1,25 @@
|
||||
/*!
|
||||
\defgroup area area: calculate area of a Geometry
|
||||
|
||||
\par Performance
|
||||
2776 * 1000 area calculations are done in 0.11 seconds
|
||||
(http://trac.osgeo.org/ggl/wiki/Performance#Area1)
|
||||
|
||||
\par Coordinate systems and strategies
|
||||
Area calculation can be done in Cartesian and in spherical/geographic
|
||||
coordinate systems.
|
||||
|
||||
\par Geometries
|
||||
The area algorithm calculates the surface area of all geometries
|
||||
having a surface: box, polygon, multi_polygon. The units are the square of
|
||||
the units used for the points defining the surface. If the polygon is defined
|
||||
in meters, the area is in square meters.
|
||||
|
||||
\par Example:
|
||||
Example showing area calculation of polygons built
|
||||
\dontinclude doxygen_1.cpp
|
||||
\skip example_area_polygon()
|
||||
\line {
|
||||
\until }
|
||||
|
||||
*/
|
3
doc/doxygen_input/groups/arithmetic.hpp
Normal file
3
doc/doxygen_input/groups/arithmetic.hpp
Normal file
@ -0,0 +1,3 @@
|
||||
/*!
|
||||
\defgroup arithmetic arithmetic: arithmetic operations on points
|
||||
*/
|
9
doc/doxygen_input/groups/buffer.hpp
Normal file
9
doc/doxygen_input/groups/buffer.hpp
Normal file
@ -0,0 +1,9 @@
|
||||
/*!
|
||||
\defgroup buffer buffer: calculate buffer of a geometry
|
||||
\par Source description:
|
||||
- OGC: Returns a geometric object that represents all Points whose distance
|
||||
from this geometric object is less than or equal to distance. Calculations are in the spatial reference system of
|
||||
this geometric object. Because of the limitations of linear interpolation, there will often be some relatively
|
||||
small error in this distance, but it should be near the resolution of the coordinates used
|
||||
\see http://en.wikipedia.org/wiki/Buffer_(GIS)
|
||||
*/
|
35
doc/doxygen_input/groups/centroid.hpp
Normal file
35
doc/doxygen_input/groups/centroid.hpp
Normal file
@ -0,0 +1,35 @@
|
||||
/*!
|
||||
\defgroup centroid centroid: calculate centroid (center of gravity) of a geometry
|
||||
\par Source descriptions:
|
||||
- OGC description: The mathematical centroid for this Surface as a Point. The
|
||||
result is not guaranteed to be on this Surface.
|
||||
- From Wikipedia: Informally, it is the "average" of all points
|
||||
\see http://en.wikipedia.org/wiki/Centroid
|
||||
\note Polygon should be closed, and can be orientated either way
|
||||
\note The "centroid" functions are taking a non const reference to the centroid.
|
||||
The "make_centroid" functions return the centroid, the type has to be
|
||||
specified.
|
||||
\note Both of them have an overloaded version where
|
||||
a centroid calculation strategy can be specified
|
||||
\exception centroid_exception if calculation is not successful,
|
||||
e.g. because polygon didn't contain points
|
||||
|
||||
\par Example:
|
||||
Example showing centroid calculation
|
||||
\dontinclude doxygen_1.cpp
|
||||
\skip example_centroid_polygon
|
||||
\line {
|
||||
\until }
|
||||
|
||||
\par Performance
|
||||
2776 * 1000 centroid calculations are done in 0.16 seconds
|
||||
(http://trac.osgeo.org/ggl/wiki/Performance#Centroid1)
|
||||
|
||||
\par Geometries:
|
||||
- RING: \image html centroid_ring.png
|
||||
- BOX: the centroid of a 2D or 3D box is the center of the box
|
||||
- POLYGON \image html centroid_polygon.png
|
||||
- POINT: the point is the centroid
|
||||
- LINESTRING: the average of the centers of its segments
|
||||
- MULTIPOINT: the average of the points
|
||||
*/
|
10
doc/doxygen_input/groups/combine.hpp
Normal file
10
doc/doxygen_input/groups/combine.hpp
Normal file
@ -0,0 +1,10 @@
|
||||
/*!
|
||||
\defgroup combine combine: add a geometry to a bounding box
|
||||
\par Geometries:
|
||||
- \b box + \b box -> \b box: the box will be combined with the other box
|
||||
\image html combine_box_box.png
|
||||
\note Also if the input box is incorrect, the box will correctly updated
|
||||
- \b box + \b point -> \b box: the box will combined with the point
|
||||
\image html combine_box_point.png
|
||||
- \b box + \b segment -> \b box
|
||||
*/
|
33
doc/doxygen_input/groups/compare.hpp
Normal file
33
doc/doxygen_input/groups/compare.hpp
Normal file
@ -0,0 +1,33 @@
|
||||
/*!
|
||||
\defgroup compare compare: define compare functors for points
|
||||
\details The compare policies enable to compare points in a way that they can
|
||||
be compared in many functions of the standard library.
|
||||
|
||||
The functors do have an optional second template argument, \b dimension.
|
||||
If dimension is specified, comparison is only done on that dimension.
|
||||
|
||||
This is useful for (a.o.):
|
||||
- std::sort (use geometry::less<P> or geometry::greater<P> or geometry::less<P, 1>)
|
||||
- std::map (use geometry::less<P>)
|
||||
- std::unique_copy (use geometry::equal_to<P>)
|
||||
|
||||
\par Geometries:
|
||||
- \b point
|
||||
|
||||
|
||||
\par Example:
|
||||
Example showing how geometry::less can be used
|
||||
\dontinclude doxygen_3.cpp
|
||||
\skip example_less()
|
||||
\line {
|
||||
\until }
|
||||
|
||||
|
||||
\note There is a boolean function \ref equals "equals" as well, which returns
|
||||
true or false if a geometry is spatially equal to another geometry. That one
|
||||
is defined for OGC compatibility, while these ones are defined for
|
||||
compatibility with the std:: library. These ones are functors, operating on
|
||||
the same geometry type (currently only the point-type), the equals function is
|
||||
a free function operating on different point types or even different geometry
|
||||
types (a linestring can be spatially equal to a multi-linestring).
|
||||
*/
|
46
doc/doxygen_input/groups/concepts.hpp
Normal file
46
doc/doxygen_input/groups/concepts.hpp
Normal file
@ -0,0 +1,46 @@
|
||||
/*!
|
||||
\defgroup concepts geometry concepts: defines and checks concepts for geometries
|
||||
|
||||
All GGL algorithms use concepts for their geometries. This means that all
|
||||
algorithms work on the GGL-provided geometries (point, linestring, etc) but
|
||||
also on custom geometries.
|
||||
|
||||
By declaring registration macro's or by specializating traits classes it is
|
||||
possible to adapt custom or legacy geometries to fulfil the GGL geometry
|
||||
concepts.
|
||||
|
||||
GGL algorithms check the concepts of the input geometries.
|
||||
Concept checking is done using BCCL (Boost Concept Check Library).
|
||||
|
||||
This means that geometries provided by library users, or legacy geometries, or
|
||||
plain arrays, or boost tuples, all can be handled by the Generic Geometry
|
||||
Library. Also std::vector of points, or tuples can be handled either as a
|
||||
linestring or as a linear ring (polygon without holes).
|
||||
|
||||
There are concepts for
|
||||
- points
|
||||
- segment
|
||||
- box
|
||||
- linestring
|
||||
- (linear) ring
|
||||
- polygon
|
||||
- multi point
|
||||
- multi linestring
|
||||
- multi polygon
|
||||
|
||||
The Generic Geometry Library uses the Boost Range Library to iterate through
|
||||
standard containers, boost arrays, c-arrays.
|
||||
So:
|
||||
- linestring
|
||||
- (linear) ring
|
||||
|
||||
are all just ranges. So a std::vector, std::deque, boost::array,
|
||||
iterator pair or c-array will be accepted as such.
|
||||
|
||||
Also the multi geometries:
|
||||
- multi point
|
||||
- multi linestring
|
||||
- multi polygon
|
||||
are considered as ranges of respectively points, linestrings and polygons.
|
||||
|
||||
*/
|
12
doc/doxygen_input/groups/convert.hpp
Normal file
12
doc/doxygen_input/groups/convert.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
/*!
|
||||
\defgroup convert convert: convert geometries from one type to another
|
||||
\details Convert from one geometry type to another type,
|
||||
for example from BOX to POLYGON
|
||||
\par Geometries:
|
||||
- \b point to \b box -> a zero-area box of a point
|
||||
- \b box to \b ring -> a rectangular ring
|
||||
- \b box to \b polygon -> a rectangular polygon
|
||||
- \b ring to \b polygon -> polygon with an exterior ring (the input ring)
|
||||
- \b polygon to \b ring -> ring, interior rings (if any) are ignored
|
||||
*/
|
||||
|
43
doc/doxygen_input/groups/convex_hull.hpp
Normal file
43
doc/doxygen_input/groups/convex_hull.hpp
Normal file
@ -0,0 +1,43 @@
|
||||
/*!
|
||||
\defgroup convex_hull convex hull: calculate the convex hull of a geometry
|
||||
\par Source descriptions:
|
||||
- OGC description: Returns a geometric object that represents the convex hull of
|
||||
this geometric object. Convex hulls, being dependent on straight lines, can
|
||||
be accurately represented in linear interpolations
|
||||
for any geometry restricted to linear interpolations.
|
||||
\see http://en.wikipedia.org/wiki/Convex_hull
|
||||
|
||||
\par Performance
|
||||
2776 counties of US are "hulled" in 0.9 seconds
|
||||
(http://trac.osgeo.org/ggl/wiki/Performance#Convexhull1)
|
||||
|
||||
\note The convex hull is always a ring, holes are not possible. Therefore it is
|
||||
can also be used in combination with an output iterator.
|
||||
|
||||
\par Geometries supported:
|
||||
In the images below the convex hull is painted in red.
|
||||
|
||||
- \b point: will not compile
|
||||
|
||||
- \b linestring:
|
||||
|
||||
- \b polygon: will deliver a polygon without holes
|
||||
\image html svg_convex_hull_country.png
|
||||
|
||||
- \b multi_point:
|
||||
\image html svg_convex_hull_cities.png
|
||||
|
||||
- \b multi_linestring:
|
||||
|
||||
- \b multi_polygon:
|
||||
|
||||
\par Output geometries supported:
|
||||
|
||||
- \b polygon
|
||||
|
||||
- \b ring
|
||||
|
||||
- inserter version (with output iterator) can output to any array supporting
|
||||
points of same type as the input geometry type
|
||||
|
||||
*/
|
3
doc/doxygen_input/groups/core.hpp
Normal file
3
doc/doxygen_input/groups/core.hpp
Normal file
@ -0,0 +1,3 @@
|
||||
/*!
|
||||
\defgroup core core: meta-functions for geometry types
|
||||
*/
|
14
doc/doxygen_input/groups/cs.hpp
Normal file
14
doc/doxygen_input/groups/cs.hpp
Normal file
@ -0,0 +1,14 @@
|
||||
/*!
|
||||
\defgroup cs coordinate systems
|
||||
\brief Defines coordinate systems
|
||||
\details Coordinate systems are essential for any point in the Generic Geometry Library. Many
|
||||
algorithms such as distance or transform use coordinate systems to select the strategy to use.
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\defgroup cs coordinate systems
|
||||
\brief Defines coordinate systems
|
||||
\details Coordinate systems are essential for any point in the Generic Geometry Library. Many
|
||||
algorithms such as distance or transform use coordinate systems to select the strategy to use.
|
||||
*/
|
4
doc/doxygen_input/groups/difference.hpp
Normal file
4
doc/doxygen_input/groups/difference.hpp
Normal file
@ -0,0 +1,4 @@
|
||||
/*!
|
||||
\defgroup difference difference: difference of two geometries
|
||||
*/
|
||||
|
15
doc/doxygen_input/groups/disjoint.hpp
Normal file
15
doc/doxygen_input/groups/disjoint.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
/*!
|
||||
\defgroup disjoint disjoint: detect if geometries are not spatially related
|
||||
\details disjoint means spatially disjoint, there is no overlap of interiors
|
||||
and boundaries, the intersection of interiors or boundaries is empty.
|
||||
|
||||
\par Geometries:
|
||||
- \b point + \b point (= ! equals)
|
||||
- \b point + \b box (= not within or on border)
|
||||
- \b box + \b box
|
||||
- \b ring + \b box
|
||||
- \b polygon + \b box
|
||||
- \b polygon + \b ring
|
||||
- \b polygon + \b polygon
|
||||
|
||||
*/
|
30
doc/doxygen_input/groups/distance.hpp
Normal file
30
doc/doxygen_input/groups/distance.hpp
Normal file
@ -0,0 +1,30 @@
|
||||
/*!
|
||||
\defgroup distance distance: calculate distance between two geometries
|
||||
The distance algorithm returns the distance between two geometries.
|
||||
\par Coordinate systems and strategies:
|
||||
With help of strategies the distance function returns the appropriate distance.
|
||||
If the input is in cartesian coordinates, the Euclidian distance (Pythagoras) is calculated.
|
||||
If the input is in spherical coordinates (either degree or radian), the distance over the sphere is returned.
|
||||
If the input is in geographic coordinates, distance is calculated over the globe and returned in meters.
|
||||
|
||||
\par Distance result:
|
||||
Depending on calculation type the distance result is either a structure, convertable
|
||||
to a double, or a double value. In case of Pythagoras it makes sense to not draw the square root in the
|
||||
strategy itself. Taking a square root is relative expensive and is not necessary when comparing distances.
|
||||
|
||||
\par Geometries:
|
||||
Currently implemented, for both cartesian and spherical/geographic:
|
||||
- POINT - POINT
|
||||
- POINT - SEGMENT and v.v.
|
||||
- POINT - LINESTRING and v.v.
|
||||
|
||||
Not yet implemented:
|
||||
- POINT - RING etc, note that it will return a zero if the point is anywhere within the ring
|
||||
|
||||
\par Example:
|
||||
Example showing distance calculation of two points, in xy and in latlong coordinates
|
||||
\dontinclude doxygen_1.cpp
|
||||
\skip example_distance_point_point
|
||||
\line {
|
||||
\until }
|
||||
*/
|
37
doc/doxygen_input/groups/envelope.hpp
Normal file
37
doc/doxygen_input/groups/envelope.hpp
Normal file
@ -0,0 +1,37 @@
|
||||
/*!
|
||||
\defgroup envelope envelope: calculate envelope (minimum bounding rectangle) of a geometry
|
||||
\par Source descriptions:
|
||||
- OGC: Envelope (): Geometry - The minimum bounding rectangle (MBR) for this
|
||||
Geometry,
|
||||
returned as a Geometry. The polygon is defined by the corner points of the
|
||||
bounding box
|
||||
[(MINX, MINY), (MAXX, MINY), (MAXX, MAXY), (MINX, MAXY), (MINX, MINY)].
|
||||
|
||||
\note Implemented in the Generic Geometry Library: The minimum bounding box,
|
||||
always as a box, having min <= max
|
||||
|
||||
The envelope algorithm calculates the bounding box, or envelope, of a geometry.
|
||||
There are two versions:
|
||||
- envelope, taking a reference to a box as second parameter
|
||||
- make_envelope, returning a newly constructed box (type as a template parameter
|
||||
in the function call)
|
||||
|
||||
\par Geometries:
|
||||
- \b point: a box with zero area, the maximum and the minimum point of the box are
|
||||
set to the point itself.
|
||||
- \b linestring, \b ring or \b range is the smallest box that contains all points of the
|
||||
specified point sequence.
|
||||
If the linestring is empty, the envelope is the inverse infinite box, that is,
|
||||
the minimum point is very large (max infinite) and the maximum point is
|
||||
very small (min infinite).
|
||||
- \b polygon, the envelope of the outer ring
|
||||
\image html envelope_polygon.png
|
||||
|
||||
\par Example:
|
||||
Example showing envelope calculation
|
||||
\dontinclude doxygen_1.cpp
|
||||
\skip example_envelope_linestring
|
||||
\line {
|
||||
\until }
|
||||
*/
|
||||
|
16
doc/doxygen_input/groups/equals.hpp
Normal file
16
doc/doxygen_input/groups/equals.hpp
Normal file
@ -0,0 +1,16 @@
|
||||
/*!
|
||||
\defgroup equals equals: detect if two geometries are spatially equal
|
||||
\details Equals returns true if geometries are spatially equal. Spatially equal
|
||||
means including the same point-set. A linestring can be spatially equal to
|
||||
another linestring, even if both do not have the same amount of points.
|
||||
A polygon can be spatially equal to a multi-polygon (which then has
|
||||
only one element).
|
||||
|
||||
\par Geometries:
|
||||
- \b point + \b point
|
||||
- \b box + \b box
|
||||
|
||||
\note There is a functor \ref compare "compare" as well, which can be used
|
||||
for std:: library compatibility.
|
||||
|
||||
*/
|
7
doc/doxygen_input/groups/for_each.hpp
Normal file
7
doc/doxygen_input/groups/for_each.hpp
Normal file
@ -0,0 +1,7 @@
|
||||
/*!
|
||||
\defgroup for_each for_each: apply a functor to each point or segment of a geometry
|
||||
\details There are two algorithms provided which walk through the points or segments
|
||||
of linestrings and polygons. They are called for_each_point, for_each_segment,
|
||||
after the standard library
|
||||
\note For both for_each algorithms there is a \b const and a non-const version provided.
|
||||
*/
|
9
doc/doxygen_input/groups/geometries.hpp
Normal file
9
doc/doxygen_input/groups/geometries.hpp
Normal file
@ -0,0 +1,9 @@
|
||||
/*!
|
||||
\defgroup geometries geometries: geometries provided by default
|
||||
\details The GGL can be used with the geometry classes provided by the library,
|
||||
and with custom geometries registered by traits classes or registration
|
||||
macros.
|
||||
|
||||
This documentation page refers to the geometry classes provided by the library.
|
||||
|
||||
*/
|
53
doc/doxygen_input/groups/intersection.hpp
Normal file
53
doc/doxygen_input/groups/intersection.hpp
Normal file
@ -0,0 +1,53 @@
|
||||
/*!
|
||||
\defgroup intersection intersection: calculate new geometry
|
||||
containing geometries A and B
|
||||
\details The intersection of two geometries A and B is the geometry containing
|
||||
all points of A also belonging to B, but no other elements. The so-called
|
||||
clip is an intersection of a geometry with a box.
|
||||
\par Source description:
|
||||
- OGC: Returns a geometric object that represents the Point set intersection of
|
||||
this geometric object with another Geometry.
|
||||
\see http://en.wikipedia.org/wiki/Intersection_(set_theory)
|
||||
\note Any intersection can result in no geometry at all
|
||||
|
||||
\par Performance
|
||||
- 2776 counties of US are intersected with a 100-points ellipse in 1.1 seconds
|
||||
(http://trac.osgeo.org/ggl/wiki/Performance#Interesection)
|
||||
- 2776 counties of US are clipped in 0.2 seconds
|
||||
(http://trac.osgeo.org/ggl/wiki/Performance#Clip)
|
||||
|
||||
|
||||
\par Geometries:
|
||||
- \b polygon + \b box (clip) -> \b polygon(s)
|
||||
\image html svg_intersection_polygon_box.png
|
||||
\image html svg_intersection_countries.png
|
||||
- \b ring + \b box (clip) -> \b polygon(s)
|
||||
\image html svg_intersection_ring_box.png
|
||||
- \b ring + \b ring -> \b polygon(s)
|
||||
\image html svg_intersection_ring_ring.png
|
||||
- \b polygon + \b ring -> \b polygon(s)
|
||||
\image html svg_intersection_polygon_ring.png
|
||||
- combinations above -> \b ring(s).
|
||||
<i>If the output is an ouput iterator of rings, holes are omitted</i>
|
||||
- \b linestring + \b box (clip)
|
||||
\image html svg_intersection_roads.png
|
||||
|
||||
\par Example:
|
||||
Example showing clipping of linestring with box
|
||||
\dontinclude doxygen_1.cpp
|
||||
\skip example_clip_linestring1
|
||||
\line {
|
||||
\until }
|
||||
\par Example:
|
||||
Example showing clipping of vector, outputting vectors, with box
|
||||
\dontinclude doxygen_1.cpp
|
||||
\skip example_clip_linestring2
|
||||
\line {
|
||||
\until }
|
||||
\par Example:
|
||||
Example showing clipping of polygon with box
|
||||
\dontinclude doxygen_1.cpp
|
||||
\skip example_intersection_polygon1
|
||||
\line {
|
||||
\until }
|
||||
*/
|
18
doc/doxygen_input/groups/intersects.hpp
Normal file
18
doc/doxygen_input/groups/intersects.hpp
Normal file
@ -0,0 +1,18 @@
|
||||
/*!
|
||||
\defgroup intersects intersects: detect if a geometry self-intersects or if two geometries intersect
|
||||
\par Source descriptions:
|
||||
- OGC description: Returns 1 (TRUE) if this geometric object spatially
|
||||
intersects anotherGeometry.
|
||||
- OGC: a.Intersects(b) <=> ! a.Disjoint(b)
|
||||
\note There are two overloaded versions:
|
||||
- with one geometry, detecting self-intersections
|
||||
- with two geometries, deferring to disjoint, returning !disjoint
|
||||
|
||||
\par Geometries:
|
||||
- \b ring
|
||||
- \b polygon
|
||||
- for two geometries: same is disjoint
|
||||
|
||||
\note if one geometry is completely within another geometry, it "intersects"
|
||||
|
||||
*/
|
3
doc/doxygen_input/groups/iterators.hpp
Normal file
3
doc/doxygen_input/groups/iterators.hpp
Normal file
@ -0,0 +1,3 @@
|
||||
/*!
|
||||
\defgroup iterators iterators: iterators
|
||||
*/
|
14
doc/doxygen_input/groups/length.hpp
Normal file
14
doc/doxygen_input/groups/length.hpp
Normal file
@ -0,0 +1,14 @@
|
||||
/*!
|
||||
\defgroup length length: calculate length of a linear geometry
|
||||
The length algorithm is implemented for the linestring and the multi_linestring
|
||||
geometry and results in the length of the linestring. If the points of
|
||||
a linestring have coordinates expressed in kilometers,
|
||||
the length of the line is expressed in kilometers as well.
|
||||
\par Example:
|
||||
Example showing length calculation
|
||||
\dontinclude doxygen_1.cpp
|
||||
\skip example_length_linestring_iterators1
|
||||
\line {
|
||||
\until }
|
||||
*/
|
||||
|
7
doc/doxygen_input/groups/midpoints.hpp
Normal file
7
doc/doxygen_input/groups/midpoints.hpp
Normal file
@ -0,0 +1,7 @@
|
||||
/*!
|
||||
\defgroup midpoints midpoints calculation
|
||||
The midpoints algorithm calculate points IN BETWEEN of other points
|
||||
\par Purpose:
|
||||
- Remove corners in rectangular lines / polygons. Calling them several times will result in smooth lines
|
||||
- Creating 3D models
|
||||
*/
|
10
doc/doxygen_input/groups/overlaps.hpp
Normal file
10
doc/doxygen_input/groups/overlaps.hpp
Normal file
@ -0,0 +1,10 @@
|
||||
/*!
|
||||
\defgroup overlaps overlaps: detect overlap between two geometries
|
||||
\par Source descriptions:
|
||||
- Egenhofer: Two objects overlap if they have common interior faces and the bounding faces have common parts
|
||||
with the opposite interior faces.
|
||||
|
||||
\par Geometries:
|
||||
- \b box + \b box
|
||||
|
||||
*/
|
4
doc/doxygen_input/groups/parse.hpp
Normal file
4
doc/doxygen_input/groups/parse.hpp
Normal file
@ -0,0 +1,4 @@
|
||||
/*!
|
||||
\defgroup parse parse and assign string values
|
||||
*/
|
||||
|
8
doc/doxygen_input/groups/perimeter.hpp
Normal file
8
doc/doxygen_input/groups/perimeter.hpp
Normal file
@ -0,0 +1,8 @@
|
||||
/*!
|
||||
\defgroup perimeter perimeter: calculate perimeter of a geometry
|
||||
\par Geometries:
|
||||
- \b polygon
|
||||
- \b box
|
||||
- \b linear_ring
|
||||
- \b multi_polygon
|
||||
*/
|
5
doc/doxygen_input/groups/register.hpp
Normal file
5
doc/doxygen_input/groups/register.hpp
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
/*!
|
||||
\defgroup register register: Macros for registration
|
||||
\details Registration of custom geometry types.
|
||||
*/
|
12
doc/doxygen_input/groups/reverse.hpp
Normal file
12
doc/doxygen_input/groups/reverse.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
/*!
|
||||
\defgroup reverse reverse: reverse a geometry
|
||||
This is functionally equivalent to the std::reverse algorithm.
|
||||
For a linestring or a linear ring, it is exactly the same as calling the std::reverse algorithm.
|
||||
For a polygon or a multi-geometry, all its rings or elements are reversed.
|
||||
|
||||
No check on order is applied. So a clockwise polygon (having positive area)
|
||||
will be made counterclockwise (having negative area).
|
||||
|
||||
The first and last points are reversed as well, even if they are closed and the same.
|
||||
*/
|
||||
|
10
doc/doxygen_input/groups/sectionalize.hpp
Normal file
10
doc/doxygen_input/groups/sectionalize.hpp
Normal file
@ -0,0 +1,10 @@
|
||||
/*!
|
||||
\defgroup sectionalize sectionalize: split a geometry (polygon, linestring, etc)
|
||||
into monotonic sections
|
||||
|
||||
\par Geometries:
|
||||
- LINESTRING:
|
||||
- RING:
|
||||
- POLYGON:
|
||||
- BOX
|
||||
*/
|
12
doc/doxygen_input/groups/selected.hpp
Normal file
12
doc/doxygen_input/groups/selected.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
/*!
|
||||
\defgroup selected selection: check if a geometry is "selected" by a point
|
||||
|
||||
Checks if one geometry is selected by a point lying within or in the neighborhood of that geometry
|
||||
|
||||
\par Geometries:
|
||||
- POINT: checks if points are CLOSE TO each other (< search_radius)
|
||||
- LINESTRING: checks if selection point is CLOSE TO linestring (< search_radius)
|
||||
- RING: checks if selection point is INSIDE the ring, search radius is ignored
|
||||
- POLYGON: checks if selection point is INSIDE the polygon, but not inside any of its holes
|
||||
|
||||
*/
|
36
doc/doxygen_input/groups/simplify.hpp
Normal file
36
doc/doxygen_input/groups/simplify.hpp
Normal file
@ -0,0 +1,36 @@
|
||||
/*!
|
||||
\defgroup simplify simplify: remove points from a geometry, keeping shape (simplification or generalization)
|
||||
\par Source description:
|
||||
- Wikipedia: given a 'curve' composed of line segments to find a curve
|
||||
not too dissimilar but that has fewer points
|
||||
|
||||
\see http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm
|
||||
|
||||
\par Performance
|
||||
- Performance is measured on simplification of a collection of rings,
|
||||
such that 10% of the points is kept.
|
||||
- 2776 counties of US are simplified in 0.7 seconds
|
||||
(http://trac.osgeo.org/ggl/wiki/Performance#Simplify1)
|
||||
|
||||
\par Geometries
|
||||
- \b linestring:
|
||||
\image html svg_simplify_road.png
|
||||
This US Road originally contained 34 points, the simplified version contains 7 points
|
||||
|
||||
- \b polygon:
|
||||
\image html svg_simplify_country.png
|
||||
This country (Belgium) originally contained 55 points, the simplified version contains 24 points
|
||||
|
||||
\note simplifying a valid simple polygon (which never intersects itself)
|
||||
might result in an invalid polygon, where the simplified rings intersect
|
||||
themselves or one of the other outer or inner rings.
|
||||
Efficient simplification of a ring/polygon is still an "Open Problem"
|
||||
(http://maven.smith.edu/~orourke/TOPP/P24.html#Problem.24)
|
||||
|
||||
- \b multi_linestring
|
||||
- \b multi_polygon
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
3
doc/doxygen_input/groups/svg.hpp
Normal file
3
doc/doxygen_input/groups/svg.hpp
Normal file
@ -0,0 +1,3 @@
|
||||
/*!
|
||||
\defgroup svg x Extension svg: Stream SVG (Scalable Vector Graphics)
|
||||
*/
|
3
doc/doxygen_input/groups/sym_difference.hpp
Normal file
3
doc/doxygen_input/groups/sym_difference.hpp
Normal file
@ -0,0 +1,3 @@
|
||||
/*!
|
||||
\defgroup sym_difference sym_difference: sym_difference of two geometries
|
||||
*/
|
5
doc/doxygen_input/groups/traits.hpp
Normal file
5
doc/doxygen_input/groups/traits.hpp
Normal file
@ -0,0 +1,5 @@
|
||||
/*!
|
||||
\defgroup traits traits: adapt geometries
|
||||
\brief Traits classes are small classes or structs to adapt geometries
|
||||
such that they are recognized by the Generic Geometry Library
|
||||
*/
|
33
doc/doxygen_input/groups/transform.hpp
Normal file
33
doc/doxygen_input/groups/transform.hpp
Normal file
@ -0,0 +1,33 @@
|
||||
/*!
|
||||
\defgroup transform transform: apply transformations on geometries
|
||||
\brief Transforms from one geometry to another geometry, optionally using a strategy
|
||||
\details The transform algorithm automatically transforms from one coordinate system to another coordinate system.
|
||||
If the coordinate system of both geometries are the same, the geometry is copied. All point(s of the geometry)
|
||||
are transformed.
|
||||
|
||||
There is a version without a strategy, transforming automatically, and there is a version with a strategy.
|
||||
|
||||
This function has a lot of appliances, for example
|
||||
- transform from spherical coordinates to cartesian coordinates, and back
|
||||
- transform from geographic coordinates to cartesian coordinates (projections) and back
|
||||
- transform from degree to radian, and back
|
||||
- transform from and to cartesian coordinates (mapping, translations, etc)
|
||||
|
||||
The automatic transformations look to the coordinate system family, and dimensions, of the point type and by this
|
||||
apply the strategy (internally bounded by traits classes).
|
||||
|
||||
\par Examples:
|
||||
The example below shows automatic transformations to go from one coordinate system to another one:
|
||||
\dontinclude doxygen_2.cpp
|
||||
\skip example_for_transform()
|
||||
\skipline XYZ
|
||||
\until endl;
|
||||
|
||||
The next example takes another approach and transforms from Cartesian to Cartesian:
|
||||
\skipline XY
|
||||
\until endl;
|
||||
|
||||
\note Not every possibility is yet worked out, e.g. polar coordinate system is ignored until now
|
||||
\note This "transform" is broader then geodetic datum transformations, those are currently not worked out
|
||||
|
||||
*/
|
24
doc/doxygen_input/groups/union.hpp
Normal file
24
doc/doxygen_input/groups/union.hpp
Normal file
@ -0,0 +1,24 @@
|
||||
|
||||
/*!
|
||||
\defgroup union union: calculate new geometry containing geometries A or B
|
||||
\details The union of two geometries A and B is the geometry containing
|
||||
all points belong to either of A or B, but no other elements.
|
||||
\par Source description:
|
||||
- OGC: Returns a geometric object that represents the Point set union of
|
||||
this geometric object with another Geometry.
|
||||
\see http://en.wikipedia.org/wiki/Union_(set_theory)
|
||||
\note A union of two rings can result in a polygon having a hole
|
||||
|
||||
\par Geometries:
|
||||
- \b polygon + \b box -> \b polygon(s)
|
||||
\image html svg_union_polygon_box.png
|
||||
- \b ring + \b box -> \b polygon(s)
|
||||
\image html svg_union_ring_box.png
|
||||
- \b ring + \b ring -> \b polygon(s)
|
||||
\image html svg_union_ring_ring.png
|
||||
- \b polygon + \b ring -> \b polygon(s)
|
||||
\image html svg_union_polygon_ring.png
|
||||
- combinations above -> \b ring(s).
|
||||
<i>If the output is an ouput iterator of rings, holes are omitted</i>
|
||||
|
||||
*/
|
6
doc/doxygen_input/groups/unique.hpp
Normal file
6
doc/doxygen_input/groups/unique.hpp
Normal file
@ -0,0 +1,6 @@
|
||||
/*!
|
||||
\defgroup unique unique: make a geometry unique w.r.t. points,
|
||||
so no duplicate consecutive points
|
||||
|
||||
*/
|
||||
|
15
doc/doxygen_input/groups/utility.hpp
Normal file
15
doc/doxygen_input/groups/utility.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
/*!
|
||||
\defgroup utility utility: utility meta-functions and functions
|
||||
\details The utilities, mostly in folder util, contain several headerfiles
|
||||
not fitting in one of the other folders.
|
||||
|
||||
The following meta-functions are general and do not relate to GGL:
|
||||
- add_const_if_c
|
||||
- range_iterator_const_if_c
|
||||
- select_most_precise
|
||||
|
||||
They might fit into boost as a separate trait or utility, or there might
|
||||
be a Boost equivalent which is yet unnoticed by the authors.
|
||||
|
||||
|
||||
*/
|
4
doc/doxygen_input/groups/veshape.hpp
Normal file
4
doc/doxygen_input/groups/veshape.hpp
Normal file
@ -0,0 +1,4 @@
|
||||
/*!
|
||||
\defgroup veshape veshape: stream VEShape (Virtual Earth shapes for in VE Ajax Control)
|
||||
\note VE assumes points in LatLong, Lat first
|
||||
*/
|
33
doc/doxygen_input/groups/within.hpp
Normal file
33
doc/doxygen_input/groups/within.hpp
Normal file
@ -0,0 +1,33 @@
|
||||
/*!
|
||||
\defgroup within within: detect if a geometry is inside another geometry, a.o. point-in-polygon
|
||||
|
||||
\par Source descriptions:
|
||||
- OGC: Returns 1 (TRUE) if this geometric object is "spatially within"
|
||||
another Geometry.
|
||||
|
||||
\par Performance
|
||||
- 2776 within determinations using bounding box and polygon are done
|
||||
in 0.05 seconds (http://trac.osgeo.org/ggl/wiki/Performance#Within1)
|
||||
- note that using another strategy the performance can be increased:
|
||||
- winding : 0.093 s
|
||||
- franklin : 0.062 s
|
||||
- Crossings-multiply : 0.047 s
|
||||
- but note also that the last two do not detect point-on-border cases
|
||||
|
||||
\par Geometries:
|
||||
- \b point + \b polygon: The well-known point-in-polygon, returning true if
|
||||
a point falls within a polygon (and not
|
||||
within one of its holes) \image html within_polygon.png
|
||||
- \b point + \b ring: returns true if point is completely within
|
||||
a ring \image html within_ring.png
|
||||
- \b point + \b box
|
||||
- \b box + \b box
|
||||
|
||||
\par Example:
|
||||
The within algorithm is used as following:
|
||||
\dontinclude doxygen_1.cpp
|
||||
\skip example_within
|
||||
\line {
|
||||
\until }
|
||||
|
||||
*/
|
7
doc/doxygen_input/groups/wkt.hpp
Normal file
7
doc/doxygen_input/groups/wkt.hpp
Normal file
@ -0,0 +1,7 @@
|
||||
/*!
|
||||
\defgroup wkt wkt: parse and stream WKT (Well-Known Text)
|
||||
The wkt classes stream the specified geometry as \ref OGC Well Known Text (\ref WKT). It is defined for OGC geometries.
|
||||
It is therefore not defined for all geometries (e.g. not for circle)
|
||||
\note The implementation is independant from point type, point_xy and point_ll are supported,
|
||||
as well as points with more than two coordinates.
|
||||
*/
|
@ -103,15 +103,18 @@ include polygon_example.cpp
|
||||
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
/*!
|
||||
\example 06_transformation_example.cpp
|
||||
\example 06_a_transformation_example.cpp
|
||||
This sample demonstrates the usage of transformations in the Generic Geometry Library.
|
||||
Behind the screens this is done using with the uBLAS matrix/vector library.
|
||||
|
||||
\example 06_b_transformation_example.cpp
|
||||
|
||||
*/
|
||||
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
|
||||
/*!
|
||||
\example 07_graph_route_example.cpp
|
||||
\example 07_a_graph_route_example.cpp
|
||||
The graph route example shows how GGL can be combined with Boost.Graph. The sample does the following things:
|
||||
- it reads roads (included in the distribution, stored on disk in the form of a text file containing geometries and names)
|
||||
- it reads cities
|
||||
@ -134,6 +137,8 @@ The SVG looks like:
|
||||
The output screen looks like:
|
||||
\image html 07_graph_route_example_text.png
|
||||
|
||||
\example 07_b_graph_route_example.cpp
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
//
|
||||
// Copyright Barend Gehrels 2007-2009, Geodan, Amsterdam, the Netherlands
|
||||
// Copyright Bruno Lalande 2008, 2009
|
||||
// Copyright Barend Gehrels 2007-2010, Geodan, Amsterdam, the Netherlands
|
||||
// Copyright Bruno Lalande 2008, 2010
|
||||
// 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)
|
||||
@ -15,9 +15,9 @@
|
||||
|
||||
\section header Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
<em>Copyright © 1995-2009 <b>Barend Gehrels</b>, Geodan, Amsterdam, the Netherlands.\n
|
||||
Copyright © 2008-2009 <b>Bruno Lalande</b>, Paris, France.\n
|
||||
Copyright © 2009 <b>Mateusz Loskot</b>, Cadcorp, London, UK.\n
|
||||
<em>Copyright © 1995-2010 <b>Barend Gehrels</b>, Geodan, Amsterdam, the Netherlands.\n
|
||||
Copyright © 2008-2010 <b>Bruno Lalande</b>, Paris, France.\n
|
||||
Copyright © 2010 <b>Mateusz Loskot</b>, Cadcorp, London, UK.\n
|
||||
Distributed under the Boost Software License, Version 1.0.\n
|
||||
(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
</em>
|
||||
|
250
doc/qbk/Doxyfile
250
doc/qbk/Doxyfile
@ -1,250 +0,0 @@
|
||||
# Doxyfile 1.5.5
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
PROJECT_NAME = "Boost.Geometry (aka GGL)"
|
||||
PROJECT_NUMBER =
|
||||
OUTPUT_DIRECTORY = ./doxygen_output
|
||||
CREATE_SUBDIRS = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ABBREVIATE_BRIEF =
|
||||
ALWAYS_DETAILED_SEC = YES
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = YES
|
||||
STRIP_FROM_PATH =
|
||||
STRIP_FROM_INC_PATH =
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
QT_AUTOBRIEF = NO
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
INHERIT_DOCS = YES
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
TAB_SIZE = 8
|
||||
ALIASES = qbk{2}="\xmlonly <qbk.\1>\2</qbk.\1> \endxmlonly"
|
||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
OPTIMIZE_FOR_FORTRAN = NO
|
||||
OPTIMIZE_OUTPUT_VHDL = NO
|
||||
BUILTIN_STL_SUPPORT = YES
|
||||
CPP_CLI_SUPPORT = NO
|
||||
SIP_SUPPORT = NO
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
SUBGROUPING = YES
|
||||
TYPEDEF_HIDES_STRUCT = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
EXTRACT_ALL = YES
|
||||
EXTRACT_PRIVATE = NO
|
||||
EXTRACT_STATIC = YES
|
||||
EXTRACT_LOCAL_CLASSES = NO
|
||||
EXTRACT_LOCAL_METHODS = NO
|
||||
EXTRACT_ANON_NSPACES = NO
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = NO
|
||||
CASE_SENSE_NAMES = NO
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
SHOW_INCLUDE_FILES = NO
|
||||
INLINE_INFO = NO
|
||||
SORT_MEMBER_DOCS = NO
|
||||
SORT_BRIEF_DOCS = YES
|
||||
SORT_GROUP_NAMES = YES
|
||||
SORT_BY_SCOPE_NAME = YES
|
||||
GENERATE_TODOLIST = NO
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = NO
|
||||
SHOW_DIRECTORIES = NO
|
||||
FILE_VERSION_FILTER =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = YES
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_NO_PARAMDOC = NO
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = ../../../../boost/geometry/geometries \
|
||||
../../../../boost/geometry/core \
|
||||
../../../../boost/geometry/algorithms \
|
||||
../../../../boost/geometry/strategies/cartesian
|
||||
INPUT_ENCODING = UTF-8
|
||||
FILE_PATTERNS = point.hpp area.hpp distance.hpp distance_pythagoras.hpp simplify1.hpp access.hpp
|
||||
RECURSIVE = NO
|
||||
EXCLUDE =
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS =
|
||||
EXCLUDE_SYMBOLS =
|
||||
EXAMPLE_PATH = ../doxygen_input/sourcecode
|
||||
EXAMPLE_PATTERNS =
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH = ../doxygen_input/images
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = NO
|
||||
INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = NO
|
||||
REFERENCES_RELATION = NO
|
||||
REFERENCES_LINK_SOURCE = NO
|
||||
USE_HTAGS = NO
|
||||
VERBATIM_HEADERS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
COLS_IN_ALPHA_INDEX = 3
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = html
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
HTML_STYLESHEET =
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
GENERATE_HTMLHELP = NO
|
||||
GENERATE_DOCSET = NO
|
||||
DOCSET_FEEDNAME = "Generated documentation, by Doxygen"
|
||||
DOCSET_BUNDLE_ID = org.doxygen.Project
|
||||
HTML_DYNAMIC_SECTIONS = NO
|
||||
CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
GENERATE_CHI = NO
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
DISABLE_INDEX = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
GENERATE_TREEVIEW = NO
|
||||
TREEVIEW_WIDTH = 250
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = NO
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4wide
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
PDF_HYPERLINKS = YES
|
||||
USE_PDFLATEX = YES
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = NO
|
||||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = NO
|
||||
RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_LINKS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = YES
|
||||
XML_OUTPUT = xml
|
||||
XML_SCHEMA =
|
||||
XML_DTD =
|
||||
XML_PROGRAMLISTING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = YES
|
||||
EXPAND_ONLY_PREDEF = YES
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED = BOOST_CONCEPT_REQUIRES(x)= \
|
||||
BOOST_CONCEPT_ASSERT(x) = \
|
||||
BOOST_STATIC_ASSERT(x) = \
|
||||
DOXYGEN_SHOULD_SKIP_THIS \
|
||||
DOXYGEN_NO_DISPATCH \
|
||||
DOXYGEN_NO_IMPL \
|
||||
DOXYGEN_NO_DETAIL \
|
||||
DOXYGEN_NO_CONCEPT_MEMBERS \
|
||||
DOXYGEN_NO_TRAITS_SPECIALIZATIONS \
|
||||
DOXYGEN_NO_STRATEGY_SPECIALIZATIONS \
|
||||
DOXYGEN_NO_SPECIALIZATIONS
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE =
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
PERL_PATH = /usr/bin/perl
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = NO
|
||||
MSCGEN_PATH =
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HAVE_DOT = NO
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = YES
|
||||
GROUP_GRAPHS = YES
|
||||
UML_LOOK = NO
|
||||
TEMPLATE_RELATIONS = NO
|
||||
INCLUDE_GRAPH = YES
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
CALL_GRAPH = NO
|
||||
CALLER_GRAPH = NO
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DIRECTORY_GRAPH = YES
|
||||
DOT_IMAGE_FORMAT = png
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
DOT_GRAPH_MAX_NODES = 50
|
||||
MAX_DOT_GRAPH_DEPTH = 0
|
||||
DOT_TRANSPARENT = YES
|
||||
DOT_MULTI_TARGETS = NO
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
SEARCHENGINE = NO
|
@ -17,8 +17,13 @@ import quickbook ;
|
||||
boostbook geometry
|
||||
: geometry.qbk
|
||||
: <dependency>Jamfile.v2
|
||||
: <xsl:param>boost.root=br_stub
|
||||
<xsl:param>callout.graphics.path=br_stub/doc/html/images/callouts/
|
||||
: <xsl:param>chunk.section.depth=4
|
||||
<xsl:param>chunk.first.sections=1
|
||||
<xsl:param>toc.section.depth=3
|
||||
<xsl:param>toc.max.depth=2
|
||||
<xsl:param>generate.section.toc.level=4
|
||||
<xsl:param>boost.root=../boostroot_stub
|
||||
<xsl:param>callout.graphics.path=../boostroot_stub/doc/html/images/callouts/
|
||||
;
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
===============================================================================/]
|
||||
|
||||
[library Boost.Geometry
|
||||
[library Geometry
|
||||
[quickbook 1.5]
|
||||
[version 1.0]
|
||||
[authors [Gehrels, Barend], [Lalande, Bruno], [Loskot, Mateusz]]
|
||||
@ -22,29 +22,22 @@
|
||||
[id geometry]
|
||||
]
|
||||
|
||||
EXPERIMENTAL!
|
||||
In progress
|
||||
|
||||
Link to [link geometry.reference.models.point_xy point XY]
|
||||
|
||||
|
||||
[import snippets/qbk_1.cpp]
|
||||
[import snippets/qbk_2.cpp]
|
||||
[import snippets/qbk_3.cpp]
|
||||
[import snippets/qbk_4.cpp]
|
||||
[import snippets/qbk_5.cpp]
|
||||
|
||||
[import ../../../../boost/geometry/geometries/point.hpp]
|
||||
[import ../doxygen_input/sourcecode/doxygen_1.cpp]
|
||||
|
||||
[section Introduction]
|
||||
This is the documentation of Boost Geometry.
|
||||
Documentation of Boost Geometry.
|
||||
[endsect]
|
||||
|
||||
[/xinclude ref.xml]
|
||||
|
||||
|
||||
[section Sample]
|
||||
[point]
|
||||
[endsect]
|
||||
|
||||
[def __geometry_concept__ Any geometry fulfilling the any Geometry concept]
|
||||
|
||||
|
||||
[section Reference]
|
||||
[include area.qbk]
|
||||
[include access.qbk]
|
||||
[include distance.qbk]
|
||||
[include simplify.qbk]
|
||||
[endsect]
|
||||
[include matrix.qbk]
|
||||
[include reference.qbk]
|
||||
|
||||
|
@ -14,20 +14,51 @@
|
||||
|
||||
@echo off
|
||||
|
||||
cd ..
|
||||
doxygen
|
||||
cd qbk
|
||||
|
||||
set xml2qbk=..\..\..\..\other\programs\doxygen_xml2qbk\Release\doxygen_xml2qbk.exe
|
||||
%xml2qbk% doxygen_output\xml\group__area.xml > area.qbk
|
||||
%xml2qbk% doxygen_output\xml\group__access.xml > access.qbk
|
||||
%xml2qbk% doxygen_output\xml\group__distance.xml > distance.qbk
|
||||
%xml2qbk% doxygen_output\xml\group__simplify.xml > simplify.qbk
|
||||
set out=..\doxygen_output\xml
|
||||
|
||||
set xslt=c:\software\xsltproc\xml\bin\xsltproc.exe
|
||||
:: Algorithms
|
||||
%xml2qbk% %out%\group__access.xml > reference\access.qbk
|
||||
%xml2qbk% %out%\group__area.xml > reference\area.qbk
|
||||
%xml2qbk% %out%\group__centroid.xml > reference\centroid.qbk
|
||||
%xml2qbk% %out%\group__combine.xml > reference\combine.qbk
|
||||
%xml2qbk% %out%\group__convert.xml > reference\convert.qbk
|
||||
%xml2qbk% %out%\group__convex__hull.xml > reference\convex_hull.qbk
|
||||
%xml2qbk% %out%\group__difference.xml > reference\difference.qbk
|
||||
%xml2qbk% %out%\group__disjoint.xml > reference\disjoint.qbk
|
||||
%xml2qbk% %out%\group__distance.xml > reference\distance.qbk
|
||||
%xml2qbk% %out%\group__envelope.xml > reference\envelope.qbk
|
||||
%xml2qbk% %out%\group__equals.xml > reference\equals.qbk
|
||||
%xml2qbk% %out%\group__for__each.xml > reference\for_each.qbk
|
||||
%xml2qbk% %out%\group__intersection.xml > reference\intersection.qbk
|
||||
%xml2qbk% %out%\group__intersects.xml > reference\intersects.qbk
|
||||
%xml2qbk% %out%\group__length.xml > reference\length.qbk
|
||||
%xml2qbk% %out%\group__overlaps.xml > reference\overlaps.qbk
|
||||
%xml2qbk% %out%\group__perimeter.xml > reference\perimeter.qbk
|
||||
%xml2qbk% %out%\group__reverse.xml > reference\reverse.qbk
|
||||
%xml2qbk% %out%\group__simplify.xml > reference\simplify.qbk
|
||||
%xml2qbk% %out%\group__sym__difference.xml > reference\sym_difference.qbk
|
||||
%xml2qbk% %out%\group__transform.xml > reference\transform.qbk
|
||||
%xml2qbk% %out%\group__union.xml > reference\union.qbk
|
||||
%xml2qbk% %out%\group__unique.xml > reference\unique.qbk
|
||||
%xml2qbk% %out%\group__within.xml > reference\within.qbk
|
||||
|
||||
|
||||
|
||||
%xml2qbk% %out%\classboost_1_1geometry_1_1point.xml > reference\point.qbk
|
||||
%xml2qbk% %out%\classboost_1_1geometry_1_1point__xy.xml > reference\point_xy.qbk
|
||||
|
||||
%xml2qbk% %out%\classboost_1_1geometry_1_1concept_1_1_point.xml > reference\concept_point.qbk
|
||||
|
||||
%xml2qbk% %out%\structboost_1_1geometry_1_1closing__iterator.xml > reference\closing_iterator.qbk
|
||||
|
||||
:: set xslt=c:\software\xsltproc\xml\bin\xsltproc.exe
|
||||
:: %xslt% reference.xsl doxygen_output\xml\classboost_1_1geometry_1_1point.xml > point.qbk
|
||||
:: %xslt% reference.xsl doxygen_output\xml\group__area.xml > area.qbk
|
||||
:: %xslt% reference.xsl doxygen_output\xml\area_8hpp.xml > area2.qbk
|
||||
|
||||
|
||||
bjam --toolset=msvc --without-python
|
||||
|
||||
bjam --toolset=msvc
|
||||
|
3
doc/qbk/matrix.qbk
Normal file
3
doc/qbk/matrix.qbk
Normal file
@ -0,0 +1,3 @@
|
||||
[section:matrix Reference matrix]
|
||||
[xinclude quickref.xml]
|
||||
[endsect]
|
276
doc/qbk/quickref.xml
Normal file
276
doc/qbk/quickref.xml
Normal file
@ -0,0 +1,276 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
||||
"boostroot_stub/dtd/boostbook.dtd">
|
||||
|
||||
|
||||
<!--
|
||||
Copyright (c) 2010 Mateusz Loskot (mateusz at loskot dot net)
|
||||
|
||||
Distributed under 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)
|
||||
-->
|
||||
|
||||
<informaltable frame="all">
|
||||
|
||||
<!-- ###### CONCEPTS ########################################################################### -->
|
||||
<tgroup cols="3">
|
||||
<colspec colname="a"/>
|
||||
<colspec colname="b"/>
|
||||
<colspec colname="c"/>
|
||||
<thead>
|
||||
<row>
|
||||
<entry valign="center" namest="a" nameend="c">
|
||||
<bridgehead renderas="sect2">Geometry Concepts</bridgehead>
|
||||
</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry valign="top">
|
||||
<bridgehead renderas="sect3">0-dimensional</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.concept__Point">concept::Point</link></member>
|
||||
<member><link linkend="geometry.reference.concept__ConstPoint">concept::ConstPoint</link></member>
|
||||
</simplelist>
|
||||
</entry>
|
||||
<entry valign="top">
|
||||
<bridgehead renderas="sect3">1-dimensional</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.concept__Segment">concept::Segment</link></member>
|
||||
<member><link linkend="geometry.reference.concept__ConstSegment">concept::ConstSegment</link></member>
|
||||
<member><link linkend="geometry.reference.concept__Linestring">concept::Linestring</link></member>
|
||||
<member><link linkend="geometry.reference.concept__ConstLinestring">concept::ConstLinestring</link></member>
|
||||
</simplelist>
|
||||
</entry>
|
||||
<entry valign="top">
|
||||
<bridgehead renderas="sect3">2-dimensional</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.concept__Box">concept::Box</link></member>
|
||||
<member><link linkend="geometry.reference.concept__ConstBox">concept::ConstBox</link></member>
|
||||
<member><link linkend="geometry.reference.concept__Ring">concept::Ring</link></member>
|
||||
<member><link linkend="geometry.reference.concept__ConstRing">concept::ConstRing</link></member>
|
||||
<member><link linkend="geometry.reference.concept__Polygon">concept::Polygon</link></member>
|
||||
<member><link linkend="geometry.reference.concept__ConstPolygon">concept::ConstPolygon</link></member>
|
||||
</simplelist>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry valign="center" namest="a" nameend="c">
|
||||
<bridgehead renderas="sect3">Functions</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.concept__check">concept::check</link></member>
|
||||
<member><link linkend="geometry.reference.concept__check_concepts_and_equal_dimensions">concept::check_concepts_and_equal_dimensions</link></member>
|
||||
</simplelist>
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
|
||||
<!-- ###### MODELS ############################################################################# -->
|
||||
<tgroup cols="3">
|
||||
<colspec colname="a"/>
|
||||
<colspec colname="b"/>
|
||||
<colspec colname="c"/>
|
||||
<thead>
|
||||
<row>
|
||||
<entry valign="center" namest="a" nameend="c">
|
||||
<bridgehead renderas="sect2">Geometry Models</bridgehead>
|
||||
</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry valign="top">
|
||||
<bridgehead renderas="sect3">0-dimensional</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.models.point">point</link></member>
|
||||
<member><link linkend="geometry.reference.models.point_xy">point_xy</link></member>
|
||||
<member><link linkend="geometry.reference.models.point_2d">point_2d</link></member>
|
||||
<member><link linkend="geometry.reference.models.point_3d">point_3d</link></member>
|
||||
</simplelist>
|
||||
</entry>
|
||||
<entry valign="top">
|
||||
<bridgehead renderas="sect3">1-dimensional</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.models.segment">segment</link></member>
|
||||
<member><link linkend="geometry.reference.models.segment_2d">segment_2d</link></member>
|
||||
<member><link linkend="geometry.reference.models.linestring">linestring</link></member>
|
||||
<member><link linkend="geometry.reference.models.linestring_2d">linestring_2d</link></member>
|
||||
<member><link linkend="geometry.reference.models.linestring_3d">linestring_3d</link></member>
|
||||
</simplelist>
|
||||
</entry>
|
||||
<entry valign="top">
|
||||
<bridgehead renderas="sect3">2-dimensional</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.models.box">box</link></member>
|
||||
<member><link linkend="geometry.reference.models.box_2d">box_2d</link></member>
|
||||
<member><link linkend="geometry.reference.models.box_3d">box_3d</link></member>
|
||||
<member><link linkend="geometry.reference.models.box">box</link></member>
|
||||
<member><link linkend="geometry.reference.models.linear_ring">linear_ring</link></member>
|
||||
<member><link linkend="geometry.reference.models.ring_2d">ring_2d</link></member>
|
||||
<member><link linkend="geometry.reference.models.ring_3d">ring_3d</link></member>
|
||||
<member><link linkend="geometry.reference.models.polygon">polygon</link></member>
|
||||
<member><link linkend="geometry.reference.models.polygon_2d">polygon_2d</link></member>
|
||||
<member><link linkend="geometry.reference.models.polygon_3d">polygon_3d</link></member>
|
||||
</simplelist>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry valign="top" namest="a" nameend="c">
|
||||
<bridgehead renderas="sect3">Functions</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
</simplelist>
|
||||
<bridgehead renderas="sect3">Macros</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.models.register.BOOST_GEOMETRY_REGISTER_POINT_2D_5">BOOST_GEOMETRY_REGISTER_POINT_2D</link></member>
|
||||
|
||||
</simplelist>
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
|
||||
|
||||
|
||||
<!-- ###### ALGORITHMS ######################################################################### -->
|
||||
<tgroup cols="3">
|
||||
<colspec colname="a"/>
|
||||
<colspec colname="b"/>
|
||||
<colspec colname="c"/>
|
||||
<thead>
|
||||
<row>
|
||||
<entry valign="center" namest="a" nameend="c">
|
||||
<bridgehead renderas="sect2">Algorithms</bridgehead>
|
||||
</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry valign="top">
|
||||
<bridgehead renderas="sect3">Geometry Constructors</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.algorithms.make">make</link></member>
|
||||
<member><link linkend="geometry.reference.algorithms.make_inverse">make_inverse</link></member>
|
||||
<member><link linkend="geometry.reference.algorithms.make_zero">make_zero</link></member>
|
||||
</simplelist>
|
||||
<bridgehead renderas="sect3">Predicates</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.algorithms.disjoint">disjoint</link></member>
|
||||
<member><link linkend="geometry.reference.algorithms.equals">equals</link></member>
|
||||
<member><link linkend="geometry.reference.algorithms.intersects">intersects</link></member>
|
||||
<member><link linkend="geometry.reference.algorithms.overlaps">overlaps</link></member>
|
||||
<member><link linkend="geometry.reference.algorithms.within">within</link></member>
|
||||
</simplelist>
|
||||
</entry>
|
||||
<entry valign="top">
|
||||
<bridgehead renderas="sect3">Append</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.algorithms.append">append</link></member>
|
||||
</simplelist>
|
||||
<bridgehead renderas="sect3">Area</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.algorithms.area">area</link></member>
|
||||
</simplelist>
|
||||
<bridgehead renderas="sect3">Assign</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.algorithms.assign">assign</link></member>
|
||||
<member><link linkend="geometry.reference.algorithms.assign_box_corners">assign_box_corners</link></member>
|
||||
<member><link linkend="geometry.reference.algorithms.assign_inverse">assign_inverse</link></member>
|
||||
<member><link linkend="geometry.reference.algorithms.assign_point_from_index">assign_point_from_index</link></member>
|
||||
<member><link linkend="geometry.reference.algorithms.assign_point_to_index">assign_point_to_index</link></member>
|
||||
<member><link linkend="geometry.reference.algorithms.assign_zero">assign_zero</link></member>
|
||||
</simplelist>
|
||||
</entry>
|
||||
<entry valign="top">
|
||||
<bridgehead renderas="sect3">Centroid</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.algorithms.centroid">centroid</link></member>
|
||||
<member><link linkend="geometry.reference.algorithms.make_centroid">make_centroid</link></member>
|
||||
</simplelist>
|
||||
<bridgehead renderas="sect3">Clear</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.algorithms.clear">clear</link></member>
|
||||
</simplelist>
|
||||
<bridgehead renderas="sect3">Combine</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.algorithms.combine">combine</link></member>
|
||||
</simplelist>
|
||||
<bridgehead renderas="sect3">Convert</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.algorithms.convert">convert</link></member>
|
||||
</simplelist>
|
||||
<bridgehead renderas="sect3">Convex Hull</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.algorithms.convex_hull">convex_hull</link></member>
|
||||
<member><link linkend="geometry.reference.algorithms.convex_hull_inserter">convex_hull_inserter</link></member>
|
||||
</simplelist>
|
||||
<bridgehead renderas="sect3">Correct</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.algorithms.correct">correct</link></member>
|
||||
</simplelist>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry valign="top">
|
||||
<bridgehead renderas="sect3">Distance</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.algorithms.distance">distance</link></member>
|
||||
</simplelist>
|
||||
<bridgehead renderas="sect3">Difference</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.algorithms.difference">difference</link></member>
|
||||
<member><link linkend="geometry.reference.algorithms.sym_difference">sym_difference</link></member>
|
||||
</simplelist>
|
||||
<bridgehead renderas="sect3">Dissolve</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.algorithms.dissolve">dissolve</link></member>
|
||||
</simplelist>
|
||||
<bridgehead renderas="sect3">Envelope</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.algorithms.envelope">envelope</link></member>
|
||||
<member><link linkend="geometry.reference.algorithms.make_envelope">make_envelope</link></member>
|
||||
</simplelist>
|
||||
<bridgehead renderas="sect3">Intersection</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.algorithms.intersection_inserter">intersection_inserter</link></member>
|
||||
</simplelist>
|
||||
</entry>
|
||||
<entry valign="top">
|
||||
<bridgehead renderas="sect3">Length</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.algorithms.length">length</link></member>
|
||||
</simplelist>
|
||||
<bridgehead renderas="sect3">Perimeter</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.algorithms.perimeter">perimeter</link></member>
|
||||
</simplelist>
|
||||
<bridgehead renderas="sect3">Reverse</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.algorithms.reverse">reverse</link></member>
|
||||
</simplelist>
|
||||
</entry>
|
||||
<entry valign="top">
|
||||
<bridgehead renderas="sect3">Simplify</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.algorithms.simplify">simplify</link></member>
|
||||
<member><link linkend="geometry.reference.algorithms.simplify_inserter">simplify_inserter</link></member>
|
||||
</simplelist>
|
||||
<bridgehead renderas="sect3">Transform</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.algorithms.transform">transform</link></member>
|
||||
</simplelist>
|
||||
<bridgehead renderas="sect3">Union</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.algorithms.union_inserter">union_inserter</link></member>
|
||||
</simplelist>
|
||||
<bridgehead renderas="sect3">Unique</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="geometry.reference.algorithms.unique">unique</link></member>
|
||||
</simplelist>
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
|
||||
|
||||
</informaltable>
|
133
doc/qbk/reference.qbk
Normal file
133
doc/qbk/reference.qbk
Normal file
@ -0,0 +1,133 @@
|
||||
[section:reference Reference]
|
||||
|
||||
|
||||
[section:algorithms Algorithms]
|
||||
|
||||
|
||||
[section:area area]
|
||||
[include reference/area.qbk]
|
||||
[endsect]
|
||||
|
||||
[section:centroid centroid]
|
||||
[include reference/centroid.qbk]
|
||||
[endsect]
|
||||
|
||||
[section:combine combine]
|
||||
[include reference/combine.qbk]
|
||||
[endsect]
|
||||
|
||||
[section:convert convert]
|
||||
[include reference/convert.qbk]
|
||||
[endsect]
|
||||
|
||||
[section:convex_hull convex_hull]
|
||||
[include reference/convex_hull.qbk]
|
||||
[endsect]
|
||||
|
||||
[section:difference difference]
|
||||
[include reference/difference.qbk]
|
||||
[endsect]
|
||||
|
||||
[section:disjoint disjoint]
|
||||
[include reference/disjoint.qbk]
|
||||
[endsect]
|
||||
|
||||
[section:distance distance]
|
||||
[include reference/distance.qbk]
|
||||
[endsect]
|
||||
|
||||
[section:envelope envelope]
|
||||
[include reference/envelope.qbk]
|
||||
[endsect]
|
||||
|
||||
[section:equals equals]
|
||||
[include reference/equals.qbk]
|
||||
[endsect]
|
||||
|
||||
[/ section:for_each for_each]
|
||||
[/ include reference/for_each.qbk]
|
||||
[/ endsect]
|
||||
|
||||
[section:intersection intersection]
|
||||
[include reference/intersection.qbk]
|
||||
[endsect]
|
||||
|
||||
[section:intersects intersects]
|
||||
[include reference/intersects.qbk]
|
||||
[endsect]
|
||||
|
||||
[section:length length]
|
||||
[include reference/length.qbk]
|
||||
[endsect]
|
||||
|
||||
[section:overlaps overlaps]
|
||||
[include reference/overlaps.qbk]
|
||||
[endsect]
|
||||
|
||||
[section:perimeter perimeter]
|
||||
[include reference/perimeter.qbk]
|
||||
[endsect]
|
||||
|
||||
[section:simplify simplify]
|
||||
[include reference/simplify.qbk]
|
||||
[endsect]
|
||||
|
||||
[section:sym_difference sym_difference]
|
||||
[include reference/sym_difference.qbk]
|
||||
[endsect]
|
||||
|
||||
[section:transform transform]
|
||||
[include reference/transform.qbk]
|
||||
[endsect]
|
||||
|
||||
|
||||
[section:union union]
|
||||
[include reference/union.qbk]
|
||||
[endsect]
|
||||
|
||||
[section:unique unique]
|
||||
[include reference/unique.qbk]
|
||||
[endsect]
|
||||
|
||||
[section:within within]
|
||||
[include reference/within.qbk]
|
||||
[endsect]
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[section:concepts Concepts]
|
||||
|
||||
[section:concept_point point]
|
||||
[include reference/concept_point.qbk]
|
||||
[endsect]
|
||||
|
||||
[endsect]
|
||||
|
||||
|
||||
[section:models Models]
|
||||
|
||||
[include reference/point.qbk]
|
||||
[include reference/point_xy.qbk]
|
||||
|
||||
[section:register register (adaptation)]
|
||||
[include reference/register.qbk]
|
||||
[endsect]
|
||||
|
||||
[endsect]
|
||||
|
||||
|
||||
[section:iterators Iterators]
|
||||
|
||||
[include reference/closing_iterator.qbk]
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
|
||||
[endsect]
|
869
doc/qbk/reference/access.qbk
Normal file
869
doc/qbk/reference/access.qbk
Normal file
@ -0,0 +1,869 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__access.xml]
|
||||
[section:append_4 append (4)]
|
||||
|
||||
Appends one or more points to a linestring, ring, polygon, multi.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry, typename RoP>
|
||||
void append (Geometry &geometry, RoP const &range_or_point, int ring_index=-1, int multi_index=0)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry &] [] [geometry] [a geometry ]]
|
||||
[[RoP const &] [] [range_or_point] [the point or range to add ]]
|
||||
[[int] [] [ring_index] [the index of the ring in case of a polygon: exterior ring (-1, the default) or interior ring index ]]
|
||||
[[int] [] [multi_index] [reserved for multi polygons ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/append.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:assign_2 assign (2)]
|
||||
|
||||
assign a range of points to a linestring, ring or polygon
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry, typename Range>
|
||||
void assign (Geometry &geometry, Range const &range)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry &] [] [geometry] []]
|
||||
[[Range const &] [] [range] []]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/assign.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:assign_5 assign (5)]
|
||||
|
||||
assign center + radius to a sphere [for extension]
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry, typename Type>
|
||||
void assign (Geometry &geometry, Type const &c1, Type const &c2, Type const &c3, Type const &c4)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry &] [] [geometry] []]
|
||||
[[Type const &] [] [c1] []]
|
||||
[[Type const &] [] [c2] []]
|
||||
[[Type const &] [] [c3] []]
|
||||
[[Type const &] [] [c4] []]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/assign.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:assign_4 assign (4)]
|
||||
|
||||
assign three values to a 3D point [or the center + radius to a circle]
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry, typename Type>
|
||||
void assign (Geometry &geometry, Type const &c1, Type const &c2, Type const &c3)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry &] [] [geometry] []]
|
||||
[[Type const &] [] [c1] []]
|
||||
[[Type const &] [] [c2] []]
|
||||
[[Type const &] [] [c3] []]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/assign.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:assign_3 assign (3)]
|
||||
|
||||
assign two values to a 2D point
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry, typename Type>
|
||||
void assign (Geometry &geometry, Type const &c1, Type const &c2)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry &] [] [geometry] []]
|
||||
[[Type const &] [] [c1] []]
|
||||
[[Type const &] [] [c2] []]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/assign.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:assign_box_corners_5 assign_box_corners (5)]
|
||||
|
||||
Assign the 4 points of a 2D box.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Box, typename Point>
|
||||
void assign_box_corners (Box const &box, Point &lower_left, Point &lower_right, Point &upper_left, Point &upper_right)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Box const &] [] [box] []]
|
||||
[[Point &] [] [lower_left] []]
|
||||
[[Point &] [] [lower_right] []]
|
||||
[[Point &] [] [upper_left] []]
|
||||
[[Point &] [] [upper_right] []]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/assign.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:assign_inverse_1 assign_inverse (1)]
|
||||
|
||||
assign to a box inverse infinite
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry>
|
||||
void assign_inverse (Geometry &geometry)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry &] [] [geometry] []]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
The assign_inverse function initialize a 2D or 3D box with large coordinates, the min corner is very large, the max corner is very small. This is a convenient starting point to collect the minimum bounding box of a geometry.
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/assign.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:assign_point_from_index_2 assign_point_from_index (2)]
|
||||
|
||||
Assign a point with a point of a box or segment.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<std::size_t Index, typename Point, typename Geometry>
|
||||
void assign_point_from_index (Geometry const &geometry, Point &point)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [] [geometry] []]
|
||||
[[Point &] [] [point] []]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/assign.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:assign_point_to_index_2 assign_point_to_index (2)]
|
||||
|
||||
Assign a box or segment with the value of a point.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<std::size_t Index, typename Geometry, typename Point>
|
||||
void assign_point_to_index (Point const &point, Geometry &geometry)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Point const &] [] [point] []]
|
||||
[[Geometry &] [] [geometry] []]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/assign.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:assign_zero_1 assign_zero (1)]
|
||||
|
||||
assign zero values to a box, point
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry>
|
||||
void assign_zero (Geometry &geometry)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry &] [the geometry type ] [geometry] []]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
The assign_zero function initializes a 2D or 3D point or box with coordinates of zero
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/assign.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:clear_1 clear (1)]
|
||||
|
||||
Clears a linestring, linear ring or polygon (exterior+interiors) or multi*.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry>
|
||||
void clear (Geometry &geometry)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry &] [] [geometry] []]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/clear.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:exterior_ring_1 exterior_ring (1)]
|
||||
|
||||
Function to get the exterior ring of a polygon (const version).
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Polygon>
|
||||
const ring_type<Polygon>::type& exterior_ring (Polygon const &polygon)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Polygon const &] [polygon type ] [polygon] [the polygon to get the exterior ring from ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
a const reference to the exterior ring
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/core/exterior_ring.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:exterior_ring_1 exterior_ring (1)]
|
||||
|
||||
Function to get the exterior_ring ring of a polygon.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Polygon, >
|
||||
ring_type<Polygon>::type& exterior_ring (Polygon &polygon)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Polygon &] [] [polygon] [the polygon to get the exterior ring from ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
a reference to the exterior ring
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/core/exterior_ring.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:get_1 get (1)]
|
||||
|
||||
get coordinate value of a Point ( / Sphere)
|
||||
|
||||
[heading Synopsis]
|
||||
``template<std::size_t Dimension, typename Geometry>
|
||||
coordinate_type<Geometry>::type get (Geometry const &geometry)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [geometry ] [geometry] [geometry to query coordinate value from ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
coordinate value
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/core/access.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:get_as_radian_1 get_as_radian (1)]
|
||||
|
||||
get coordinate value of a point, result is in Radian
|
||||
|
||||
[heading Synopsis]
|
||||
``template<std::size_t Dimension, typename Geometry>
|
||||
fp_coordinate_type<Geometry>::type get_as_radian (Geometry const &geometry)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [geometry ] [geometry] [geometry to get coordinate value from ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
coordinate value
|
||||
|
||||
[heading Description]
|
||||
Result is in Radian, even if source coordinate system is in Degrees
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/core/radian_access.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:interior_rings_1 interior_rings (1)]
|
||||
|
||||
Function to get the interior rings of a polygon (const version).
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Polygon, >
|
||||
const interior_type<Polygon>::type& interior_rings (Polygon const &polygon)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Polygon const &] [] [polygon] [the polygon to get the interior rings from ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
a const reference to the interior rings
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/core/interior_rings.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:interior_rings_1 interior_rings (1)]
|
||||
|
||||
Function to get the interior rings of a polygon (non const version).
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Polygon, >
|
||||
interior_type<Polygon>::type& interior_rings (Polygon &polygon)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Polygon &] [] [polygon] [the polygon to get the interior rings from ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
a reference to the interior rings
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/core/interior_rings.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:make_3 make (3)]
|
||||
|
||||
Make a geometry.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry, typename T>
|
||||
Geometry make (T const &c1, T const &c2, T const &c3)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[T const &] [] [c1] []]
|
||||
[[T const &] [] [c2] []]
|
||||
[[T const &] [] [c3] []]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
a 3D point
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/make.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:make_2 make (2)]
|
||||
|
||||
Make a geometry.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry, typename T, >
|
||||
Geometry make (T const &c1, T const &c2)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[T const &] [the coordinate type ] [c1] []]
|
||||
[[T const &] [the coordinate type ] [c2] []]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
the geometry
|
||||
|
||||
[heading Description]
|
||||
the Generic Geometry Library uses concepts for all its geometries. Therefore it does not rely on constructors. The "make" functions are object generators creating geometries. There are overloads with two, three, four or six values, which are implemented depending on the geometry specified.
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/make.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:make_inverse_0 make_inverse (0)]
|
||||
|
||||
Create a box with inverse infinite coordinates.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry>
|
||||
Geometry make_inverse ()``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
the box
|
||||
|
||||
[heading Description]
|
||||
The make_inverse function initialize a 2D or 3D box with large coordinates, the min corner is very large, the max corner is very small
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/make.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:make_zero_0 make_zero (0)]
|
||||
|
||||
Create a geometry with "zero" coordinates.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry>
|
||||
Geometry make_zero ()``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
the geometry
|
||||
|
||||
[heading Description]
|
||||
The make_zero function initializes a 2D or 3D point or box with coordinates of zero
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/make.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:num_geometries_1 num_geometries (1)]
|
||||
|
||||
Function to get the number of geometries of a composite geometry. For a single geometry it is always 0 (also for a polygon with holes).
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry>
|
||||
std::size_t num_geometries (Geometry const &geometry)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [geometry type ] [geometry] [the polygon or other geometry ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
the number of interior rings of the geometry
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/core/num_geometries.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:num_interior_rings_1 num_interior_rings (1)]
|
||||
|
||||
Function to get the number of interior rings of a polygon.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry>
|
||||
std::size_t num_interior_rings (Geometry const &geometry)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [geometry type ] [geometry] [the polygon or other geometry ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
the number of interior rings of the geometry
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/core/interior_rings.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:num_points_1 num_points (1)]
|
||||
|
||||
get number of points
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry>
|
||||
std::size_t num_points (Geometry const &geometry)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [geometry type ] [geometry] [the geometry to get number of points from ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
number of points
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/num_points.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:set_2 set (2)]
|
||||
|
||||
set coordinate value of a Point ( / Sphere)
|
||||
|
||||
[heading Synopsis]
|
||||
``template<std::size_t Dimension, typename Geometry>
|
||||
void set (Geometry &geometry, typename coordinate_type< Geometry >::type const &value)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry &] [geometry ] [geometry] [geometry to assign coordinate to ]]
|
||||
[[typename coordinate_type< Geometry >::type const &] [] [value] [coordinate value to assign ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/core/access.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:set_from_radian_2 set_from_radian (2)]
|
||||
|
||||
set coordinate value (in radian) to a point
|
||||
|
||||
[heading Synopsis]
|
||||
``template<std::size_t Dimension, typename Geometry>
|
||||
void set_from_radian (Geometry &geometry, typename fp_coordinate_type< Geometry >::type const &radians)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry &] [geometry ] [geometry] [geometry to assign coordinate to ]]
|
||||
[[typename fp_coordinate_type< Geometry >::type const &] [] [radians] [coordinate value to assign ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/core/radian_access.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
@ -1,38 +1,5 @@
|
||||
[section:area_1 area (1)]
|
||||
|
||||
Calculate area of a geometry.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry>
|
||||
area_result<Geometry>::type area (Geometry const &geometry)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [A type fulfilling any Geometry concept ] [geometry] [A model of Geometry ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
The calculated area
|
||||
|
||||
[heading Description]
|
||||
The function area returns the area of a polygon, ring, box using the default area-calculation strategy. Strategies are provided for cartesian and spherical coordinate systems The geometries should correct, polygons should be closed and according to the specified orientation (clockwise/counter clockwise)
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/area.hpp>`
|
||||
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__area.xml]
|
||||
[section:area_2 area (2)]
|
||||
|
||||
Calculate area of a geometry using a specified strategy.
|
||||
@ -45,7 +12,7 @@ Strategy::return_type area (Geometry const &geometry, Strategy const &strategy)`
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [A type fulfilling any Geometry concept ] [geometry] [A model of Geometry ]]
|
||||
[[Geometry const &] [Any geometry fulfilling the any Geometry concept ] [geometry] [A model of Geometry ]]
|
||||
[[Strategy const &] [A type fulfilling a AreaStrategy concept ] [strategy] [A strategy to calculate area. Especially for spherical and geographical area calculations there are various approaches. ]]
|
||||
]
|
||||
|
||||
@ -66,6 +33,43 @@ Or
|
||||
`#include <boost/geometry/algorithms/area.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:area_1 area (1)]
|
||||
|
||||
Calculate area of a geometry.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry>
|
||||
area_result<Geometry>::type area (Geometry const &geometry)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [Any geometry fulfilling the any Geometry concept ] [geometry] [A model of Geometry ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
The calculated area
|
||||
|
||||
[heading Description]
|
||||
The function area returns the area of a polygon, ring, box using the default area-calculation strategy. Strategies are provided for cartesian and spherical coordinate systems The geometries should correct, polygons should be closed and according to the specified orientation (clockwise/counter clockwise)
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/area.hpp>`
|
||||
|
||||
[heading Snippets]
|
||||
[area_polygon]
|
||||
[area_polygon_spherical]
|
||||
|
||||
|
||||
[endsect]
|
||||
|
136
doc/qbk/reference/centroid.qbk
Normal file
136
doc/qbk/reference/centroid.qbk
Normal file
@ -0,0 +1,136 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__centroid.xml]
|
||||
[section:centroid_2 centroid (2)]
|
||||
|
||||
Calculate centroid.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry, typename Point>
|
||||
void centroid (Geometry const &geometry, Point &c)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [] [geometry] [a geometry (e.g. closed ring or polygon) ]]
|
||||
[[Point &] [] [c] [reference to point which will contain the centroid ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/centroid.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:centroid_3 centroid (3)]
|
||||
|
||||
Calculate centroid using a specified strategy.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry, typename Point, typename Strategy>
|
||||
void centroid (Geometry const &geometry, Point &c, Strategy const &strategy)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [] [geometry] [the geometry to calculate centroid from ]]
|
||||
[[Point &] [] [c] [reference to point which will contain the centroid ]]
|
||||
[[Strategy const &] [] [strategy] [Calculation strategy for centroid ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/centroid.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:make_centroid_2 make_centroid (2)]
|
||||
|
||||
Calculate and return centroid, using a specified strategy.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Point, typename Geometry, typename Strategy>
|
||||
Point make_centroid (Geometry const &geometry, Strategy const &strategy)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [] [geometry] [the geometry to calculate centroid from ]]
|
||||
[[Strategy const &] [] [strategy] [Calculation strategy for centroid ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
the centroid
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/centroid.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:make_centroid_1 make_centroid (1)]
|
||||
|
||||
Calculate and return centroid.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Point, typename Geometry>
|
||||
Point make_centroid (Geometry const &geometry)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [] [geometry] [the geometry to calculate centroid from ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
the centroid
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/centroid.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
55
doc/qbk/reference/closing_iterator.qbk
Normal file
55
doc/qbk/reference/closing_iterator.qbk
Normal file
@ -0,0 +1,55 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\structboost_1_1geometry_1_1closing__iterator.xml]
|
||||
[section:closing_iterator closing_iterator]
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Range>
|
||||
class closing_iterator
|
||||
{
|
||||
// ...
|
||||
};
|
||||
``
|
||||
|
||||
[heading Template parameter(s)]
|
||||
[table
|
||||
[[Parameter] [Description]]
|
||||
[[typename Range] [range on which this class is based on]]
|
||||
]
|
||||
|
||||
[heading Constructor(s)]
|
||||
[table
|
||||
[[Function] [Description] [Parameters] ]
|
||||
[[``closing_iterator (Range &range)``
|
||||
|
||||
] [Constructor including the range it is based on. ] [[* Range &]: ['range]:
|
||||
|
||||
|
||||
|
||||
|
||||
]]
|
||||
[[``closing_iterator (Range &range, bool)``
|
||||
|
||||
] [Constructor to indicate the end of a range. ] [[* Range &]: ['range]:
|
||||
|
||||
[* bool]: [']:
|
||||
|
||||
|
||||
|
||||
|
||||
]]
|
||||
]
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/iterators/closing_iterator.hpp>`
|
||||
|
||||
[endsect]
|
||||
|
34
doc/qbk/reference/combine.qbk
Normal file
34
doc/qbk/reference/combine.qbk
Normal file
@ -0,0 +1,34 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__combine.xml]
|
||||
[section:combine_2 combine (2)]
|
||||
|
||||
Combines a box with another geometry (box, point).
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Box, typename Geometry>
|
||||
void combine (Box &box, Geometry const &geometry)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Box &] [type of the box ] [box] [box to combine another geometry with, might be changed ]]
|
||||
[[Geometry const &] [of second geometry, to be combined with the box ] [geometry] [other geometry ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/combine.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
32
doc/qbk/reference/concept_point.qbk
Normal file
32
doc/qbk/reference/concept_point.qbk
Normal file
@ -0,0 +1,32 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\classboost_1_1geometry_1_1concept_1_1_point.xml]
|
||||
[section:concept::Point concept::Point]
|
||||
|
||||
[heading Description]
|
||||
It uses the macro as following:
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry>
|
||||
class concept::Point
|
||||
{
|
||||
// ...
|
||||
};
|
||||
``
|
||||
|
||||
[heading Template parameter(s)]
|
||||
[table
|
||||
[[Parameter] [Description]]
|
||||
[[typename Geometry] []]
|
||||
]
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/geometries/concepts/point_concept.hpp>`
|
||||
|
||||
[endsect]
|
||||
|
34
doc/qbk/reference/convert.qbk
Normal file
34
doc/qbk/reference/convert.qbk
Normal file
@ -0,0 +1,34 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__convert.xml]
|
||||
[section:convert_2 convert (2)]
|
||||
|
||||
Converts one geometry to another geometry.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry1, typename Geometry2>
|
||||
void convert (Geometry1 const &geometry1, Geometry2 &geometry2)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry1 const &] [first geometry type ] [geometry1] [first geometry (source) ]]
|
||||
[[Geometry2 &] [second geometry type ] [geometry2] [second geometry (target) ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/convert.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
66
doc/qbk/reference/convex_hull.qbk
Normal file
66
doc/qbk/reference/convex_hull.qbk
Normal file
@ -0,0 +1,66 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__convex__hull.xml]
|
||||
[section:convex_hull_2 convex_hull (2)]
|
||||
|
||||
Calculate the convex hull of a geometry.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry1, typename Geometry2, >
|
||||
void convex_hull (Geometry1 const &geometry, Geometry2 &out)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry1 const &] [the input geometry type ] [geometry] [the geometry to calculate convex hull from ]]
|
||||
[[Geometry2 &] [] [out] [a geometry receiving points of the convex hull ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/convex_hull.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:convex_hull_inserter_2 convex_hull_inserter (2)]
|
||||
|
||||
Calculate the convex hull of a geometry, output-iterator version.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry, typename OutputIterator, >
|
||||
OutputIterator convex_hull_inserter (Geometry const &geometry, OutputIterator out)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [the input geometry type ] [geometry] [the geometry to calculate convex hull from ]]
|
||||
[[OutputIterator] [] [out] [an output iterator outputing points of the convex hull ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/convex_hull.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
35
doc/qbk/reference/difference.qbk
Normal file
35
doc/qbk/reference/difference.qbk
Normal file
@ -0,0 +1,35 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__difference.xml]
|
||||
[section:difference_3 difference (3)]
|
||||
|
||||
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry1, typename Geometry2, typename Collection>
|
||||
void difference (Geometry1 const &geometry1, Geometry2 geometry2, Collection &output_collection)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry1 const &] [first geometry type ] [geometry1] [first geometry ]]
|
||||
[[Geometry2] [second geometry type ] [geometry2] [second geometry ]]
|
||||
[[Collection &] [output collection, either a multi-geometry, or a std::vector<Geometry> / std::deque<Geometry> etc ] [output_collection] [the output collection ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/difference.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
37
doc/qbk/reference/disjoint.qbk
Normal file
37
doc/qbk/reference/disjoint.qbk
Normal file
@ -0,0 +1,37 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__disjoint.xml]
|
||||
[section:disjoint_2 disjoint (2)]
|
||||
|
||||
Calculate if two geometries are disjoint.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry1, typename Geometry2>
|
||||
bool disjoint (Geometry1 const &geometry1, Geometry2 const &geometry2)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry1 const &] [first geometry type ] [geometry1] [first geometry ]]
|
||||
[[Geometry2 const &] [second geometry type ] [geometry2] [second geometry ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
true if disjoint, else false
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/disjoint.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
@ -1,26 +1,27 @@
|
||||
[section:distance_3 distance (3)]
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__distance.xml]
|
||||
[section:comparable_distance_2 comparable_distance (2)]
|
||||
|
||||
Calculate distance between two geometries with a specified strategy.
|
||||
Calculate comparable distance measurement between two geometries.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry1, typename Geometry2, typename Strategy>
|
||||
strategy::distance::services::return_type<Strategy>::type distance (Geometry1 const &geometry1, Geometry2 const &geometry2, Strategy const &strategy)``
|
||||
``template<typename Geometry1, typename Geometry2, , >
|
||||
distance_result<Geometry1, Geometry2>::type comparable_distance (Geometry1 const &geometry1, Geometry2 const &geometry2)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry1 const &] [first geometry type ] [geometry1] [first geometry ]]
|
||||
[[Geometry2 const &] [second geometry type ] [geometry2] [second geometry ]]
|
||||
[[Strategy const &] [] [strategy] [strategy to calculate distance between two points ]]
|
||||
[[Geometry1 const &] [] [geometry1] [first geometry ]]
|
||||
[[Geometry2 const &] [] [geometry2] [second geometry ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
the distance
|
||||
the comparable distance
|
||||
|
||||
[heading Description]
|
||||
|
||||
The default strategy is used, belonging to the corresponding coordinate system of the geometries and the comparable strategy is used
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
@ -29,8 +30,7 @@ Either
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/distance.hpp>`
|
||||
|
||||
`#include <boost/geometry/algorithms/comparable_distance.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
@ -47,8 +47,8 @@ distance_result<Geometry1, Geometry2>::type distance (Geometry1 const &geometry1
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry1 const &] [] [geometry1] [first geometry ]]
|
||||
[[Geometry2 const &] [] [geometry2] [second geometry ]]
|
||||
[[Geometry1 const &] [first geometry type ] [geometry1] [first geometry ]]
|
||||
[[Geometry2 const &] [second geometry type ] [geometry2] [second geometry ]]
|
||||
]
|
||||
|
||||
|
||||
@ -68,6 +68,41 @@ Or
|
||||
`#include <boost/geometry/algorithms/distance.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:distance_3 distance (3)]
|
||||
|
||||
Calculate distance between two geometries with a specified strategy.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry1, typename Geometry2, typename Strategy>
|
||||
strategy::distance::services::return_type<Strategy>::type distance (Geometry1 const &geometry1, Geometry2 const &geometry2, Strategy const &strategy)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry1 const &] [first geometry type ] [geometry1] [first geometry ]]
|
||||
[[Geometry2 const &] [second geometry type ] [geometry2] [second geometry ]]
|
||||
[[Strategy const &] [point-point-distance strategy type ] [strategy] [strategy to calculate distance between two points ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
the distance
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/distance.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
65
doc/qbk/reference/envelope.qbk
Normal file
65
doc/qbk/reference/envelope.qbk
Normal file
@ -0,0 +1,65 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__envelope.xml]
|
||||
[section:envelope_2 envelope (2)]
|
||||
|
||||
Calculate envelope of a geometry.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry, typename Box>
|
||||
void envelope (Geometry const &geometry, Box &mbr)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [] [geometry] [the geometry ]]
|
||||
[[Box &] [] [mbr] [the box receiving the envelope ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/envelope.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:make_envelope_1 make_envelope (1)]
|
||||
|
||||
Calculate and return envelope of a geometry.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Box, typename Geometry>
|
||||
Box make_envelope (Geometry const &geometry)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [] [geometry] [the geometry ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/envelope.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
37
doc/qbk/reference/equals.qbk
Normal file
37
doc/qbk/reference/equals.qbk
Normal file
@ -0,0 +1,37 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__equals.xml]
|
||||
[section:equals_2 equals (2)]
|
||||
|
||||
Detect if two geometries are spatially equal.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry1, typename Geometry2>
|
||||
bool equals (Geometry1 const &geometry1, Geometry2 const &geometry2)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry1 const &] [first geometry type ] [geometry1] [first geometry ]]
|
||||
[[Geometry2 const &] [second geometry type ] [geometry2] [second geometry ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
true if geometries are spatially equal, else false
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/equals.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
130
doc/qbk/reference/for_each.qbk
Normal file
130
doc/qbk/reference/for_each.qbk
Normal file
@ -0,0 +1,130 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__for__each.xml]
|
||||
[section:for_each_point_2 for_each_point (2)]
|
||||
|
||||
Calls functor for geometry.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry, typename Functor>
|
||||
Functor for_each_point (Geometry &geometry, Functor f)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry &] [] [geometry] [geometry to loop through ]]
|
||||
[[Functor] [] [f] [functor to use]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
Calls the functor for the specified geometry
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/for_each.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:for_each_point_2 for_each_point (2)]
|
||||
|
||||
Calls functor for geometry.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry, typename Functor>
|
||||
Functor for_each_point (Geometry const &geometry, Functor f)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [] [geometry] [geometry to loop through ]]
|
||||
[[Functor] [] [f] [functor to use]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
Calls the functor the specified
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/for_each.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:for_each_segment_2 for_each_segment (2)]
|
||||
|
||||
Calls functor for segments on linestrings, rings, polygons, ...
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry, typename Functor>
|
||||
Functor for_each_segment (Geometry &geometry, Functor f)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry &] [] [geometry] [geometry to loop through ]]
|
||||
[[Functor] [] [f] [functor to use]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
Calls the functor all segments of the specified geometry
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/for_each.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:for_each_segment_2 for_each_segment (2)]
|
||||
|
||||
Calls functor for segments on linestrings, rings, polygons, ...
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry, typename Functor>
|
||||
Functor for_each_segment (Geometry const &geometry, Functor f)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [] [geometry] [geometry to loop through ]]
|
||||
[[Functor] [] [f] [functor to use]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
Calls the functor all
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/for_each.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
111
doc/qbk/reference/intersection.qbk
Normal file
111
doc/qbk/reference/intersection.qbk
Normal file
@ -0,0 +1,111 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__intersection.xml]
|
||||
[section:intersection_3 intersection (3)]
|
||||
|
||||
Intersects two geometries.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry1, typename Geometry2, typename Collection>
|
||||
void intersection (Geometry1 const &geometry1, Geometry2 const &geometry2, Collection &output_collection)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry1 const &] [first geometry type ] [geometry1] [first geometry ]]
|
||||
[[Geometry2 const &] [second geometry type ] [geometry2] [second geometry ]]
|
||||
[[Collection &] [collection of rings, polygons (e.g. a vector<polygon> or a ] [output_collection] [the collection ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
true if successful
|
||||
|
||||
[heading Description]
|
||||
The two input geometries are intersected and the resulting linestring(s), ring(s) or polygon(s) are added to the specified collection.
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/intersection.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:intersection_inserter_3 intersection_inserter (3)]
|
||||
|
||||
Intersects two geometries.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename GeometryOut, typename Geometry1, typename Geometry2, typename OutputIterator>
|
||||
OutputIterator intersection_inserter (Geometry1 const &geometry1, Geometry2 const &geometry2, OutputIterator out)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry1 const &] [first geometry type ] [geometry1] [first geometry ]]
|
||||
[[Geometry2 const &] [second geometry type ] [geometry2] [second geometry ]]
|
||||
[[OutputIterator] [output iterator ] [out] [the output iterator, outputting linestrings or polygons ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
the output iterator
|
||||
|
||||
[heading Description]
|
||||
The two input geometries are intersected and the resulting linestring(s), ring(s) or polygon(s) are sent to the specified output operator.
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/intersection.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:intersection_inserter_4 intersection_inserter (4)]
|
||||
|
||||
Intersects two geometries.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename GeometryOut, typename Geometry1, typename Geometry2, typename OutputIterator, typename Strategy>
|
||||
OutputIterator intersection_inserter (Geometry1 const &geometry1, Geometry2 const &geometry2, OutputIterator out, Strategy const &strategy)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry1 const &] [first geometry type ] [geometry1] [first geometry ]]
|
||||
[[Geometry2 const &] [second geometry type ] [geometry2] [second geometry ]]
|
||||
[[OutputIterator] [output iterator ] [out] [the output iterator, outputting linestrings or polygons ]]
|
||||
[[Strategy const &] [compound strategy for intersection ] [strategy] [the strategy ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
the output iterator
|
||||
|
||||
[heading Description]
|
||||
The two input geometries are intersected and the resulting linestring(s), ring(s) or polygon(s) are sent to the specified output operator.
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/intersection.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
71
doc/qbk/reference/intersects.qbk
Normal file
71
doc/qbk/reference/intersects.qbk
Normal file
@ -0,0 +1,71 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__intersects.xml]
|
||||
[section:intersects_2 intersects (2)]
|
||||
|
||||
Determine if there is at least one intersection.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry1, typename Geometry2>
|
||||
bool intersects (Geometry1 const &geometry1, Geometry2 const &geometry2)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry1 const &] [first geometry type ] [geometry1] [first geometry ]]
|
||||
[[Geometry2 const &] [second geometry type ] [geometry2] [second geometry ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
true if there are intersection(s), else false
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/intersects.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:intersects_1 intersects (1)]
|
||||
|
||||
Determine if there is at least one intersection (crossing or self-tangency).
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry>
|
||||
bool intersects (Geometry const &geometry)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [geometry type ] [geometry] [geometry ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
true if there are intersections, else false
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/intersects.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
71
doc/qbk/reference/length.qbk
Normal file
71
doc/qbk/reference/length.qbk
Normal file
@ -0,0 +1,71 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__length.xml]
|
||||
[section:length_2 length (2)]
|
||||
|
||||
Calculate length of a geometry.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry, typename Strategy>
|
||||
length_result<Geometry>::type length (Geometry const &geometry, Strategy const &strategy)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [] [geometry] [the geometry, being a ]]
|
||||
[[Strategy const &] [] [strategy] [strategy to be used for distance calculations. ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
the length
|
||||
|
||||
[heading Description]
|
||||
The function length returns the length of a geometry, using specified strategy
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/length.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:length_1 length (1)]
|
||||
|
||||
Calculate length of a geometry.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry>
|
||||
length_result<Geometry>::type length (Geometry const &geometry)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [] [geometry] [the geometry, being a ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
the length Example showing length calculation on a vector
|
||||
|
||||
[heading Description]
|
||||
The function length returns the length of a geometry, using the default distance-calculation-strategy
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/length.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
37
doc/qbk/reference/overlaps.qbk
Normal file
37
doc/qbk/reference/overlaps.qbk
Normal file
@ -0,0 +1,37 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__overlaps.xml]
|
||||
[section:overlaps_2 overlaps (2)]
|
||||
|
||||
Determines overlap between two geometries.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry1, typename Geometry2>
|
||||
bool overlaps (Geometry1 const &geometry1, Geometry2 const &geometry2)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry1 const &] [] [geometry1] []]
|
||||
[[Geometry2 const &] [] [geometry2] []]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
true if there is overlap
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/overlaps.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
71
doc/qbk/reference/perimeter.qbk
Normal file
71
doc/qbk/reference/perimeter.qbk
Normal file
@ -0,0 +1,71 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__perimeter.xml]
|
||||
[section:perimeter_2 perimeter (2)]
|
||||
|
||||
Calculate perimeter of a geometry.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry, typename Strategy>
|
||||
length_result<Geometry>::type perimeter (Geometry const &geometry, Strategy const &strategy)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [] [geometry] [the geometry, be it a geometry::ring, vector, iterator pair, or any other boost compatible range ]]
|
||||
[[Strategy const &] [] [strategy] [strategy to be used for distance calculations. ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
the perimeter
|
||||
|
||||
[heading Description]
|
||||
The function perimeter returns the perimeter of a geometry, using specified strategy
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/perimeter.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:perimeter_1 perimeter (1)]
|
||||
|
||||
Calculate perimeter of a geometry.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry>
|
||||
length_result<Geometry>::type perimeter (Geometry const &geometry)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [] [geometry] [the geometry, be it a geometry::ring, vector, iterator pair, or any other boost compatible range ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
the perimeter
|
||||
|
||||
[heading Description]
|
||||
The function perimeter returns the perimeter of a geometry, using the default distance-calculation-strategy
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/perimeter.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
84
doc/qbk/reference/point.qbk
Normal file
84
doc/qbk/reference/point.qbk
Normal file
@ -0,0 +1,84 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\classboost_1_1geometry_1_1point.xml]
|
||||
[section:point point]
|
||||
|
||||
[heading Description]
|
||||
Defines a neutral point class, fulfilling the Point Concept. Library users can use this point class, or use their own point classes. This point class is used in most of the samples and tests of Boost.Geometry This point class is used occasionally within the library, where a temporary point class is necessary.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename CoordinateType, std::size_t DimensionCount, typename CoordinateSystem>
|
||||
class point
|
||||
{
|
||||
// ...
|
||||
};
|
||||
``
|
||||
|
||||
[heading Template parameter(s)]
|
||||
[table
|
||||
[[Parameter] [Description]]
|
||||
[[typename CoordinateType] [Numerical type (int, double, ttmath, ...) ]]
|
||||
[[std::size_t DimensionCount] [number of coordinates, usually 2 or 3 ]]
|
||||
[[typename CoordinateSystem] [coordinate system, for example ]]
|
||||
]
|
||||
|
||||
[heading Constructor(s)]
|
||||
[table
|
||||
[[Function] [Description] [Parameters] ]
|
||||
[[``point ()``
|
||||
|
||||
] [Default constructor, no initialization. ] [
|
||||
|
||||
|
||||
]]
|
||||
[[``point (CoordinateType const &v0, CoordinateType const &v1=0, CoordinateType const &v2=0)``
|
||||
|
||||
] [Constructor to set one, two or three values. ] [[* CoordinateType const &]: ['v0]:
|
||||
|
||||
[* CoordinateType const &]: ['v1]:
|
||||
|
||||
[* CoordinateType const &]: ['v2]:
|
||||
|
||||
|
||||
|
||||
|
||||
]]
|
||||
]
|
||||
|
||||
[heading Member Function(s)]
|
||||
[table
|
||||
[[Function] [Description] [Parameters] [Returns] ]
|
||||
[[``template<std::size_t K>
|
||||
CoordinateType const & get () const ``
|
||||
|
||||
] [Get a coordinate. ] [
|
||||
|
||||
][
|
||||
the coordinate
|
||||
|
||||
|
||||
]]
|
||||
[[``template<std::size_t K>
|
||||
void set (CoordinateType const &value)``
|
||||
|
||||
] [Set a coordinate. ] [[* CoordinateType const &]: ['value]: value to set
|
||||
|
||||
|
||||
|
||||
|
||||
]]
|
||||
]
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/geometries/point.hpp>`
|
||||
|
||||
[heading Snippets]
|
||||
[point]
|
||||
|
||||
[endsect]
|
||||
|
87
doc/qbk/reference/point_xy.qbk
Normal file
87
doc/qbk/reference/point_xy.qbk
Normal file
@ -0,0 +1,87 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\classboost_1_1geometry_1_1point__xy.xml]
|
||||
[section:point_xy point_xy]
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename T, typename C>
|
||||
class point_xy
|
||||
{
|
||||
// ...
|
||||
};
|
||||
``
|
||||
|
||||
[heading Template parameter(s)]
|
||||
[table
|
||||
[[Parameter] [Description]]
|
||||
[[typename T] [numeric type, arguments can be, for example, double, float, int ]]
|
||||
[[typename C] []]
|
||||
]
|
||||
|
||||
[heading Constructor(s)]
|
||||
[table
|
||||
[[Function] [Description] [Parameters] ]
|
||||
[[``point_xy ()``
|
||||
|
||||
] [Default constructor, does not initialize anything. ] [
|
||||
|
||||
|
||||
]]
|
||||
[[``point_xy (T const &x, T const &y)``
|
||||
|
||||
] [Constructor with x/y values. ] [[* T const &]: ['x]:
|
||||
|
||||
[* T const &]: ['y]:
|
||||
|
||||
|
||||
|
||||
|
||||
]]
|
||||
]
|
||||
|
||||
[heading Member Function(s)]
|
||||
[table
|
||||
[[Function] [Description] [Parameters] [Returns] ]
|
||||
[[``T const & x () const ``
|
||||
|
||||
] [Get x-value. ] [
|
||||
|
||||
|
||||
]]
|
||||
[[``T const & y () const ``
|
||||
|
||||
] [Get y-value. ] [
|
||||
|
||||
|
||||
]]
|
||||
[[``void x (T const &v)``
|
||||
|
||||
] [Set x-value. ] [[* T const &]: ['v]:
|
||||
|
||||
|
||||
|
||||
|
||||
]]
|
||||
[[``void y (T const &v)``
|
||||
|
||||
] [Set y-value. ] [[* T const &]: ['v]:
|
||||
|
||||
|
||||
|
||||
|
||||
]]
|
||||
]
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/geometries/point_xy.hpp>`
|
||||
|
||||
[endsect]
|
||||
|
33
doc/qbk/reference/reverse.qbk
Normal file
33
doc/qbk/reference/reverse.qbk
Normal file
@ -0,0 +1,33 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__reverse.xml]
|
||||
[section:reverse_1 reverse (1)]
|
||||
|
||||
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry>
|
||||
void reverse (Geometry &geometry)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry &] [geometry type ] [geometry] [the geometry to make reverse ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/reverse.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
141
doc/qbk/reference/simplify.qbk
Normal file
141
doc/qbk/reference/simplify.qbk
Normal file
@ -0,0 +1,141 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__simplify.xml]
|
||||
[section:simplify_3 simplify (3)]
|
||||
|
||||
Simplify a geometry.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry, typename Distance>
|
||||
void simplify (Geometry const &geometry, Geometry &out, Distance const &max_distance)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [Any geometry fulfilling the any Geometry concept ] [geometry] [input geometry, to be simplified ]]
|
||||
[[Geometry &] [Any geometry fulfilling the any Geometry concept ] [out] [output geometry, simplified version of the input geometry ]]
|
||||
[[Distance const &] [Numerical type (int, double, ttmath, ...) ] [max_distance] [distance (in units of input coordinates) of a vertex to other segments to be removed]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/simplify.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:simplify_4 simplify (4)]
|
||||
|
||||
Simplify a geometry using a specified strategy.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry, typename Distance, typename Strategy>
|
||||
void simplify (Geometry const &geometry, Geometry &out, Distance const &max_distance, Strategy const &strategy)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Strategy const &] [A type fulfilling a SimplifyStrategy concept ] [strategy] [simplify strategy to be used for simplification, might include point-distance strategy]]
|
||||
[[Geometry const &] [Any geometry fulfilling the any Geometry concept ] [geometry] [input geometry, to be simplified ]]
|
||||
[[Geometry &] [Any geometry fulfilling the any Geometry concept ] [out] [output geometry, simplified version of the input geometry ]]
|
||||
[[Distance const &] [A numerical distance measure ] [max_distance] [distance (in units of input coordinates) of a vertex to other segments to be removed ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/simplify.hpp>`
|
||||
|
||||
[heading Image(s)]
|
||||
[$svg_simplify_country.png]
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:simplify_inserter_3 simplify_inserter (3)]
|
||||
|
||||
Simplify a geometry, using an output iterator.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry, typename OutputIterator, typename Distance>
|
||||
void simplify_inserter (Geometry const &geometry, OutputIterator out, Distance const &max_distance)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [Any geometry fulfilling the any Geometry concept ] [geometry] [input geometry, to be simplified ]]
|
||||
[[OutputIterator] [] [out] [output iterator, outputs all simplified points ]]
|
||||
[[Distance const &] [] [max_distance] [distance (in units of input coordinates) of a vertex to other segments to be removed]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/simplify.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:simplify_inserter_4 simplify_inserter (4)]
|
||||
|
||||
Simplify a geometry, using an output iterator and a specified strategy.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry, typename OutputIterator, typename Distance, typename Strategy>
|
||||
void simplify_inserter (Geometry const &geometry, OutputIterator out, Distance const &max_distance, Strategy const &strategy)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry const &] [Any geometry fulfilling the any Geometry concept ] [geometry] [input geometry, to be simplified ]]
|
||||
[[OutputIterator] [] [out] [output iterator, outputs all simplified points ]]
|
||||
[[Distance const &] [] [max_distance] [distance (in units of input coordinates) of a vertex to other segments to be removed ]]
|
||||
[[Strategy const &] [] [strategy] [simplify strategy to be used for simplification, might include point-distance strategy ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/simplify.hpp>`
|
||||
|
||||
[heading Snippets]
|
||||
[simplify_inserter]
|
||||
|
||||
|
||||
[endsect]
|
||||
|
35
doc/qbk/reference/sym_difference.qbk
Normal file
35
doc/qbk/reference/sym_difference.qbk
Normal file
@ -0,0 +1,35 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__sym__difference.xml]
|
||||
[section:sym_difference_3 sym_difference (3)]
|
||||
|
||||
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry1, typename Geometry2, typename Collection>
|
||||
void sym_difference (Geometry1 geometry1, Geometry2 geometry2, Collection &output_collection)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry1] [first geometry type ] [geometry1] [first geometry ]]
|
||||
[[Geometry2] [second geometry type ] [geometry2] [second geometry ]]
|
||||
[[Collection &] [output collection, either a multi-geometry, or a std::vector<Geometry> / std::deque<Geometry> etc ] [output_collection] [the output collection ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/sym_difference.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
70
doc/qbk/reference/transform.qbk
Normal file
70
doc/qbk/reference/transform.qbk
Normal file
@ -0,0 +1,70 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__transform.xml]
|
||||
[section:transform_2 transform (2)]
|
||||
|
||||
Transforms from one geometry to another geometry using a strategy.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry1, typename Geometry2>
|
||||
bool transform (Geometry1 const &geometry1, Geometry2 &geometry2)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry1 const &] [first geometry type ] [geometry1] [first geometry ]]
|
||||
[[Geometry2 &] [second geometry type ] [geometry2] [second geometry ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
true if the transformation could be done
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/transform.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:transform_3 transform (3)]
|
||||
|
||||
Transforms from one geometry to another geometry using a strategy.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry1, typename Geometry2, typename Strategy>
|
||||
bool transform (Geometry1 const &geometry1, Geometry2 &geometry2, Strategy const &strategy)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry1 const &] [first geometry type ] [geometry1] [first geometry ]]
|
||||
[[Geometry2 &] [second geometry type ] [geometry2] [second geometry ]]
|
||||
[[Strategy const &] [strategy ] [strategy] [the strategy to be used for transformation ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/transform.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
108
doc/qbk/reference/union.qbk
Normal file
108
doc/qbk/reference/union.qbk
Normal file
@ -0,0 +1,108 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__union.xml]
|
||||
[section:union__3 union_ (3)]
|
||||
|
||||
Combines two geometries which each other.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry1, typename Geometry2, typename Collection>
|
||||
void union_ (Geometry1 const &geometry1, Geometry2 const &geometry2, Collection &output_collection)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry1 const &] [first geometry type ] [geometry1] [first geometry ]]
|
||||
[[Geometry2 const &] [second geometry type ] [geometry2] [second geometry ]]
|
||||
[[Collection &] [output collection, either a multi-geometry, or a std::vector<Geometry> / std::deque<Geometry> etc ] [output_collection] [the output collection ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/union.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:union_inserter_3 union_inserter (3)]
|
||||
|
||||
Combines two geometries which each other.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename GeometryOut, typename Geometry1, typename Geometry2, typename OutputIterator>
|
||||
OutputIterator union_inserter (Geometry1 const &geometry1, Geometry2 const &geometry2, OutputIterator out)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry1 const &] [first geometry type ] [geometry1] [first geometry ]]
|
||||
[[Geometry2 const &] [second geometry type ] [geometry2] [second geometry ]]
|
||||
[[OutputIterator] [output iterator ] [out] [the output iterator, outputting polygons ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
the output iterator
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/union.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:union_inserter_4 union_inserter (4)]
|
||||
|
||||
Combines two geometries which each other.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename GeometryOut, typename Geometry1, typename Geometry2, typename OutputIterator, typename Strategy>
|
||||
OutputIterator union_inserter (Geometry1 const &geometry1, Geometry2 const &geometry2, OutputIterator out, Strategy const &strategy)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry1 const &] [first geometry type ] [geometry1] [first geometry ]]
|
||||
[[Geometry2 const &] [second geometry type ] [geometry2] [second geometry ]]
|
||||
[[OutputIterator] [output iterator ] [out] [the output iterator, outputting polygons ]]
|
||||
[[Strategy const &] [compound strategy for intersection ] [strategy] [the strategy ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
the output iterator
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/union.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
33
doc/qbk/reference/unique.qbk
Normal file
33
doc/qbk/reference/unique.qbk
Normal file
@ -0,0 +1,33 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__unique.xml]
|
||||
[section:unique_1 unique (1)]
|
||||
|
||||
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry>
|
||||
void unique (Geometry &geometry)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry &] [geometry type ] [geometry] [the geometry to make unique ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/unique.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
73
doc/qbk/reference/within.qbk
Normal file
73
doc/qbk/reference/within.qbk
Normal file
@ -0,0 +1,73 @@
|
||||
[/ Generated by doxygen_xml2qbk, don't change, it will be overwritten automatically]
|
||||
[/ Generated from ..\doxygen_output\xml\group__within.xml]
|
||||
[section:within_3 within (3)]
|
||||
|
||||
Within, examine if a geometry is within another geometry, using a specified strategy.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry1, typename Geometry2, typename Strategy>
|
||||
bool within (Geometry1 const &geometry1, Geometry2 const &geometry2, Strategy const &strategy)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry1 const &] [] [geometry1] [geometry which might be within the second geometry ]]
|
||||
[[Geometry2 const &] [] [geometry2] [geometry which might contain the first geometry ]]
|
||||
[[Strategy const &] [] [strategy] [strategy to be used ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
true if geometry1 is completely contained within geometry2, else false
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/within.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:within_2 within (2)]
|
||||
|
||||
Within, examine if a geometry is within another geometry.
|
||||
|
||||
[heading Synopsis]
|
||||
``template<typename Geometry1, typename Geometry2>
|
||||
bool within (Geometry1 const &geometry1, Geometry2 const &geometry2)``
|
||||
|
||||
[heading Parameters]
|
||||
|
||||
[table
|
||||
[[Type] [Concept] [Name] [Description] ]
|
||||
[[Geometry1 const &] [] [geometry1] [geometry which might be within the second geometry ]]
|
||||
[[Geometry2 const &] [] [geometry2] [geometry which might contain the first geometry ]]
|
||||
]
|
||||
|
||||
|
||||
[heading Returns]
|
||||
true if geometry1 is completely contained within geometry2, else false
|
||||
|
||||
[heading Description]
|
||||
|
||||
|
||||
[heading Header]
|
||||
Either
|
||||
|
||||
`#include <boost/geometry/geometry.hpp>`
|
||||
|
||||
Or
|
||||
|
||||
`#include <boost/geometry/algorithms/within.hpp>`
|
||||
|
||||
|
||||
[endsect]
|
||||
|
20
doc/qbk/snippets/boost.vsprops
Normal file
20
doc/qbk/snippets/boost.vsprops
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioPropertySheet
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="boost"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="$(BOOST_ROOT)"
|
||||
WarningLevel="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories="$(BOOST_ROOT)\lib"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="BOOST_ROOT"
|
||||
Value="C:\Program Files\boost\boost_1_39"
|
||||
/>
|
||||
</VisualStudioPropertySheet>
|
522
doc/qbk/snippets/qbk_1.cpp
Normal file
522
doc/qbk/snippets/qbk_1.cpp
Normal file
@ -0,0 +1,522 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
//
|
||||
// Copyright Barend Gehrels 2010, Geodan, Amsterdam, the Netherlands
|
||||
// Copyright Bruno Lalande 2008, 2009
|
||||
// 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 Examples, referred to from the sources
|
||||
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
// We deliberately mix float/double's here so turn off warning
|
||||
#pragma warning( disable : 4244 )
|
||||
#endif // defined(_MSC_VER)
|
||||
|
||||
#include <boost/geometry/geometry.hpp>
|
||||
#include <boost/geometry/geometries/register/point.hpp>
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/adapted/std_as_linestring.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/io/wkt/wkt.hpp>
|
||||
|
||||
|
||||
void example_point()
|
||||
{
|
||||
struct custom_cs {};
|
||||
|
||||
//[point
|
||||
//` Declaration and use of the basic Boost.Geometry point
|
||||
namespace bg = boost::geometry;
|
||||
bg::point<double, 2, bg::cs::cartesian> point1;
|
||||
bg::point<double, 3, bg::cs::cartesian> point2(1.0, 2.0, 3.0); /*< Construct, assigning three coordinates >*/
|
||||
bg::point<int, 4, custom_cs> point3;
|
||||
point1.set<0>(1.0); /*< Set a coordinate. [*Note]: prefer using `bg::set<0>(point1, 1.0);` >*/
|
||||
point1.set<1>(2.0);
|
||||
|
||||
double x = point1.get<0>(); /*< Get a coordinate. [*Note]: prefer using `x = bg::get<0>(point1);` >*/
|
||||
double y = point1.get<1>();
|
||||
//]
|
||||
}
|
||||
|
||||
//[boost_geometry_register_point_2d
|
||||
struct legacy_point /*< Somewhere, any legacy point struct is available >*/
|
||||
{
|
||||
double x, y;
|
||||
};
|
||||
|
||||
BOOST_GEOMETRY_REGISTER_POINT_2D(legacy_point, double, boost::geometry::cs::cartesian, x, y); /*< The magic: adapt it to Boost.Geometry Point Concept >*/
|
||||
|
||||
void foo1()
|
||||
{
|
||||
legacy_point p1, p2;
|
||||
|
||||
/*< Any Boost.Geometry function can be used. Here: assign and distance >*/
|
||||
namespace bg = boost::geometry;
|
||||
bg::assign(p1, 1, 1);
|
||||
bg::assign(p2, 2, 2);
|
||||
double d = bg::distance(p1, p2);
|
||||
}
|
||||
|
||||
//]
|
||||
|
||||
|
||||
// All functions below are referred to in the documentation of Boost.Geometry
|
||||
// Don't rename them.
|
||||
void example_area_polygon()
|
||||
{
|
||||
//[area_polygon
|
||||
//` Calculate the area of a polygon
|
||||
namespace bg = boost::geometry;
|
||||
bg::polygon<bg::point_xy<double> > poly; /*< Declare >*/
|
||||
bg::read_wkt("POLYGON((0 0,0 7,4 2,2 0,0 0))", poly); /*< Fill, in this case with WKT >*/
|
||||
double area = bg::area(poly); /*< Calculate area >*/
|
||||
//]
|
||||
}
|
||||
|
||||
void example_area_polygon_spherical()
|
||||
{
|
||||
//[area_polygon_spherical
|
||||
//` Calculate the area of a *spherical* polygon
|
||||
namespace bg = boost::geometry;
|
||||
bg::polygon<bg::point<float, 2, bg::cs::spherical<bg::degree> > > sph_poly;
|
||||
bg::read_wkt("POLYGON((0 0,0 45,45 0,0 0))", sph_poly);
|
||||
double area = bg::area(sph_poly);
|
||||
//]
|
||||
}
|
||||
|
||||
|
||||
|
||||
void example_as_wkt_point()
|
||||
{
|
||||
typedef boost::geometry::point_xy<double> P;
|
||||
P p(5.12, 6.34);
|
||||
// Points can be streamed like this:
|
||||
std::cout << boost::geometry::dsv<P>(p) << std::endl;
|
||||
|
||||
// or like this:
|
||||
std::cout << boost::geometry::dsv(p) << std::endl;
|
||||
|
||||
// or (with extension) like this:
|
||||
std::cout << boost::geometry::wkt(p) << std::endl;
|
||||
}
|
||||
|
||||
void example_as_wkt_vector()
|
||||
{
|
||||
std::vector<boost::geometry::point_xy<int> > v;
|
||||
boost::geometry::read_wkt<boost::geometry::point_xy<int> >("linestring(1 1,2 2,3 3,4 4)", std::back_inserter(v));
|
||||
|
||||
std::cout << boost::geometry::dsv(std::make_pair(v.begin(), v.end())) << std::endl;
|
||||
}
|
||||
|
||||
|
||||
void example_centroid_polygon()
|
||||
{
|
||||
boost::geometry::polygon<boost::geometry::point_xy<double> > poly;
|
||||
boost::geometry::read_wkt("POLYGON((0 0,0 7,4 2,2 0,0 0))", poly);
|
||||
// Center of polygon might have different type than points of polygon
|
||||
boost::geometry::point_xy<float> center;
|
||||
boost::geometry::centroid(poly, center);
|
||||
std::cout << "Centroid: " << boost::geometry::dsv(center) << std::endl;
|
||||
}
|
||||
|
||||
|
||||
void example_distance_point_point()
|
||||
{
|
||||
boost::geometry::point_xy<double> p1(1, 1);
|
||||
boost::geometry::point_xy<double> p2(2, 3);
|
||||
std::cout << "Distance p1-p2 is "
|
||||
<< boost::geometry::distance(p1, p2)
|
||||
<< " units" << std::endl;
|
||||
|
||||
/*
|
||||
Extension, other coordinate system:
|
||||
// Read 2 Dutch cities from WKT texts (in decimal degrees)
|
||||
boost::geometry::point_ll<double, boost::geometry::cs::geographic<boost::geometry::degree> > a, r;
|
||||
boost::geometry::read_wkt("POINT(4.89222 52.3731)", a);
|
||||
boost::geometry::read_wkt("POINT(4.47917 51.9308)", r);
|
||||
|
||||
std::cout << "Distance Amsterdam-Rotterdam is "
|
||||
<< boost::geometry::distance(a, r) / 1000.0
|
||||
<< " kilometers " << std::endl;
|
||||
*/
|
||||
}
|
||||
|
||||
void example_distance_point_point_strategy()
|
||||
{
|
||||
/*
|
||||
Extension, other coordinate system:
|
||||
typedef boost::geometry::point_ll<double, boost::geometry::cs::geographic<boost::geometry::degree> > LL;
|
||||
LL a, r;
|
||||
boost::geometry::read_wkt("POINT(4.89222 52.3731)", a);
|
||||
boost::geometry::read_wkt("POINT(4.47917 51.9308)", r);
|
||||
|
||||
std::cout << "Distance Amsterdam-Rotterdam is "
|
||||
<< boost::geometry::distance(a, r,
|
||||
boost::geometry::strategy::distance::vincenty<LL>() )
|
||||
/ 1000.0
|
||||
<< " kilometers " << std::endl;
|
||||
*/
|
||||
}
|
||||
|
||||
void example_from_wkt_point()
|
||||
{
|
||||
boost::geometry::point_xy<int> point;
|
||||
boost::geometry::read_wkt("Point(1 2)", point);
|
||||
std::cout << point.x() << "," << point.y() << std::endl;
|
||||
}
|
||||
|
||||
void example_from_wkt_output_iterator()
|
||||
{
|
||||
std::vector<boost::geometry::point_xy<int> > v;
|
||||
boost::geometry::read_wkt<boost::geometry::point_xy<int> >("linestring(1 1,2 2,3 3,4 4)", std::back_inserter(v));
|
||||
std::cout << "vector has " << v.size() << " coordinates" << std::endl;
|
||||
}
|
||||
|
||||
void example_from_wkt_linestring()
|
||||
{
|
||||
boost::geometry::linestring<boost::geometry::point_xy<double> > line;
|
||||
boost::geometry::read_wkt("linestring(1 1,2 2,3 3,4 4)", line);
|
||||
std::cout << "linestring has " << line.size() << " coordinates" << std::endl;
|
||||
}
|
||||
|
||||
void example_from_wkt_polygon()
|
||||
{
|
||||
boost::geometry::polygon<boost::geometry::point_xy<double> > poly;
|
||||
boost::geometry::read_wkt("POLYGON((0 0,0 1,1 1,1 0,0 0))", poly);
|
||||
std::cout << "Polygon has " << poly.outer().size() << " coordinates in outer ring" << std::endl;
|
||||
}
|
||||
|
||||
void example_point_ll_convert()
|
||||
{
|
||||
/*
|
||||
Extension, other coordinate system:
|
||||
boost::geometry::point_ll<double, boost::geometry::cs::geographic<boost::geometry::degree> > deg(boost::geometry::latitude<>(33.0), boost::geometry::longitude<>(-118.0));
|
||||
boost::geometry::point_ll<double, boost::geometry::cs::geographic<boost::geometry::radian> > rad;
|
||||
boost::geometry::transform(deg, rad);
|
||||
|
||||
std::cout << "point in radians: " << rad << std::endl;
|
||||
*/
|
||||
}
|
||||
|
||||
void example_clip_linestring1()
|
||||
{
|
||||
typedef boost::geometry::point_xy<double> P;
|
||||
boost::geometry::linestring<P> line;
|
||||
boost::geometry::read_wkt("linestring(1.1 1.1, 2.5 2.1, 3.1 3.1, 4.9 1.1, 3.1 1.9)", line);
|
||||
boost::geometry::box<P> cb(P(1.5, 1.5), P(4.5, 2.5));
|
||||
std::cout << "Clipped linestring(s) " << std::endl;
|
||||
|
||||
std::vector<boost::geometry::linestring<P> > intersection;
|
||||
boost::geometry::intersection_inserter<boost::geometry::linestring<P> >(cb, line, std::back_inserter(intersection));
|
||||
}
|
||||
|
||||
void example_clip_linestring2()
|
||||
{
|
||||
typedef boost::geometry::point_xy<double> P;
|
||||
std::vector<P> vector_in;
|
||||
boost::geometry::read_wkt<P>("linestring(1.1 1.1, 2.5 2.1, 3.1 3.1, 4.9 1.1, 3.1 1.9)",
|
||||
std::back_inserter(vector_in));
|
||||
|
||||
boost::geometry::box<P> cb(P(1.5, 1.5), P(4.5, 2.5));
|
||||
typedef std::vector<std::vector<P> > VV;
|
||||
VV vector_out;
|
||||
boost::geometry::intersection_inserter<std::vector<P> >(cb, vector_in, std::back_inserter(vector_out));
|
||||
|
||||
std::cout << "Clipped vector(s) " << std::endl;
|
||||
for (VV::const_iterator it = vector_out.begin(); it != vector_out.end(); it++)
|
||||
{
|
||||
std::copy(it->begin(), it->end(), std::ostream_iterator<P>(std::cout, " "));
|
||||
std::cout << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void example_intersection_polygon1()
|
||||
{
|
||||
typedef boost::geometry::point_xy<double> P;
|
||||
typedef std::vector<boost::geometry::polygon<P> > PV;
|
||||
|
||||
boost::geometry::box<P> cb(P(1.5, 1.5), P(4.5, 2.5));
|
||||
boost::geometry::polygon<P> poly;
|
||||
boost::geometry::read_wkt("POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 3,5.3 2.6,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3)"
|
||||
",(4 2,4.2 1.4,4.8 1.9,4.4 2.2,4 2))", poly);
|
||||
|
||||
PV v;
|
||||
boost::geometry::intersection_inserter<boost::geometry::polygon<P> >(cb, poly, std::back_inserter(v));
|
||||
|
||||
std::cout << "Clipped polygon(s) " << std::endl;
|
||||
for (PV::const_iterator it = v.begin(); it != v.end(); it++)
|
||||
{
|
||||
std::cout << boost::geometry::dsv(*it) << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
void example_simplify_linestring1()
|
||||
{
|
||||
//[simplify
|
||||
//` Simplify a linestring
|
||||
boost::geometry::linestring<boost::geometry::point_xy<double> > line, simplified;
|
||||
boost::geometry::read_wkt("linestring(1.1 1.1, 2.5 2.1, 3.1 3.1, 4.9 1.1, 3.1 1.9)", line);
|
||||
boost::geometry::simplify(line, simplified, 0.5); /*< Simplify it, using distance of 0.5 units >*/
|
||||
std::cout
|
||||
<< " original line: " << boost::geometry::dsv(line) << std::endl
|
||||
<< "simplified line: " << boost::geometry::dsv(simplified) << std::endl;
|
||||
//]
|
||||
}
|
||||
|
||||
void example_simplify_linestring2()
|
||||
{
|
||||
//[simplify_inserter
|
||||
//` Simplify a linestring using an output iterator
|
||||
typedef boost::geometry::point_xy<double> P;
|
||||
typedef boost::geometry::linestring<P> L;
|
||||
L line;
|
||||
|
||||
boost::geometry::read_wkt("linestring(1.1 1.1, 2.5 2.1, 3.1 3.1, 4.9 1.1, 3.1 1.9)", line);
|
||||
|
||||
typedef boost::geometry::strategy::distance::projected_point<P, P> DS;
|
||||
typedef boost::geometry::strategy::simplify::douglas_peucker<P, DS> simplification;
|
||||
boost::geometry::simplify_inserter(line, std::ostream_iterator<P>(std::cout, "\n"), 0.5, simplification());
|
||||
//]
|
||||
}
|
||||
|
||||
|
||||
|
||||
void example_within()
|
||||
{
|
||||
boost::geometry::polygon<boost::geometry::point_xy<double> > poly;
|
||||
boost::geometry::read_wkt("POLYGON((0 0,0 7,4 2,2 0,0 0))", poly);
|
||||
boost::geometry::point_xy<float> point(3, 3);
|
||||
std::cout << "Point is "
|
||||
<< (boost::geometry::within(point, poly) ? "IN" : "NOT in")
|
||||
<< " polygon"
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
/*
|
||||
void example_within_strategy()
|
||||
{
|
||||
// TO BE UPDATED/FINISHED
|
||||
typedef boost::geometry::point_xy<double> P;
|
||||
typedef boost::geometry::polygon<P> POLY;
|
||||
P p;
|
||||
std::cout << within(p, poly, strategy::within::cross_count<P>) << std::endl;
|
||||
}
|
||||
*/
|
||||
|
||||
void example_length_linestring()
|
||||
{
|
||||
using namespace boost::geometry;
|
||||
linestring<point_xy<double> > line;
|
||||
read_wkt("linestring(0 0,1 1,4 8,3 2)", line);
|
||||
std::cout << "linestring length is "
|
||||
<< length(line)
|
||||
<< " units" << std::endl;
|
||||
|
||||
/*
|
||||
Extension, other coordinate system:
|
||||
// Linestring in latlong, filled with
|
||||
// explicit degree-minute-second values
|
||||
typedef point_ll<float, boost::geometry::cs::geographic<boost::geometry::degree> > LL;
|
||||
linestring<LL> line_ll;
|
||||
line_ll.push_back(LL(
|
||||
latitude<float>(dms<north, float>(52, 22, 23)),
|
||||
longitude<float>(dms<east, float>(4, 53, 32))));
|
||||
line_ll.push_back(LL(
|
||||
latitude<float>(dms<north, float>(51, 55, 51)),
|
||||
longitude<float>(dms<east, float>(4, 28, 45))));
|
||||
line_ll.push_back(LL(
|
||||
latitude<float>(dms<north, float>(52, 4, 48)),
|
||||
longitude<float>(dms<east, float>(4, 18, 0))));
|
||||
std::cout << "linestring length is "
|
||||
<< length(line_ll) / 1000
|
||||
<< " kilometers " << std::endl;
|
||||
*/
|
||||
}
|
||||
|
||||
void example_length_linestring_iterators1()
|
||||
{
|
||||
boost::geometry::linestring<boost::geometry::point_xy<double> > line;
|
||||
boost::geometry::read_wkt("linestring(0 0,1 1,4 8,3 2)", line);
|
||||
std::cout << "linestring length is "
|
||||
<< boost::geometry::length(line)
|
||||
<< " units" << std::endl;
|
||||
}
|
||||
|
||||
void example_length_linestring_iterators2()
|
||||
{
|
||||
std::vector<boost::geometry::point_xy<double> > line;
|
||||
boost::geometry::read_wkt<boost::geometry::point_xy<double> >("linestring(0 0,1 1,4 8,3 2)", std::back_inserter(line));
|
||||
std::cout << "linestring length is "
|
||||
<< boost::geometry::length(line)
|
||||
<< " units" << std::endl;
|
||||
}
|
||||
|
||||
void example_length_linestring_iterators3()
|
||||
{
|
||||
/*
|
||||
Extension, other coordinate system:
|
||||
using namespace boost::geometry;
|
||||
typedef point_ll<float, boost::geometry::cs::geographic<boost::geometry::degree> > LL;
|
||||
std::deque<LL> line;
|
||||
boost::geometry::read_wkt<LL>("linestring(0 51,1 51,2 52)", std::back_inserter(line));
|
||||
std::cout << "linestring length is "
|
||||
<< 0.001 * boost::geometry::length(line, boost::geometry::strategy::distance::vincenty<LL>())
|
||||
<< " kilometers" << std::endl;
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
void example_length_linestring_strategy()
|
||||
{
|
||||
/*
|
||||
Extension, other coordinate system:
|
||||
using namespace boost::geometry;
|
||||
typedef point_ll<float, boost::geometry::cs::geographic<boost::geometry::degree> > LL;
|
||||
linestring<LL> line_ll;
|
||||
line_ll.push_back(LL(latitude<float>(dms<north, float>(52, 22, 23)), longitude<float>(dms<east, float>(4, 53, 32))));
|
||||
line_ll.push_back(LL(latitude<float>(dms<north, float>(51, 55, 51)), longitude<float>(dms<east, float>(4, 28, 45))));
|
||||
line_ll.push_back(LL(latitude<float>(dms<north, float>(52, 4, 48)), longitude<float>(dms<east, float>(4, 18, 0))));
|
||||
std::cout << "linestring length is "
|
||||
<< length(line_ll, strategy::distance::vincenty<LL, LL>() )/(1000)
|
||||
<< " kilometers " << std::endl;
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
void example_envelope_linestring()
|
||||
{
|
||||
boost::geometry::linestring<boost::geometry::point_xy<double> > line;
|
||||
boost::geometry::read_wkt("linestring(0 0,1 1,4 8,3 2)", line);
|
||||
boost::geometry::box<boost::geometry::point_xy<double> > box;
|
||||
boost::geometry::envelope(line, box);
|
||||
|
||||
std::cout << "envelope is " << boost::geometry::dsv(box) << std::endl;
|
||||
}
|
||||
|
||||
void example_envelope_polygon()
|
||||
{
|
||||
/*
|
||||
Extension, other coordinate system:
|
||||
using namespace boost::geometry;
|
||||
typedef point_ll<double, boost::geometry::cs::geographic<boost::geometry::degree> > LL;
|
||||
|
||||
// Wrangel island, 180 meridian crossing island above Siberia.
|
||||
polygon<LL> wrangel;
|
||||
wrangel.outer().push_back(LL(latitude<>(dms<north>(70, 47, 7)), longitude<>(dms<west>(178, 47, 9))));
|
||||
wrangel.outer().push_back(LL(latitude<>(dms<north>(71, 14, 0)), longitude<>(dms<east>(177, 28, 33))));
|
||||
wrangel.outer().push_back(LL(latitude<>(dms<north>(71, 34, 24)), longitude<>(dms<east>(179, 44, 37))));
|
||||
// Close it
|
||||
wrangel.outer().push_back(wrangel.outer().front());
|
||||
|
||||
boost::geometry::box<LL> box;
|
||||
boost::geometry::envelope(wrangel, box);
|
||||
|
||||
dms<cd_lat> minlat(box.min_corner().lat());
|
||||
dms<cd_lon> minlon(box.min_corner().lon());
|
||||
|
||||
dms<cd_lat> maxlat(box.max_corner().lat());
|
||||
dms<cd_lon> maxlon(box.max_corner().lon());
|
||||
|
||||
std::cout << wrangel << std::endl;
|
||||
std::cout << "min: " << minlat.get_dms() << " , " << minlon.get_dms() << std::endl;
|
||||
std::cout << "max: " << maxlat.get_dms() << " , " << maxlon.get_dms() << std::endl;
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
void example_dms()
|
||||
{
|
||||
/*
|
||||
Extension, other coordinate system:
|
||||
// Construction with degree/minute/seconds
|
||||
boost::geometry::dms<boost::geometry::east> d1(4, 53, 32.5);
|
||||
|
||||
// Explicit conversion to double.
|
||||
std::cout << d1.as_value() << std::endl;
|
||||
|
||||
// Conversion to string, with optional strings
|
||||
std::cout << d1.get_dms(" deg ", " min ", " sec") << std::endl;
|
||||
|
||||
// Combination with latitude/longitude and cardinal directions
|
||||
{
|
||||
using namespace boost::geometry;
|
||||
point_ll<double, boost::geometry::cs::geographic<boost::geometry::degree> > canberra(
|
||||
latitude<>(dms<south>(35, 18, 27)),
|
||||
longitude<>(dms<east>(149, 7, 27.9)));
|
||||
std::cout << canberra << std::endl;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void example_point_ll_construct()
|
||||
{
|
||||
/*
|
||||
Extension, other coordinate system:
|
||||
using namespace boost::geometry;
|
||||
typedef point_ll<double, boost::geometry::cs::geographic<boost::geometry::degree> > ll;
|
||||
|
||||
// Constructions in both orders possible
|
||||
ll juneau(
|
||||
latitude<>(dms<north>(58, 21, 5)),
|
||||
longitude<>(dms<west>(134, 30, 42)));
|
||||
ll wladiwostok(
|
||||
longitude<>(dms<east>(131, 54)),
|
||||
latitude<>(dms<north>(43, 8))
|
||||
);
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
example_point();
|
||||
|
||||
example_area_polygon();
|
||||
example_area_polygon_spherical();
|
||||
|
||||
example_centroid_polygon();
|
||||
|
||||
example_distance_point_point();
|
||||
example_distance_point_point_strategy();
|
||||
|
||||
example_from_wkt_point();
|
||||
example_from_wkt_output_iterator();
|
||||
example_from_wkt_linestring();
|
||||
example_from_wkt_polygon();
|
||||
|
||||
example_as_wkt_point();
|
||||
|
||||
example_clip_linestring1();
|
||||
example_clip_linestring2();
|
||||
example_intersection_polygon1();
|
||||
|
||||
example_simplify_linestring1();
|
||||
example_simplify_linestring2();
|
||||
|
||||
example_length_linestring();
|
||||
example_length_linestring_iterators1();
|
||||
example_length_linestring_iterators2();
|
||||
example_length_linestring_iterators3();
|
||||
example_length_linestring_strategy();
|
||||
|
||||
example_envelope_linestring();
|
||||
example_envelope_polygon();
|
||||
|
||||
example_within();
|
||||
|
||||
example_point_ll_convert();
|
||||
example_point_ll_construct();
|
||||
example_dms();
|
||||
|
||||
boost_geometry_register_point_2d::foo();
|
||||
|
||||
return 0;
|
||||
}
|
182
doc/qbk/snippets/qbk_1.vcproj
Normal file
182
doc/qbk/snippets/qbk_1.vcproj
Normal file
@ -0,0 +1,182 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="qbk_1"
|
||||
ProjectGUID="{861F130D-2849-4B50-B240-049DBD9D3F18}"
|
||||
RootNamespace="qbk_1"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)\qbk_1"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\boost.vsprops"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../../../.."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="kernel32.lib $(NoInherit)"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)\qbk_1"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\boost.vsprops"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../../../../.."
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="kernel32.lib $(NoInherit)"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="cd ../doc
doxygen
"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath=".\qbk_1.cpp"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
156
doc/qbk/snippets/qbk_2.cpp
Normal file
156
doc/qbk/snippets/qbk_2.cpp
Normal file
@ -0,0 +1,156 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
//
|
||||
// Copyright Barend Gehrels 2007-2009, Geodan, Amsterdam, the Netherlands
|
||||
// Copyright Bruno Lalande 2008, 2009
|
||||
// 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 Examples, for main page
|
||||
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
// We deliberately mix float/double's here so turn off warning
|
||||
//#pragma warning( disable : 4244 )
|
||||
#endif // defined(_MSC_VER)
|
||||
|
||||
#include <boost/geometry/geometry.hpp>
|
||||
#include <boost/geometry/algorithms/overlaps.hpp>
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/cartesian2d.hpp>
|
||||
#include <boost/geometry/geometries/register/point.hpp>
|
||||
#include <boost/geometry/geometries/adapted/tuple_cartesian.hpp>
|
||||
#include <boost/geometry/geometries/adapted/c_array_cartesian.hpp>
|
||||
#include <boost/geometry/geometries/adapted/std_as_linestring.hpp>
|
||||
|
||||
|
||||
// Small QRect simulations following http://doc.trolltech.com/4.4/qrect.html
|
||||
// Todo: once work the traits out further, would be nice if there is a real example of this.
|
||||
// However for the example it makes no difference, it will work any way.
|
||||
struct QPoint
|
||||
{
|
||||
int x, y;
|
||||
// In Qt these are methods but for example below it makes no difference
|
||||
};
|
||||
|
||||
struct QRect
|
||||
{
|
||||
int x, y, width, height;
|
||||
QRect(int _x, int _y, int w, int h)
|
||||
: x(_x), y(_y), width(w), height(h)
|
||||
{}
|
||||
// In Qt these are methods but that will work as well, requires changing traits below
|
||||
};
|
||||
|
||||
|
||||
// Would be get/set with x(),y(),setX(),setY()
|
||||
BOOST_GEOMETRY_REGISTER_POINT_2D(QPoint, int, cs::cartesian, x, y)
|
||||
|
||||
|
||||
// Register the QT rectangle. The macro(s) does not offer (yet) enough flexibility to do this in one line,
|
||||
// but the traits classes do their job perfectly.
|
||||
namespace boost { namespace geometry { namespace traits
|
||||
{
|
||||
|
||||
template <> struct tag<QRect> { typedef box_tag type; };
|
||||
template <> struct point_type<QRect> { typedef QPoint type; };
|
||||
|
||||
template <size_t C, size_t D>
|
||||
struct indexed_access<QRect, C, D>
|
||||
{
|
||||
static inline int get(const QRect& qr)
|
||||
{
|
||||
// Would be: x(), y(), width(), height()
|
||||
return C == min_corner && D == 0 ? qr.x
|
||||
: C == min_corner && D == 1 ? qr.y
|
||||
: C == max_corner && D == 0 ? qr.x + qr.width
|
||||
: C == max_corner && D == 1 ? qr.y + qr.height
|
||||
: 0;
|
||||
}
|
||||
|
||||
static inline void set(QRect& qr, const int& value)
|
||||
{
|
||||
// Would be: setX, setY, setWidth, setHeight
|
||||
if (C == min_corner && D == 0) qr.x = value;
|
||||
else if (C == min_corner && D == 1) qr.y = value;
|
||||
else if (C == max_corner && D == 0) qr.width = value - qr.x;
|
||||
else if (C == max_corner && D == 1) qr.height = value - qr.y;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}}}
|
||||
|
||||
|
||||
void example_for_main_page()
|
||||
{
|
||||
using namespace boost::geometry;
|
||||
|
||||
int a[2] = {1,1};
|
||||
int b[2] = {2,3};
|
||||
double d = distance(a, b);
|
||||
std::cout << "Distance a-b is:" << d << std::endl;
|
||||
|
||||
ring_2d poly;
|
||||
double points[][2] = {{2.0, 1.3}, {4.1, 3.0}, {5.3, 2.6}, {2.9, 0.7}, {2.0, 1.3}};
|
||||
append(poly, points);
|
||||
boost::tuple<double, double> p = boost::make_tuple(3.7, 2.0);
|
||||
std::cout << "Point p is in polygon? " << (within(p, poly) ? "YES" : "NO") << std::endl;
|
||||
|
||||
std::cout << "Area: " << area(poly) << std::endl;
|
||||
|
||||
double d2 = distance(a, p);
|
||||
std::cout << "Distance a-p is:" << d2 << std::endl;
|
||||
|
||||
/***
|
||||
Now extension
|
||||
point_ll_deg amsterdam, paris;
|
||||
parse(amsterdam, "52 22 23 N", "4 53 32 E");
|
||||
parse(paris, "48 52 0 N", "2 19 59 E");
|
||||
std::cout << "Distance A'dam-Paris: " << distance(amsterdam, paris) / 1000.0 << " kilometers " << std::endl;
|
||||
***/
|
||||
|
||||
QRect r1(100, 200, 15, 15);
|
||||
QRect r2(110, 210, 20, 20);
|
||||
if (overlaps(r1, r2))
|
||||
{
|
||||
assign(r2, 200, 300, 220, 320);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void example_for_transform()
|
||||
{
|
||||
using namespace boost::geometry;
|
||||
|
||||
typedef point<double, 3, cs::cartesian> XYZ;
|
||||
typedef point<double, 3, cs::spherical<degree> > SPH;
|
||||
XYZ p;
|
||||
|
||||
SPH sph1, sph2;
|
||||
assign(sph1, 12.5, 41.90, 1.0);
|
||||
// Go from spherical to Cartesian-3D:
|
||||
transform(sph1, p);
|
||||
// Go back from Cartesian 3D to spherical:
|
||||
transform(p, sph2);
|
||||
|
||||
std::cout << dsv(p) << " <-> " << dsv(sph2) << std::endl;
|
||||
|
||||
typedef point_xy<double> XY;
|
||||
typedef point_xy<int> PIXEL;
|
||||
XY xy(50, 50);
|
||||
strategy::transform::map_transformer<XY, PIXEL, false> map(0, 0, 100, 100, 1024, 768);
|
||||
PIXEL pix;
|
||||
transform(xy, pix, map);
|
||||
std::cout << pix.x() << "," << pix.y() << std::endl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
example_for_main_page();
|
||||
example_for_transform();
|
||||
return 0;
|
||||
}
|
182
doc/qbk/snippets/qbk_2.vcproj
Normal file
182
doc/qbk/snippets/qbk_2.vcproj
Normal file
@ -0,0 +1,182 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="qbk_2"
|
||||
ProjectGUID="{6CF6A521-57E0-4DA4-9D17-ED5D29E4208C}"
|
||||
RootNamespace="qbk_2"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)\qbk_2"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\boost.vsprops"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../../../.."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="kernel32.lib $(NoInherit)"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)\qbk_2"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\boost.vsprops"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../../../../.."
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="kernel32.lib $(NoInherit)"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine=""
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath=".\qbk_2.cpp"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
75
doc/qbk/snippets/qbk_3.cpp
Normal file
75
doc/qbk/snippets/qbk_3.cpp
Normal file
@ -0,0 +1,75 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
//
|
||||
// Copyright Barend Gehrels 2007-2009, Geodan, Amsterdam, the Netherlands
|
||||
// Copyright Bruno Lalande 2008, 2009
|
||||
// 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 Examples, for e.g. email formal review
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
#include <boost/geometry/geometry.hpp>
|
||||
#include <boost/geometry/geometries/adapted/tuple_cartesian.hpp>
|
||||
#include <boost/geometry/geometries/adapted/c_array_cartesian.hpp>
|
||||
#include <boost/geometry/geometries/adapted/std_as_linestring.hpp>
|
||||
|
||||
|
||||
|
||||
void example_distance()
|
||||
{
|
||||
int a[2] = {1,2};
|
||||
int b[2] = {3,4};
|
||||
double d = boost::geometry::distance(a, b);
|
||||
std::cout << d << std::endl;
|
||||
}
|
||||
|
||||
void example_length1()
|
||||
{
|
||||
std::vector<boost::tuple<double, double, double> > line;
|
||||
line.push_back(boost::make_tuple(1, 2, 3));
|
||||
line.push_back(boost::make_tuple(4, 5, 6));
|
||||
line.push_back(boost::make_tuple(7, 8, 9));
|
||||
double length = boost::geometry::length(line);
|
||||
std::cout << length << std::endl;
|
||||
}
|
||||
|
||||
void example_length2()
|
||||
{
|
||||
std::vector<boost::tuple<double, double> > line;
|
||||
line.push_back(boost::make_tuple(1.1, 2.2));
|
||||
line.push_back(boost::make_tuple(3.3, 4.4));
|
||||
line.push_back(boost::make_tuple(5.5, 6.6));
|
||||
std::cout << boost::geometry::length(
|
||||
std::make_pair(boost::begin(line), boost::end(line) + -1)
|
||||
)
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
void example_less()
|
||||
{
|
||||
typedef boost::tuple<double, double> P;
|
||||
std::vector<P> line;
|
||||
line.push_back(boost::make_tuple(8.1, 1.9));
|
||||
line.push_back(boost::make_tuple(4.2, 7.5));
|
||||
line.push_back(boost::make_tuple(2.3, 3.6));
|
||||
std::sort(line.begin(), line.end(), boost::geometry::less<P>());
|
||||
|
||||
// Display ordered points
|
||||
BOOST_FOREACH(P const& p, line)
|
||||
{
|
||||
std::cout << boost::geometry::dsv(p) << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
example_distance();
|
||||
example_length1();
|
||||
example_length2();
|
||||
example_less();
|
||||
return 0;
|
||||
}
|
182
doc/qbk/snippets/qbk_3.vcproj
Normal file
182
doc/qbk/snippets/qbk_3.vcproj
Normal file
@ -0,0 +1,182 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="qbk_3"
|
||||
ProjectGUID="{45D4139F-BC5B-4D48-BAB8-9901C53ECCC9}"
|
||||
RootNamespace="qbk_3"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)\qbk_3"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\boost.vsprops"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../../../.."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="kernel32.lib $(NoInherit)"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)\qbk_3"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\boost.vsprops"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../../../../.."
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="kernel32.lib $(NoInherit)"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine=""
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath=".\qbk_3.cpp"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
326
doc/qbk/snippets/qbk_4.cpp
Normal file
326
doc/qbk/snippets/qbk_4.cpp
Normal file
File diff suppressed because one or more lines are too long
182
doc/qbk/snippets/qbk_4.vcproj
Normal file
182
doc/qbk/snippets/qbk_4.vcproj
Normal file
@ -0,0 +1,182 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="qbk_4"
|
||||
ProjectGUID="{CBEDAEC7-EC87-4F91-9C45-F9505A052A44}"
|
||||
RootNamespace="qbk_4"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)\qbk_4"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\boost.vsprops"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../../../..;../../../test"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="kernel32.lib $(NoInherit)"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)\qbk_4"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\boost.vsprops"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../../../../..;../../../test"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="kernel32.lib $(NoInherit)"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine=""
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath=".\qbk_4.cpp"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
136
doc/qbk/snippets/qbk_5.cpp
Normal file
136
doc/qbk/snippets/qbk_5.cpp
Normal file
@ -0,0 +1,136 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
//
|
||||
// Copyright Barend Gehrels 2007-2009, Geodan, Amsterdam, the Netherlands
|
||||
// Copyright Bruno Lalande 2008, 2009
|
||||
// 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 Examples, for Geometry Concepts
|
||||
|
||||
#include <boost/geometry/geometry.hpp>
|
||||
#include <boost/geometry/geometries/register/point.hpp>
|
||||
#include <boost/geometry/geometries/register/linestring.hpp>
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
|
||||
|
||||
|
||||
struct legacy_point1
|
||||
{
|
||||
double x, y;
|
||||
};
|
||||
|
||||
// adapt legacy_point1
|
||||
namespace boost { namespace geometry { namespace traits
|
||||
{
|
||||
template <> struct tag<legacy_point1> { typedef point_tag type; };
|
||||
template <> struct coordinate_type<legacy_point1> { typedef double type; };
|
||||
template <> struct coordinate_system<legacy_point1> { typedef cs::cartesian type; };
|
||||
template <> struct dimension<legacy_point1>: boost::mpl::int_<2> {};
|
||||
template <> struct access<legacy_point1, 0>
|
||||
{
|
||||
static double get(legacy_point1 const& p) { return p.x; }
|
||||
static void set(legacy_point1& p, double const& value) { p.x = value; }
|
||||
};
|
||||
template <> struct access<legacy_point1, 1>
|
||||
{
|
||||
static double get(legacy_point1 const& p) { return p.y; }
|
||||
static void set(legacy_point1& p, double const& value) { p.y = value; }
|
||||
};
|
||||
}}} // namespace boost::geometry::traits
|
||||
// end adaptation
|
||||
|
||||
namespace example_legacy_point1
|
||||
{
|
||||
// The first way to check a concept at compile time: checking if the input is parameter
|
||||
// or return type is OK.
|
||||
template <typename P>
|
||||
BOOST_CONCEPT_REQUIRES(((boost::geometry::concept::Point<P>)), (void))
|
||||
test1(P& p)
|
||||
{
|
||||
}
|
||||
|
||||
// The second way to check a concept at compile time: checking if the provided type,
|
||||
// inside the function, if OK
|
||||
template <typename P>
|
||||
void test2(P& p)
|
||||
{
|
||||
BOOST_CONCEPT_ASSERT((boost::geometry::concept::Point<P>));
|
||||
}
|
||||
|
||||
|
||||
void example()
|
||||
{
|
||||
legacy_point1 p;
|
||||
test1(p);
|
||||
test2(p);
|
||||
}
|
||||
}
|
||||
|
||||
// leave comment below for (strange behaviour of) doxygen
|
||||
class legacy_point2
|
||||
{
|
||||
public :
|
||||
double x() const;
|
||||
double y() const;
|
||||
};
|
||||
|
||||
// adapt legacy_point2
|
||||
BOOST_GEOMETRY_REGISTER_POINT_2D_CONST(legacy_point2, double, boost::geometry::cs::cartesian, x(), y() )
|
||||
// end adaptation
|
||||
|
||||
|
||||
double legacy_point2::x() const { return 0; }
|
||||
double legacy_point2::y() const { return 0; }
|
||||
|
||||
namespace example_legacy_point2
|
||||
{
|
||||
// test it using boost concept requires
|
||||
|
||||
template <typename P>
|
||||
BOOST_CONCEPT_REQUIRES(((boost::geometry::concept::ConstPoint<P>)), (double))
|
||||
test3(P& p)
|
||||
{
|
||||
return boost::geometry::get<0>(p);
|
||||
}
|
||||
|
||||
void example()
|
||||
{
|
||||
legacy_point2 p;
|
||||
test3(p);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template <typename P>
|
||||
struct custom_linestring1 : std::deque<P>
|
||||
{
|
||||
int id;
|
||||
};
|
||||
|
||||
// adapt custom_linestring1
|
||||
namespace boost { namespace geometry { namespace traits
|
||||
{
|
||||
template <typename P>
|
||||
struct tag< custom_linestring1<P> > { typedef linestring_tag type; };
|
||||
}}} // namespace boost::geometry::traits
|
||||
// end adaptation
|
||||
|
||||
namespace example_custom_linestring1
|
||||
{
|
||||
void example()
|
||||
{
|
||||
typedef custom_linestring1<legacy_point1> L;
|
||||
BOOST_CONCEPT_ASSERT((boost::geometry::concept::Linestring<L>));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
example_legacy_point1::example();
|
||||
example_legacy_point2::example();
|
||||
example_custom_linestring1::example();
|
||||
|
||||
return 0;
|
||||
}
|
182
doc/qbk/snippets/qbk_5.vcproj
Normal file
182
doc/qbk/snippets/qbk_5.vcproj
Normal file
@ -0,0 +1,182 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="qbk_5"
|
||||
ProjectGUID="{0CDE9E15-C937-4D05-B9BF-A2D96B8EAD33}"
|
||||
RootNamespace="qbk_5"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)\qbk_5"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\boost.vsprops"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../../../..;../../../test"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="kernel32.lib $(NoInherit)"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)\qbk_5"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\boost.vsprops"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../../../../..;../../../test"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="kernel32.lib $(NoInherit)"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine=""
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath=".\qbk_5.cpp"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
43
doc/qbk/snippets/qbk_examples.sln
Normal file
43
doc/qbk/snippets/qbk_examples.sln
Normal file
@ -0,0 +1,43 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual C++ Express 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qbk_1", "qbk_1.vcproj", "{861F130D-2849-4B50-B240-049DBD9D3F18}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qbk_2", "qbk_2.vcproj", "{6CF6A521-57E0-4DA4-9D17-ED5D29E4208C}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qbk_3", "qbk_3.vcproj", "{45D4139F-BC5B-4D48-BAB8-9901C53ECCC9}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qbk_4", "qbk_4.vcproj", "{CBEDAEC7-EC87-4F91-9C45-F9505A052A44}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qbk_5", "qbk_5.vcproj", "{0CDE9E15-C937-4D05-B9BF-A2D96B8EAD33}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{861F130D-2849-4B50-B240-049DBD9D3F18}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{861F130D-2849-4B50-B240-049DBD9D3F18}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{861F130D-2849-4B50-B240-049DBD9D3F18}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{861F130D-2849-4B50-B240-049DBD9D3F18}.Release|Win32.Build.0 = Release|Win32
|
||||
{6CF6A521-57E0-4DA4-9D17-ED5D29E4208C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{6CF6A521-57E0-4DA4-9D17-ED5D29E4208C}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{6CF6A521-57E0-4DA4-9D17-ED5D29E4208C}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{6CF6A521-57E0-4DA4-9D17-ED5D29E4208C}.Release|Win32.Build.0 = Release|Win32
|
||||
{45D4139F-BC5B-4D48-BAB8-9901C53ECCC9}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{45D4139F-BC5B-4D48-BAB8-9901C53ECCC9}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{45D4139F-BC5B-4D48-BAB8-9901C53ECCC9}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{45D4139F-BC5B-4D48-BAB8-9901C53ECCC9}.Release|Win32.Build.0 = Release|Win32
|
||||
{CBEDAEC7-EC87-4F91-9C45-F9505A052A44}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{CBEDAEC7-EC87-4F91-9C45-F9505A052A44}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{CBEDAEC7-EC87-4F91-9C45-F9505A052A44}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{CBEDAEC7-EC87-4F91-9C45-F9505A052A44}.Release|Win32.Build.0 = Release|Win32
|
||||
{0CDE9E15-C937-4D05-B9BF-A2D96B8EAD33}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0CDE9E15-C937-4D05-B9BF-A2D96B8EAD33}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0CDE9E15-C937-4D05-B9BF-A2D96B8EAD33}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0CDE9E15-C937-4D05-B9BF-A2D96B8EAD33}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
Loading…
x
Reference in New Issue
Block a user