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

Public Types

using value_type = T
 
using reference = T &
 
using const_reference = const T &
 
using iterator = T *
 
using const_iterator = const T *
 
using difference_type = std::ptrdiff_t
 
using size_type = size_t
 
using reverse_iterator = std::reverse_iterator< iterator >
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 
using point_type = basic_point_z
 
using coord_type = value_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_point_z (T x, T y, T z)
 
 basic_point_z (coord_iterator begin, coord_iterator end)
 
 basic_point_z (coord_const_iterator begin, coord_const_iterator end)
 
std::size_t size () const noexcept
 
T & operator[] (size_t pos)
 
size_type max_size () const
 
bool empty ()
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
reverse_iterator rend ()
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
- Public Member Functions inherited from simo::shapes::basic_geometry< basic_point_z< 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...
 

Public Attributes

union {
   struct {
      T   x
 
      T   y
 
      T   z
 
   } 
 
   struct {
      T   lng
 
      T   lat
 
      T   height
 
   } 
 
   T   coords [N]
 
}; 
 

Static Public Attributes

static const size_type N = 3
 

Friends

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

Additional Inherited Members

- Static Public Member Functions inherited from simo::shapes::basic_geometry< basic_point_z< T > >
static basic_point_z< T > from_json (const std::string &json)
 Creates a geometry from a geojson string. More...
 
static basic_point_z< T > from_wkt (const std::string &wkt)
 Creates a Geometry from a wkt string. More...
 

Detailed Description

template<class T, typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type>
class simo::shapes::basic_point_z< T, typename >

Definition at line 310 of file point.hpp.


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