10,7 → 10,6 |
* @doc |
* |
************************************************************************/ |
#pragma once |
|
//======================================================================= |
/** |
17,86 → 16,6 |
* UTM support goes here |
*/ |
//======================================================================= |
class CUtmPoint |
{ |
protected: |
double m_easting; |
double m_northing; |
int m_xzone; |
char m_yzone; |
public: |
void LatLonToUtmWGS84 (int* utmXZone, char* utmYZone, |
double* easting, double* northing, double lat, double lon); |
|
//======================================================================= |
//======================================================================= |
CUtmPoint() |
{Clear();} |
|
//======================================================================= |
//======================================================================= |
CUtmPoint(const CPosition &p) |
{ |
FromPosition(p); |
} |
|
//======================================================================= |
//======================================================================= |
CUtmPoint(const CUtmPoint& that) |
{ |
m_easting=that.m_easting; |
m_northing=that.m_northing; |
m_xzone=that.m_xzone; |
m_yzone=that.m_yzone; |
} |
|
//======================================================================= |
//======================================================================= |
void Clear() |
{ |
m_easting=m_northing=0; |
m_xzone=0; |
m_yzone=0; |
} |
|
//======================================================================= |
/** |
@func Build a position string |
@parm target. must be 30 characters or longer. |
*/ |
//======================================================================= |
|
void GetString(TCHAR *position) const; |
|
//======================================================================= |
/** |
@func get the position of a UTM point |
@parm point out |
*/ |
//======================================================================= |
|
void ToPosition(CPosition &pos) const; |
|
//======================================================================= |
/** |
@func turn a position into a UTM point |
@parm position |
@rdesc true if it was in range |
*/ |
//======================================================================= |
|
bool FromPosition(const CPosition &pos); |
|
//======================================================================= |
/** |
range test |
*/ |
//======================================================================= |
|
static bool IsPositionInUtmSpace(const CPosition &pos) |
{ return pos.GetLatitude()<=84 && pos.GetLatitude()>=-80;} |
|
|
|
}; |
|
|
|