MySQL  8.0.19
Source Code Documentation
dd::Spatial_reference_system_impl Class Reference

#include <spatial_reference_system_impl.h>

Inheritance diagram for dd::Spatial_reference_system_impl:
dd::Entity_object_impl dd::Spatial_reference_system dd::Entity_object dd::Weak_object_impl dd::Entity_object dd::Weak_object dd::Weak_object dd::Weak_object

Public Member Functions

 Spatial_reference_system_impl ()
 
virtual const Object_tableobject_table () const override
 
virtual bool validate () const override
 
virtual bool store_attributes (Raw_record *r) override
 
virtual 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...
 
virtual ulonglong created (bool convert_time) const override
 
virtual void set_created (ulonglong created) override
 
virtual ulonglong last_altered (bool convert_time) const override
 
virtual void set_last_altered (ulonglong last_altered) override
 
virtual const Mysql::Nullable< String_type > & organization () const override
 
virtual void set_organization (const String_type &organization) override
 
virtual void set_organization (std::nullptr_t) override
 
virtual const Mysql::Nullable< gis::srid_t > & organization_coordsys_id () const override
 
virtual void set_organization_coordsys_id (gis::srid_t organization_coordsys_id) override
 
virtual void set_organization_coordsys_id (std::nullptr_t) override
 
virtual const String_typedefinition () const override
 
virtual void set_definition (const String_type &definition) override
 
virtual gis::Coordinate_system cs_type () const override
 
virtual bool is_projected () const override
 
virtual bool is_geographic () const override
 
virtual bool is_cartesian () const override
 
virtual bool is_lat_long () const override
 Check whether an SRS has latitude-longitude axis ordering. More...
 
virtual double semi_major_axis () const override
 
virtual double semi_minor_axis () const override
 
double linear_unit () const override
 
virtual double angular_unit () const override
 
virtual double prime_meridian () const override
 
virtual bool positive_east () const override
 
virtual bool positive_north () const override
 
virtual bool missing_towgs84 () const override
 Checks whether the SRS definition is missing a TOWGS84 clause. More...
 
virtual double to_radians (double d) const override
 Converts a coordinate value from the SRS unit to radians. More...
 
virtual 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...
 
virtual const Mysql::Nullable< String_type > & description () const override
 
virtual void set_description (const String_type &description) override
 
virtual void set_description (std::nullptr_t) override
 
virtual Entity_object_implimpl () override
 
virtual const Entity_object_implimpl () const override
 
virtual Object_id id () const override
 The unique dictionary object id. More...
 
virtual bool is_persistent () const override
 Is dictionary object persistent in dictionary tables ? More...
 
virtual const String_typename () const override
 
virtual void set_name (const String_type &name) override
 
virtual 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)
 
virtual Object_keycreate_primary_key () const override
 
virtual 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 ()
 
 Weak_object (const Weak_object &)=default
 
virtual ~Weak_object ()
 
- Public Member Functions inherited from dd::Weak_object_impl
 Weak_object_impl ()
 
virtual ~Weak_object_impl ()
 
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
 
virtual ~Spatial_reference_system ()
 

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_systemclone () const override
 Allocate a new object and invoke the copy constructor. More...
 

Private Attributes

ulonglong m_created
 
ulonglong m_last_altered
 
Mysql::Nullable< String_typem_organization
 
Mysql::Nullable< gis::srid_tm_organization_coordsys_id
 
String_type m_definition
 
std::unique_ptr< gis::srs::Spatial_reference_systemm_parsed_definition
 
Mysql::Nullable< String_typem_description
 

Additional Inherited Members

- Public Types inherited from dd::Spatial_reference_system
typedef Spatial_reference_system_impl Impl
 
typedef Spatial_reference_system Cache_partition
 
typedef tables::Spatial_reference_systems DD_table
 
typedef Primary_id_key Id_key
 
typedef Item_name_key Name_key
 
typedef Void_key Aux_key
 
- Protected Member Functions inherited from dd::Entity_object_impl
virtual void set_primary_key_value (const Raw_new_record &r) override
 
virtual void fix_has_new_primary_key () override
 
void restore_id (const Raw_record &r, int field_idx)
 
void restore_name (const Raw_record &r, int field_idx)
 
bool store_id (Raw_record *r, int field_idx)
 
bool store_name (Raw_record *r, int field_idx)
 
bool store_name (Raw_record *r, int field_idx, bool is_null)
 
void serialize (Sdi_wcontext *wctx, Sdi_writer *w) const
 
bool deserialize (Sdi_rcontext *rctx, const RJ_Value &val)
 
 Entity_object_impl (const Entity_object_impl &src)
 
- Protected Member Functions inherited from dd::Weak_object_impl
bool check_parent_consistency (Entity_object_impl *parent, Object_id parent_id) const
 

Constructor & Destructor Documentation

◆ Spatial_reference_system_impl() [1/2]

dd::Spatial_reference_system_impl::Spatial_reference_system_impl ( )
inline

◆ Spatial_reference_system_impl() [2/2]

dd::Spatial_reference_system_impl::Spatial_reference_system_impl ( const Spatial_reference_system_impl srs)
inlineprivate

Member Function Documentation

◆ angular_unit()

virtual double dd::Spatial_reference_system_impl::angular_unit ( ) const
inlineoverridevirtual

◆ can_be_modified_to()

bool dd::Spatial_reference_system_impl::can_be_modified_to ( const Spatial_reference_system srs) const
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.

Parameters
[in]srsThe SRS to compare with.
Return values
trueThe two SRSs are semantically the same.
falseThe two SRss are not semantically the same, or of types which comparison rules are unknown (e.g., unknown projection).

Implements dd::Spatial_reference_system.

◆ clone()

Spatial_reference_system* dd::Spatial_reference_system_impl::clone ( ) const
inlineoverrideprivatevirtual

Allocate a new object and invoke the copy constructor.

Returns
pointer to dynamically allocated copy

Implements dd::Spatial_reference_system.

◆ created()

virtual ulonglong dd::Spatial_reference_system_impl::created ( bool  convert_time) const
inlineoverridevirtual

◆ cs_type()

virtual gis::Coordinate_system dd::Spatial_reference_system_impl::cs_type ( ) const
inlineoverridevirtual

◆ debug_print()

virtual void dd::Spatial_reference_system_impl::debug_print ( String_type outb) const
inlineoverridevirtual

Implements dd::Weak_object.

◆ definition()

virtual const String_type& dd::Spatial_reference_system_impl::definition ( ) const
inlineoverridevirtual

◆ description()

virtual const Mysql::Nullable<String_type>& dd::Spatial_reference_system_impl::description ( ) const
inlineoverridevirtual

◆ deserialize()

bool dd::Spatial_reference_system_impl::deserialize ( Sdi_rcontext rctx,
const RJ_Value val 
)

◆ from_normalized_latitude()

double dd::Spatial_reference_system_impl::from_normalized_latitude ( double  d) const
inlineoverridevirtual

Converts a latitude value from the in-memory representation of latitude (radians, positive North) to the SRS unit and direction.

Parameters
[in]dLatitude in radians, positive North.
Returns
Latitude in the SRS unit and axis direction.

Implements dd::Spatial_reference_system.

◆ from_normalized_longitude()

double dd::Spatial_reference_system_impl::from_normalized_longitude ( double  d) const
inlineoverridevirtual

Converts a longitude value from the in-memory representation of longitude (radians, positive East, Greenwich meridian) to the SRS unit, direction and meridian.

Parameters
[in]dLongitude in radians, positive East, Greenwich meridian.
Returns
Longitude in the SRS unit, axis direction and meridian.

Implements dd::Spatial_reference_system.

◆ from_radians()

virtual double dd::Spatial_reference_system_impl::from_radians ( double  d) const
inlineoverridevirtual

Converts a coordinate value from radians to the SRS unit.

The conversion does not take axis direction or meridian shifting into account.

Parameters
[in]dValue in radians.
Returns
Value in the SRS unit.

Implements dd::Spatial_reference_system.

◆ id()

virtual Object_id dd::Spatial_reference_system_impl::id ( ) const
inlineoverridevirtual

The unique dictionary object id.

Reimplemented from dd::Entity_object_impl.

◆ impl() [1/2]

virtual const Entity_object_impl* dd::Spatial_reference_system_impl::impl ( ) const
inlineoverridevirtual

Reimplemented from dd::Entity_object_impl.

◆ impl() [2/2]

virtual Entity_object_impl* dd::Spatial_reference_system_impl::impl ( )
inlineoverridevirtual

Reimplemented from dd::Entity_object_impl.

◆ is_cartesian()

virtual bool dd::Spatial_reference_system_impl::is_cartesian ( ) const
inlineoverridevirtual

◆ is_geographic()

virtual bool dd::Spatial_reference_system_impl::is_geographic ( ) const
inlineoverridevirtual

◆ is_lat_long()

bool dd::Spatial_reference_system_impl::is_lat_long ( ) const
overridevirtual

Check whether an SRS has latitude-longitude axis ordering.

Return values
truethe axis order is latitude-longitude
falsethe SRS is not geographic, or is geographic longitude-latitude

Implements dd::Spatial_reference_system.

◆ is_persistent()

virtual bool dd::Spatial_reference_system_impl::is_persistent ( ) const
inlineoverridevirtual

Is dictionary object persistent in dictionary tables ?

Reimplemented from dd::Entity_object_impl.

◆ is_projected()

virtual bool dd::Spatial_reference_system_impl::is_projected ( ) const
inlineoverridevirtual

◆ last_altered()

virtual ulonglong dd::Spatial_reference_system_impl::last_altered ( bool  convert_time) const
inlineoverridevirtual

◆ linear_unit()

double dd::Spatial_reference_system_impl::linear_unit ( ) const
inlineoverridevirtual

◆ missing_towgs84()

virtual bool dd::Spatial_reference_system_impl::missing_towgs84 ( ) const
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.

Return values
trueThe SRS is missing a TOWGS84 clause.
falseThe SRS has or doesn't need a TOWGS84 clause.

Implements dd::Spatial_reference_system.

◆ name()

virtual const String_type& dd::Spatial_reference_system_impl::name ( ) const
inlineoverridevirtual

Reimplemented from dd::Entity_object_impl.

◆ object_table()

const Object_table & dd::Spatial_reference_system_impl::object_table ( ) const
overridevirtual

Implements dd::Weak_object_impl.

◆ organization()

virtual const Mysql::Nullable<String_type>& dd::Spatial_reference_system_impl::organization ( ) const
inlineoverridevirtual

◆ organization_coordsys_id()

virtual const Mysql::Nullable<gis::srid_t>& dd::Spatial_reference_system_impl::organization_coordsys_id ( ) const
inlineoverridevirtual

◆ parse_definition()

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.

◆ positive_east()

virtual bool dd::Spatial_reference_system_impl::positive_east ( ) const
inlineoverridevirtual

◆ positive_north()

virtual bool dd::Spatial_reference_system_impl::positive_north ( ) const
inlineoverridevirtual

◆ prime_meridian()

virtual double dd::Spatial_reference_system_impl::prime_meridian ( ) const
inlineoverridevirtual

◆ proj4_parameters()

String_type dd::Spatial_reference_system_impl::proj4_parameters ( ) const
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.

Returns
The proj4 parameter string, or an empty string.

Implements dd::Spatial_reference_system.

◆ register_tables()

void dd::Spatial_reference_system_impl::register_tables ( Open_dictionary_tables_ctx otx)
static

◆ restore_attributes()

bool dd::Spatial_reference_system_impl::restore_attributes ( const Raw_record r)
overridevirtual

Implements dd::Weak_object_impl.

◆ semi_major_axis()

virtual double dd::Spatial_reference_system_impl::semi_major_axis ( ) const
inlineoverridevirtual

◆ semi_minor_axis()

virtual double dd::Spatial_reference_system_impl::semi_minor_axis ( ) const
inlineoverridevirtual

◆ serialize()

void dd::Spatial_reference_system_impl::serialize ( Sdi_wcontext wctx,
Sdi_writer w 
) const

◆ set_created()

virtual void dd::Spatial_reference_system_impl::set_created ( ulonglong  created)
inlineoverridevirtual

◆ set_definition()

virtual void dd::Spatial_reference_system_impl::set_definition ( const String_type definition)
inlineoverridevirtual

◆ set_description() [1/2]

virtual void dd::Spatial_reference_system_impl::set_description ( const String_type description)
inlineoverridevirtual

◆ set_description() [2/2]

virtual void dd::Spatial_reference_system_impl::set_description ( std::nullptr_t  )
inlineoverridevirtual

◆ set_last_altered()

virtual void dd::Spatial_reference_system_impl::set_last_altered ( ulonglong  last_altered)
inlineoverridevirtual

◆ set_name()

virtual void dd::Spatial_reference_system_impl::set_name ( const String_type name)
inlineoverridevirtual

Reimplemented from dd::Entity_object_impl.

◆ set_organization() [1/2]

virtual void dd::Spatial_reference_system_impl::set_organization ( const String_type organization)
inlineoverridevirtual

◆ set_organization() [2/2]

virtual void dd::Spatial_reference_system_impl::set_organization ( std::nullptr_t  )
inlineoverridevirtual

◆ set_organization_coordsys_id() [1/2]

virtual void dd::Spatial_reference_system_impl::set_organization_coordsys_id ( gis::srid_t  organization_coordsys_id)
inlineoverridevirtual

◆ set_organization_coordsys_id() [2/2]

virtual void dd::Spatial_reference_system_impl::set_organization_coordsys_id ( std::nullptr_t  )
inlineoverridevirtual

◆ store_attributes()

bool dd::Spatial_reference_system_impl::store_attributes ( Raw_record r)
overridevirtual

Implements dd::Weak_object_impl.

◆ to_normalized_latitude()

double dd::Spatial_reference_system_impl::to_normalized_latitude ( double  d) const
inlineoverridevirtual

Converts a latitude value from the SRS unit and direction to the in-memory representation of latitude (radians, positive North).

Parameters
[in]dLatitude in the SRS unit and axis direction.
Returns
Latitude in radians, positive North.

Implements dd::Spatial_reference_system.

◆ to_normalized_longitude()

double dd::Spatial_reference_system_impl::to_normalized_longitude ( double  d) const
inlineoverridevirtual

Converts a longitude value from the SRS unit, direction and meridian to the in-memory representation of longitude (radians, positive East, Greenwich meridian).

Parameters
[in]dLongitude in the SRS unit, axis direction and meridian.
Returns
Longitude in radians, positive East, Greenwich meridian.

Implements dd::Spatial_reference_system.

◆ to_radians()

virtual double dd::Spatial_reference_system_impl::to_radians ( double  d) const
inlineoverridevirtual

Converts a coordinate value from the SRS unit to radians.

The conversion does not take axis direction or meridian shifting into account.

Parameters
[in]dValue in the SRS unit.
Returns
Value in radians.

Implements dd::Spatial_reference_system.

◆ validate()

bool dd::Spatial_reference_system_impl::validate ( ) const
overridevirtual

Implements dd::Weak_object_impl.

Member Data Documentation

◆ m_created

ulonglong dd::Spatial_reference_system_impl::m_created
private

◆ m_definition

String_type dd::Spatial_reference_system_impl::m_definition
private

◆ m_description

Mysql::Nullable<String_type> dd::Spatial_reference_system_impl::m_description
private

◆ m_last_altered

ulonglong dd::Spatial_reference_system_impl::m_last_altered
private

◆ m_organization

Mysql::Nullable<String_type> dd::Spatial_reference_system_impl::m_organization
private

◆ m_organization_coordsys_id

Mysql::Nullable<gis::srid_t> dd::Spatial_reference_system_impl::m_organization_coordsys_id
private

◆ m_parsed_definition

std::unique_ptr<gis::srs::Spatial_reference_system> dd::Spatial_reference_system_impl::m_parsed_definition
private

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