00001 /* 00002 * Fimex, Projection.h 00003 * 00004 * (C) Copyright 2010, met.no 00005 * 00006 * Project Info: https://wiki.met.no/fimex/start 00007 * 00008 * This library is free software; you can redistribute it and/or modify it 00009 * under the terms of the GNU Lesser General Public License as published by 00010 * the Free Software Foundation; either version 2.1 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, but 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 00015 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 00016 * License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 00021 * USA. 00022 * 00023 * Created on: Apr 27, 2010 00024 * Author: Heiko Klein 00025 */ 00026 00027 #ifndef PROJECTION_H_ 00028 #define PROJECTION_H_ 00029 00030 #include <vector> 00031 #include <iostream> 00032 #include <boost/shared_ptr.hpp> 00033 #include "fimex/CDMAttribute.h" 00034 00035 namespace MetNoFimex 00036 { 00037 00042 class Projection : public CDMNamedEntity 00043 { 00044 public: 00045 virtual ~Projection() {} 00046 virtual std::vector<CDMAttribute> getParameters() const = 0; 00047 virtual void addParameter(CDMAttribute attribute) = 0; 00048 virtual void addParameters(std::vector<CDMAttribute> attributes) = 0; 00049 virtual void removeParameter(std::string paramName) = 0; 00051 virtual const std::string& getName() const = 0; 00053 virtual const bool isDegree() const = 0; 00055 virtual std::string getProj4String() const = 0; 00060 virtual std::string toString() const = 0; 00065 virtual bool operator==(const Projection& b) const; 00067 static boost::shared_ptr<Projection> create(std::vector<CDMAttribute>); 00069 static boost::shared_ptr<Projection> createByProj4(const std::string& projStr); 00070 protected: 00071 Projection() {}; 00072 }; 00073 00075 std::ostream& operator<<(std::ostream& out, const Projection& proj); 00076 00077 } /* namespace MetNoFimex */ 00078 00079 #endif /* PROJECTION_H_ */