GeographicLib::CassiniSoldner Class Reference

Cassini-Soldner Projection. More...

#include <GeographicLib/CassiniSoldner.hpp>

List of all members.

Public Member Functions

 CassiniSoldner (const Geodesic &earth=Geodesic::WGS84) throw ()
 CassiniSoldner (real lat0, real lon0, const Geodesic &earth=Geodesic::WGS84) throw ()
void Reset (real lat0, real lon0) throw ()
void Forward (real lat, real lon, real &x, real &y, real &azi, real &rk) const throw ()
void Reverse (real x, real y, real &lat, real &lon, real &azi, real &rk) const throw ()
bool Init () const throw ()
Math::real LatitudeOrigin () const throw ()
Math::real LongitudeOrigin () const throw ()
Math::real MajorRadius () const throw ()
Math::real InverseFlattening () const throw ()

Detailed Description

Cassini-Soldner Projection.

Cassini-Soldner projection centered at an arbitrary position, lat0, lon0, on the ellipsoid. This projection is a transverse cylindrical equidistant projection. The projection from (lat, lon) to easting and northing (x, y) is defined by geodesics as follows. Go north along a geodesic a distance y from the central point; then turn clockwise 90o and go a distance x along a geodesic. (Although the initial heading is north, this changes to south if the pole is crossed.) This procedure uniquely defines the reverse projection. The forward projection is constructed as follows. Find the point (lat1, lon1) on the meridian closest to (lat, lon). Here we consider the full meridian so that lon1 may be either lon0 or lon0 + 180o. x is the geodesic distance from (lat1, lon1) to (lat, lon), appropriately signed according to which side of the central meridian (lat, lon) lies. y is the shortest distance along the meridian from (lat0, lon0) to (lat1, lon1), again, appropriately signed according to the initial heading. [Note that, in the case of prolate ellipsoids, the shortest meridional path from (lat0, lon0) to (lat1, lon1) may not be the shortest path.] This procedure uniquely defines the forward projection except for a small class of points for which there may be two equally short routes for either leg of the path.

Because of the properties of geodesics, the (x, y) grid is orthogonal. The scale in the easting direction is unity. The scale, k, in the northing direction is unity on the central meridian and increases away from the central meridian. The projection routines return azi, the true bearing of the easting direction, and rk = 1/k, the reciprocal of the scale in the northing direction.

The conversions all take place using a GeographicLib::Geodesic object (by default GeographicLib::Geodesic::WGS84). For more information on geodesics see Geodesics on the Ellipsoid. The determination of (lat1, lon1) in the forward projection is by solving the inverse geodesic problem for (lat, lon) and its twin obtained by reflection in the meridional plane. The scale is found by determining where two neighboring geodesics intersecting the central meridan at lat1 and lat1 + dlat1 intersect and taking the ratio of the reduced lengths for the two geodesics between that point and, respectively, (lat1, lon1) and (lat, lon).

Definition at line 62 of file CassiniSoldner.hpp.


Constructor & Destructor Documentation

GeographicLib::CassiniSoldner::CassiniSoldner ( const Geodesic earth = Geodesic::WGS84  )  throw () [inline, explicit]

Constructor for CassiniSoldner setting the Geodesic object, earth, to use for geodesic calculations. By default this uses the WGS84 ellipsoid. This constructor makes an "uninitialized" object. Call Reset to set the central latitude and longuitude, prior to calling Forward and Reverse.

Definition at line 103 of file CassiniSoldner.hpp.

GeographicLib::CassiniSoldner::CassiniSoldner ( real  lat0,
real  lon0,
const Geodesic earth = Geodesic::WGS84 
) throw () [inline]

Constructor for CassiniSoldner setting the center point, lat0, lon0 (degrees) of the projection and the Geodesic object, earth, to use for geodesic calculations. By default this uses the WGS84 ellipsoid.

Definition at line 112 of file CassiniSoldner.hpp.

References Reset().


Member Function Documentation

void GeographicLib::CassiniSoldner::Reset ( real  lat0,
real  lon0 
) throw ()

Set the central latititude to lat0 and central longitude to lon0 (degrees). lat0 should be in the range [-90, 90] and lon0 should be in the range [-180, 360].

Definition at line 26 of file CassiniSoldner.cpp.

Referenced by CassiniSoldner().

void GeographicLib::CassiniSoldner::Forward ( real  lat,
real  lon,
real &  x,
real &  y,
real &  azi,
real &  rk 
) const throw ()

Convert from latitude lat (degrees) and longitude lon (degrees) to Cassini-Soldner easting x (meters) and northing y (meters). Also return the azimuth of the easting direction azi (degrees) and the reciprocal of the northing scale rk. lat should be in the range [-90, 90] and lon should be in the range [-180, 360]. A call to Forward followed by a call to Reverse will return the original (lat, lon) (to within roundoff). The routine does nothing if the origin has not been set.

Definition at line 36 of file CassiniSoldner.cpp.

References GeographicLib::GeodesicLine::EquatorialAzimuth(), and GeographicLib::GeodesicLine::Scale().

void GeographicLib::CassiniSoldner::Reverse ( real  x,
real  y,
real &  lat,
real &  lon,
real &  azi,
real &  rk 
) const throw ()

Convert from Cassini-Soldner easting x (meters) and northing y (meters) to latitude lat (degrees) and longitude lon (degrees). Also return the azimuth of the easting direction azi (degrees) and the reciprocal of the northing scale rk. A call to Reverse followed by a call to Forward will return the original (x, y) (to within roundoff), provided that x and y are sufficiently small not to "wrap around" the earth. The routine does nothing if the origin has not been set.

Definition at line 82 of file CassiniSoldner.cpp.

References GeographicLib::GeodesicLine::Position(), and GeographicLib::GeodesicLine::Scale().

bool GeographicLib::CassiniSoldner::Init (  )  const throw () [inline]

Has this object been initialized with an origin?

Definition at line 154 of file CassiniSoldner.hpp.

References GeographicLib::GeodesicLine::Init().

Math::real GeographicLib::CassiniSoldner::LatitudeOrigin (  )  const throw () [inline]

Return the latitude of the origin (degrees).

Definition at line 159 of file CassiniSoldner.hpp.

References GeographicLib::GeodesicLine::Latitude().

Math::real GeographicLib::CassiniSoldner::LongitudeOrigin (  )  const throw () [inline]

Return the longitude of the origin (degrees).

Definition at line 165 of file CassiniSoldner.hpp.

References GeographicLib::GeodesicLine::Longitude().

Math::real GeographicLib::CassiniSoldner::MajorRadius (  )  const throw () [inline]

The major radius of the ellipsoid (meters). This is that value of a inherited from the Geodesic object used in the constructor.

Definition at line 172 of file CassiniSoldner.hpp.

References GeographicLib::Geodesic::MajorRadius().

Math::real GeographicLib::CassiniSoldner::InverseFlattening (  )  const throw () [inline]

The inverse flattening of the ellipsoid. This is that value of r inherited from the Geodesic object used in the constructor. A value of 0 is returned for a sphere (infinite inverse flattening).

Definition at line 179 of file CassiniSoldner.hpp.

References GeographicLib::Geodesic::InverseFlattening().


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

Generated on 21 May 2010 for GeographicLib by  doxygen 1.6.1