53 ObliqueCylindrical::ObliqueCylindrical(
Pvl &label,
bool allowDefaults) :
66 if (m_poleLatitude < -90 || m_poleLatitude > 90) {
68 "Pole latitude must be between -90 and 90.",
74 if (m_poleLongitude < -360 || m_poleLongitude > 360) {
76 "Pole longitude must be between -360 and 360.",
82 if (m_poleRotation < -360 || m_poleRotation > 360) {
84 "Pole rotation must be between -360 and 360.",
88 bool calculateVectors =
false;
92 || mapGroup[
"XAxisVector"].size() != 3) {
93 calculateVectors =
true;
97 || mapGroup[
"YAxisVector"].size() != 3) {
98 calculateVectors =
true;
102 || mapGroup[
"ZAxisVector"].size() != 3) {
103 calculateVectors =
true;
106 if (!calculateVectors) {
130 eul2m_c(rotationAngle, latitudeAngle, longitudeAngle, 3, 2, 3, pvec);
149 for (
int i = 0; i < 3; i++) {
154 mapGroup[
"XAxisVector"] +=
toString(pvec[0][i]);
155 mapGroup[
"YAxisVector"] +=
toString(pvec[1][i]);
156 mapGroup[
"ZAxisVector"] +=
toString(pvec[2][i]);
163 QString message =
"Invalid label group [Mapping]";
181 if (!Projection::operator==(proj))
return false;
198 return "ObliqueCylindrical";
224 double normalLat, normalLon;
225 double obliqueLat, obliqueLon;
248 obliqueLon = atan2(cos(normalLat) * sin(normalLon -
poleLongitude),
253 while(obliqueLon < -
PI) {
254 obliqueLon += (2.0 *
PI);
257 while(obliqueLon >=
PI) {
258 obliqueLon -= (2.0 *
PI);
306 double obliqueLat, obliqueLon;
362 double &minY,
double &maxY) {
434 void ObliqueCylindrical::init() {
446 "The input center latitude is too close to a pole " 447 "which will result in a division by zero.",
466 bool allowDefaults) {
~ObliqueCylindrical()
Destroys the ObliqueCylindrical object.
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
bool operator==(const Isis::Projection &proj)
Compares two Projection objects to see if they are equal.
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
bool xyRangeOblique(double &minX, double &maxX, double &minY, double &maxY)
This method is used to find the XY range for oblique aspect projections (non-polar projections) by "w...
const double PI
The mathematical constant PI.
Longitude values increase in the westerly direction.
PvlGroup MappingLatitudes()
This function returns the latitude keywords that this projection uses.
Isis::Projection * ObliqueCylindricalPlugin(Isis::Pvl &lab, bool allowDefaults)
This is the function that is called in order to instantiate an ObliqueCylindrical object...
bool XYRange(double &minX, double &maxX, double &minY, double &maxY)
This method is used to determine the x/y range which completely covers the area of interest specified...
Base class for Map TProjections.
const double HALFPI
The mathematical constant PI/2.
Namespace for the standard library.
double poleLatitude() const
Returns the value of the pole latitude.
double GetX() const
Calculates the unrotated form of current x value.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
double toDouble(const QString &string)
Global function to convert from a string to a double.
double m_poleLongitude
The Oblique Pole Longitude.
A type of error that occurred when performing an actual I/O operation.
void SetComputedXY(double x, double y)
This protected method is a helper for derived classes.
double m_latitude
This contains the currently set latitude value.
virtual PvlGroup MappingLatitudes()
This function returns the latitude keywords that this projection uses.
double m_longitude
This contains the currently set longitude value.
bool IsPlanetocentric() const
This indicates if the latitude type is planetocentric (as opposed to planetographic).
Base class for Map Projections.
double poleRotation() const
Returns the value of the pole rotation.
double m_equatorialRadius
Polar radius of the target.
bool SetCoordinate(const double x, const double y)
This method is used to set the projection x/y.
Contains multiple PvlContainers.
#define _FILEINFO_
Macro for the filename and line number.
PvlGroup Mapping()
This function returns the keywords that this projection uses.
A single keyword-value pair.
A type of error that cannot be classified as any of the other error types.
bool SetGround(const double lat, const double lon)
This method is used to set the latitude/longitude (assumed to be of the correct LatitudeType, LongitudeDirection, and LongitudeDomain.
std::vector< double > m_zAxisVector
The z-axis vector, read from the mapping group in the label.
double poleLongitude() const
Returns the value of the pole longitude.
std::vector< double > m_yAxisVector
The y-axis vector, read from the mapping group in the label.
Container for cube-like labels.
double ToPlanetographic(const double lat) const
This method converts a planetocentric latitude to a planetographic latitude.
virtual PvlGroup Mapping()
This function returns the keywords that this projection uses.
bool m_good
Indicates if the contents of m_x, m_y, m_latitude, and m_longitude are valid.
PvlGroup MappingLongitudes()
This function returns the longitude keywords that this projection uses.
LongitudeDirection m_longitudeDirection
An enumerated type indicating the LongitudeDirection read from the labels.
QString Version() const
Returns the version of the map projection.
QString Name() const
Returns the name of the map projection, "ObliqueCylindrical".
static void CheckErrors(bool resetNaif=true)
This method looks for any naif errors that might have occurred.
Namespace for ISIS/Bullet specific routines.
double GetY() const
Calculates the unrotated form of the current y value.
virtual PvlGroup MappingLongitudes()
This function returns the longitude keywords that this projection uses.
void SetXY(double x, double y)
This protected method is a helper for derived classes.
std::vector< double > m_xAxisVector
The x-axis vector, read from the mapping group in the label.
double m_poleLatitude
The Oblique Pole Latitude.
Oblique Cylindrical Map Projection.
PvlGroup m_mappingGrp
Mapping group that created this projection.
void deleteKeyword(const QString &name)
Remove a specified keyword.
double m_poleRotation
The Oblique Pole Rotation.