35 const double EPSILON = 1.0e-10;
56 Robinson::Robinson(
Pvl &label,
bool allowDefaults) :
84 m_xlr << 0 << 0.9986 <<
110 if ((allowDefaults) && (!mapGroup.
hasKeyword(
"CenterLongitude"))) {
123 QString message =
"Invalid label group [Mapping]";
141 if (!Projection::operator==(proj))
return false;
184 double latRadians = lat *
DEG2RAD;
185 double lonRadians = lon *
DEG2RAD;
190 double p2 = fabs(latRadians / 5.0 /
DEG2RAD);
191 long ip1 = (long) (p2 - EPSILON);
200 m_xlr[ip1 + 1]) / 2.0 +
201 p2 * p2 * (m_xlr[ip1 + 3] - 2.0 * m_xlr[ip1 + 2] +
202 m_xlr[ip1 + 1])/2.0) * deltaLon;
205 m_pr[ip1 +1]) / 2.0 + p2 * p2 * (m_pr[ip1 + 3] -
206 2.0 * m_pr[ip1 + 2] + m_pr[ip1 + 1]) / 2.0);
207 if (lat < 0) y *= -1.;
235 double phid = yy * 90.0;
236 double p2 = fabs(phid / 5.0);
237 long ip1 = (long) (p2 - EPSILON);
238 if (ip1 == 0) ip1 = 1;
252 u = m_pr[ip1 + 3] - m_pr[ip1 + 1];
253 v = m_pr[ip1 + 3] - 2.0 * m_pr[ip1 + 2] + m_pr[ip1 + 1];
254 t = 2.0 * (fabs(yy) - m_pr[ip1 + 2]) / u;
256 p2 = t * (1.0 - c * t * (1.0 - 2.0 * c * t));
258 if ((p2 >= 0.0) || (ip1 == 1)) {
259 phid = (p2 + (double) ip1 ) * 5.0;
260 if (y < 0) phid *= -1;
263 p2 = fabs(phid / 5.0);
264 ip1 = (long) (p2 - EPSILON);
271 m_pr[ip1 +1]) / 2.0 + p2 * p2 * (m_pr[ip1 + 3] -
272 2.0 * m_pr[ip1 + 2] + m_pr[ip1 + 1])/2.0);
273 if (y < 0) y1 *= -1.;
280 }
while (fabs(y1 - y) > .00001);
297 p2 * (m_xlr[ip1 + 3] - m_xlr[ip1 + 1]) / 2.0 +
298 p2 * p2 * (m_xlr[ip1 + 3] - 2.0 * m_xlr[ip1 + 2] +
299 m_xlr[ip1 + 1]) / 2.0);
334 double &minY,
double &maxY) {
413 bool allowDefaults) {
bool SetCoordinate(const double x, const double y)
This method is used to set the projection x/y.
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
PvlGroup MappingLatitudes()
This function returns the latitude keywords that this projection uses.
Isis::Projection * RobinsonPlugin(Isis::Pvl &lab, bool allowDefaults)
This is the function that is called in order to instantiate a Robinson object.
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Longitude values increase in the westerly direction.
double m_centerLongitude
The center longitude for the map projection.
Base class for Map TProjections.
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 the standard library.
PvlGroup MappingLongitudes()
This function returns the longitude keywords that this projection uses.
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.
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.
QString Version() const
Returns the version of the map projection.
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.
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 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.
Container for cube-like labels.
~Robinson()
Destroys the Robinson object.
virtual PvlGroup Mapping()
This function returns the keywords that this projection uses.
const double DEG2RAD
Multiplier for converting from degrees to radians.
bool m_good
Indicates if the contents of m_x, m_y, m_latitude, and m_longitude are valid.
LongitudeDirection m_longitudeDirection
An enumerated type indicating the LongitudeDirection read from the labels.
PvlGroup Mapping()
This function returns the keywords that this projection uses.
Namespace for ISIS/Bullet specific routines.
QString Name() const
Returns the name of the map projection, "Robinson".
const double RAD2DEG
Multiplier for converting from radians to degrees.
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.
bool operator==(const Projection &proj)
Compares two Projection objects to see if they are equal.
PvlGroup m_mappingGrp
Mapping group that created this projection.