MySQL 8.0.39
Source Code Documentation
gis::Geographic_linestring Class Reference

A geographic (ellipsoidal) 2d linestring. More...

#include <geometries_cs.h>

Inheritance diagram for gis::Geographic_linestring:
[legend]

Public Types

typedef decltype(m_points) ::value_type value_type
 
typedef decltype(m_points) ::iterator iterator
 
typedef decltype(m_points) ::const_iterator const_iterator
 

Public Member Functions

 Geographic_linestring ()
 
Coordinate_system coordinate_system () const override
 Gets the coordinate system. More...
 
bool accept (Geometry_visitor *v) override
 Applies a hierarchical visitor to this geometry. More...
 
void push_back (const Point &pt) override
 Adds a point to the end of the linestring. More...
 
void push_back (Point &&pt) override
 
void pop_front () override
 Removes a point from the front of the linestring. More...
 
bool empty () const override
 Checks if the linestring is empty. More...
 
std::size_t size () const override
 Returns the size of (number of points in) the linestring. More...
 
void resize (std::size_t count)
 
void clear () noexcept override
 Removes all points from the linestring. More...
 
Geographic_linestringclone () const override
 
Geographic_pointback () override
 Returns the last point of the linestring. More...
 
const Geographic_pointback () const override
 
iterator begin () noexcept
 
const_iterator begin () const noexcept
 
iterator end () noexcept
 
const_iterator end () const noexcept
 
Geographic_pointfront () override
 Returns the first point of the linestring. More...
 
const Geographic_pointfront () const override
 
Geographic_pointoperator[] (std::size_t i) override
 
const Geographic_pointoperator[] (std::size_t i) const override
 
- Public Member Functions inherited from gis::Linestring
Geometry_type type () const override
 Gets the geometry type of the object. More...
 
bool is_empty () const override
 Check if this is an empty geometry. More...
 
- Public Member Functions inherited from gis::Geometry
 Geometry ()=default
 
virtual ~Geometry ()=default
 
 Geometry (const Geometry &)=default
 
Geometryoperator= (const Geometry &)=default
 

Protected Attributes

std::vector< Geographic_point, Malloc_allocator< Geographic_point > > m_points
 String of points constituting the linestring. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from gis::Linestring
static Linestringcreate_linestring (Coordinate_system coordinate_system)
 Creates a subclass of Linestring from a Coordinate_system. More...
 

Detailed Description

A geographic (ellipsoidal) 2d linestring.

The linestring follows the geodetic between each pair of points.

Member Typedef Documentation

◆ const_iterator

◆ iterator

◆ value_type

Constructor & Destructor Documentation

◆ Geographic_linestring()

gis::Geographic_linestring::Geographic_linestring ( )
inline

Member Function Documentation

◆ accept()

bool gis::Geographic_linestring::accept ( Geometry_visitor v)
overridevirtual

Applies a hierarchical visitor to this geometry.

See also
gis::Geometry_visitor
Parameters
vA hierarchical visitor.
Return values
trueThe execution was aborted by the visitor.
falseThe execution completed.

Implements gis::Linestring.

Reimplemented in gis::Geographic_linearring.

◆ back() [1/2]

const Geographic_point & gis::Geographic_linestring::back ( ) const
inlineoverridevirtual

Implements gis::Linestring.

Reimplemented in gis::Geographic_linearring.

◆ back() [2/2]

Geographic_point & gis::Geographic_linestring::back ( )
inlineoverridevirtual

Returns the last point of the linestring.

Returns
Last point of linestring

Implements gis::Linestring.

Reimplemented in gis::Geographic_linearring.

◆ begin() [1/2]

const_iterator gis::Geographic_linestring::begin ( void  ) const
inlinenoexcept

◆ begin() [2/2]

iterator gis::Geographic_linestring::begin ( void  )
inlinenoexcept

◆ clear()

void gis::Geographic_linestring::clear ( )
inlineoverridevirtualnoexcept

Removes all points from the linestring.

Implements gis::Linestring.

Reimplemented in gis::Geographic_linearring.

◆ clone()

Geographic_linestring * gis::Geographic_linestring::clone ( ) const
inlineoverridevirtual

Implements gis::Linestring.

Reimplemented in gis::Geographic_linearring.

◆ coordinate_system()

Coordinate_system gis::Geographic_linestring::coordinate_system ( ) const
inlineoverridevirtual

Gets the coordinate system.

Returns
The coordinate system type.

Implements gis::Geometry.

Reimplemented in gis::Geographic_linearring.

◆ empty()

bool gis::Geographic_linestring::empty ( ) const
overridevirtual

Checks if the linestring is empty.

Here, the definition of empty is that the linestring does not contain any points. An invalid linestring with only one coordinate is not empty.

Return values
trueThe linestring is empty.
falseThe linestring is not empty.

Implements gis::Linestring.

Reimplemented in gis::Geographic_linearring.

◆ end() [1/2]

const_iterator gis::Geographic_linestring::end ( void  ) const
inlinenoexcept

◆ end() [2/2]

iterator gis::Geographic_linestring::end ( void  )
inlinenoexcept

◆ front() [1/2]

const Geographic_point & gis::Geographic_linestring::front ( ) const
inlineoverridevirtual

Implements gis::Linestring.

Reimplemented in gis::Geographic_linearring.

◆ front() [2/2]

Geographic_point & gis::Geographic_linestring::front ( )
inlineoverridevirtual

Returns the first point of the linestring.

Returns
First point of linestring

Implements gis::Linestring.

Reimplemented in gis::Geographic_linearring.

◆ operator[]() [1/2]

const Geographic_point & gis::Geographic_linestring::operator[] ( std::size_t  i) const
inlineoverridevirtual

Implements gis::Linestring.

Reimplemented in gis::Geographic_linearring.

◆ operator[]() [2/2]

Geographic_point & gis::Geographic_linestring::operator[] ( std::size_t  i)
inlineoverridevirtual

Implements gis::Linestring.

Reimplemented in gis::Geographic_linearring.

◆ pop_front()

void gis::Geographic_linestring::pop_front ( )
inlineoverridevirtual

Removes a point from the front of the linestring.

Implements gis::Linestring.

Reimplemented in gis::Geographic_linearring.

◆ push_back() [1/2]

void gis::Geographic_linestring::push_back ( const Point pt)
overridevirtual

Adds a point to the end of the linestring.

Parameters
ptThe point to add.

Implements gis::Linestring.

Reimplemented in gis::Geographic_linearring.

◆ push_back() [2/2]

void gis::Geographic_linestring::push_back ( Point &&  pt)
overridevirtual

Implements gis::Linestring.

Reimplemented in gis::Geographic_linearring.

◆ resize()

void gis::Geographic_linestring::resize ( std::size_t  count)
inline

◆ size()

std::size_t gis::Geographic_linestring::size ( ) const
inlineoverridevirtual

Returns the size of (number of points in) the linestring.

Returns
Number of points in the linestring.

Implements gis::Linestring.

Reimplemented in gis::Geographic_linearring.

Member Data Documentation

◆ m_points

std::vector<Geographic_point, Malloc_allocator<Geographic_point> > gis::Geographic_linestring::m_points
protected

String of points constituting the linestring.

The line starts in the first point, goes through all intermediate points, and ends in the last point.


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