mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-11 13:34:10 +00:00
810 lines
15 KiB
Plaintext
810 lines
15 KiB
Plaintext
[/ 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 Header]
|
|
Either
|
|
|
|
`#include <boost/geometry/geometry.hpp>`
|
|
|
|
Or
|
|
|
|
`#include <boost/geometry/algorithms/append.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 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 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 Header]
|
|
Either
|
|
|
|
`#include <boost/geometry/geometry.hpp>`
|
|
|
|
Or
|
|
|
|
`#include <boost/geometry/algorithms/assign.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 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 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 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 Synopsis]
|
|
``template<typename Geometry>
|
|
void assign_inverse (Geometry &geometry)``
|
|
|
|
[heading Parameters]
|
|
|
|
[table
|
|
[[Type] [Concept] [Name] [Description] ]
|
|
[[Geometry &] [] [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 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 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 Description]
|
|
The assign_zero function initializes a 2D or 3D point or box with coordinates of zero
|
|
|
|
[heading Synopsis]
|
|
``template<typename Geometry>
|
|
void assign_zero (Geometry &geometry)``
|
|
|
|
[heading Parameters]
|
|
|
|
[table
|
|
[[Type] [Concept] [Name] [Description] ]
|
|
[[Geometry &] [the geometry type ] [geometry] []]
|
|
]
|
|
|
|
|
|
[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 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 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 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 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 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 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 Description]
|
|
Result is in Radian, even if source coordinate system is in Degrees
|
|
|
|
[heading Synopsis]
|
|
``template<std::size_t Dimension, typename Geometry>
|
|
fp_coordinate_type<Geometry>::type get_as_radian (Geometry const &geometry)``
|
|
|
|
[heading Parameters]
|
|
|
|
[table
|
|
[[Type] [Concept] [Name] [Description] ]
|
|
[[Geometry const &] [geometry ] [geometry] [geometry to get coordinate value from ]]
|
|
]
|
|
|
|
|
|
[heading Returns]
|
|
coordinate value
|
|
|
|
[heading Header]
|
|
Either
|
|
|
|
`#include <boost/geometry/geometry.hpp>`
|
|
|
|
Or
|
|
|
|
`#include <boost/geometry/core/radian_access.hpp>`
|
|
|
|
|
|
[endsect]
|
|
|
|
[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 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 (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 Header]
|
|
Either
|
|
|
|
`#include <boost/geometry/geometry.hpp>`
|
|
|
|
Or
|
|
|
|
`#include <boost/geometry/core/interior_rings.hpp>`
|
|
|
|
|
|
[endsect]
|
|
|
|
[section:make_2 make (2)]
|
|
|
|
Make a 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 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 Header]
|
|
Either
|
|
|
|
`#include <boost/geometry/geometry.hpp>`
|
|
|
|
Or
|
|
|
|
`#include <boost/geometry/algorithms/make.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 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 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 Synopsis]
|
|
``template<typename Geometry>
|
|
Geometry make_inverse ()``
|
|
|
|
[heading Parameters]
|
|
|
|
[table
|
|
[[Type] [Concept] [Name] [Description] ]
|
|
]
|
|
|
|
|
|
[heading Returns]
|
|
the box
|
|
|
|
[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 Description]
|
|
The make_zero function initializes a 2D or 3D point or box with coordinates of zero
|
|
|
|
[heading Synopsis]
|
|
``template<typename Geometry>
|
|
Geometry make_zero ()``
|
|
|
|
[heading Parameters]
|
|
|
|
[table
|
|
[[Type] [Concept] [Name] [Description] ]
|
|
]
|
|
|
|
|
|
[heading Returns]
|
|
the geometry
|
|
|
|
[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 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 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 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 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 Header]
|
|
Either
|
|
|
|
`#include <boost/geometry/geometry.hpp>`
|
|
|
|
Or
|
|
|
|
`#include <boost/geometry/core/radian_access.hpp>`
|
|
|
|
|
|
[endsect]
|
|
|