| Home | Libraries | People | FAQ | More

#### point_type

Metafunction defining type as the point_type of the specified geometry type.

###### Synopsis

    template<typename Geometry>
    struct point_type
    {
      // ...
    };

###### Template parameter(s)

Parameter | Description
--- | ---
typename Geometry | Any type fulfilling a Geometry Concept

###### Header

`#include <boost/geometry/core/point_type.hpp>`

###### Complexity

Compile time

###### Example

Examine the point type of a multi_polygon

    #include <iostream>
    #include <typeinfo>

    #include <boost/geometry.hpp>
    #include <boost/geometry/geometries/polygon.hpp>
    #include <boost/geometry/geometries/point_xy.hpp>
    #include <boost/geometry/multi/geometries/multi_polygon.hpp>

    int main()
    {
        typedef boost::geometry::model::d2::point_xy<double> point_type;
        typedef boost::geometry::model::polygon<point_type> polygon_type;
        typedef boost::geometry::model::multi_polygon<polygon_type> mp_type;

        typedef boost::geometry::point_type<mp_type>::type ptype;

        std::cout << "point type: " << typeid(ptype).name() << std::endl;

        return 0;
    }

Output (in MSVC):

    point type: class boost::geometry::model::d2::point_xy<double,struct boost::geometry::cs::cartesian>