88 if ((QString)
m_mappingGrp[
"RingLongitudeDirection"] ==
"Clockwise") {
91 else if ((QString)
m_mappingGrp[
"RingLongitudeDirection"] ==
"CounterClockwise") {
95 QString msg =
"Projection failed. Invalid value for keyword "
96 "[RingLongitudeDirection] must be "
97 "[Clockwise or CounterClockwise]";
102 if ((QString)
m_mappingGrp[
"RingLongitudeDomain"] ==
"360") {
105 else if ((QString)
m_mappingGrp[
"RingLongitudeDomain"] ==
"180") {
109 QString msg =
"Projection failed. Invalid value for keyword "
110 "[RingLongitudeDomain] must be [180 or 360]";
127 IString msg =
"Projection failed. "
134 IString msg =
"Projection failed. "
141 IString msg =
"Projection failed. "
142 "[MinimumRingRadius,MaximumRingRadius] of ["
145 +
"properly ordered";
150 IString msg =
"Projection failed. "
151 "[MinimumRingLongitude,MaximumRingLongitude] of ["
154 +
"properly ordered";
178 IString msg =
"Projection failed. Invalid label group [Mapping]";
197 if (!Projection::operator==(proj))
return false;
256 if (ringLongitude ==
Null) {
258 "Unable to convert to Clockwise. The given ring longitude value ["
262 double myRingLongitude = ringLongitude;
264 myRingLongitude *= -1;
269 else if (domain == 180) {
274 +
"] is not 180 or 360.";
278 return myRingLongitude;
296 if (ringLongitude ==
Null) {
298 "Unable to convert to CounterClockwise. The given ring longitude value ["
299 +
IString(ringLongitude) +
"] is invalid.",
302 double myRingLongitude = ringLongitude;
304 myRingLongitude *= -1;
309 else if (domain == 180) {
313 IString msg =
"Unable to convert ring longitude. Domain [" +
IString(domain)
314 +
"] is not 180 or 360.";
318 return myRingLongitude;
331 return "CounterClockwise";
368 if (ringLongitude ==
Null) {
370 "Unable to convert to 180 degree domain. The given ring longitude value ["
371 +
IString(ringLongitude) +
"] is invalid.",
386 if (ringLongitude ==
Null) {
388 "Unable to convert to 360 degree domain. The given ring longitude value ["
389 +
IString(ringLongitude) +
"] is invalid.",
392 double result = ringLongitude;
394 if ( (ringLongitude < 0.0 || ringLongitude > 360.0) &&
395 !qFuzzyCompare(ringLongitude, 0.0) && !qFuzzyCompare(ringLongitude, 360.0)) {
472 if (ringRadius ==
Null || ringLongitude ==
Null) {
562 if (ringRadius ==
Null || ringLongitude ==
Null) {
608 return ringLongitude;
672 double &minY,
double &maxY) {
725 if (ringRadius ==
Null || ringLongitude ==
Null) {
virtual bool SetCoordinate(const double x, const double y)
This method is used to set the projection x/y.
double LocalRadius() const
This returns a local radius.
double Scale() const
This method returns the scale for mapping world coordinates into projection coordinates.
virtual double Resolution() const
This virtual method will the resolution of the world system relative to one unit in the projection sy...
int m_ringLongitudeDomain
This integer is either 180 or 360 and is read from the labels.
const double Null
Value for an Isis Null pixel.
WorldMapper * m_mapper
This points to a mapper passed into the SetWorldMapper method.
double m_maximumRingLongitude
Contains the maximum longitude for the entire ground range.
double degrees() const
Get the angle in units of Degrees.
double MinimumRingRadius() const
This returns the minimum radius of the area of interest.
std::string RingLongitudeDomainString() const
This method returns the ring longitude domain as a string.
bool HasGroundRange() const
This indicates if the longitude direction type is positive west (as opposed to postive east)...
const double DEG2RAD(0.017453292519943295769237)
Multiplier for converting from degrees to radians.
double XCoord() const
This returns the projection X provided SetGround, SetCoordinate, SetUniversalGround, or SetWorld returned with success.
virtual PvlGroup MappingRingLongitudes()
This function returns the ring longitude keywords that this projection uses.
virtual double TrueScaleRingRadius() const
This method returns the radius of true scale.
double m_minimumX
The data elements m_minimumX, m_minimumY, m_maximumX, and m_maximumY are convience data elements when...
Longitude force180Domain() const
This returns a longitude that is constricted to -180 to 180 degrees.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
void SetComputedXY(double x, double y)
This protected method is a helper for derived classes.
virtual PvlGroup Mapping()
This method is used to find the XY range for oblique aspect projections (non-polar projections) by "w...
double m_maximumY
See minimumX description.
Longitude force360Domain() const
This returns a longitude that is constricted to 0-360 degrees.
bool Has360Domain() const
This indicates if the ring longitude domain is 0 to 360 (as opposed to -180 to 180).
This class is designed to encapsulate the concept of a Longitude.
Base class for Map Projections.
double m_minimumY
See minimumX description.
These projections are used to map ring planes.
double RingLongitude() const
This returns a ring longitude with correct ring longitude direction and domain as specified in the la...
Degrees are generally considered more human readable, 0-360 is one circle, however most math does not...
std::string RingLongitudeDirectionString() const
This method returns the ring longitude direction as a string.
RingLongitudeDirection m_ringLongitudeDirection
An enumerated type indicating the LongitudeDirection read from the labels.
Contains multiple PvlContainers.
void setProjectionType(const ProjectionType ptype)
Sets the projection subclass type.
bool m_groundRangeGood
Indicates if the ground range (min/max lat/lons) were read from the labels.
#define _FILEINFO_
Macro for the filename and line number.
double MaximumRingRadius() const
This returns the maximum radius of the area of interest.
A type of error that cannot be classified as any of the other error types.
double UniversalRingRadius()
This returns a universal radius, which is just the radius in meters.
virtual bool SetGround(const double ringRadius, const double ringLongitude)
This method is used to set the ring radius/longitude (assumed to be of the correct LatitudeType...
static double ToCounterClockwise(const double ringLongitude, const int domain)
This method converts an ring longitude into the counterclockwise direction.
Ring longitude values increase in the counterclockwise direction.
Container for cube-like labels.
double m_ringLongitude
This contain a ring longitude value.
double MinimumRingLongitude() const
This returns the minimum ring longitude of the area of interest.
bool IsGood() const
This indicates if the last invocation of SetGround, SetCoordinate, SetUniversalGround, or SetWorld was with successful or not.
bool m_good
Indicates if the contents of m_x, m_y, m_latitude, and m_longitude are valid.
double YCoord() const
This returns the projection Y provided SetGround, SetCoordinate, SetUniversalGround, or SetWorld returned with success.
double m_ringRadius
This contain a ring radius value in m.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
void XYRangeCheck(const double ringRadius, const double ringLongitude)
This convience function is established to assist in the development of the XYRange virtual method...
virtual bool operator==(const Projection &proj)
This method determines whether two map projection objects are equal by comparing the ring longitude d...
Ring longitude values increase in the clockwise direction.
Base class for Map Projections of plane shapes.
double m_maximumRingRadius
Contains the maximum ring radius for the entire ground range.
double MaximumRingLongitude() const
This returns the maximum ring longitude of the area of interest.
bool IsCounterClockwise() const
This indicates if the longitude direction type is positive east (as opposed to postive west)...
static double To360Domain(const double lon)
This method converts an ring longitude into the 0 to 360 domain.
static double ToClockwise(const double ringLongitude, const int domain)
This method converts an ring longitude into the clockwise direction.
Adds specific functionality to C++ strings.
double RingRadius() const
This returns a radius.
virtual 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...
bool SetUniversalGround(const double ringRadius, const double ringLongitude)
This method is used to set the ring radius/longitude which must be PositiveEast/Domain360 (ring longi...
bool IsClockwise() const
This indicates if the longitude direction type is positive west (as opposed to postive east)...
void SetXY(double x, double y)
This protected method is a helper for derived classes.
static double To180Domain(const double lon)
This method converts a ring longitude into the -180 to 180 domain.
double m_maximumX
See minimumX description.
virtual ~RingPlaneProjection()
Destroys the Projection object.
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
double m_minimumRingLongitude
Contains the minimum longitude for the entire ground range.
double UniversalRingLongitude()
This returns a universal ring longitude (clockwise in 0 to 360 domain).
virtual PvlGroup MappingRingRadii()
This function returns the ring radius keywords that this projection uses.
bool Has180Domain() const
This indicates if the longitude domain is -180 to 180 (as opposed to 0 to 360).
PvlGroup m_mappingGrp
Mapping group that created this projection.
double m_minimumRingRadius
Contains the minimum ring radius for the entire ground range.