MI - Fimex
CachedVectorReprojection.h
Go to the documentation of this file.
1 /*
2  * Fimex
3  *
4  * (C) Copyright 2008, met.no
5  *
6  * Project Info: https://wiki.met.no/fimex/start
7  *
8  * This library is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU Lesser General Public License as published by
10  * the Free Software Foundation; either version 2.1 of the License, or
11  * (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16  * License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
21  * USA.
22  */
23 
24 #ifndef CACHEDVECTORREPROJECTION_H_
25 #define CACHEDVECTORREPROJECTION_H_
26 
27 #include <boost/shared_ptr.hpp>
28 #include "fimex/Data.h"
29 #include "fimex/interpolation.h"
30 
31 namespace MetNoFimex
32 {
33 
35 {
36 public:
37  CachedVectorReprojection() : method(MIFI_OK), ox(0), oy(0) {}
38  CachedVectorReprojection(int method, boost::shared_array<double> matrix, int ox, int oy) : method(method), matrix(matrix), ox(ox), oy(oy) {}
47  void reprojectValues(boost::shared_array<float>& uValues, boost::shared_array<float>& vValues, size_t size) const;
53  void reprojectDirectionValues(boost::shared_array<float>& angles, size_t size) const;
54  // @return size of the spatial plane in x-direction
55  size_t getXSize() const {return ox;}
56  // @return size of the spatial plane in y-direction
57  size_t getYSize() const {return oy;}
58 
59 private:
60  int method;
61  boost::shared_array<double> matrix;
62  size_t ox;
63  size_t oy;
64 };
65 
66 }
67 
68 #endif /*CACHEDVECTORREPROJECTION_H_*/
void reprojectDirectionValues(boost::shared_array< float > &angles, size_t size) const
CachedVectorReprojection()
Definition: CachedVectorReprojection.h:37
Definition: C_CDMReader.h:35
virtual ~CachedVectorReprojection()
Definition: CachedVectorReprojection.h:39
size_t getXSize() const
Definition: CachedVectorReprojection.h:55
#define MIFI_OK
return code, ok
Definition: mifi_constants.h:261
Definition: CachedVectorReprojection.h:34
size_t getYSize() const
Definition: CachedVectorReprojection.h:57
void reprojectValues(boost::shared_array< float > &uValues, boost::shared_array< float > &vValues, size_t size) const
CachedVectorReprojection(int method, boost::shared_array< double > matrix, int ox, int oy)
Definition: CachedVectorReprojection.h:38