55 Orthographic::Orthographic(
Pvl &label,
bool allowDefaults) :
65 if ((allowDefaults) && (!mapGroup.
hasKeyword(
"CenterLongitude"))) {
74 if ((allowDefaults) && (!mapGroup.
hasKeyword(
"CenterLatitude"))) {
88 QString msg =
"The center longitude cannot exceed [-360, 360]. "
116 double sinphi, cosphi, coslon;
143 QString msg =
"The longitude range cannot exceed 360 degrees.";
165 QString message =
"Invalid label group [Mapping]";
183 if (!Projection::operator==(proj))
return false;
197 return "Orthographic";
240 double lonRadians = lon *
PI / 180.0;
245 double latRadians = lat;
247 latRadians *=
PI / 180.0;
251 double sinphi = sin(latRadians);
252 double cosphi = cos(latRadians);
253 double coslon = cos(deltaLon);
257 if ((g <= 0.0) && (fabs(g) > 1.0e-10)) {
289 double rho, con, z, sinz, cosz;
290 const double epsilon = 1.0e-10;
306 if (fabs(rho) <= epsilon) {
311 if (con > 1.0) con = 1.0;
312 if (con < -1.0) con = -1.0;
317 if (con > 1.0) con = 1.0;
318 if (con < -1.0) con = -1.0;
321 if (fabs(con) <= epsilon) {
331 if ((fabs(con) >= epsilon) || (fabs(
GetX()) >= epsilon)) {
390 double &minY,
double &maxY) {
397 bool correctedMinLon =
false;
399 if (adjustedMinLon >= adjustedMaxLon) {
400 adjustedMinLon -= 360;
401 correctedMinLon =
true;
455 for (
double angle = 0.0; angle <= 360.0; angle += 0.01) {
466 adjustedLon <= adjustedMaxLon &&
468 adjustedLon >= adjustedMinLon) {
546 bool allowDefaults) {
double GetX() const
Calculates the unrotated form of current x value.
PvlGroup MappingLongitudes()
This function returns the longitude keywords that this projection uses.
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
const double E(2.7182818284590452354)
Sets some basic constants for use in ISIS programming.
Longitude values increase in the westerly direction.
double m_centerLongitude
The center longitude for the map projection.
Base class for Map TProjections.
double ToPlanetographic(const double lat) const
This method converts a planetocentric latitude to a planetographic latitude.
Orthographic Map Projection.
double m_cosph0
Cosine of the center latitude.
const double PI(3.14159265358979323846)
The mathematical constant PI.
Isis::Projection * OrthographicPlugin(Isis::Pvl &lab, bool allowDefaults)
This is the function that is called in order to instantiate an Orthographic object.
double m_minimumX
The data elements m_minimumX, m_minimumY, m_maximumX, and m_maximumY are convience data elements when...
const double HALFPI(1.57079632679489661923)
The mathematical constant PI/2.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
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.
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...
double m_maximumY
See minimumX description.
double m_longitude
This contains the currently set longitude value.
double m_maximumLongitude
Contains the maximum longitude for the entire ground range.
double m_minimumLatitude
Contains the minimum latitude for the entire ground range.
double m_maximumLatitude
Contains the maximum latitude for the entire ground range.
Base class for Map Projections.
double m_minimumY
See minimumX description.
PvlGroup MappingLatitudes()
This function returns the latitude keywords that this projection uses.
double m_equatorialRadius
Polar radius of the target.
int m_longitudeDomain
This integer is either 180 or 360 and is read from the labels.
static double To180Domain(const double lon)
This method converts a longitude into the -180 to 180 domain.
Contains multiple PvlContainers.
#define _FILEINFO_
Macro for the filename and line number.
double MinimumLongitude() const
This returns the minimum longitude of the area of interest.
A type of error that could only have occurred due to a mistake on the user's part (e...
A single keyword-value pair.
bool operator==(const Projection &proj)
Compares two Projection objects to see if they are equal.
Container for cube-like labels.
bool IsPlanetocentric() const
This indicates if the latitude type is planetocentric (as opposed to planetographic).
double ToPlanetocentric(const double lat) const
This method converts a planetographic latitude to a planetocentric 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.
static double To360Domain(const double lon)
This method converts a longitude into the 0 to 360 domain.
PvlGroup Mapping()
This function returns the keywords that this projection uses.
LongitudeDirection m_longitudeDirection
An enumerated type indicating the LongitudeDirection read from the labels.
double GetY() const
Calculates the unrotated form of the current y value.
double TrueScaleLatitude() const
Returns the center latitude, in degrees.
double MaximumLongitude() const
This returns the maximum longitude of the area of interest.
double m_centerLatitude
The center latitude for the map projection.
QString Name() const
Returns the name of the map projection, "Orthographic".
bool SetCoordinate(const double x, const double y)
This method is used to set the projection x/y.
double m_sinph0
Sine of the center latitude.
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.
void XYRangeCheck(const double latitude, const double longitude)
This convience function is established to assist in the development of the XYRange virtual method...
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.
double m_minimumLongitude
Contains the minimum longitude for the entire ground range.
QString Version() const
Returns the version of the map projection.
double m_maximumX
See minimumX description.
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
~Orthographic()
Destroys the Orthographic object.
PvlGroup m_mappingGrp
Mapping group that created this projection.