Mapper  0.9.0
API documentation
Public Types | Public Member Functions | List of all members
OpenOrienteering::CRSTemplate Class Reference

A template for a coordinate reference system specification (CRS) string. More...

#include <crs_template.h>

Public Types

using Parameter = CRSTemplateParameter
 
using ParameterList = std::vector< Parameter * >
 

Public Member Functions

 CRSTemplate (const QString &id, const QString &name, const QString &coordinates_name, const QString &spec_template, ParameterList &&parameters)
 Creates a new CRS template. More...
 
 CRSTemplate (const CRSTemplate &)=delete
 
 ~CRSTemplate ()
 Destructor. More...
 
CRSTemplateoperator= (const CRSTemplate &)=delete
 
QString id () const
 Returns the unique ID of this template. More...
 
QString name () const
 Returns the display name of this template. More...
 
QString coordinatesName (const std::vector< QString > &values={}) const
 Returns the display name for the coordinates of this template, e.g. More...
 
QString specificationTemplate () const
 Returns the specification string template in Proj.4 format. More...
 
const ParameterListparameters () const
 Returns the parameters. More...
 

Detailed Description

A template for a coordinate reference system specification (CRS) string.

A CRSTemplate may contain one or more parameters described by the CRSTemplateParameter class. For each parameter, spec_template must contain a number of free parameters for QString::arg(), e.g. "%1" for the first parameter.

Member Typedef Documentation

◆ Parameter

◆ ParameterList

Constructor & Destructor Documentation

◆ CRSTemplate() [1/2]

OpenOrienteering::CRSTemplate::CRSTemplate ( const QString id,
const QString name,
const QString coordinates_name,
const QString spec_template,
ParameterList &&  parameters 
)

Creates a new CRS template.

The id must be unique and different from "Local". The template takes ownership of the parameters in the list.

The coordinates_name may contain placeholders written @ which refer to the parameter with the given ID. They can be replaced with actual parameter values when calling coordinatesName().

◆ CRSTemplate() [2/2]

OpenOrienteering::CRSTemplate::CRSTemplate ( const CRSTemplate )
delete

◆ ~CRSTemplate()

OpenOrienteering::CRSTemplate::~CRSTemplate ( )

Destructor.

This deletes the parameters.

Member Function Documentation

◆ coordinatesName()

QString OpenOrienteering::CRSTemplate::coordinatesName ( const std::vector< QString > &  values = {}) const

Returns the display name for the coordinates of this template, e.g.

"UTM coordinates".

The values list must be either of the same size as the templates list parameters, or empty. The given parameter values are substituted for the respective @ placeholders in the coordinates_name which was passed to the constructor.

◆ id()

QString OpenOrienteering::CRSTemplate::id ( ) const
inline

Returns the unique ID of this template.

◆ name()

QString OpenOrienteering::CRSTemplate::name ( ) const
inline

Returns the display name of this template.

◆ operator=()

CRSTemplate& OpenOrienteering::CRSTemplate::operator= ( const CRSTemplate )
delete

◆ parameters()

const CRSTemplate::ParameterList & OpenOrienteering::CRSTemplate::parameters ( ) const
inline

Returns the parameters.

◆ specificationTemplate()

QString OpenOrienteering::CRSTemplate::specificationTemplate ( ) const
inline

Returns the specification string template in Proj.4 format.


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