MI - Fimex
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
MetNoFimex::ProjectionImpl Class Referenceabstract

#include <ProjectionImpl.h>

Inheritance diagram for MetNoFimex::ProjectionImpl:
MetNoFimex::Projection MetNoFimex::CDMNamedEntity MetNoFimex::AlbersConicalEqualAreaProjection MetNoFimex::AzimuthalEquidistantProjection MetNoFimex::LambertAzimuthalEqualAreaProjection MetNoFimex::LambertConformalConicProjection MetNoFimex::LambertCylindricalEqualAreaProjection MetNoFimex::LatitudeLongitudeProjection MetNoFimex::MercatorProjection MetNoFimex::OrthographicProjection MetNoFimex::RotatedLatitudeLongitudeProjection MetNoFimex::StereographicProjection MetNoFimex::TransverseMercatorProjection MetNoFimex::UnknownToFgdcProjection MetNoFimex::VerticalPerspectiveProjection

Public Member Functions

virtual ~ProjectionImpl ()
 
virtual std::vector< CDMAttributegetParameters () const
 
virtual void addParameter (CDMAttribute attribute)
 
virtual void addParameters (std::vector< CDMAttribute > attributes)
 
virtual void removeParameter (std::string paramName)
 
virtual const std::stringgetName () const
 
virtual bool isDegree () const
 
virtual std::string getProj4String () const
 
virtual std::string getProj4EarthString () const
 
virtual std::string toString () const
 
- Public Member Functions inherited from MetNoFimex::Projection
virtual ~Projection ()
 
virtual void convertToLonLat (std::vector< double > &xVals, std::vector< double > &yVals) const throw (CDMException)
 
virtual void convertFromLonLat (std::vector< double > &xVals, std::vector< double > &yVals) const throw (CDMException)
 
virtual bool operator== (const Projection &b) const
 
- Public Member Functions inherited from MetNoFimex::CDMNamedEntity
virtual ~CDMNamedEntity ()=0
 

Protected Member Functions

 ProjectionImpl (std::string name, bool isDegree)
 
virtual std::ostreamgetProj4ProjectionPart (std::ostream &) const =0
 
bool addParameterToStream (std::ostream &outStream, const std::string &name, std::string replaceName="") const
 
- Protected Member Functions inherited from MetNoFimex::Projection
 Projection ()
 

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< CDMAttributeparams_
 

Additional Inherited Members

- Static Public Member Functions inherited from MetNoFimex::Projection
static boost::shared_ptr< Projectioncreate (std::vector< CDMAttribute >)
 
static boost::shared_ptr< ProjectioncreateByProj4 (const std::string &projStr)
 

Detailed Description

ProjectionImpl is a next to complete implementation of Projection, storing all parameters as a vector<CDMAttribute>. Implementations only need to implement a constructor calling the ProjectionImpl("proj-name") and the method getProj4ProjectionPart()

Note
the implemented projection needs to get made visible in Projection::create() and Projection::createByProj4

Constructor & Destructor Documentation

virtual MetNoFimex::ProjectionImpl::~ProjectionImpl ( )
virtual
MetNoFimex::ProjectionImpl::ProjectionImpl ( std::string  name,
bool  isDegree 
)
explicitprotected

Member Function Documentation

virtual void MetNoFimex::ProjectionImpl::addParameter ( CDMAttribute  attribute)
virtual
virtual void MetNoFimex::ProjectionImpl::addParameters ( std::vector< CDMAttribute attributes)
virtual
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

Parameters
outStream
namethe parameters name
replaceNamethe name to use in the stream to the parameter, defaults to original name ("")
Returns
true if parameter found and set
virtual const std::string& MetNoFimex::ProjectionImpl::getName ( ) const
virtual

get the projection name

Implements MetNoFimex::Projection.

virtual std::vector<CDMAttribute> MetNoFimex::ProjectionImpl::getParameters ( ) const
virtual
virtual std::string MetNoFimex::ProjectionImpl::getProj4EarthString ( ) const
virtual

get the parts of the proj4 string defining the earth.

Implements MetNoFimex::Projection.

virtual std::ostream& MetNoFimex::ProjectionImpl::getProj4ProjectionPart ( std::ostream ) const
protectedpure virtual
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.

Note
Implementors should not overwrite this method, but the protected getProj4ProjectionPart() method

Implements MetNoFimex::Projection.

virtual bool MetNoFimex::ProjectionImpl::isDegree ( ) const
virtual

check if the coordinates belonging to this projection are in degree (otherwise metrical)

Implements MetNoFimex::Projection.

static void MetNoFimex::ProjectionImpl::proj4GetEarthAttributes ( const std::string proj4String,
std::vector< CDMAttribute > &  attrList 
)
staticprotected

add the attributes describing the earth from a proj4-string to the outAttrs

Parameters
proj4Stringstring as used for proj4
attrListoutput list of CDMAttributes
static bool MetNoFimex::ProjectionImpl::proj4ProjectionMatchesName ( const std::string proj4String,
const std::string name 
)
staticprotected

match the +proj= part of a proj4 string

virtual void MetNoFimex::ProjectionImpl::removeParameter ( std::string  paramName)
virtual
virtual std::string MetNoFimex::ProjectionImpl::toString ( ) const
virtual

get a string representation

Implements MetNoFimex::Projection.

Member Data Documentation

std::vector<CDMAttribute> MetNoFimex::ProjectionImpl::params_
protected

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