MySQL 9.1.0
Source Code Documentation
gis::srs::Spatial_reference_system Class Referenceabstract

Superclass for all spatial reference systems. More...

#include <srs.h>

Inheritance diagram for gis::srs::Spatial_reference_system:
[legend]

Public Member Functions

 Spatial_reference_system ()=default
 
 Spatial_reference_system (const Spatial_reference_system &)=default
 
 Spatial_reference_system (Spatial_reference_system &&)=default
 
virtual ~Spatial_reference_system ()=default
 
virtual Srs_type srs_type () const =0
 Get the type of spatial reference system: projected, geometric, etc. More...
 
virtual Spatial_reference_systemclone ()=0
 Clone the object. More...
 
virtual Axis_direction axis_direction (const int axis) const =0
 Retrieve the axis direction of the spatial reference system. More...
 
virtual double angular_unit () const =0
 Retrieve the angular unit relative to radians. More...
 
virtual double linear_unit () const =0
 Retrieve how long the unit of the spatial reference system is in meters. More...
 
virtual double prime_meridian () const =0
 Retrieve the prime meridian relative to Greenwich. More...
 
virtual bool can_be_modified_to (const Spatial_reference_system &srs) const =0
 Checks if this SRS can be changed to another SRS without causing computational incompatibilities. More...
 
virtual std::string proj4_parameters () const
 Retrieve the proj4 parameter string. More...
 
virtual bool has_towgs84 () const =0
 Checks if this SRS has valid Bursa Wolf parameters. More...
 
virtual bool is_wgs84_based () const =0
 Checks if this SRS is WGS 84 or a projection based on WGS 84. More...
 

Detailed Description

Superclass for all spatial reference systems.

Constructor & Destructor Documentation

◆ Spatial_reference_system() [1/3]

gis::srs::Spatial_reference_system::Spatial_reference_system ( )
default

◆ Spatial_reference_system() [2/3]

gis::srs::Spatial_reference_system::Spatial_reference_system ( const Spatial_reference_system )
default

◆ Spatial_reference_system() [3/3]

gis::srs::Spatial_reference_system::Spatial_reference_system ( Spatial_reference_system &&  )
default

◆ ~Spatial_reference_system()

virtual gis::srs::Spatial_reference_system::~Spatial_reference_system ( )
virtualdefault

Member Function Documentation

◆ angular_unit()

virtual double gis::srs::Spatial_reference_system::angular_unit ( ) const
pure virtual

Retrieve the angular unit relative to radians.

Returns
Conversion factor.

Implemented in gis::srs::Geographic_srs, and gis::srs::Projected_srs.

◆ axis_direction()

virtual Axis_direction gis::srs::Spatial_reference_system::axis_direction ( const int  axis) const
pure virtual

Retrieve the axis direction of the spatial reference system.

Parameters
axisaxis number, zero indexed
Returns
Axis direction

Implemented in gis::srs::Geographic_srs, and gis::srs::Projected_srs.

◆ can_be_modified_to()

virtual bool gis::srs::Spatial_reference_system::can_be_modified_to ( const Spatial_reference_system srs) const
pure virtual

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.

Parameters
srsThe SRS to compare with.
Return values
trueThe two SRSs are semantically the same.
falseThe two SRSs are semantically different, or we don't know how to compare them.

Implemented in gis::srs::Unknown_projected_srs, gis::srs::Popular_visualisation_pseudo_mercator_srs, gis::srs::Lambert_azimuthal_equal_area_spherical_srs, gis::srs::Equidistant_cylindrical_srs, gis::srs::Equidistant_cylindrical_spherical_srs, gis::srs::Krovak_north_orientated_srs, gis::srs::Krovak_modified_srs, gis::srs::Krovak_modified_north_orientated_srs, gis::srs::Lambert_conic_conformal_2sp_michigan_srs, gis::srs::Colombia_urban_srs, gis::srs::Lambert_conic_conformal_1sp_srs, gis::srs::Lambert_conic_conformal_2sp_srs, gis::srs::Lambert_conic_conformal_2sp_belgium_srs, gis::srs::Mercator_variant_a_srs, gis::srs::Mercator_variant_b_srs, gis::srs::Cassini_soldner_srs, gis::srs::Transverse_mercator_srs, gis::srs::Transverse_mercator_south_orientated_srs, gis::srs::Oblique_stereographic_srs, gis::srs::Polar_stereographic_variant_a_srs, gis::srs::New_zealand_map_grid_srs, gis::srs::Hotine_oblique_mercator_variant_a_srs, gis::srs::Laborde_oblique_mercator_srs, gis::srs::Hotine_oblique_mercator_variant_b_srs, gis::srs::Tunisia_mining_grid_srs, gis::srs::Lambert_conic_near_conformal_srs, gis::srs::American_polyconic_srs, gis::srs::Krovak_srs, gis::srs::Lambert_azimuthal_equal_area_srs, gis::srs::Albers_equal_area_srs, gis::srs::Transverse_mercator_zoned_grid_system_srs, gis::srs::Lambert_conic_conformal_west_orientated_srs, gis::srs::Bonne_south_orientated_srs, gis::srs::Polar_stereographic_variant_b_srs, gis::srs::Polar_stereographic_variant_c_srs, gis::srs::Guam_projection_srs, gis::srs::Modified_azimuthal_equidistant_srs, gis::srs::Hyperbolic_cassini_soldner_srs, gis::srs::Lambert_cylindrical_equal_area_spherical_srs, gis::srs::Lambert_cylindrical_equal_area_srs, and gis::srs::Geographic_srs.

◆ clone()

virtual Spatial_reference_system * gis::srs::Spatial_reference_system::clone ( )
pure virtual

Clone the object.

Returns
A new Spatial_reference_system object

Implemented in gis::srs::Geographic_srs, gis::srs::Unknown_projected_srs, gis::srs::Popular_visualisation_pseudo_mercator_srs, gis::srs::Lambert_azimuthal_equal_area_spherical_srs, gis::srs::Equidistant_cylindrical_srs, gis::srs::Equidistant_cylindrical_spherical_srs, gis::srs::Krovak_north_orientated_srs, gis::srs::Krovak_modified_srs, gis::srs::Krovak_modified_north_orientated_srs, gis::srs::Lambert_conic_conformal_2sp_michigan_srs, gis::srs::Colombia_urban_srs, gis::srs::Lambert_conic_conformal_1sp_srs, gis::srs::Lambert_conic_conformal_2sp_srs, gis::srs::Lambert_conic_conformal_2sp_belgium_srs, gis::srs::Mercator_variant_a_srs, gis::srs::Mercator_variant_b_srs, gis::srs::Cassini_soldner_srs, gis::srs::Transverse_mercator_srs, gis::srs::Transverse_mercator_south_orientated_srs, gis::srs::Oblique_stereographic_srs, gis::srs::Polar_stereographic_variant_a_srs, gis::srs::New_zealand_map_grid_srs, gis::srs::Hotine_oblique_mercator_variant_a_srs, gis::srs::Laborde_oblique_mercator_srs, gis::srs::Hotine_oblique_mercator_variant_b_srs, gis::srs::Tunisia_mining_grid_srs, gis::srs::Lambert_conic_near_conformal_srs, gis::srs::American_polyconic_srs, gis::srs::Krovak_srs, gis::srs::Lambert_azimuthal_equal_area_srs, gis::srs::Albers_equal_area_srs, gis::srs::Transverse_mercator_zoned_grid_system_srs, gis::srs::Lambert_conic_conformal_west_orientated_srs, gis::srs::Bonne_south_orientated_srs, gis::srs::Polar_stereographic_variant_b_srs, gis::srs::Polar_stereographic_variant_c_srs, gis::srs::Guam_projection_srs, gis::srs::Modified_azimuthal_equidistant_srs, gis::srs::Hyperbolic_cassini_soldner_srs, gis::srs::Lambert_cylindrical_equal_area_spherical_srs, and gis::srs::Lambert_cylindrical_equal_area_srs.

◆ has_towgs84()

virtual bool gis::srs::Spatial_reference_system::has_towgs84 ( ) const
pure virtual

Checks if this SRS has valid Bursa Wolf parameters.

Return values
trueTransformation parameters are specified.
falseTransformation parameters are not specified.

Implemented in gis::srs::Geographic_srs, and gis::srs::Projected_srs.

◆ is_wgs84_based()

virtual bool gis::srs::Spatial_reference_system::is_wgs84_based ( ) const
pure virtual

Checks if this SRS is WGS 84 or a projection based on WGS 84.

Return values
trueThis SRS is WGS 84 or a projection of WGS 84.
falseThis SRS is neither WGS 84 or a projection of WGS 84.

Implemented in gis::srs::Geographic_srs, and gis::srs::Projected_srs.

◆ linear_unit()

virtual double gis::srs::Spatial_reference_system::linear_unit ( ) const
pure virtual

Retrieve how long the unit of the spatial reference system is in meters.

Returns
Conversion factor

Implemented in gis::srs::Geographic_srs, and gis::srs::Projected_srs.

◆ prime_meridian()

virtual double gis::srs::Spatial_reference_system::prime_meridian ( ) const
pure virtual

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.

See also
angular_unit
Returns
Prime meridian.

Implemented in gis::srs::Geographic_srs, and gis::srs::Projected_srs.

◆ proj4_parameters()

virtual std::string gis::srs::Spatial_reference_system::proj4_parameters ( ) const
inlinevirtual

Retrieve the proj4 parameter string.

If the SRS can't be represented as a proj4 parameter string, an empty string is returned.

Returns
Proj4 parameter string or empty string.

Reimplemented in gis::srs::Geographic_srs, gis::srs::Popular_visualisation_pseudo_mercator_srs, gis::srs::Lambert_azimuthal_equal_area_spherical_srs, gis::srs::Equidistant_cylindrical_srs, gis::srs::Equidistant_cylindrical_spherical_srs, gis::srs::Krovak_north_orientated_srs, gis::srs::Lambert_conic_conformal_2sp_michigan_srs, gis::srs::Colombia_urban_srs, gis::srs::Lambert_conic_conformal_1sp_srs, gis::srs::Lambert_conic_conformal_2sp_srs, gis::srs::Lambert_conic_conformal_2sp_belgium_srs, gis::srs::Mercator_variant_a_srs, gis::srs::Mercator_variant_b_srs, gis::srs::Cassini_soldner_srs, gis::srs::Transverse_mercator_srs, gis::srs::Transverse_mercator_south_orientated_srs, gis::srs::Oblique_stereographic_srs, gis::srs::Polar_stereographic_variant_a_srs, gis::srs::New_zealand_map_grid_srs, gis::srs::Hotine_oblique_mercator_variant_a_srs, gis::srs::Laborde_oblique_mercator_srs, gis::srs::Hotine_oblique_mercator_variant_b_srs, gis::srs::Lambert_conic_near_conformal_srs, gis::srs::American_polyconic_srs, gis::srs::Krovak_srs, gis::srs::Lambert_azimuthal_equal_area_srs, gis::srs::Albers_equal_area_srs, gis::srs::Transverse_mercator_zoned_grid_system_srs, gis::srs::Bonne_south_orientated_srs, gis::srs::Polar_stereographic_variant_b_srs, gis::srs::Polar_stereographic_variant_c_srs, gis::srs::Guam_projection_srs, gis::srs::Modified_azimuthal_equidistant_srs, gis::srs::Hyperbolic_cassini_soldner_srs, gis::srs::Lambert_cylindrical_equal_area_spherical_srs, and gis::srs::Lambert_cylindrical_equal_area_srs.

◆ srs_type()

virtual Srs_type gis::srs::Spatial_reference_system::srs_type ( ) const
pure virtual

Get the type of spatial reference system: projected, geometric, etc.

Returns
SRS type

Implemented in gis::srs::Geographic_srs, and gis::srs::Projected_srs.


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