| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes
TeProjection Class Reference

Provides methods that are required to handle all map projection definitions and georeferencing of satellite images. More...

`#include <TeProjection.h>`

Inheritance diagram for TeProjection:

List of all members.

## Public Member Functions

| TeProjection (const string &name, const TeDatum &datum, double lon0=0., double lat0=0., double offx=0., double offy=0., double stlat1=0., double stlat2=0., const string units="Meters", double scale=1., TeHemisphere hem=TeSOUTH_HEM, int epsgcode=-1)
| Normal constructor.
| TeProjection ()
| TeProjection (const TeProjection &)
| Copy Constructor.
TeProjection & | operator= (const TeProjection &)
| Operator =.
virtual | ~TeProjection ()
| Destructor.
string & | name ()
| Returns the projection name;.
const string & | name () const
| Returns the projection name;.
TeDatum | datum ()
| Returns the projection datum.
const TeDatum & | datum () const
| Returns the projection datum.
void | setDatum (const TeDatum &datum)
| Sets the datum associated to the projection.
string & | units ()
| Return the projection units.
double | lon0 ()
| Return the longitude of origin ( in rad)
double | lat0 ()
| Return the Latitude of origin (rad)
double | offX ()
| Return X (projection coordinate) offset (m)
double | offY ()
| Return Y (projection coordinate) offset (m)
double | stLat1 ()
| Return First standard parallel (rad)
double | stLat2 ()
| Return the second standard parallel (rad)
double | scale ()
| Return the scale (used for UTM)
int | epsgCode ()
void | epsgCode (int code)
const TeHemisphere & | hemisphere () const
| Return the Hemisphere.
virtual TeProjectionParams | params () const
bool | operator== (const TeProjection &proj)
virtual TeCoord2D | LL2PC (const TeCoord2D &p)=0
| Pure virtual method that transforms geodetic into projection coordinates.
virtual void | LL2PC (ostream &) const
virtual TeCoord2D | PC2LL (const TeCoord2D &p)=0
| Pure virtual method that transforms projection into geodetic coordinates.
virtual void | LL2PC (double, double, double &, double &) const
virtual void | PC2LL (double, double, double &, double &)
void | setDestinationProjection (TeProjection *proj)
| Sets the projection to which a Latitude/Longitude value will be generated by the current projection by calling changeLL in PC2LL method.
void | print (FILE *file_)
| Concrete method that prints information about a projection.
string | describe ()
| Concrete method that prints information about a projection in a string.
int | id ()
| Get projection unique id in the database.
void | id (int i)
| Set projection unique id in the database.

## Protected Member Functions

void | ChangeLL (double &x, double &y)
| Changes planimetic datum.

## Protected Attributes

string | GPname
TeDatum | GPdatum
double | GPlon0
double | GPlat0
double | GPoffx
double | GPoffy
double | GPstlat1
double | GPstlat2
string | GPunits
double | GPscale
TeHemisphere | GPhemisphere
TeProjection * | GPdestination
int | GPid
int | GPepsgCode
TeUnits | GPunitsEnum

## Detailed Description

Provides methods that are required to handle all map projection definitions and georeferencing of satellite images.

Specifies earth and projection parameters that represent a common ground in terms of defining conventional map projections, navigating on low-resolution images of geostationary satellites.

Examples:

  copyLayer.cpp, createLayer.cpp, createTheme.cpp, and importGridData.cpp.

## Constructor & Destructor Documentation

TeProjection::TeProjection | ( | const string & | name,
|  | const TeDatum & | datum,
|  | double | lon0 = `0.`,
|  | double | lat0 = `0.`,
|  | double | offx = `0.`,
|  | double | offy = `0.`,
|  | double | stlat1 = `0.`,
|  | double | stlat2 = `0.`,
|  | const string | units = `"Meters"`,
|  | double | scale = `1.`,
|  | TeHemisphere | hem = `TeSOUTH_HEM`,
|  | int | epsgcode = `-1`
| ) |  | `[inline]`

Normal constructor.

Initializes projection parameters

Parameters:

  name | projection name
  datum | spheroid
  lon0 | longitude of origin (in radians)
  lat0 | latitude of origin (in radians)
  offx | X (projection coordinate) offset (m)
  offy | Y (projection coordinate) offset (m)
  stlat1 | first standard parallel (in radians)
  stlat2 | second standard parallel (in radians)
  units | projection unit
  scale | scale (used for UTM)
  hem | hemisphere

TeProjection::TeProjection | ( |  | ) | `[inline]`

TeProjection::TeProjection | ( | const TeProjection & | rhs | ) |

Copy Constructor.

virtual TeProjection::~TeProjection | ( |  | ) | `[inline, virtual]`

Destructor.

## Member Function Documentation

void TeProjection::ChangeLL | ( | double & | x,
|  | double & | y
| ) |  | `[protected]`

Changes planimetic datum.

Computes changes in geodetic coordinates due to planimetric datum changes. First, the method finds geocentric cartesian coordinates on the initial datum, then applies datum shifts, and finally computes the new geodetic coordinates on the final datum. The new geodetic latitude is computed iteractively, the old geodetic latitude being used as initial guess.

Parameters:

  x | Initial longitude (rad);
  y | Initial latitude (rad).

Returns:
  x Final longitude (rad);
  y Final latitude (rad).

Note:
  x must be a valid longitude ([0,pi] or [0,-pi]) and y must be a valid latitude ([0,pi/2] or [0,-pi/2]).

TeDatum TeProjection::datum | ( |  | ) | `[inline]`

Returns the projection datum.

Examples:
  copyLayer.cpp, importGeoTab.cpp, importMIDMIF.cpp, and importShape.cpp.

const TeDatum& TeProjection::datum | ( |  | ) | const`[inline]`

Returns the projection datum.

string TeProjection::describe | ( |  | ) |

Concrete method that prints information about a projection in a string.

int TeProjection::epsgCode | ( |  | ) | `[inline]`

void TeProjection::epsgCode | ( | int | code | ) | `[inline]`

const TeHemisphere& TeProjection::hemisphere | ( |  | ) | const`[inline]`

Return the Hemisphere.

int TeProjection::id | ( |  | ) | `[inline]`

Get projection unique id in the database.

void TeProjection::id | ( | int | i | ) | `[inline]`

Set projection unique id in the database.

double TeProjection::lat0 | ( |  | ) | `[inline]`

Return the Latitude of origin (rad)

virtual TeCoord2D TeProjection::LL2PC | ( | const TeCoord2D & | p | ) | `[pure virtual]`

Pure virtual method that transforms geodetic into projection coordinates.

This method is implemented for each available projection class and represents the so-called direct formulas, which compute projection coordinates from geodetic coordinates.

Parameters:

  p | Geodetic coordinates (radian).

Returns:
  p Projection coordinates (m).

Note:
  Geodetic coordinates must be a valid latitude ([0,pi/2] or [0,-pi/2]) and a valid longitude ([0,pi] or [0,-pi]).

Implemented in TeUtm, TeLambertConformal, TeMercator, TePolyconic, TeLatLong, TeAlbers, TeMiller, TeSinusoidal, TeCylindricalEquidistant, TePolarStereographic, TeSatelliteProjection, TeNoProjection, and TeVirtualEarthMercator.

virtual void TeProjection::LL2PC | ( | ostream & |  | ) | const`[inline, virtual]`

Reimplemented in TePolarStereographic.

virtual void TeProjection::LL2PC | ( | double | ,
|  | double | ,
|  | double & | ,
|  | double & |
| ) |  | const`[inline, virtual]`

Reimplemented in TeLatLong, and TePolarStereographic.

double TeProjection::lon0 | ( |  | ) | `[inline]`

Return the longitude of origin ( in rad)

const string& TeProjection::name | ( |  | ) | const`[inline]`

Returns the projection name;.

string& TeProjection::name | ( |  | ) | `[inline]`

Returns the projection name;.

Examples:
  copyLayer.cpp, importGeoTab.cpp, importMIDMIF.cpp, and importShape.cpp.

double TeProjection::offX | ( |  | ) | `[inline]`

Return X (projection coordinate) offset (m)

double TeProjection::offY | ( |  | ) | `[inline]`

Return Y (projection coordinate) offset (m)

TeProjection & TeProjection::operator= | ( | const TeProjection & | rhs | ) |

Operator =.

bool TeProjection::operator== | ( | const TeProjection & | proj | ) |

TeProjectionParams TeProjection::params | ( |  | ) | const`[virtual]`

Reimplemented in TeSatelliteProjection.

Examples:
  createTheme.cpp.

virtual void TeProjection::PC2LL | ( | double | ,
|  | double | ,
|  | double & | ,
|  | double & |
| ) |  | `[inline, virtual]`

Reimplemented in TeLatLong.

virtual TeCoord2D TeProjection::PC2LL | ( | const TeCoord2D & | p | ) | `[pure virtual]`

Pure virtual method that transforms projection into geodetic coordinates.

This method is implemented for each available projection class and represents the so-called inverse formulas, which compute geodetic coordinates from projection coordinates.

Parameters:

  p | Projection coordinates (m).

Returns:
  p Geodetic coordinates (rad).

Note:
  X and Y projection coordinates must be both valid, within the typical range of each projection class.

Implemented in TeUtm, TeLambertConformal, TeMercator, TePolyconic, TeLatLong, TeAlbers, TeMiller, TeSinusoidal, TeCylindricalEquidistant, TePolarStereographic, TeSatelliteProjection, TeNoProjection, and TeVirtualEarthMercator.

void TeProjection::print | ( | FILE * | file_ | ) |

Concrete method that prints information about a projection.

double TeProjection::scale | ( |  | ) | `[inline]`

Return the scale (used for UTM)

void TeProjection::setDatum | ( | const TeDatum & | datum | ) | `[inline]`

Sets the datum associated to the projection.

void TeProjection::setDestinationProjection | ( | TeProjection * | proj | ) | `[inline]`

Sets the projection to which a Latitude/Longitude value will be generated by the current projection by calling changeLL in PC2LL method.

Examples:
  convertCoordinates.cpp.

double TeProjection::stLat1 | ( |  | ) | `[inline]`

Return First standard parallel (rad)

double TeProjection::stLat2 | ( |  | ) | `[inline]`

Return the second standard parallel (rad)

string& TeProjection::units | ( |  | ) | `[inline]`

Return the projection units.

## Member Data Documentation

TeDatum TeProjection::GPdatum`[protected]`

TeProjection* TeProjection::GPdestination`[protected]`

int TeProjection::GPepsgCode`[protected]`

TeHemisphere TeProjection::GPhemisphere`[protected]`

int TeProjection::GPid`[protected]`

double TeProjection::GPlat0`[protected]`

double TeProjection::GPlon0`[protected]`

string TeProjection::GPname`[protected]`

double TeProjection::GPoffx`[protected]`

double TeProjection::GPoffy`[protected]`

double TeProjection::GPscale`[protected]`

double TeProjection::GPstlat1`[protected]`

double TeProjection::GPstlat2`[protected]`

string TeProjection::GPunits`[protected]`

TeUnits TeProjection::GPunitsEnum`[protected]`

The documentation for this class was generated from the following files:

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeProjection.h
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeProjection.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines