MySQL 8.4.3
Source Code Documentation
|
#include <spatial_reference_system_impl.h>
Public Member Functions | |
Spatial_reference_system_impl () | |
const Object_table & | object_table () const override |
bool | validate () const override |
bool | store_attributes (Raw_record *r) override |
bool | restore_attributes (const Raw_record &r) override |
void | serialize (Sdi_wcontext *wctx, Sdi_writer *w) const |
bool | deserialize (Sdi_rcontext *rctx, const RJ_Value &val) |
bool | parse_definition () |
Parse the SRS definition string. More... | |
ulonglong | created (bool convert_time) const override |
void | set_created (ulonglong created) override |
ulonglong | last_altered (bool convert_time) const override |
void | set_last_altered (ulonglong last_altered) override |
const std::optional< String_type > & | organization () const override |
void | set_organization (const String_type &organization) override |
void | set_organization (std::nullptr_t) override |
const std::optional< gis::srid_t > & | organization_coordsys_id () const override |
void | set_organization_coordsys_id (gis::srid_t organization_coordsys_id) override |
void | set_organization_coordsys_id (std::nullptr_t) override |
const String_type & | definition () const override |
void | set_definition (const String_type &definition) override |
gis::Coordinate_system | cs_type () const override |
bool | is_projected () const override |
bool | is_geographic () const override |
bool | is_cartesian () const override |
bool | is_lat_long () const override |
Check whether an SRS has latitude-longitude axis ordering. More... | |
double | semi_major_axis () const override |
double | semi_minor_axis () const override |
double | linear_unit () const override |
double | angular_unit () const override |
double | prime_meridian () const override |
bool | positive_east () const override |
bool | positive_north () const override |
bool | missing_towgs84 () const override |
Checks whether the SRS definition is missing a TOWGS84 clause. More... | |
double | to_radians (double d) const override |
Converts a coordinate value from the SRS unit to radians. More... | |
double | from_radians (double d) const override |
Converts a coordinate value from radians to the SRS unit. More... | |
double | to_normalized_latitude (double d) const override |
Converts a latitude value from the SRS unit and direction to the in-memory representation of latitude (radians, positive North). More... | |
double | from_normalized_latitude (double d) const override |
Converts a latitude value from the in-memory representation of latitude (radians, positive North) to the SRS unit and direction. More... | |
double | to_normalized_longitude (double d) const override |
Converts a longitude value from the SRS unit, direction and meridian to the in-memory representation of longitude (radians, positive East, Greenwich meridian). More... | |
double | from_normalized_longitude (double d) const override |
Converts a longitude value from the in-memory representation of longitude (radians, positive East, Greenwich meridian) to the SRS unit, direction and meridian. More... | |
bool | can_be_modified_to (const Spatial_reference_system &srs) const override |
Checks if this SRS can be changed to another SRS definition without changing any computations. More... | |
String_type | proj4_parameters () const override |
Gets the proj4 parameters for this SRS. More... | |
const std::optional< String_type > & | description () const override |
void | set_description (const String_type &description) override |
void | set_description (std::nullptr_t) override |
Entity_object_impl * | impl () override |
const Entity_object_impl * | impl () const override |
Object_id | id () const override |
The unique dictionary object id. More... | |
bool | is_persistent () const override |
Is dictionary object persistent in dictionary tables ? More... | |
const String_type & | name () const override |
void | set_name (const String_type &name) override |
void | debug_print (String_type &outb) const override |
Public Member Functions inherited from dd::Entity_object_impl | |
Entity_object_impl () | |
void | set_id (Object_id id) |
Object_key * | create_primary_key () const override |
bool | has_new_primary_key () const override |
Indicates that object is guaranteed to have primary key value which doesn't exist in database (e.g. More... | |
Public Member Functions inherited from dd::Weak_object | |
Weak_object ()=default | |
Weak_object (const Weak_object &)=default | |
virtual | ~Weak_object ()=default |
Public Member Functions inherited from dd::Weak_object_impl_< use_pfs > | |
Weak_object_impl_ ()=default | |
~Weak_object_impl_ () override=default | |
void * | operator new (size_t size, const std::nothrow_t &nt) noexcept |
void | operator delete (void *ptr, const std::nothrow_t &nt) noexcept |
void * | operator new (size_t size) noexcept |
void | operator delete (void *ptr) noexcept |
virtual bool | store (Open_dictionary_tables_ctx *otx) |
Store the DD object into DD table. More... | |
bool | drop (Open_dictionary_tables_ctx *otx) const |
Drop the DD object from DD table. More... | |
virtual bool | restore_children (Open_dictionary_tables_ctx *) |
virtual bool | store_children (Open_dictionary_tables_ctx *) |
virtual bool | drop_children (Open_dictionary_tables_ctx *) const |
Public Member Functions inherited from dd::Spatial_reference_system | |
virtual bool | update_id_key (Id_key *key) const |
virtual bool | update_name_key (Name_key *key) const |
virtual bool | update_aux_key (Aux_key *) const |
~Spatial_reference_system () override=default | |
Static Public Member Functions | |
static void | register_tables (Open_dictionary_tables_ctx *otx) |
Static Public Member Functions inherited from dd::Spatial_reference_system | |
static bool | update_id_key (Id_key *key, Object_id id) |
static bool | update_name_key (Name_key *key, const String_type &name) |
Private Member Functions | |
Spatial_reference_system_impl (const Spatial_reference_system_impl &srs) | |
Spatial_reference_system * | clone () const override |
Allocate a new object and invoke the copy constructor. More... | |
Spatial_reference_system * | clone_dropped_object_placeholder () const override |
Allocate a new object which can serve as a placeholder for the original object in the Dictionary_client's dropped registry. More... | |
Private Attributes | |
ulonglong | m_created |
ulonglong | m_last_altered |
std::optional< String_type > | m_organization |
std::optional< gis::srid_t > | m_organization_coordsys_id |
String_type | m_definition |
std::unique_ptr< gis::srs::Spatial_reference_system > | m_parsed_definition |
std::optional< String_type > | m_description |
|
inline |
|
inlineprivate |
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Checks if this SRS can be changed to another SRS definition without changing any computations.
It's not allowed to change any numbers that affect computations, but it is allowed to add TOWGS84 parameters if the SRS doesn't already have any.
[in] | srs | The SRS to compare with. |
true | The two SRSs are semantically the same. |
false | The two SRss are not semantically the same, or of types which comparison rules are unknown (e.g., unknown projection). |
Implements dd::Spatial_reference_system.
|
inlineoverrideprivatevirtual |
Allocate a new object and invoke the copy constructor.
Implements dd::Spatial_reference_system.
|
inlineoverrideprivatevirtual |
Allocate a new object which can serve as a placeholder for the original object in the Dictionary_client's dropped registry.
Such object has the same keys as the original but has no other info and as result occupies less memory.
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Implements dd::Weak_object.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
bool dd::Spatial_reference_system_impl::deserialize | ( | Sdi_rcontext * | rctx, |
const RJ_Value & | val | ||
) |
|
inlineoverridevirtual |
Converts a latitude value from the in-memory representation of latitude (radians, positive North) to the SRS unit and direction.
[in] | d | Latitude in radians, positive North. |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Converts a longitude value from the in-memory representation of longitude (radians, positive East, Greenwich meridian) to the SRS unit, direction and meridian.
[in] | d | Longitude in radians, positive East, Greenwich meridian. |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Converts a coordinate value from radians to the SRS unit.
The conversion does not take axis direction or meridian shifting into account.
[in] | d | Value in radians. |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
The unique dictionary object id.
Reimplemented from dd::Entity_object_impl.
|
inlineoverridevirtual |
Reimplemented from dd::Entity_object_impl.
|
inlineoverridevirtual |
Reimplemented from dd::Entity_object_impl.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
|
overridevirtual |
Check whether an SRS has latitude-longitude axis ordering.
true | the axis order is latitude-longitude |
false | the SRS is not geographic, or is geographic longitude-latitude |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Is dictionary object persistent in dictionary tables ?
Reimplemented from dd::Entity_object_impl.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Checks whether the SRS definition is missing a TOWGS84 clause.
TOWGS84 clauses are not mandatory. However, in order to transform to/from an SRS, the SRS must either be WGS 84, be a projection of WGS 84, or have a TOWGS84 clause in the definition.
true | The SRS is missing a TOWGS84 clause. |
false | The SRS has or doesn't need a TOWGS84 clause. |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Reimplemented from dd::Entity_object_impl.
|
overridevirtual |
Implements dd::Weak_object_impl_< use_pfs >.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
bool dd::Spatial_reference_system_impl::parse_definition | ( | ) |
Parse the SRS definition string.
Used internally. Made public to make it easier to write unit tests.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Gets the proj4 parameters for this SRS.
An empty string is returned in case we don't know how to create proj4 parameters for this SRS.
Implements dd::Spatial_reference_system.
|
static |
|
overridevirtual |
Implements dd::Weak_object_impl_< use_pfs >.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
void dd::Spatial_reference_system_impl::serialize | ( | Sdi_wcontext * | wctx, |
Sdi_writer * | w | ||
) | const |
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Reimplemented from dd::Entity_object_impl.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Implements dd::Spatial_reference_system.
|
overridevirtual |
Implements dd::Weak_object_impl_< use_pfs >.
|
inlineoverridevirtual |
Converts a latitude value from the SRS unit and direction to the in-memory representation of latitude (radians, positive North).
[in] | d | Latitude in the SRS unit and axis direction. |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Converts a longitude value from the SRS unit, direction and meridian to the in-memory representation of longitude (radians, positive East, Greenwich meridian).
[in] | d | Longitude in the SRS unit, axis direction and meridian. |
Implements dd::Spatial_reference_system.
|
inlineoverridevirtual |
Converts a coordinate value from the SRS unit to radians.
The conversion does not take axis direction or meridian shifting into account.
[in] | d | Value in the SRS unit. |
Implements dd::Spatial_reference_system.
|
overridevirtual |
Implements dd::Weak_object_impl_< use_pfs >.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |