Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
swri_transform_util::UtmUtil::UtmData Class Reference

The actual UTM conversion processing takes place in this helper class, which is a singleton due to the large memory footprint of the underlying PROJ.4 projections library structures. More...

Public Member Functions

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. More...
 
void ToUtm (double latitude, double longitude, int &zone, char &band, double &easting, double &northing) const
 Convert WGS84 latitude and longitude to UTM. More...
 
void ToUtm (double latitude, double longitude, double &easting, double &northing) const
 Convert WGS84 latitude and longitude to UTM. More...
 
 ~UtmData ()
 

Private Member Functions

 UtmData ()
 

Private Attributes

projPJ lat_lon_
 
boost::mutex mutex_
 
projPJ utm_north_ [60]
 
projPJ utm_south_ [60]
 

Friends

class boost::serialization::detail::singleton_wrapper< swri_transform_util::UtmUtil::UtmData >
 

Detailed Description

The actual UTM conversion processing takes place in this helper class, which is a singleton due to the large memory footprint of the underlying PROJ.4 projections library structures.

Thread safety is enforced with mutexes around the PROJ.4 functions, but could be achieved in the future with a thread-safe version of PROJ.4 or ignored all together if the calls can be determined to be thread safe in this context.

Definition at line 116 of file utm_util.h.

Constructor & Destructor Documentation

swri_transform_util::UtmUtil::UtmData::~UtmData ( )
swri_transform_util::UtmUtil::UtmData::UtmData ( )
private

Member Function Documentation

void swri_transform_util::UtmUtil::UtmData::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
[in]zoneUTM zone.
[in]bandUTM band.
[in]eastingUTM easting in meters.
[in]northingUTM northing in meters.
[out]latitudeWGS84 latitude in degrees.
[out]longitudeWGS84 longitude in degrees.
void swri_transform_util::UtmUtil::UtmData::ToUtm ( double  latitude,
double  longitude,
int &  zone,
char &  band,
double &  easting,
double &  northing 
) const

Convert WGS84 latitude and longitude to UTM.

Parameters
[in]latitudeLatitude value in degrees.
[in]longitudeLongitude value in degrees.
[out]zoneUTM zone number
[out]bandUTM band letter
[out]eastingUTM easting in meters.
[out]northingUTM northing in meters.
void swri_transform_util::UtmUtil::UtmData::ToUtm ( double  latitude,
double  longitude,
double &  easting,
double &  northing 
) const

Convert WGS84 latitude and longitude to UTM.

Parameters
[in]latitudeLatitude value in degrees.
[in]longitudeLongitude value in degrees.
[out]eastingUTM easting in meters.
[out]northingUTM northing in meters.

Friends And Related Function Documentation

friend class boost::serialization::detail::singleton_wrapper< swri_transform_util::UtmUtil::UtmData >
friend

Definition at line 164 of file utm_util.h.

Member Data Documentation

projPJ swri_transform_util::UtmUtil::UtmData::lat_lon_
private

Definition at line 169 of file utm_util.h.

boost::mutex swri_transform_util::UtmUtil::UtmData::mutex_
mutableprivate

Definition at line 173 of file utm_util.h.

projPJ swri_transform_util::UtmUtil::UtmData::utm_north_[60]
private

Definition at line 170 of file utm_util.h.

projPJ swri_transform_util::UtmUtil::UtmData::utm_south_[60]
private

Definition at line 171 of file utm_util.h.


The documentation for this class was generated from the following file:


swri_transform_util
Author(s): Marc Alban
autogenerated on Tue Apr 6 2021 02:50:46