MySQL 9.0.0
Source Code Documentation
gis::Geographic_linearring Class Reference

A geographic (ellipsoidal) 2d linear ring. More...

#include <geometries_cs.h>

Inheritance diagram for gis::Geographic_linearring:
[legend]

Public Member Functions

Geometry_type type () const override
 Gets the geometry type of the object. More...
 
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...
 
bool is_empty () const override
 Check if this is an empty geometry. More...
 
void push_back (const gis::Point &pt) override
 Adds a point to the end of the linestring. More...
 
void push_back (gis::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 clear () noexcept override
 Removes all points from the linestring. More...
 
Geographic_linestringclone () const override
 This implementation of clone() uses a broader return type than other implementations. More...
 
Geographic_pointback () override
 Returns the last point of the linestring. More...
 
const Geographic_pointback () const override
 
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::Geographic_linestring
 Geographic_linestring ()
 
void resize (std::size_t count)
 
iterator begin () noexcept
 
const_iterator begin () const noexcept
 
iterator end () noexcept
 
const_iterator end () const noexcept
 
- Public Member Functions inherited from gis::Geometry
 Geometry ()=default
 
virtual ~Geometry ()=default
 
 Geometry (const Geometry &)=default
 
Geometryoperator= (const Geometry &)=default
 

Additional Inherited Members

- Public Types inherited from gis::Geographic_linestring
typedef decltype(m_points) ::value_type value_type
 
typedef decltype(m_points) ::iterator iterator
 
typedef decltype(m_points) ::const_iterator const_iterator
 
- 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...
 
- Static Public Member Functions inherited from gis::Linearring
static Linearringcreate_linearring (Coordinate_system coordinate_system)
 Creates a subclass of Linearring from a Coordinate_system. More...
 
- Protected Attributes inherited from gis::Geographic_linestring
std::vector< Geographic_point, Malloc_allocator< Geographic_point > > m_points
 String of points constituting the linestring. More...
 

Detailed Description

A geographic (ellipsoidal) 2d linear ring.

Member Function Documentation

◆ accept()

bool gis::Geographic_linearring::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::Linearring.

◆ back() [1/2]

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

Reimplemented from gis::Geographic_linestring.

◆ back() [2/2]

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

Returns the last point of the linestring.

Returns
Last point of linestring

Reimplemented from gis::Geographic_linestring.

◆ clear()

void gis::Geographic_linearring::clear ( )
inlineoverridevirtualnoexcept

Removes all points from the linestring.

Reimplemented from gis::Geographic_linestring.

◆ clone()

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

This implementation of clone() uses a broader return type than other implementations.

This is due to the restraint in some compilers, such as cl.exe, that overriding functions with ambiguous bases must have covariant return types.

Reimplemented from gis::Geographic_linestring.

◆ coordinate_system()

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

Gets the coordinate system.

Returns
The coordinate system type.

Reimplemented from gis::Geographic_linestring.

◆ empty()

bool gis::Geographic_linearring::empty ( ) const
inlineoverridevirtual

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.

Reimplemented from gis::Geographic_linestring.

◆ front() [1/2]

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

Reimplemented from gis::Geographic_linestring.

◆ front() [2/2]

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

Returns the first point of the linestring.

Returns
First point of linestring

Reimplemented from gis::Geographic_linestring.

◆ is_empty()

bool gis::Geographic_linearring::is_empty ( ) const
inlineoverridevirtual

Check if this is an empty geometry.

The definition of empty geometries is the one in SFA-CA (OGC 06-103r4, Sect. 6.1.2.2), i.e., an empty point set.

Note
This is different from the function "empty", which returns true if a geometry contains no subgeometries. E.g., a geometry collection may contain another geometry collection which is empty. In this case, the "empty" function would return false on the outermost geometry collection, while "is_empty" would return true.
Return values
trueThe geometry represents the empty point set.
falseThe geometry represent a non-empty point set.

Reimplemented from gis::Linestring.

◆ operator[]() [1/2]

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

Reimplemented from gis::Geographic_linestring.

◆ operator[]() [2/2]

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

Reimplemented from gis::Geographic_linestring.

◆ pop_front()

void gis::Geographic_linearring::pop_front ( )
inlineoverridevirtual

Removes a point from the front of the linestring.

Reimplemented from gis::Geographic_linestring.

◆ push_back() [1/2]

void gis::Geographic_linearring::push_back ( const gis::Point pt)
inlineoverridevirtual

Adds a point to the end of the linestring.

Parameters
ptThe point to add.

Reimplemented from gis::Geographic_linestring.

◆ push_back() [2/2]

void gis::Geographic_linearring::push_back ( gis::Point &&  pt)
inlineoverridevirtual

Reimplemented from gis::Geographic_linestring.

◆ size()

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

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

Returns
Number of points in the linestring.

Reimplemented from gis::Geographic_linestring.

◆ type()

Geometry_type gis::Geographic_linearring::type ( ) const
inlineoverridevirtual

Gets the geometry type of the object.

Returns
The type of this object

Reimplemented from gis::Linestring.


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