|
Isis 3 Programmer Reference
|
7 #include "PolarStereographic.h"
13 #include "Constants.h"
14 #include "IException.h"
15 #include "TProjection.h"
18 #include "PvlKeyword.h"
42 PolarStereographic::PolarStereographic(
Pvl &label,
bool allowDefaults) :
50 if ((allowDefaults) && (!mapGroup.
hasKeyword(
"CenterLongitude"))) {
57 if ((allowDefaults) && (!mapGroup.
hasKeyword(
"CenterLatitude"))) {
77 QString msg =
"Invalid value for keyword [CenterLatitude] in map file.";
78 msg +=
" CenterLatitude cannot equal 0.0";
94 double sinphi = sin(phi);
95 double cosphi = cos(phi);
107 QString message =
"Invalid label group [Mapping]";
127 if (!Projection::operator==(proj))
return false;
143 return "PolarStereographic";
186 double lonRadians = lon *
PI / 180.0;
191 double latRadians = lat;
193 latRadians = latRadians *
PI / 180.0;
198 double sinphi = sin(phi);
242 double dist = sqrt(east * east + north * north);
258 QString msg =
"X,Y causes latitude to be outside [-90,90] "
259 "in PolarStereographic Class";
310 double &minY,
double &maxY) {
402 bool allowDefaults) {
double m_maximumLatitude
Contains the maximum latitude for the entire ground range.
const double HALFPI
The mathematical constant PI/2.
double m_longitude
This contains the currently set longitude value.
int m_longitudeDomain
This integer is either 180 or 360 and is read from the labels.
double m_centerLatitude
The center latitude for the map projection.
double m_e4
Convenience variable for calculations.
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
double m_minimumLongitude
Contains the minimum longitude for the entire ground range.
double m_latitude
This contains the currently set latitude value.
double m_centerLongitude
The center longitude for the map projection.
const double PI
The mathematical constant PI.
A single keyword-value pair.
LongitudeDirection m_longitudeDirection
An enumerated type indicating the LongitudeDirection read from the labels.
double m_minimumLatitude
Contains the minimum latitude for the entire ground range.
@ PositiveWest
Longitude values increase in the westerly direction.
double e4Compute() const
A convience method to compute.
@ Unknown
A type of error that cannot be classified as any of the other error types.
double m_minimumY
See minimumX description.
double GetX() const
Calculates the unrotated form of current x value.
double tCompute(const double phi, const double sinphi) const
A convience method to compute Snyder's t equation (15-9) for a given latitude, .
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
Container for cube-like labels.
void SetXY(double x, double y)
This protected method is a helper for derived classes.
double ToPlanetocentric(const double lat) const
This method converts a planetographic latitude to a planetocentric latitude.
double m_m
Snyder's m-value from equation (14-15).
void XYRangeCheck(const double latitude, const double longitude)
This convience function is established to assist in the development of the XYRange virtual method.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
PvlGroup m_mappingGrp
Mapping group that created this projection.
double GetY() const
Calculates the unrotated form of the current y value.
@ Traverse
Search child objects.
double m_minimumX
The data elements m_minimumX, m_minimumY, m_maximumX, and m_maximumY are convience data elements when...
Contains multiple PvlContainers.
bool m_good
Indicates if the contents of m_x, m_y, m_latitude, and m_longitude are valid.
QString Name() const
Returns the name of the map projection, "PolarStereographic".
Base class for Map TProjections.
static double To180Domain(const double lon)
This method converts a longitude into the -180 to 180 domain.
Stereographic Map Projection for Polar Aspect.
double m_t
Snyder's t-value from equation (15-19).
double TrueScaleLatitude() const
Returns the latitude of true scale.
virtual PvlGroup MappingLongitudes()
This function returns the longitude keywords that this projection uses.
void SetComputedXY(double x, double y)
This protected method is a helper for derived classes.
PvlGroup MappingLongitudes()
This function returns the longitude keywords that this projection uses.
@ Programmer
This error is for when a programmer made an API call that was illegal.
Namespace for the standard library.
double m_poleFlag
Indicates whether the center latitude is at a pole.
QString Version() const
Returns the version of the map projection.
double m_maximumLongitude
Contains the maximum longitude for the entire ground range.
bool operator==(const Projection &proj)
Compares two Projection objects to see if they are equal.
bool SetCoordinate(const double x, const double y)
This method is used to set the projection x/y.
bool SetGround(const double lat, const double lon)
This method is used to set the latitude/longitude (assumed to be of the correct LatitudeType,...
virtual PvlGroup MappingLatitudes()
This function returns the latitude keywords that this projection uses.
double ToPlanetographic(const double lat) const
This method converts a planetocentric latitude to a planetographic latitude.
double phi2Compute(const double t) const
A convience method to compute latitude angle phi2 given small t, from Syder's recursive equation (7-9...
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...
PvlGroup MappingLatitudes()
This function returns the latitude keywords that this projection uses.
virtual PvlGroup Mapping()
This function returns the keywords that this projection uses.
PvlGroup Mapping()
This function returns the keywords that this projection uses.
double m_equatorialRadius
Polar radius of the target.
static double To360Domain(const double lon)
This method converts a longitude into the 0 to 360 domain.
bool IsPlanetocentric() const
This indicates if the latitude type is planetocentric (as opposed to planetographic).
double m_signFactor
If the center latitude is positive, the sign factor is 1.
double m_maximumY
See minimumX description.
Base class for Map Projections.
double m_maximumX
See minimumX description.
double mCompute(const double sinphi, const double cosphi) const
A convience method to compute Snyder's m equation (14-15) for a given latitude, .
~PolarStereographic()
Destroys the PolarStereographic object.
This is free and unencumbered software released into the public domain.
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....