53 Mercator::Mercator(
Pvl &label,
bool allowDefaults) :
61 if ((allowDefaults) && (!mapGroup.
hasKeyword(
"CenterLongitude"))) {
68 if ((allowDefaults) && (!mapGroup.
hasKeyword(
"CenterLatitude"))) {
89 m_scalefactor = cos_clat / sqrt(1.0 - m_eccsq * sin_clat * sin_clat);
92 QString message =
"Invalid label group [Mapping]";
110 if (!Projection::operator==(proj))
return false;
172 double lonRadians = lon *
PI / 180.0;
177 double latRadians = lat;
179 latRadians *=
PI / 180.0;
182 if (fabs(fabs(
m_latitude) - 90.0) <= DBL_EPSILON) {
190 double sinphi = sin(latRadians);
191 double t =
tCompute(latRadians, sinphi);
235 if (coslat <= DBL_EPSILON) {
284 double &minY,
double &maxY) {
359 bool allowDefaults) {
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
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.
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
double tCompute(const double phi, const double sinphi) const
A convience method to compute Snyder's t equation (15-9) for a given latitude, .
double m_centerLongitude
The center longitude for the map projection.
const double PI
The mathematical constant PI.
Longitude values increase in the westerly direction.
bool operator==(const Projection &proj)
Compares two Projection objects to see if they are equal.
Base class for Map TProjections.
const double HALFPI
The mathematical constant PI/2.
Namespace for the standard library.
QString Version() const
Returns the version of the map projection.
double GetX() const
Calculates the unrotated form of current x value.
double m_minimumX
The data elements m_minimumX, m_minimumY, m_maximumX, and m_maximumY are convience data elements when...
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
PvlGroup MappingLongitudes()
This function returns the longitude keywords that this projection uses.
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_maximumY
See minimumX description.
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).
double m_maximumLongitude
Contains the maximum longitude for the entire ground range.
PvlGroup Mapping()
This function returns the keywords that this projection uses.
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.
QString Name() const
Returns the name of the map projection, "Mercator".
double Eccentricity() const
This returns the eccentricity of the target,.
~Mercator()
Destroys the Mercator object.
double m_equatorialRadius
Polar radius of the target.
Contains multiple PvlContainers.
#define _FILEINFO_
Macro for the filename and line number.
A single keyword-value pair.
bool SetCoordinate(const double x, const double y)
This method is used to set the projection x/y.
double TrueScaleLatitude() const
Returns the latitude of true scale in degrees.
Container for cube-like labels.
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...
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.
double m_scalefactor
Scaling factor.
LongitudeDirection m_longitudeDirection
An enumerated type indicating the LongitudeDirection read from the labels.
PvlGroup MappingLatitudes()
This function returns the latitude keywords that this projection uses.
double m_centerLatitude
The center latitude for the map projection.
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...
Namespace for ISIS/Bullet specific routines.
bool IsEquatorialCylindrical()
Indicates whether the projection is Equitorial Cylindrical.
double GetY() const
Calculates the unrotated form of the current y value.
Isis::Projection * MercatorPlugin(Isis::Pvl &lab, bool allowDefaults)
This is the function that is called in order to instantiate a Mercator object.
double ToPlanetocentric(const double lat) const
This method converts a planetographic latitude to a planetocentric 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...
double m_minimumLongitude
Contains the minimum longitude for the entire ground range.
double m_maximumX
See minimumX description.
PvlGroup m_mappingGrp
Mapping group that created this projection.