source: flair-src/branches/sanscv/lib/FlairCore/src/GeoCoordinate.h

Last change on this file was 324, checked in by Sanahuja Guillaume, 2 years ago

removing opencv dependency

File size: 2.4 KB
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5/*!
6 * \file GeoCoordinate.h
7 * \brief Class defining a point by its lla coordinates
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2013/07/29
10 * \version 4.0
11 */
12#ifndef GEOCOORDINATE_H
13#define GEOCOORDINATE_H
14
15#include <io_data.h>
16
17namespace flair {
18namespace core {
19
20/*! \class GeoCoordinate
21*
22* \brief Class defining a point by its lla coordinates
23*/
24class GeoCoordinate : public io_data {
25public:
26 class Type : public DataType {
27 public:
28 size_t GetSize() const {
29 return sizeof(latitude) + sizeof(longitude) + sizeof(altitude);
30 }
31 std::string GetDescription() const { return "lla"; }
32 };
33
34 /*!
35 * \brief Constructor
36 *
37 * Construct GeoCoordinate using values from another class.
38 *
39 * \param parent parent
40 * \param name name
41 * \param point class to copy
42 * \param n number of samples
43 */
44 GeoCoordinate(const Object *parent, std::string name,
45 const GeoCoordinate *point, int n = 1);
46
47 /*!
48 * \brief Constructor
49 *
50 * Construct GeoCoordinate using specified values.
51 *
52 * \param parent parent
53 * \param name name
54 * \param latitude latitude
55 * \param longitude longitude
56 * \param altitude altitude
57 * \param n number of samples
58 */
59 GeoCoordinate(const Object *parent, std::string name, double latitude,
60 double longitude, double altitude, int n = 1);
61
62 /*!
63 * \brief Destructor
64 *
65 */
66 ~GeoCoordinate();
67
68 /*!
69 * \brief Copy
70 *
71 * \param point class to copy
72 */
73 void CopyFrom(const GeoCoordinate *point);
74
75 /*!
76 * \brief Set coordinates
77 *
78 * \param latitude latitude
79 * \param longitude longitude
80 * \param altitude altitude
81 */
82 void SetCoordinates(double latitude, double longitude, double altitude);
83
84 /*!
85 * \brief Get coordinates
86 *
87 * \param latitude latitude
88 * \param longitude longitude
89 * \param altitude altitude
90 */
91 void GetCoordinates(double *latitude, double *longitude,
92 double *altitude) const;
93
94 Type const &GetDataType() const { return dataType; }
95
96private:
97 /*!
98 * \brief Raw read datas
99 *
100 * Reimplemented from io_data. \n
101 * See io_data::RawRead.
102 *
103 * \param dst destination buffer
104 */
105 void RawRead(char *ptr) const;
106
107 double latitude;
108 double longitude;
109 double altitude;
110 Type dataType;
111};
112
113} // end namespace core
114} // end namespace flair
115
116#endif // GEOCOORDINATE_H
Note: See TracBrowser for help on using the repository browser.