1 /***************************************************************************
2 * This file is part of Tecorrec. *
3 * Copyright 2008 James Hogan <james@albanarts.com> *
5 * Tecorrec is free software: you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation, either version 2 of the License, or *
8 * (at your option) any later version. *
10 * Tecorrec is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with Tecorrec. If not, write to the Free Software Foundation, *
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
18 ***************************************************************************/
20 #ifndef _tcSrtmModel_h_
21 #define _tcSrtmModel_h_
25 * @brief SRTM elevation model.
34 /// SRTM elevation model.
48 /// Number of longitudenal samples in the tile.
51 /// Number of latitudenal samples in the tile.
54 /// Is there more detail available longitudely.
55 bool moreAvailableLon
;
57 /// Is there more detail available latitudely
58 bool moreAvailableLat
;
61 friend class tcSrtmModel
;
63 /// South west corner of tile.
66 /// North east corner of tile.
69 /// Coordinate of most south westly sample inside tile.
72 /// Diagonal angles between samples.
77 * Constructors + destructor
80 /// Default constructor.
84 virtual ~tcSrtmModel();
90 /** Get information to allow alignment with actual samples.
91 * @param swCorner South West corner of tile.
92 * @param neCorner North East corner of tile.
93 * @param state[out] Gets various information put into it to allow optimized rendering.
94 * @param maxSamples Maximum number of inner samples.
96 void sampleAlign(const tcGeo
& swCorner
, const tcGeo
& neCorner
, RenderState
* state
, int maxSamples
= 0);
98 /// Get the altitude at a sample in a render state.
99 double altitudeAt(const RenderState
& state
, int x
, int y
, tcGeo
* outCoord
, bool corrected
= false, bool* accurate
= 0);
101 /// Get the altitude at a coordinate.
102 double altitudeAt(const tcGeo
& coord
, bool corrected
= false, bool* accurate
= 0);
104 /// Set the data set to use.
105 void setDataSet(const QString
& name
);
114 tcSrtmCache
* m_cache
;