This file is indexed.

/usr/include/ossim/elevation/ossimDtedElevationDatabase.h is in libossim-dev 2.2.2-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
#ifndef ossimDtedElevationDatabase_HEADER
#define ossimDtedElevationDatabase_HEADER 1

#include <ossim/elevation/ossimElevationCellDatabase.h>
#include <ossim/base/ossimFilename.h>
#include <ossim/elevation/ossimDtedHandler.h>
#include <mutex>

/**
* The DTED elevation data base is also an elevation source but allows
* one to point to an file based elevation tree.  The general format of
* a DTED elevation tree:
* 
* <root dir>/e|w<longitude value>/n|s<latitiude value>.<extension>
* Exmaple 1 kilometer:
* <root dir>/w023/n15.dt0
*
* Note for 1 kilimeter the extension is dt0 and for 90 meter post spacing
* it is .dt1 and for 30 meter spacing it is .dt2
*
*/  
class OSSIM_DLL ossimDtedElevationDatabase : public ossimElevationCellDatabase
{
public:
   typedef std::vector<ossimRefPtr<CellInfo> > DirectMap; // 360x180 cell grid
   
   ossimDtedElevationDatabase();

   ossimDtedElevationDatabase(const ossimDtedElevationDatabase& rhs);

   virtual ~ossimDtedElevationDatabase();

   virtual ossimObject* dup() const;

   virtual bool open(const ossimString& connectionString);
   virtual bool pointHasCoverage(const ossimGpt& gpt) const
   {
      ossimFilename filename;
      createFullPath(filename, gpt);
      
      return filename.exists();
   }
   
   virtual bool getAccuracyInfo(ossimElevationAccuracyInfo& info, const ossimGpt& gpt) const;
   virtual double getHeightAboveMSL(const ossimGpt&);
   virtual double getHeightAboveEllipsoid(const ossimGpt& gpt);
   virtual ossim_uint64 createId(const ossimGpt& pt)const
   {
      ossim_uint64 y = static_cast<ossim_uint64>(ossim::wrap(pt.latd(), -90.0, 90.0)+90.0);
      ossim_uint64 x = static_cast<ossim_uint64>(ossim::wrap(pt.lond(),-180.0,180.0)+180.0);
      // map the extreme edge to the same ID ax the 179 west cell and the same for the 89
      // degree north cell.
      //
      x = x==360?359:x;
      y = y==180?179:y;
      // dted databases are 1x1 degree cells and we will use a world 
      // grid for id generation.
      //
      return (y*360+x);
   }
   virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix = 0);
   virtual bool saveState(ossimKeywordlist& kwl, const char* prefix = 0)const;
   
   virtual std::ostream& print(std::ostream& out) const;

protected:
   bool openDtedDirectory(const ossimFilename& dir);

   void createRelativePath(ossimFilename& file, const ossimGpt& gpt)const;

   void createFullPath(ossimFilename& file, const ossimGpt& gpt)const
   {
      ossimFilename relativeFile;
      createRelativePath(relativeFile, gpt);
      file = ossimFilename(m_connectionString).dirCat(relativeFile);
   }

   virtual ossimRefPtr<ossimElevCellHandler> createCell(const ossimGpt& gpt);

   /**
    * @brief Scans directory and set m_extension to extension of first dted
    * file found.
    * @param dir Directory to scan.
    * @return true on success, false on error.
    */
   bool inititializeExtension( const ossimFilename& dir );

   // DTED extension. E.g. ".dt2", ".dt1", ".dt0"
   ossimString m_extension;

   // Upcase or not when scanning for file.  E.g. E045/N34.DT2 or e045/n34.dt2
   bool m_upcase;

   ossimRefPtr<ossimElevCellHandler> m_lastHandler;
   mutable std::mutex m_mutex;
    

TYPE_DATA
};
#endif