#include <ProjectionImpl.h>
Public Member Functions | |
virtual | ~ProjectionImpl () |
virtual std::vector< CDMAttribute > | getParameters () const |
virtual void | addParameter (CDMAttribute attribute) |
virtual void | addParameters (std::vector< CDMAttribute > attributes) |
virtual void | removeParameter (std::string paramName) |
virtual const std::string & | getName () const |
virtual const bool | isDegree () const |
virtual std::string | getProj4String () const |
virtual std::string | toString () const |
Protected Member Functions | |
ProjectionImpl (std::string name, bool isDegree) | |
virtual std::ostream & | getProj4ProjectionPart (std::ostream &) const =0 |
bool | addParameterToStream (std::ostream &outStream, const std::string &name, std::string replaceName="") const |
Static Protected Member Functions | |
static bool | proj4ProjectionMatchesName (const std::string &proj4String, const std::string &name) |
static void | proj4GetEarthAttributes (const std::string &proj4String, std::vector< CDMAttribute > &attrList) |
Protected Attributes | |
std::vector< CDMAttribute > | params_ |
virtual MetNoFimex::ProjectionImpl::~ProjectionImpl | ( | ) | [virtual] |
MetNoFimex::ProjectionImpl::ProjectionImpl | ( | std::string | name, | |
bool | isDegree | |||
) | [explicit, protected] |
virtual std::vector<CDMAttribute> MetNoFimex::ProjectionImpl::getParameters | ( | ) | const [virtual] |
Implements MetNoFimex::Projection.
virtual void MetNoFimex::ProjectionImpl::addParameter | ( | CDMAttribute | attribute | ) | [virtual] |
Implements MetNoFimex::Projection.
virtual void MetNoFimex::ProjectionImpl::addParameters | ( | std::vector< CDMAttribute > | attributes | ) | [virtual] |
Implements MetNoFimex::Projection.
virtual void MetNoFimex::ProjectionImpl::removeParameter | ( | std::string | paramName | ) | [virtual] |
Implements MetNoFimex::Projection.
virtual const std::string& MetNoFimex::ProjectionImpl::getName | ( | ) | const [virtual] |
get the projection name
Implements MetNoFimex::Projection.
virtual const bool MetNoFimex::ProjectionImpl::isDegree | ( | ) | const [virtual] |
check if the coordinates belonging to this projection are in degree (otherwise metrical)
Implements MetNoFimex::Projection.
virtual std::string MetNoFimex::ProjectionImpl::getProj4String | ( | ) | const [virtual] |
get the proj4 string defined by the parameters. If a parameter named 'proj4' exists, that one will be used and all other parameters will be ignored.
Implements MetNoFimex::Projection.
virtual std::string MetNoFimex::ProjectionImpl::toString | ( | ) | const [virtual] |
get a string representation
Implements MetNoFimex::Projection.
static bool MetNoFimex::ProjectionImpl::proj4ProjectionMatchesName | ( | const std::string & | proj4String, | |
const std::string & | name | |||
) | [static, protected] |
match the +proj= part of a proj4 string
static void MetNoFimex::ProjectionImpl::proj4GetEarthAttributes | ( | const std::string & | proj4String, | |
std::vector< CDMAttribute > & | attrList | |||
) | [static, protected] |
add the attributes describing the earth from a proj4-string to the outAttrs
proj4String | string as used for proj4 | |
output | list of CDMAttributes |
virtual std::ostream& MetNoFimex::ProjectionImpl::getProj4ProjectionPart | ( | std::ostream & | ) | const [protected, pure virtual] |
add the pure projection parameters for proj4 to the stream, i.e. no earth definitions, and no +no_defs
Implemented in MetNoFimex::LambertConformalConicProjection, MetNoFimex::LatitudeLongitudeProjection, MetNoFimex::MercatorProjection, MetNoFimex::RotatedLatitudeLongitudeProjection, and MetNoFimex::StereographicProjection.
bool MetNoFimex::ProjectionImpl::addParameterToStream | ( | std::ostream & | outStream, | |
const std::string & | name, | |||
std::string | replaceName = "" | |||
) | const [protected] |
Add the numeric value of a parameter named name as replaceName to oproj, e.g. name = false_easting, replaceName = +x_0, sets "+x_0=... " Assume only one value at maximum
outStream | ||
name | the parameters name | |
replaceName | the name to use in the stream to the parameter, defaults to original name ("") |
std::vector<CDMAttribute> MetNoFimex::ProjectionImpl::params_ [protected] |