core
vpgl
vpgl_utm.h
Go to the documentation of this file.
1
#ifndef vpgl_utm_h
2
#define vpgl_utm_h
3
//:
4
// \file
5
// A rip-off of the IUE utm_geodedic and geodetic_utm transform classes
6
// which allows the GeoPt to support a constructor in UTM coordinates.
7
// The constructor defaults to WGS-84, but there are accessors to
8
// set the major and minor axes of other spheroids, e.g. nad-27.
9
//
10
// The latitude and longitude values are expressed in degrees, with
11
// negative values representing South and West respectively.
12
// The UTM zone is 1 between 180 degrees and 174 degrees West
13
// longitude and increases by one every six degrees from West to East.
14
// The UTM zone ranges from 10 on the West Coast of the US to 19 on the
15
// East Coast. If the latitude is negative, i.e., below the equator,
16
// then the south_flag should be set to true. I am not sure what the
17
// utm_central_meridian variable is for, maybe for the polar caps.
18
//
19
// Adapted by: J. L. Mundy
20
// \date May 8, 1999
21
//
22
//======================================================================
23
24
class
vpgl_utm
25
{
26
public
:
27
vpgl_utm
();
28
vpgl_utm
(
const
vpgl_utm
&t);
29
~vpgl_utm
();
30
void
SetSpheroidA
(
double
a) {
a_
= a; }
31
void
SetSpheroidB
(
double
b) {
b_
= b; }
32
//UTM to LatLon
33
void
transform
(
int
utm_zone,
double
x,
double
y,
double
z,
34
double
& lat,
double
& lon ,
double
& elev,
35
bool
south_flag =
false
,
36
double
utm_central_meridian = 0);
37
38
void
transform
(
int
utm_zone,
double
x,
double
y,
39
double
& lat,
double
& lon,
40
bool
south_flag =
false
,
41
double
utm_central_meridian = 0);
42
//: LatLon to UTM
43
void
transform
(
double
lat,
double
lon,
44
double
& x,
double
& y,
int
& utm_zone);
45
46
private
:
47
double
a_
,
b_
;
48
};
49
50
#endif
vpgl_utm::a_
double a_
Definition:
vpgl_utm.h:46
vpgl_utm::SetSpheroidB
void SetSpheroidB(double b)
Definition:
vpgl_utm.h:30
vpgl_utm
Definition:
vpgl_utm.h:23
vpgl_utm::~vpgl_utm
~vpgl_utm()
vpgl_utm::SetSpheroidA
void SetSpheroidA(double a)
Definition:
vpgl_utm.h:29
vpgl_utm::b_
double b_
Definition:
vpgl_utm.h:46
vpgl_utm::vpgl_utm
vpgl_utm()
Definition:
vpgl_utm.cxx:146
vpgl_utm::transform
void transform(int utm_zone, double x, double y, double z, double &lat, double &lon, double &elev, bool south_flag=false, double utm_central_meridian=0)
Definition:
vpgl_utm.cxx:155
Generated by
1.8.15