WSF
WsfDtedRect.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2003-2015 The Boeing Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WSFDTEDRECT_HPP
13#define WSFDTEDRECT_HPP
14
15#include "wsf_export.h"
16
17// 'WsfDtedRect' is a utility class copied from project "geodatag" (renamed from DtedRect),
18// and used to simplify the height processing of a collected North-East-aligned rectangle of DTED tiles.
19
20#include <vector>
21
22class DtedTile;
23
25{
26public:
27 WsfDtedRect(double aSW_Lat, double aSW_Lon, double aNE_Lat, double aNE_Lon);
28
30
31 unsigned int GetTileCount() const;
32
33 bool GetTile(unsigned int aIndex, double& aLat, double& aLon);
34
35 // Accessors
36 double GetSWLat() const { return mSWLat; }
37 double GetSWLon() const { return mSWLon; }
38 double GetNELat() const { return mNELat; }
39 double GetNELon() const { return mNELon; }
40
41 // Mutators
42 // void SetSWLat(double aSWLat) { mSWLat = aSWLat; }
43 // void SetSWLon(double aSWLon) { mSWLon = aSWLon; }
44 // void SetNELat(double aNELat) { mNELat = aNELat; }
45 // void SetNELon(double aNELon) { mNELon = aNELon; }
46
47 // 'Normalize' out of range values so they are in the proper range.
48 // Latitudes are clamped so they are between +/-90. Longitudes will
49 // have +/- 360 added until they are in the range +/-180.
50
51 void Normalize();
52
53protected:
54 int GetLat(unsigned int aTileIndex);
55 int GetLon(unsigned int aTileIndex);
56
57 void SelectTiles();
58
59private:
60 WsfDtedRect(const WsfDtedRect& aSrc); // Not implemented
61 WsfDtedRect& operator=(const WsfDtedRect& aRhs); // Not implemented
62
63 struct SelectedTile
64 {
65 int mLat;
66 int mLon;
67 };
68
69 double mSWLat;
70 double mSWLon;
71 double mNELat;
72 double mNELon;
73
74 int mMinLat;
75 int mMaxLat;
76 int mMinLon;
77 int mMaxLon;
78
79 std::vector<SelectedTile> mSelectedTiles;
80};
81
82#endif
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Definition WsfDtedRect.hpp:25
double GetSWLon() const
Definition WsfDtedRect.hpp:37
double GetNELat() const
Definition WsfDtedRect.hpp:38
double GetSWLat() const
Definition WsfDtedRect.hpp:36
unsigned int GetTileCount() const
Definition WsfDtedRect.cpp:32
WsfDtedRect(double aSW_Lat, double aSW_Lon, double aNE_Lat, double aNE_Lon)
Latitude and Longitude in degrees.
Definition WsfDtedRect.cpp:20
bool GetTile(unsigned int aIndex, double &aLat, double &aLon)
Definition WsfDtedRect.cpp:61
double GetNELon() const
Definition WsfDtedRect.hpp:39
Copyrights Multiple, All Rights Reserved