MySQL 8.0.39
Source Code Documentation
|
A 2d point. More...
#include <geometries.h>
Public Member Functions | |
Point () | |
Point (double x, double y) | |
Geometry_type | type () const override |
Gets the geometry type of the object. 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... | |
Point * | clone () const override=0 |
template<std::size_t K> | |
double | get () const |
Gets a coordinate value. More... | |
double | x () const |
Gets the first coordinate value. More... | |
double | y () const |
Gets the second coordinate value. More... | |
template<std::size_t K> | |
void | set (double d) |
Sets a coordinate. More... | |
void | x (double d) |
Sets the first coordinate value. More... | |
void | y (double d) |
Sets the second coordinate value. More... | |
template<> | |
double | get () const |
template<> | |
double | get () const |
template<> | |
void | set (double d) |
template<> | |
void | set (double d) |
Public Member Functions inherited from gis::Geometry | |
Geometry ()=default | |
virtual | ~Geometry ()=default |
Geometry (const Geometry &)=default | |
Geometry & | operator= (const Geometry &)=default |
virtual Coordinate_system | coordinate_system () const =0 |
Gets the coordinate system. More... | |
Private Attributes | |
double | m_x |
First coordinate (X or longitude). More... | |
double | m_y |
Second coordinate (Y or latitude). More... | |
A 2d point.
Point is an instantiable type in SQL.
|
inline |
|
inline |
|
overridevirtual |
Applies a hierarchical visitor to this geometry.
v | A hierarchical visitor. |
true | The execution was aborted by the visitor. |
false | The execution completed. |
Implements gis::Geometry.
|
overridepure virtual |
Implements gis::Geometry.
Implemented in gis::Cartesian_point, and gis::Geographic_point.
double gis::Point::get | ( | ) | const |
double gis::Point::get | ( | ) | const |
double gis::Point::get | ( | ) | const |
Gets a coordinate value.
This function signature must match the expectations of Boost.Geometry.
K | Coordinate number, zero indexed. |
|
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.
true | The geometry represents the empty point set. |
false | The geometry represent a non-empty point set. |
Implements gis::Geometry.
void gis::Point::set | ( | double | d | ) |
void gis::Point::set | ( | double | d | ) |
void gis::Point::set | ( | double | d | ) |
Sets a coordinate.
This function signature must match the expectations of Boost.Geometry.
K | Coordinate number, zero indexed. |
d | The coordinate value. |
|
inlineoverridevirtual |
double gis::Point::x | ( | ) | const |
Gets the first coordinate value.
For geographic points, the first coordinate is longitude.
void gis::Point::x | ( | double | d | ) |
Sets the first coordinate value.
For geographic points, the first coordinate is longitude.
d | The coordinate value. |
double gis::Point::y | ( | ) | const |
Gets the second coordinate value.
For geographic points, the second coordinate is latitude.
void gis::Point::y | ( | double | d | ) |
Sets the second coordinate value.
For geographic points, the second coordinate is latitude.
d | The coordinate value. |
|
private |
First coordinate (X or longitude).
Geographic coordinates are in radians, positive to the East of Greenwich. Cartesian coordinates are in the SRSs length unit.
|
private |
Second coordinate (Y or latitude).
Geographic coordinates are in radians, positive to the North of the Equator. Cartesian coordinates are in the SRSs length unit.