#include <projection.h>
Public Types | |
enum | ecode { UNKNOWN, GKK, UTM, LAMBERT1, LAMBERT2, SLK, SPK, SPKLV03, SPKLV95, END_OF_MAP } |
map projection codes More... | |
Public Member Functions | |
virtual const char * | map_name () const |
get map projection name | |
virtual void | print (ostream &os) const |
print parameters | |
constructors/destructors | |
Projection () | |
default constructor | |
Projection (const string &ell_name) | |
constructor with name of the reference ellipsoid | |
virtual | ~Projection () |
destructor | |
set/get latitude of origin in radian | |
void | b0 (double b0) |
set latitude of origin | |
double | b0 () const |
get latitude of origin | |
set/get longitude of origin (central meridian) | |
void | l0 (double l0) |
set longitude of origin in radian | |
double | l0 () const |
get longitude of origin | |
set/get scale factor | |
void | m0 (double m0) |
set scale factor | |
double | m0 () const |
get scale factor | |
set/get offset in x (false easting) | |
void | x0 (double x0) |
set offset in x in meter | |
double | x0 () const |
get offset in x | |
set/get offset in y (false northing) | |
void | y0 (double y0) |
set offset in y | |
double | y0 () const |
get offset in y | |
conversion routines | |
conversion between geodetic and map coordinates | |
virtual void | geo_to_map (double b, double l, double &x, double &y) const =0 |
convert geodetic into map coordinates | |
virtual void | map_to_geo (double x, double y, double &b, double &l) const =0 |
convert map into geodetic coordinates | |
Static Public Member Functions | |
static ecode | code (const char *map_name) |
get code form keyword map. | |
Protected Attributes | |
double | _b0 |
latitude of origin | |
double | _l0 |
longitude of origin (central meridian) | |
double | _m0 |
scale factor | |
double | _x0 |
offset in x (false easting) | |
double | _y0 |
offset in y (false northing) | |
Static Protected Attributes | |
static map_t | _map [] |
keyword map | |
Private Member Functions | |
void | init () |
initilize all parameters | |
Classes | |
struct | map_t |
map structure More... |
This class provide a general interface for map projection conversions between (ellipsoidal) geographic or geodetic (b, l) and map coordinates (x, y).
map projection codes
UNKNOWN | unknown projection |
GKK | Gauss-Krueger-Koordinaten. |
UTM | Universal Transverse Meractor projection. |
LAMBERT1 | Lambert Conformal Conic Projection with one standard parallel. |
LAMBERT2 | Lambert Conformal Conic Projection with two standard parallels. |
SLK | Schweizer Landeskoordinaten. |
SPK | Schweizer Projektionskoordinaten. |
SPKLV03 | Schweizer Landeskoordinaten LV03. |
SPKLV95 | Schweizer Landeskoordinaten LV95. |
END_OF_MAP | end-of-map |
GCL::Projection::Projection | ( | const string & | ell_name | ) | [inline] |
constructor with name of the reference ellipsoid
ell_name | name of the reference ellipsoid |
References init().
void GCL::Projection::print | ( | ostream & | os | ) | const [virtual] |
print parameters
[out] | os | output stream |
Reimplemented from GCL::Ellipsoid.
Reimplemented in GCL::Lambert2.
References _b0, _l0, _m0, _x0, _y0, and map_name().
Referenced by GCL::Lambert2::print().
virtual void GCL::Projection::geo_to_map | ( | double | b, | |
double | l, | |||
double & | x, | |||
double & | y | |||
) | const [pure virtual] |
convert geodetic into map coordinates
[in] | b,l | geodetic coordinates, latitude and longitude in radian |
[out] | x,y | map coordinates in meter |
Implemented in GCL::GIC, GCL::GKK, GCL::Lambert1, GCL::Lambert2, GCL::SPK, and GCL::UTM.
virtual void GCL::Projection::map_to_geo | ( | double | x, | |
double | y, | |||
double & | b, | |||
double & | l | |||
) | const [pure virtual] |
convert map into geodetic coordinates
[in] | x,y | map coordinates in meter |
[out] | b,l | geodetic coordinates, latitude and longitude in radian |
Implemented in GCL::GIC, GCL::GKK, GCL::Lambert1, GCL::Lambert2, GCL::SPK, and GCL::UTM.
Projection::ecode GCL::Projection::code | ( | const char * | map_name | ) | [static] |
get code form keyword map.
[in] | map_name | keyword string |
References _map, GCL::Projection::map_t::code, and GCL::Projection::map_t::name.
Referenced by GCL::create().
Projection::map_t GCL::Projection::_map [static, protected] |