Loading [MathJax]/jax/output/NativeMML/config.js
Isis Developer Reference
Longitude.h
Go to the documentation of this file.
1 #ifndef Longitude_h
2 #define Longitude_h
3 
9 /* SPDX-License-Identifier: CC0-1.0 */
10 
11 #include "Angle.h"
12 #include <QList>
13 #include <QPair>
14 
15 namespace Isis {
16  class PvlGroup;
17 
40  class Longitude : public Angle {
41  public:
46  enum Direction {
51  };
52 
62  enum Domain {
66  Domain180
67  };
68 
69  Longitude();
70  Longitude(double longitude,
71  Angle::Units longitudeUnits,
72  Direction lonDir = PositiveEast,
73  Domain lonDomain = Domain360);
74  Longitude(Angle longitude,
75  Direction lonDir = PositiveEast,
76  Domain lonDomain = Domain360);
77  Longitude(double longitude,
78  PvlGroup mapping,
79  Angle::Units longitudeUnits);
80  Longitude(const Longitude &longitudeToCopy);
81  ~Longitude();
82 
83  double positiveEast(Angle::Units units = Angle::Radians) const;
84  void setPositiveEast(double longitude,
86  double positiveWest(Angle::Units units = Angle::Radians) const;
87  void setPositiveWest(double longitude,
89 
90  Longitude force180Domain() const;
91  Longitude force360Domain() const;
92 
93  bool inRange(Longitude min, Longitude max) const;
95 
105  Longitude& operator=(const Longitude & longitudeToCopy);
106 
107  private:
111  Domain m_currentDomain;
112  };
113 }
114 
115 #endif
Isis::Angle::Degrees
@ Degrees
Degrees are generally considered more human readable, 0-360 is one circle, however most math does not...
Definition: Angle.h:56
Isis::PI
const double PI
The mathematical constant PI.
Definition: Constants.h:40
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::Longitude::positiveWest
double positiveWest(Angle::Units units=Angle::Radians) const
Get the longitude in the PositiveWest coordinate system.
Definition: Longitude.cpp:158
Isis::Longitude::positiveEast
double positiveEast(Angle::Units units=Angle::Radians) const
Get the longitude in the PositiveEast coordinate system.
Definition: Longitude.cpp:146
SpecialPixel.h
PvlGroup.h
Isis::Longitude::operator=
Longitude & operator=(const Longitude &longitudeToCopy)
Same as positiveEast.
Definition: Longitude.cpp:252
Longitude.h
Isis::Longitude::Domain180
@ Domain180
As the longitude increases the actual position is more west.
Definition: Longitude.h:66
Isis::Longitude::Domain360
@ Domain360
As the longitude increases the actual position is more east.
Definition: Longitude.h:64
Isis::Angle::unitWrapValue
double unitWrapValue(const Units &unit) const
Return wrap value in desired units.
Definition: Angle.cpp:266
Isis::Longitude::force180Domain
Longitude force180Domain() const
This returns a longitude that is constricted to -180 to 180 degrees.
Definition: Longitude.cpp:289
Isis::IsSpecial
bool IsSpecial(const double d)
Returns if the input pixel is special.
Definition: SpecialPixel.h:197
Isis::Longitude::setPositiveEast
void setPositiveEast(double longitude, Angle::Units units=Angle::Radians)
Set the longitude given a value in the PositiveEast longitude system.
Definition: Longitude.cpp:199
IString.h
Isis::Longitude
This class is designed to encapsulate the concept of a Longitude.
Definition: Longitude.h:40
Isis::Longitude::~Longitude
~Longitude()
This cleans up the Longitude class.
Definition: Longitude.cpp:135
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::Longitude::setPositiveWest
void setPositiveWest(double longitude, Angle::Units units=Angle::Radians)
Set the longitude given a value in the PositiveWest longitude system.
Definition: Longitude.cpp:210
Isis::Angle::Units
Units
The set of usable angle measurement units.
Definition: Angle.h:49
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::Angle
Defines an angle and provides unit conversions.
Definition: Angle.h:45
Isis::Longitude::Direction
Direction
Possible longitude directions: Is a positive longitude towards east or towards west?
Definition: Longitude.h:46
IException.h
Isis::IException::Programmer
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
Isis::Longitude::to360Range
static QList< QPair< Longitude, Longitude > > to360Range(Longitude startLon, Longitude endLon)
Calculates where the longitude range is in 0-360.
Definition: Longitude.cpp:364
Isis::Angle::isValid
bool isValid() const
This indicates whether we have a legitimate angle stored or are in an unset, or invalid,...
Definition: Angle.cpp:95
Isis::Angle::Angle
Angle()
Constructs a blank angle object which needs a value to be set in order to do any calculations.
Definition: Angle.cpp:23
QPair
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:23
Isis::Angle::fullRotation
static Angle fullRotation()
Makes an angle to represent a full rotation (0-360 or 0-2pi).
Definition: Angle.cpp:106
Angle.h
Isis::Angle::degrees
double degrees() const
Get the angle in units of Degrees.
Definition: Angle.h:232
Isis::Angle::setAngle
virtual void setAngle(const double &angle, const Units &unit)
Set angle value in desired units.
Definition: Angle.cpp:323
Isis::Longitude::PositiveWest
@ PositiveWest
As the longitude increases the actual position is more west.
Definition: Longitude.h:50
Isis::IString
Adds specific functionality to C++ strings.
Definition: IString.h:165
Constants.h
Isis::Longitude::Domain
Domain
Use LongitudeDomain360 if 0-360 is the primary range of the longitude values with 180 being the 'cent...
Definition: Longitude.h:62
Isis::Longitude::Longitude
Longitude()
Create a blank Longitude object with 0-360 domain.
Definition: Longitude.cpp:24
Isis::Longitude::force360Domain
Longitude force360Domain() const
This returns a longitude that is constricted to 0-360 degrees.
Definition: Longitude.cpp:267
Isis::Longitude::PositiveEast
@ PositiveEast
As the longitude increases the actual position is more east.
Definition: Longitude.h:48
Isis::Angle::angle
virtual double angle(const Units &unit) const
Return angle value in desired units.
Definition: Angle.cpp:289
Isis::Angle::Radians
@ Radians
Radians are generally used in mathematical equations, 0-2*PI is one circle, however these are more di...
Definition: Angle.h:63
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::Longitude::inRange
bool inRange(Longitude min, Longitude max) const
Checks if this longitude value is within the given range.
Definition: Longitude.cpp:319
Isis::Angle::radians
double radians() const
Convert an angle to a double.
Definition: Angle.h:226

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 03/21/2022 06:51:01