This file is indexed.

/usr/include/terralib/kernel/TeDatum.h is in libterralib-dev 4.3.0+dfsg.2-11.

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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
/************************************************************************************
TerraLib - a library for developing GIS applications.
Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.

This code is part of the TerraLib library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

You should have received a copy of the GNU Lesser General Public
License along with this library.

The authors reassure the license terms regarding the warranties.
They specifically disclaim any warranties, including, but not limited to,
the implied warranties of merchantability and fitness for a particular purpose.
The library provided hereunder is on an "as is" basis, and the authors have no
obligation to provide maintenance, support, updates, enhancements, or modifications.
In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
indirect, special, incidental, or consequential damages arising out of the use
of this library and its documentation.
*************************************************************************************/
/*! \file TeDatum.h
    \brief This file contains structures and definitions to support the concept of a planimetric datum
*/

#ifndef  __TERRALIB_INTERNAL_DATUM_H
#define  __TERRALIB_INTERNAL_DATUM_H

#include <string>
#include "TeUtils.h"

//! Number of supported datum in TerraLib
const int NUM_DATUM = 11; 

TL_DLL const char** TeGetDatumList();


//! Implements valid Datum options and related parameters which account for different earth spheroids.
/*! Specifies planimetric TeDatum parameters to be used for defining geodetic
	coordinates, which are necessary to establish a map projection system.
	It encapsulates the following important information regarding 
	a planimetric Datum such as:
	\li	Datum name;
	\li	Earth equatorial radius;
	\li	Earth flatenning;
	\li	Datum shifts. 

	\author
	 Ubirajara Freitas, Julio d'Alge.

	\sa TeDatumFactory
*/
class TL_DLL TeDatum
{
private:
	std::string	name_;		//!< Planimetric TeDatum name
	double	rd_,		//!< Earth equatorial radius (m) 
			flt_;		//!< Earth flattening 
public:
	double	dx_,		//!< TeDatum shift along x axis (m)
			dy_,		//!< TeDatum shift along y axis (m)
			dz_;		//!< TeDatum shift along z axis (m) 

	//!	Constructor.
	TeDatum ( std::string name = "Spherical", double rd = 6.371000e+06 , double flt = 0., 
			  double dx = 0., double dy= 0., double dz = 0.):
	name_ ( name ),
	rd_   (  rd  ),
	flt_  ( flt  ),
	dx_   (  dx  ),
	dy_   (  dy  ),
	dz_   (  dz  )
	{ }

	//! Copy constructor
	TeDatum(const TeDatum& other);

	//! Operator =
	TeDatum& operator=(const TeDatum& rhs);

	//!	Destructor.
	~TeDatum () {}

	//! Returns the datum name
	std::string 	name()	 const			
	{ return name_;} 

	//! Sets the datum name
	void name(const std::string& name)	 			
	{	name_ = name;	} 

	//! Returns Earth equatorial radius (m)
	double radius() const
	{ return rd_; }

	//! Sets Earth equatorial radius (m)
	void radius(const double rd) 
	{ rd_ = rd; }

	//! Returns the Earth equatorial radius (m) (m)
	double flattening() const
	{ return flt_; }

	//! Sets the Earth equatorial radius (m) (m)
	void flattening(const double flt) 
	{ flt_ = flt; }

	//! Returns the shift along x axis (m)
	double	xShift() const
	{ return dx_; }
 
	//! Returns the shift along y axis (m)
	double  yShift() const 
	{ return dy_; }

	//! Returns the shift along z axis (m)
	double zShift()  const
	{ return dz_; }


//!		Verifies if current TeDatum is equal to TeDatum& dat. 
	bool operator== (const TeDatum& dat) const 
	{
		return (TeFPEquals(rd_,dat.rd_,0.0000000001) 
			   && TeFPEquals(flt_,dat.flt_,0.0000000001)
			   && TeFPEquals(dx_,dat.dx_,0.0000000001) 
			   && TeFPEquals(dy_,dat.dy_,0.0000000001) 
			   && TeFPEquals(dz_,dat.dz_,0.0000000001)); 
	}

	//! Returns the Datum description in PROJ4 format
	string getProj4Description();

	//! Returns the Datum description in WKT format
	string getWKTDescription();

};

//! Produces a Datum accordingly to an specified name
class TL_DLL TeDatumFactory
{
public:
	//! Builds a datum from a TerraLib name
	static	TeDatum make ( const std::string& name );

	//! Builds a datum from its EPSG code
	static TeDatum makeFromEPSGCode(const std::string epsgCode);

	//! Builds a datum from its OGC's WKT description
	static TeDatum makeFromWKT(const std::string wktDatumDescription);
};

/*! 
   \fn   findDatum(double semiMajor, double flatenning, TeDatum& datum)
   \brief Tries to find the a TeDatum according to givem semi major axis and earth flattening
 */
TL_DLL bool findDatum(double semiMajor, double flatenning, TeDatum& datum);

#endif