MySQL 9.1.0
Source Code Documentation
gis::Geographic_polygon Class Reference

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

#include <geometries_cs.h>

Inheritance diagram for gis::Geographic_polygon:
[legend]

Public Member Functions

 Geographic_polygon ()
 
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 Linearring &lr) override
 Adds a linear ring to the polygon. More...
 
void push_back (Linearring &&lr) override
 
bool empty () const override
 Checks if the polygon is empty. More...
 
Geographic_polygonclone () const override
 
decltype(m_interior_rings) & interior_rings ()
 Get list of interior rings. More...
 
decltype(m_interior_rings) const & const_interior_rings () const
 Get list of interior rings. More...
 
std::size_t size () const override
 Returns the size of the polygon. More...
 
Geographic_linearringgeographic_exterior_ring () const
 Get the exterior ring. More...
 
Linearringexterior_ring () override
 Returns the exterior ring of the polygon. More...
 
Linearringinterior_ring (std::size_t n) override
 Returns an interior ring of the polygon. More...
 
- Public Member Functions inherited from gis::Polygon
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
 

Private Attributes

Geographic_linearring m_exterior_ring
 Exterior ring. More...
 
std::vector< Geographic_linearring, Malloc_allocator< Geographic_linearring > > m_interior_rings
 Interior rings (holes). More...
 

Additional Inherited Members

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

Detailed Description

A geographic (ellipsoidal) 2d polygon.

Constructor & Destructor Documentation

◆ Geographic_polygon()

gis::Geographic_polygon::Geographic_polygon ( )
inline

Member Function Documentation

◆ accept()

bool gis::Geographic_polygon::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::Polygon.

◆ clone()

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

Implements gis::Polygon.

◆ const_interior_rings()

decltype(m_interior_rings) const & gis::Geographic_polygon::const_interior_rings ( ) const

Get list of interior rings.

This function is used by the interface to Boost.Geometry.

Returns
The list of interior rings

◆ coordinate_system()

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

Gets the coordinate system.

Returns
The coordinate system type.

Implements gis::Geometry.

◆ empty()

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

Checks if the polygon is empty.

The polygon is considered empty if it has no rings.

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

Implements gis::Polygon.

◆ exterior_ring()

Linearring & gis::Geographic_polygon::exterior_ring ( )
inlineoverridevirtual

Returns the exterior ring of the polygon.

Note
If the polygon currently has no exterior ring, an empty one is added.
Returns
The exterior ring.

Implements gis::Polygon.

◆ geographic_exterior_ring()

Geographic_linearring & gis::Geographic_polygon::geographic_exterior_ring ( ) const

Get the exterior ring.

This function is used by the interface to Boost.Geometry.

Returns
The exterior ring.

◆ interior_ring()

Linearring & gis::Geographic_polygon::interior_ring ( std::size_t  n)
overridevirtual

Returns an interior ring of the polygon.

Parameters
nRing number, zero indexed.
Returns
The interior ring.

Implements gis::Polygon.

◆ interior_rings()

decltype(m_interior_rings) & gis::Geographic_polygon::interior_rings ( )

Get list of interior rings.

This function is used by the interface to Boost.Geometry.

Returns
The list of interior rings

◆ push_back() [1/2]

void gis::Geographic_polygon::push_back ( const Linearring lr)
overridevirtual

Adds a linear ring to the polygon.

The first ring will become the exterior ring. All following rings will be interior rings (holes).

Parameters
lrThe linear ring to add.

Implements gis::Polygon.

◆ push_back() [2/2]

void gis::Geographic_polygon::push_back ( Linearring &&  lr)
overridevirtual

Implements gis::Polygon.

◆ size()

std::size_t gis::Geographic_polygon::size ( ) const
overridevirtual

Returns the size of the polygon.

Returns
Number of rings in the polygon (exterior + interior).

Implements gis::Polygon.

Member Data Documentation

◆ m_exterior_ring

Geographic_linearring gis::Geographic_polygon::m_exterior_ring
private

Exterior ring.

◆ m_interior_rings

std::vector<Geographic_linearring, Malloc_allocator<Geographic_linearring> > gis::Geographic_polygon::m_interior_rings
private

Interior rings (holes).


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