Shapes
GIS made easy, a lightweight header-only planar geometry library for Modern C++
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
simo::shapes::basic_multipoint< T, AllocatorType > Class Template Reference
Inheritance diagram for simo::shapes::basic_multipoint< T, AllocatorType >:
simo::shapes::basic_geometry< basic_multipoint< T > >

Public Types

using base_type = std::vector< T, AllocatorType >
 
using point_type = typename T::point_type
 
using point_iterator = typename std::vector< T >::iterator
 
using point_const_iterator = typename std::vector< T >::const_iterator
 
using coord_type = typename T::coord_type
 
using coord_iterator = typename std::vector< coord_type >::iterator
 
using coord_const_iterator = typename std::vector< coord_type >::const_iterator
 

Public Member Functions

 basic_multipoint (std::initializer_list< T > init)
 
 basic_multipoint (coord_const_iterator first, coord_const_iterator last)
 
 basic_multipoint (coord_iterator first, coord_iterator last)
 
 basic_multipoint (point_iterator first, point_iterator last)
 
 basic_multipoint (point_const_iterator first, point_const_iterator last)
 
std::vector< std::tuple< double, double > > xy () const
 
std::string polyline (std::int32_t precision=5) const
 
- Public Member Functions inherited from simo::shapes::basic_geometry< basic_multipoint< T > >
geometry_type geom_type () const noexcept
 Returns the geometry type. More...
 
std::string tagged_text () const noexcept
 Returns the geometry type as a string. More...
 
dimension_type dim () const noexcept
 Returns the dimension type for the geometry. More...
 
size_t ndim () const noexcept
 Returns the number of dimensions of the geometry. More...
 
void throw_for_invalid () const
 Raise an error if the geometry is invalid. More...
 
bool is_closed () const noexcept
 Whether the geometry is closed. More...
 
bool is_valid () const noexcept
 Whether the geometry is valid. More...
 
bounds_t bounds () const
 Returns the bounding box of the geometry. More...
 
bool has_z () const noexcept
 Whether the geometry has the z-coordinate. More...
 
bool has_m () const noexcept
 Whether the geometry has the m-coordinate (measurement coordinate) More...
 
std::string json (std::int32_t precision=-1) const
 Dumps the geojson representation of the geometry. More...
 
std::string wkt (std::int32_t precision=-1) const
 Dumps the wkt representation of the geometry. More...
 

Static Public Member Functions

static basic_multipoint< T > from_polyline (const std::string &polyline, std::int32_t precision=5)
 
- Static Public Member Functions inherited from simo::shapes::basic_geometry< basic_multipoint< T > >
static basic_multipoint< T > from_json (const std::string &json)
 Creates a geometry from a geojson string. More...
 
static basic_multipoint< T > from_wkt (const std::string &wkt)
 Creates a Geometry from a wkt string. More...
 

Friends

class basic_geometry< basic_multipoint< T > >
 for allow basic_geometry to access basic_multipoint private members
 
bool operator== (const basic_multipoint< T > &lhs, const basic_multipoint< T > &rhs)
 
bool operator!= (const basic_multipoint< T > &lhs, const basic_multipoint< T > &rhs)
 

Detailed Description

template<typename T, typename AllocatorType = std::allocator<T>>
class simo::shapes::basic_multipoint< T, AllocatorType >

Definition at line 17 of file multipoint.hpp.

Constructor & Destructor Documentation

template<typename T, typename AllocatorType = std::allocator<T>>
simo::shapes::basic_multipoint< T, AllocatorType >::basic_multipoint ( coord_const_iterator  first,
coord_const_iterator  last 
)
inlineexplicit
Todo:
deal with repetition

Definition at line 36 of file multipoint.hpp.

template<typename T, typename AllocatorType = std::allocator<T>>
simo::shapes::basic_multipoint< T, AllocatorType >::basic_multipoint ( coord_iterator  first,
coord_iterator  last 
)
inlineexplicit
Todo:
deal with repetition

Definition at line 47 of file multipoint.hpp.

Friends And Related Function Documentation

template<typename T, typename AllocatorType = std::allocator<T>>
bool operator!= ( const basic_multipoint< T > &  lhs,
const basic_multipoint< T > &  rhs 
)
friend
Parameters
lhsa mulipoint
rhsa mulipoint
Returns
true if at least one Point is different, otherwise false
Since
0.0.1

Definition at line 100 of file multipoint.hpp.

template<typename T, typename AllocatorType = std::allocator<T>>
bool operator== ( const basic_multipoint< T > &  lhs,
const basic_multipoint< T > &  rhs 
)
friend
Parameters
lhsa mulipoint
rhsa mulipoint
Returns
true if all Point's are equal, otherwise false
Since
0.0.1

Definition at line 77 of file multipoint.hpp.


The documentation for this class was generated from the following file: