Class to hold and convert a point in geodetic coordinates. More...
#include <utl/UTMPoint.h>
Classes | |
class | UTMException |
Report problems in UTM handling. More... | |
class | UTMZoneException |
Report attempts to use invalid UTM zone. More... | |
Public Types | |
enum | ZoneRange { eZoneMin = 1, eZoneMax = 60 } |
range of zone numbers More... | |
Public Member Functions | |
char | GetBand () const |
Get the band. More... | |
boost::tuple< double, double, double, int, char > | GetCoordinates () const |
Get norting, easting, height, zone, and band. More... | |
boost::tuple< double, double, double > | GetCoordinates3 () const |
Get norting, easting, and height. More... | |
boost::tuple< double, double, double, int > | GetCoordinates4 () const |
Get norting, easting, height, and zone. More... | |
double | GetEasting () const |
Get the easting. More... | |
const ReferenceEllipsoid & | GetEllipsoid () const |
Get the reference ellipsoid. More... | |
boost::tuple< double, double, double > | GetGeodeticCoordinates () const |
Get geodetic latitude, longitude, height. More... | |
double | GetHeight () const |
Get the height. More... | |
double | GetNorthing () const |
Get the northing. More... | |
Point | GetPoint (const CoordinateSystemPtr &theCS=CoordinateSystemPtr()) const |
Get a cartesian point from an UTMPoint. More... | |
int | GetZone () const |
Get the zone. More... | |
bool | operator!= (const UTMPoint &rhs) const |
inequality operator More... | |
bool | operator== (const UTMPoint &rhs) const |
equality operator More... | |
UTMPoint (const double theNorthing, const double theEasting, const double theHeight, const int theZone, const char theBand, const ReferenceEllipsoid &theEllipsoid) | |
Construct UTMPoint from the UTM information. More... | |
UTMPoint (const double theNorthing, const double theEasting, const double theHeight, const int theZone, const char theBand, const ReferenceEllipsoid::EllipsoidID theEllipsoidID) | |
Construct UTMPoint from the UTM information, ellipsoid by name. More... | |
UTMPoint (const UTMPoint &theUTMPoint, const ReferenceEllipsoid &theEllipsoid) | |
Construct UTMPoint with an alternative reference ellipsoid. More... | |
UTMPoint (const UTMPoint &theUTMPoint, const ReferenceEllipsoid::EllipsoidID theEllipsoidID) | |
Construct UTMPoint with an alternative reference ellipsoid. More... | |
UTMPoint (const Point &thePoint, const ReferenceEllipsoid &theEllipsoid) | |
Construct UTMPoint from cartesian point with given reference ellipsoid. More... | |
UTMPoint (const Point &thePoint, const ReferenceEllipsoid::EllipsoidID theEllipsoidID) | |
Construct UTMPoint from cartesian point with named reference ellipsoid. More... | |
UTMPoint (const double theLatitude, const double theLongitude, const double theHeight, const ReferenceEllipsoid &theEllipsoid) | |
Construct UTMPoint from geodetic Coordinates with given ellipsoid. More... | |
UTMPoint (const double theLatitude, const double theLongitude, const double theHeight, const ReferenceEllipsoid::EllipsoidID theEllipsoidID) | |
Construct UTMPoint from geodetic Coordinates with named ellipsoid. More... | |
~UTMPoint () | |
Destructor - should be virtual for base classes. More... | |
Private Member Functions | |
void | SetFromCartesian (const Point &thePoint) |
Construction from Cartesian coordinates. More... | |
void | SetFromLatitudeLongitude (const double theLatitude, const double theLongitude) |
Construction from geodetic Latitude and Longitude (height identical) More... | |
void | SetFromOtherDatum (const UTMPoint &theUTMPoint) |
Datum transformation. More... | |
void | VerifyZone () |
verify zone and throw exception if out of bounds More... | |
Static Private Member Functions | |
static char | BandFromLatitude (const double theLatitude) |
Calculate band letter from latitude and longitude. More... | |
static int | ZoneFromLatitudeLongitude (const double theLatitude, const double theLongitude) |
Calculate zone number from latitude and longitude. More... | |
Private Attributes | |
char | fBand |
Letter indicating band, C-X, w/o O, I. More... | |
double | fEasting |
const ReferenceEllipsoid * | fEllipsoid |
double | fHeight |
double | fNorthing |
int | fZone |
zone runs from 1 to 60 More... | |
Class to hold and convert a point in geodetic coordinates.
This class implements a point represented with UTM coordinates. It provides conversion to and from Points and geodetic latitude/longitude.
Definition at line 40 of file UTMPoint.h.
range of zone numbers
Enumerator | |
---|---|
eZoneMin |
Minimum UTM zone number. |
eZoneMax |
Maximum UTM zone number. |
Definition at line 43 of file UTMPoint.h.
|
inline |
Construct UTMPoint from the UTM information.
Construct an UTM point from the following information:
Definition at line 62 of file UTMPoint.h.
References VerifyZone().
|
inline |
Construct UTMPoint from the UTM information, ellipsoid by name.
Construct an UTM point from the following information:
Definition at line 90 of file UTMPoint.h.
References VerifyZone().
|
inline |
Construct UTMPoint with an alternative reference ellipsoid.
This constructor is for datum transformations. It constructs an UTMPoint with Northing, Easting, and Height in the grid defined by the new reference ellipsoid.
Definition at line 110 of file UTMPoint.h.
References SetFromOtherDatum().
|
inline |
Construct UTMPoint with an alternative reference ellipsoid.
This constructor is for datum transformations. It constructs an UTMPoint with Northing, Easting, and Height in the grid defined by the new reference ellipsoid.
Definition at line 120 of file UTMPoint.h.
References SetFromOtherDatum().
|
inline |
Construct UTMPoint from cartesian point with given reference ellipsoid.
This constructor implements the conversion from a point in cartesian coordinates to UTM coordinates with a given reference ellipsoid.
Definition at line 133 of file UTMPoint.h.
References SetFromCartesian().
|
inline |
Construct UTMPoint from cartesian point with named reference ellipsoid.
This constructor implements the conversion from a point in cartesian coordinates to UTM coordinates with a given reference ellipsoid.
Definition at line 142 of file UTMPoint.h.
References SetFromCartesian().
|
inline |
Construct UTMPoint from geodetic Coordinates with given ellipsoid.
This constructor implements the conversion from geodetic latitude, lngitude, and height. The height is the same in both representations.
The constructor takes a given reference ellipsoid.
Definition at line 157 of file UTMPoint.h.
References SetFromLatitudeLongitude().
|
inline |
Construct UTMPoint from geodetic Coordinates with named ellipsoid.
This constructor implements the conversion from geodetic latitude, lngitude, and height. The height is the same in both representations.
The constructor takes a named reference ellipsoid.
Definition at line 175 of file UTMPoint.h.
References SetFromLatitudeLongitude().
|
inline |
Destructor - should be virtual for base classes.
Definition at line 186 of file UTMPoint.h.
|
staticprivate |
Calculate band letter from latitude and longitude.
Definition at line 302 of file UTMPoint.cc.
References utl::deg, and ERROR.
Referenced by SetFromLatitudeLongitude().
|
inline |
Get the band.
Definition at line 218 of file UTMPoint.h.
References fBand.
Referenced by RdZHAireSSimPreparator::RdZHAireSSimPreparator::GenerateCoreAroundStation(), RdREASSimPreparatorNG::RdREASSimPreparatorNG::GenerateCoreAroundStation(), EventGeneratorOG::EventGenerator::GenerateEyeCentricCore(), EventGeneratorOG::EventGenerator::GenerateSphereCentricCore(), EventGeneratorOG::EventGenerator::Init(), testUTMPoint::oneLatLongConversion(), testUTMPoint::oneUTMConversion(), testUTMPoint::testAssignement(), testUTMPoint::testConstructors(), CoordinateSystemRegistryTest::testPampaAmarilla(), and testUTMPoint::testUTMConversions().
|
inline |
Get norting, easting, height, zone, and band.
Definition at line 232 of file UTMPoint.h.
References fBand, fEasting, fHeight, fNorthing, and fZone.
Referenced by utl::operator<<(), GeometryExampleNS::GeometryExample::Run(), testUTMPoint::testAssignement(), and testUTMPoint::testConstructors().
|
inline |
Get norting, easting, and height.
Definition at line 224 of file UTMPoint.h.
References fEasting, fHeight, and fNorthing.
Referenced by evt::ConvertEventToIoSd(), testUTMPoint::oneLatLongConversion(), testUTMPoint::oneUTMConversion(), testUTMPoint::testAssignement(), testUTMPoint::testConstructors(), and testUTMPoint::testUTMConversions().
|
inline |
Get norting, easting, height, and zone.
Definition at line 228 of file UTMPoint.h.
References fEasting, fHeight, fNorthing, and fZone.
Referenced by testUTMPoint::testAssignement(), and testUTMPoint::testConstructors().
|
inline |
Get the easting.
Definition at line 209 of file UTMPoint.h.
References fEasting.
Referenced by sdet::SDenseStationListXMLManager::DenseStations::AddStation(), RdStationAssociator::RdStationAssociator::AddVirtualStations(), evt::ConvertEventToEc(), SdRecPlotterOG::SdRecPlotter::DrawEvent(), otoa::FD2ADST::FillFdCoreAxis(), otoa::RdFiller::FillRadioShower(), otoa::SD2ADST::FillSEvent(), otoa::Offline2ADST::FillSim(), otoa::SD2ADST::FillUniversality(), StereoGeometryFinderOG::StereoGeometryFinder::FindAxisStereo(), RdZHAireSSimPreparator::RdZHAireSSimPreparator::GenerateCoreAroundStation(), RdREASSimPreparatorNG::RdREASSimPreparatorNG::GenerateCoreAroundStation(), EventGeneratorOG::EventGenerator::GenerateEyeCentricCore(), EventGeneratorOG::EventGenerator::GenerateSphereCentricCore(), atm::GOESDB::GetCloudProbability(), HybridGeometryFinderWG::HybridGeometryFinder::GetDataFromPreviousFit(), atm::GOESDB::GetMaximumCloudProbability(), EventGeneratorOG::EventGenerator::Init(), RdTimeCalibration::RdTimeCalibration::Init(), otoa::err::CalculateFdCorePosition::operator()(), EventGeneratorOG::EventGenerator::Run(), FdEventLoggerGS::FdEventLogger::Run(), PlotGOESNS::PlotGOES::Run(), testUTMPoint::testAssignement(), testUTMPoint::testConstructors(), CoordinateSystemRegistryTest::testPampaAmarilla(), and RSQLManagerTest::testStationListManager().
|
inline |
Get the reference ellipsoid.
Definition at line 221 of file UTMPoint.h.
References fEllipsoid.
Referenced by RdAirplane::Ads_bEvent::Ads_bEvent(), utl::AugerCoordinateSystemConstructor< Policy >::Create(), testUTMPoint::testAssignement(), and testUTMPoint::testConstructors().
boost::tuple< double, double, double > UTMPoint::GetGeodeticCoordinates | ( | ) | const |
Get geodetic latitude, longitude, height.
UTM to Latitude Longitude converstion. The formulae are taken from the code by B. Revenu. See GAP 2001-038
Definition at line 67 of file UTMPoint.cc.
References RdGeoCeLDFFitter::a, fBand, fEasting, fEllipsoid, fHeight, fNorthing, fZone, utl::ReferenceEllipsoid::GetEccentricity2(), utl::ReferenceEllipsoid::GetEquatorialRadius(), std::pow(), utl::rad, and sqrt().
Referenced by RdAirplane::Interpolator3D::_getGeodeticCoordinates(), RdAirplane::Ads_bEvent::Ads_bEvent(), GetPoint(), RdAirplane::RdTransformAds_bLogFile::Init(), testUTMPoint::oneLatLongConversion(), otoa::err::CalculateEquatorialCoordinates::operator()(), and testUTMPoint::testUTMConversions().
|
inline |
Get the height.
Definition at line 212 of file UTMPoint.h.
References fHeight.
Referenced by sdet::SDenseStationListXMLManager::DenseStations::AddStation(), RdStationAssociator::RdStationAssociator::AddVirtualStations(), RdAirplane::Ads_bEvent::Ads_bEvent(), FdProfileReconstructorKG::CherenkovFluorescenceMatrix::CalculateFluorescenceMatrix(), RdREASSimPreparator::RdREASSimPreparator::CorsikaInpFileWriter(), RdREASSimPreparatorNG::RdREASSimPreparatorNG::CreateCoREASContent(), RdREASSimPreparatorNG::RdREASSimPreparatorNG::CreateCoREASListContent(), RdZHAireSSimPreparator::RdZHAireSSimPreparator::CreateFiles(), RdEVASimPreparator::RdEVASimPreparator::EVAFileWriter(), otoa::FD2ADST::FillFdCoreAxis(), otoa::RdFiller::FillRadioShower(), otoa::SD2ADST::FillSEvent(), otoa::Offline2ADST::FillSim(), otoa::SD2ADST::FillUniversality(), StereoGeometryFinderOG::StereoGeometryFinder::FindAxisStereo(), RdZHAireSSimPreparator::RdZHAireSSimPreparator::GenerateCoreAroundStation(), RdREASSimPreparatorNG::RdREASSimPreparatorNG::GenerateCoreAroundStation(), EventGeneratorOG::EventGenerator::GenerateSphereCentricCore(), HybridGeometryFinderWG::HybridGeometryFinder::GetDataFromPreviousFit(), fdet::FTimeFitModel::GetTimeAtAperture(), FdProfileReconstructorKG::CherenkovFluorescenceMatrix::GillerFraction(), FdProfileReconstructorKG::CherenkovFluorescenceMatrix::GoraFraction(), atm::InclinedAtmosphericProfile::InclinedAtmosphericProfile(), EventGeneratorOG::EventGenerator::Init(), RdTimeCalibration::RdTimeCalibration::Init(), atm::SimShowerProfileModel::LazyInit(), io::CorsikaShowerFileGeometryProducer::MakeGroundParticleCoordinateSystem(), StereoGeometryFinderOG::StereoGeometryFinder::MinuitFitFuncStereoHybrid(), FdProfileReconstructorKG::CherenkovFluorescenceMatrix::PekalaFraction(), io::ZHAireSFile::Read(), io::SELFASFile::Read(), RdREASSimPreparator::RdREASSimPreparator::REASFileWriter(), OverrideConfigNS::OverrideConfig::Run(), AtmosphericProfileNS::AtmosphericProfile::Run(), UniversalityFitter::UniversalityFitter::Run(), io::CorsikaShowerFile::SetHeaderTrailer(), testUTMPoint::testAssignement(), testUTMPoint::testConstructors(), CoordinateSystemRegistryTest::testPampaAmarilla(), RSQLManagerTest::testStationListManager(), and RdREASSimPreparator::RdREASSimPreparator::WriteDetectorFile().
|
inline |
Get the northing.
Definition at line 206 of file UTMPoint.h.
References fNorthing.
Referenced by sdet::SDenseStationListXMLManager::DenseStations::AddStation(), RdStationAssociator::RdStationAssociator::AddVirtualStations(), evt::ConvertEventToEc(), SdRecPlotterOG::SdRecPlotter::DrawEvent(), otoa::FD2ADST::FillFdCoreAxis(), otoa::RdFiller::FillRadioShower(), otoa::SD2ADST::FillSEvent(), otoa::Offline2ADST::FillSim(), otoa::SD2ADST::FillUniversality(), StereoGeometryFinderOG::StereoGeometryFinder::FindAxisStereo(), StationListCreatorModuleNS::StationListCreatorModule::Finish(), RdZHAireSSimPreparator::RdZHAireSSimPreparator::GenerateCoreAroundStation(), RdREASSimPreparatorNG::RdREASSimPreparatorNG::GenerateCoreAroundStation(), EventGeneratorOG::EventGenerator::GenerateEyeCentricCore(), EventGeneratorOG::EventGenerator::GenerateSphereCentricCore(), atm::GOESDB::GetCloudProbability(), HybridGeometryFinderWG::HybridGeometryFinder::GetDataFromPreviousFit(), atm::GOESDB::GetMaximumCloudProbability(), EventGeneratorOG::EventGenerator::Init(), RdTimeCalibration::RdTimeCalibration::Init(), otoa::err::CalculateFdCorePosition::operator()(), EventGeneratorOG::EventGenerator::Run(), FdEventLoggerGS::FdEventLogger::Run(), PlotGOESNS::PlotGOES::Run(), testUTMPoint::testAssignement(), testUTMPoint::testConstructors(), CoordinateSystemRegistryTest::testPampaAmarilla(), and RSQLManagerTest::testStationListManager().
Point UTMPoint::GetPoint | ( | const CoordinateSystemPtr & | theCS = CoordinateSystemPtr() | ) | const |
Get a cartesian point from an UTMPoint.
This member function implements the conversion from UTM coordinates to cartesian coordinates. One can specify the desired coordinate system for representing the point internally.
Definition at line 45 of file UTMPoint.cc.
References fEllipsoid, GetGeodeticCoordinates(), and utl::ReferenceEllipsoid::LatitudeLongitudeHeightToPoint().
Referenced by RdAirplane::Interpolator3D::_getCoordinates(), evt::ConvertEventToEc(), utl::AugerCoordinateSystemConstructor< Policy >::Create(), fwk::LocalCoordinateSystemConstructor< Policy >::Create(), FdAxisFinderOG::FdAxisFinder::FindAxisLaser(), StereoGeometryFinderOG::StereoGeometryFinder::FindAxisStereo(), StereoGeometryFinderOG::StereoGeometryFinder::FindAxisStereoHybrid(), HybridGeometryFinderWG::HybridGeometryFinder::FitAxis(), EventGeneratorOG::EventGenerator::GenerateArrayCentricRandomizedCoreAroundRandomStation(), EventGeneratorOG::EventGenerator::GenerateCoreAroundStation(), EventGeneratorOG::EventGenerator::GenerateSphereCentricCore(), cdet::Station::GetPosition(), rdet::Station::GetPosition(), sdet::Station::GetPosition(), RdStationPositionCorrectionOG::RdStationPositionCorrection::Init(), SdStationPositionCorrectionOG::SdStationPositionCorrection::Init(), RdAirplane::RdAirplaneTiming::Init(), HybridGeometryFinderWG::HybridGeometryFinder::MinuitFitFuncAxis(), FdAxisFinderOG::FdAxisFinder::MinuitFitFuncLaser(), StereoGeometryFinderOG::StereoGeometryFinder::MinuitFitFuncStereo(), StereoGeometryFinderOG::StereoGeometryFinder::MinuitFitFuncStereoHybrid(), testUTMPoint::oneUTMConversion(), HybridGeometryFinderWG::AxisParameterCalculator::operator()(), HybridGeometryFinderWG::HybridGeometryFinder::RecalculateChiSquare(), GeometryExampleNS::GeometryExample::Run(), EventGeneratorOG::EventGenerator::Run(), ShowerInventorNS::ShowerInventor::Run(), LocalCoordinateSystemTest::testCreate(), testAugerCoordinateSystem::testCS(), CoordinateSystemRegistryTest::testPampaAmarilla(), testAugerCoordinateSystem::testSiteCS(), and testUTMPoint::testUTMConversions().
|
inline |
Get the zone.
Definition at line 215 of file UTMPoint.h.
References fZone.
Referenced by RdZHAireSSimPreparator::RdZHAireSSimPreparator::GenerateCoreAroundStation(), RdREASSimPreparatorNG::RdREASSimPreparatorNG::GenerateCoreAroundStation(), EventGeneratorOG::EventGenerator::GenerateEyeCentricCore(), EventGeneratorOG::EventGenerator::GenerateSphereCentricCore(), EventGeneratorOG::EventGenerator::Init(), testUTMPoint::oneLatLongConversion(), testUTMPoint::oneUTMConversion(), testUTMPoint::testAssignement(), testUTMPoint::testConstructors(), CoordinateSystemRegistryTest::testPampaAmarilla(), and testUTMPoint::testUTMConversions().
|
inline |
|
inline |
equality operator
Definition at line 190 of file UTMPoint.h.
References fBand, fEasting, fEllipsoid, fHeight, fNorthing, and fZone.
Referenced by operator!=().
|
private |
Construction from Cartesian coordinates.
Definition at line 160 of file UTMPoint.cc.
References fEllipsoid, fHeight, utl::ReferenceEllipsoid::PointToLatitudeLongitudeHeight(), and SetFromLatitudeLongitude().
Referenced by UTMPoint().
|
private |
Construction from geodetic Latitude and Longitude (height identical)
Latitude Longitude to UTM converstion. The formulae are taken from the code by B. Revenu. See GAP 2001-038
Definition at line 179 of file UTMPoint.cc.
References RdGeoCeLDFFitter::a, BandFromLatitude(), fBand, fEasting, fEllipsoid, fNorthing, fZone, utl::ReferenceEllipsoid::GetEccentricity2(), utl::ReferenceEllipsoid::GetEquatorialRadius(), utl::rad, sqrt(), and ZoneFromLatitudeLongitude().
Referenced by SetFromCartesian(), and UTMPoint().
|
private |
Datum transformation.
Definition at line 142 of file UTMPoint.cc.
References FATAL, fBand, fEasting, fEllipsoid, fHeight, fNorthing, and fZone.
Referenced by UTMPoint().
|
private |
verify zone and throw exception if out of bounds
Definition at line 257 of file UTMPoint.cc.
References eZoneMax, eZoneMin, FATAL, and fZone.
Referenced by UTMPoint().
|
staticprivate |
Calculate zone number from latitude and longitude.
Definition at line 274 of file UTMPoint.cc.
References utl::deg, and eZoneMax.
Referenced by SetFromLatitudeLongitude().
|
private |
Letter indicating band, C-X, w/o O, I.
Definition at line 283 of file UTMPoint.h.
Referenced by GetBand(), GetCoordinates(), GetGeodeticCoordinates(), operator==(), SetFromLatitudeLongitude(), and SetFromOtherDatum().
|
private |
Definition at line 278 of file UTMPoint.h.
Referenced by GetCoordinates(), GetCoordinates3(), GetCoordinates4(), GetEasting(), GetGeodeticCoordinates(), operator==(), SetFromLatitudeLongitude(), and SetFromOtherDatum().
|
private |
Definition at line 284 of file UTMPoint.h.
Referenced by GetEllipsoid(), GetGeodeticCoordinates(), GetPoint(), operator==(), SetFromCartesian(), SetFromLatitudeLongitude(), and SetFromOtherDatum().
|
private |
Definition at line 279 of file UTMPoint.h.
Referenced by GetCoordinates(), GetCoordinates3(), GetCoordinates4(), GetGeodeticCoordinates(), GetHeight(), operator==(), SetFromCartesian(), and SetFromOtherDatum().
|
private |
Definition at line 277 of file UTMPoint.h.
Referenced by GetCoordinates(), GetCoordinates3(), GetCoordinates4(), GetGeodeticCoordinates(), GetNorthing(), operator==(), SetFromLatitudeLongitude(), and SetFromOtherDatum().
|
private |
zone runs from 1 to 60
Definition at line 281 of file UTMPoint.h.
Referenced by GetCoordinates(), GetCoordinates4(), GetGeodeticCoordinates(), GetZone(), operator==(), SetFromLatitudeLongitude(), SetFromOtherDatum(), and VerifyZone().