Class UtmUtil

Nested Relationships

Nested Types

Class Documentation

class UtmUtil

Utility class for converting between latitude/longitude and UTM

Initialization of this class is costly, so it should be created on startup and reused.

Public Functions

UtmUtil()
void ToUtm(double latitude, double longitude, int &zone, char &band, double &easting, double &northing) const

Convert WGS84 latitude and longitude to UTM.

Parameters:
  • latitude[in] Latitude value in degrees.

  • longitude[in] Longitude value in degrees.

  • zone[out] UTM zone.

  • band[out] UTM band.

  • easting[out] UTM easting in meters.

  • northing[out] UTM northing in meters.

void ToUtm(double latitude, double longitude, double &easting, double &northing) const

Convert WGS84 latitude and longitude to UTM.

Parameters:
  • latitude[in] Latitude value in degrees.

  • longitude[in] Longitude value in degrees.

  • easting[out] UTM easting in meters.

  • northing[out] UTM northing in meters.

void ToLatLon(int zone, char band, double easting, double northing, double &latitude, double &longitude) const

Convert UTM easting and northing to WGS84 latitude and longitude.

Parameters:
  • zone[in] UTM zone.

  • band[in] UTM band.

  • easting[in] UTM easting in meters.

  • northing[in] UTM northing in meters.

  • latitude[out] WGS84 latitude in degrees.

  • longitude[out] WGS84 longitude in degrees.