GeographicLib: GeographicLib::CassiniSoldner Class Reference (original) (raw)

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 90° 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 + 180°. 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 Geodesic object (by default Geodesic::WGS84()). For more information on geodesics see Geodesics on an ellipsoid of revolution. 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 meridian 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).

Example of use:

#include

#include

using namespace std;

try {

Geodesic geod(Constants::WGS84_a(), Constants::WGS84_f());

const double lat0 = 48 + 50/60.0, lon0 = 2 + 20/60.0;

{

double lat = 50.9, lon = 1.8;

double x, y;

proj.Forward(lat, lon, x, y);

cout << x << " " << y << "\n";

}

{

double x = -38e3, y = 230e3;

double lat, lon;

proj.Reverse(x, y, lat, lon);

cout << lat << " " << lon << "\n";

}

}

catch (const exception& e) {

cerr << "Caught exception: " << e.what() << "\n";

return 1;

}

}

int main(int argc, const char *const argv[])

Header for GeographicLib::CassiniSoldner class.

Header for GeographicLib::Geodesic class.

Cassini-Soldner projection.

Namespace for GeographicLib.

GeodesicProj is a command-line utility providing access to the functionality of AzimuthalEquidistant, Gnomonic, and CassiniSoldner.

Definition at line 69 of file CassiniSoldner.hpp.