MySQL 9.1.0
Source Code Documentation
|
A geographic (longitude-latitude) spatial reference system. More...
#include <srs.h>
Public Member Functions | |
Geographic_srs () | |
Srs_type | srs_type () const override |
Get the type of spatial reference system: projected, geometric, etc. More... | |
Spatial_reference_system * | clone () override |
Clone the object. More... | |
virtual bool | init (srid_t srid, wkt_parser::Geographic_cs *g) |
Initialize from parse tree. More... | |
bool | has_towgs84 () const override |
Checks if this SRS has valid Bursa Wolf parameters. More... | |
bool | is_wgs84_based () const override |
Checks if this SRS is WGS 84 or a projection based on WGS 84. More... | |
Axis_direction | axis_direction (const int axis) const override |
Retrieve the axis direction of the spatial reference system. More... | |
std::string | partial_proj4_parameters () const |
double | semi_major_axis () const |
double | inverse_flattening () const |
double | linear_unit () const override |
Retrieve how long the unit of the spatial reference system is in meters. More... | |
double | angular_unit () const override |
Retrieve the angular unit relative to radians. More... | |
double | prime_meridian () const override |
Retrieve the prime meridian relative to Greenwich. More... | |
bool | can_be_modified_to (const Spatial_reference_system &srs) const override |
Checks if this SRS can be changed to another SRS without causing computational incompatibilities. More... | |
std::string | proj4_parameters () const override |
Retrieve the proj4 parameter string. More... | |
Public Member Functions inherited from gis::srs::Spatial_reference_system | |
Spatial_reference_system ()=default | |
Spatial_reference_system (const Spatial_reference_system &)=default | |
Spatial_reference_system (Spatial_reference_system &&)=default | |
virtual | ~Spatial_reference_system ()=default |
Private Attributes | |
double | m_semi_major_axis |
Semi-major axis of ellipsoid. More... | |
double | m_inverse_flattening |
Inverse flattening of ellipsoid. More... | |
double | m_towgs84 [7] |
Bursa Wolf transformation parameters used to transform to WGS84. More... | |
double | m_prime_meridian |
Longitude of the prime meridian relative to the Greenwich Meridian (measured in m_angular_unit). More... | |
double | m_angular_unit |
Conversion factor for the angular unit relative to radians. More... | |
Axis_direction | m_axes [2] |
Direction of x and y axis, respectively. More... | |
bool | m_is_wgs84 |
Whether this SRS is WGS 84. More... | |
A geographic (longitude-latitude) spatial reference system.
|
inline |
|
inlineoverridevirtual |
Retrieve the angular unit relative to radians.
Implements gis::srs::Spatial_reference_system.
|
inlineoverridevirtual |
Retrieve the axis direction of the spatial reference system.
axis | axis number, zero indexed |
Implements gis::srs::Spatial_reference_system.
|
overridevirtual |
Checks if this SRS can be changed to another SRS without causing computational incompatibilities.
This means checking that all values in the two SRSs that affect computations are the same. The syntax of the SRS definitions may still vary, e.g., by using different names or by having different authority codes.
In some cases, e.g., unknown projection methods, we don't know how to compare the two SRSs. In that case, we fail by saying that the SRSs are not the same.
The operation is not commutative. The SRS parameter is allowed to have a TOWGS84 specification even though this object doesn't. The opposite is not necessarily true. If this object lacks TOWGS84 information, transformation operations are forbidden on this SRS. Adding that possibility changes what computations are available, but it doesn't change the result of any computation that can currently be done.
An SRS that is currently identified as WGS 84 may both add and remove TOWGS84 information as long as the parameters are all 0. Adding a non-all-zero TOWGS84 clause to a WGS 84 SRS is not allowed.
srs | The SRS to compare with. |
true | The two SRSs are semantically the same. |
false | The two SRSs are semantically different, or we don't know how to compare them. |
Implements gis::srs::Spatial_reference_system.
|
inlineoverridevirtual |
Clone the object.
Implements gis::srs::Spatial_reference_system.
|
inlineoverridevirtual |
Checks if this SRS has valid Bursa Wolf parameters.
true | Transformation parameters are specified. |
false | Transformation parameters are not specified. |
Implements gis::srs::Spatial_reference_system.
|
virtual |
Initialize from parse tree.
[in] | srid | Spatial reference system ID to use when reporting errors |
[in] | g | Parser output |
true | An error has occurred. The error has been flagged. |
false | Success |
|
inline |
|
inlineoverridevirtual |
Checks if this SRS is WGS 84 or a projection based on WGS 84.
true | This SRS is WGS 84 or a projection of WGS 84. |
false | This SRS is neither WGS 84 or a projection of WGS 84. |
Implements gis::srs::Spatial_reference_system.
|
inlineoverridevirtual |
Retrieve how long the unit of the spatial reference system is in meters.
Implements gis::srs::Spatial_reference_system.
std::string gis::srs::Geographic_srs::partial_proj4_parameters | ( | ) | const |
|
inlineoverridevirtual |
Retrieve the prime meridian relative to Greenwich.
The prime meridian is returned in the angular unit of the SRS. Positive numbers are East of Greenwich.
Implements gis::srs::Spatial_reference_system.
|
overridevirtual |
Retrieve the proj4 parameter string.
If the SRS can't be represented as a proj4 parameter string, an empty string is returned.
Reimplemented from gis::srs::Spatial_reference_system.
|
inline |
|
inlineoverridevirtual |
Get the type of spatial reference system: projected, geometric, etc.
Implements gis::srs::Spatial_reference_system.
|
private |
Conversion factor for the angular unit relative to radians.
|
private |
Direction of x and y axis, respectively.
|
private |
Inverse flattening of ellipsoid.
|
private |
Whether this SRS is WGS 84.
|
private |
Longitude of the prime meridian relative to the Greenwich Meridian (measured in m_angular_unit).
Positive values are East of Greenwich.
|
private |
Semi-major axis of ellipsoid.
|
private |
Bursa Wolf transformation parameters used to transform to WGS84.