MySQL 8.4.3
Source Code Documentation
dd::Spatial_reference_system_impl Class Reference

#include <spatial_reference_system_impl.h>

Inheritance diagram for dd::Spatial_reference_system_impl:
[legend]

Public Member Functions

 Spatial_reference_system_impl ()
 
const Object_tableobject_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_typedefinition () 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_implimpl () override
 
const Entity_object_implimpl () 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_typename () 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_keycreate_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_systemclone () const override
 Allocate a new object and invoke the copy constructor. More...
 
Spatial_reference_systemclone_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_typem_organization
 
std::optional< gis::srid_tm_organization_coordsys_id
 
String_type m_definition
 
std::unique_ptr< gis::srs::Spatial_reference_systemm_parsed_definition
 
std::optional< 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
void set_primary_key_value (const Raw_new_record &r) override
 
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_< use_pfs >
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()

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.

◆ clone_dropped_object_placeholder()

Spatial_reference_system * dd::Spatial_reference_system_impl::clone_dropped_object_placeholder ( ) const
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.

◆ created()

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

◆ cs_type()

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

◆ debug_print()

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

Implements dd::Weak_object.

◆ definition()

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

◆ description()

const std::optional< 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()

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()

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

The unique dictionary object id.

Reimplemented from dd::Entity_object_impl.

◆ impl() [1/2]

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

Reimplemented from dd::Entity_object_impl.

◆ impl() [2/2]

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

Reimplemented from dd::Entity_object_impl.

◆ is_cartesian()

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

◆ is_geographic()

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()

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()

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

◆ last_altered()

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()

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()

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

◆ organization()

const std::optional< String_type > & dd::Spatial_reference_system_impl::organization ( ) const
inlineoverridevirtual

◆ organization_coordsys_id()

const std::optional< 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()

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

◆ positive_north()

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

◆ prime_meridian()

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

◆ semi_major_axis()

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

◆ semi_minor_axis()

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()

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

◆ set_definition()

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

◆ set_description() [1/2]

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

◆ set_description() [2/2]

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

◆ set_last_altered()

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

◆ set_name()

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

Reimplemented from dd::Entity_object_impl.

◆ set_organization() [1/2]

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

◆ set_organization() [2/2]

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

◆ set_organization_coordsys_id() [1/2]

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

◆ set_organization_coordsys_id() [2/2]

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

◆ 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()

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

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

std::optional<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

std::optional<String_type> dd::Spatial_reference_system_impl::m_organization
private

◆ m_organization_coordsys_id

std::optional<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: