OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimSrtmSupportData.h
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 // Copyright (c) 2005, David Burken, all rights reserved.
3 //
4 // License: MIT
5 //
6 // See LICENSE.txt file in the top level directory for more details.
7 //
8 // Author: David Burken
9 //
10 // Description:
11 //
12 // Support data class for a Shuttle Radar Topography Mission (SRTM) file.
13 //
14 //----------------------------------------------------------------------------
15 // $Id$
16 
17 #ifndef ossimSrtmSupportData_HEADER
18 #define ossimSrtmSupportData_HEADER 1
19 
20 #include <ossim/base/ossimObject.h>
23 #include <ossim/base/ossimRefPtr.h>
26 #include <memory>
27 
36 {
37 public:
40 
42  virtual ~ossimSrtmSupportData();
43 
59  bool setFilename(const ossimFilename& srtmFile,
60  bool scanForMinMax = false);
61 
63  ossimFilename getFilename() const;
64 
69  ossim_uint32 getNumberOfLines() const;
70 
75  ossim_uint32 getNumberOfSamples() const;
76 
88  virtual bool getImageGeometry(ossimKeywordlist& kwl, const char* prefix=0);
89 
94  ossimRefPtr<ossimProjection> getProjection() const;
95 
100  virtual bool saveState(ossimKeywordlist& kwl,
101  const char* prefix=0) const;
102 
107  virtual bool loadState(const ossimKeywordlist& kwl,
108  const char* prefix=0);
109 
114  ossim_float64 getSouthwestLatitude() const;
115 
120  ossim_float64 getSouthwestLongitude() const;
121 
126  ossim_float64 getLatitudeSpacing() const;
127 
132  ossim_float64 getLongitudeSpacing() const;
133 
139  ossim_float64 getMinPixelValue() const;
140 
146  ossim_float64 getMaxPixelValue() const;
147 
154  virtual std::ostream& print(std::ostream& out) const;
155 
156 private:
157 
161  bool loadOmd(const ossimKeywordlist& kwl, const char* prefix=0);
162 
164  void clear();
165 
171  bool setCornerPoints();
172 
178  bool setSize();
179 
185  bool computeMinMax();
186 
190  ossim_float64 m_southwestLatitude; //< decimal degrees
191  ossim_float64 m_southwestLongitude; //< decimal degrees
192  ossim_float64 m_latSpacing; //< decimal degrees
193  ossim_float64 m_lonSpacing; //< decimal degrees
196 
198 
199  // mutable ossimRefPtr<ossimIFStream> theFileStream;
200  mutable std::shared_ptr<ossim::istream> m_str;
201 
202  template <class T>
203  bool computeMinMaxTemplate(T dummy, double defaultNull);
204 };
205 
206 #endif /* #ifndef ossimSrtmSupportData */
#define OSSIMDLLEXPORT
Represents serializable keyword/value map.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Definition: ossimObject.cpp:95
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
ossimScalarType getScalarType(const H5::DataSet *dataset)
double ossim_float64
virtual std::ostream & print(std::ostream &out) const
Generic print method.
OSSIM_DLL double defaultNull(ossimScalarType scalarType)
unsigned int ossim_uint32
ossimScalarType m_scalarType
ossimScalarType
ossim_float64 m_southwestLatitude
ossim_float64 m_southwestLongitude
std::shared_ptr< ossim::istream > m_str
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23