| Home | Libraries | People | FAQ | More

#### Point Concept

###### Description

The Point Concept describes the requirements for a point type. All algorithms in Boost.Geometry will check any geometry arguments against the concept requirements.

A point is an entity that has a location in space or on a plane, but has no extent (wiki). The point is the most basic geometry of Boost.Geometry, most other geometries consist of points. (Exceptions are box and segment, which might consist of two points but that is not necessarily the case.)

###### Concept Definition

The Point Concept is defined as following:

- there must be a specialization of `traits::tag`, defining `point_tag` as type
- there must be a specialization of `traits::coordinate_type`, defining the type of its coordinates
- there must be a specialization of `traits::coordinate_system`, defining its coordinate system (cartesian, spherical, etc)
- there must be a specialization of `traits::dimension`, defining its number of dimensions (2, 3, ...) (hint: derive it conveniently from `boost::mpl::int_<X>` for X Dimensional)
- there must be a specialization of `traits::access`, per dimension, with two functions:
  - `get` to get a coordinate value
  - `set` to set a coordinate value (this one is not checked for ConstPoint)

###### Available Models

- model::point
- model::d2::point_xy
- a lat long point (currently in an extension)
- C array
- C++ array container
- Boost.Array
- Boost.Fusion
- Boost.Polygon
- Boost.Tuple
- other point types, adapted e.g. using one of the registration macro's