Isis Developer Reference
RingPlaneProjection.h
Go to the documentation of this file.
1 #ifndef RingPlaneProjection_h
2 #define RingPlaneProjection_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 #include <string>
10 #include <vector>
11 
12 #include "Projection.h"
13 #include "PvlGroup.h" // protected data member object (m_mappingGrp)
14 
15 namespace Isis {
16  class Displacement;
17  class Pvl;
18  class WorldMapper;
148  public:
149  // constructor
150  RingPlaneProjection(Pvl &label);
151  virtual ~RingPlaneProjection();
152  virtual bool operator== (const Projection &proj);
153 
154  // These return properties of the target
155  double LocalRadius() const; // requires SetGround or SetCoordinate
156 
157  // These return or change properties of the projection, independent of calculations
164  virtual QString Name() const = 0;
171  virtual QString Version() const = 0;
172  virtual double TrueScaleRingRadius() const;
173 
182  };
183 
184  // Check ring longitude direction or get ring longitude direction as a string
185  bool IsClockwise() const;
186  bool IsCounterClockwise() const;
187  std::string RingLongitudeDirectionString() const;
188 
189  // Check ring longitude domain or get ring longitude domain as a string TODO** check implementation to see if this can go in Projection
190  bool Has180Domain() const;
191  bool Has360Domain() const;
192  std::string RingLongitudeDomainString() const;
193 
194  // Get min/max ring rad/lon
195  double MinimumRingRadius() const;
196  double MaximumRingRadius() const;
197  double MinimumRingLongitude() const;
198  double MaximumRingLongitude() const;
199 
200  // Calculations
201  // Set ground position or x/y coordinate
202  virtual bool SetGround(const double ringRadius, const double ringLongitude);
203  virtual bool SetCoordinate(const double x, const double y);
204 
205  // Methods that depend on successful completion
206  // of SetGround/SetCoordinate Get ring rad,ring
207  // lon, x,y
208  double RingRadius() const;
209  double RingLongitude() const;
210 
211  // Set the universal ground coordinate (calls SetGround)
212  bool SetUniversalGround(const double ringRadius, const double ringLongitude);
213 
214  // Return the universal ground coordinate after successful SetCoordinate
215  double UniversalRingRadius();
216  double UniversalRingLongitude();
217 
218  // convert from world coordinate to projected coordinate
219  // double ToProjectionX(const double worldX) const;
220  // double ToProjectionY(const double worldY) const;
221 
222  // get resolution and scale for mapping world coordinates
223  double Scale() const;
224 
225  // Return the x/y range which covers the ring rad/lon range in the labels
226  virtual bool XYRange(double &minX, double &maxX,
227  double &minY, double &maxY);
228 
229  // get mapping information
230  virtual PvlGroup Mapping();
231  virtual PvlGroup MappingRingRadii();
233 
234  // change ring longitude direction
235  static double ToClockwise(const double ringLongitude, const int domain);
236  static double ToCounterClockwise(const double ringLongitude, const int domain);
237 
238  // change ring longitude domain
239  static double To180Domain(const double lon);
240  static double To360Domain(const double lon);
241 
242  protected:
243  void XYRangeCheck(const double ringRadius, const double ringLongitude);
244  // bool xyRangeOblique(double &minX, double &maxX,
245  // double &minY, double &maxY);
246 
247  private:
248  // These methods are not currectly being used by the ring plane projections
249  /* void doSearch(double minBorder, double maxBorder,
250  double &extremeVal, const double constBorder,
251  bool searchX, bool searchRingLongitude, bool findMin);
252  void findExtreme(double &minBorder, double &maxBorder,
253  double &minBorderX, double &minBorderY,
254  double &maxBorderX, double &maxBorderY,
255  const double constBorder, bool searchX,
256  bool searchRingLongitude, bool findMin);
257  void setSearchGround(const double variableBorder,
258  const double constBorder, bool variableIsRad);
259  */
260  protected:
261  double m_ringRadius;
274  // TODO** Can this be generalized for both longitude and ring longitude???
294  private:
295  };
296 };
297 #endif
298 
Isis::RingPlaneProjection::CounterClockwise
@ CounterClockwise
Ring longitude values increase in the counterclockwise direction.
Definition: RingPlaneProjection.h:180
Isis::Angle::Degrees
@ Degrees
Degrees are generally considered more human readable, 0-360 is one circle, however most math does not...
Definition: Angle.h:56
Isis::RingPlaneProjection::SetGround
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,...
Definition: RingPlaneProjection.cpp:456
Isis::RingPlaneProjection::Has360Domain
bool Has360Domain() const
This indicates if the ring longitude domain is 0 to 360 (as opposed to -180 to 180).
Definition: RingPlaneProjection.cpp:337
Displacement.h
FileName.h
Isis::RingPlaneProjection::m_maximumRingLongitude
double m_maximumRingLongitude
Contains the maximum longitude for the entire ground range.
Definition: RingPlaneProjection.h:290
Isis::RingPlaneProjection::UniversalRingLongitude
double UniversalRingLongitude()
This returns a universal ring longitude (clockwise in 0 to 360 domain).
Definition: RingPlaneProjection.cpp:589
Isis::Projection::m_mapper
WorldMapper * m_mapper
This points to a mapper passed into the SetWorldMapper method.
Definition: Projection.h:292
Isis::RingPlaneProjection::MinimumRingRadius
double MinimumRingRadius() const
This returns the minimum radius of the area of interest.
Definition: RingPlaneProjection.cpp:405
Isis::RingPlaneProjection::Version
virtual QString Version() const =0
This method returns the Version of the map projection.
Isis::RingPlaneProjection::Mapping
virtual PvlGroup Mapping()
This method is used to find the XY range for oblique aspect projections (non-polar projections) by "w...
Definition: RingPlaneProjection.cpp:1253
SpecialPixel.h
Isis::RingPlaneProjection::To360Domain
static double To360Domain(const double lon)
This method converts an ring longitude into the 0 to 360 domain.
Definition: RingPlaneProjection.cpp:370
Isis::DEG2RAD
const double DEG2RAD
Multiplier for converting from degrees to radians.
Definition: Constants.h:43
Isis::IException::Unknown
@ Unknown
A type of error that cannot be classified as any of the other error types.
Definition: IException.h:118
PvlGroup.h
Isis::Projection::m_minimumY
double m_minimumY
See minimumX description.
Definition: Projection.h:327
Isis::RingPlaneProjection::RingLongitude
double RingLongitude() const
This returns a ring longitude with correct ring longitude direction and domain as specified in the la...
Definition: RingPlaneProjection.cpp:530
Longitude.h
Isis::RingPlaneProjection::LocalRadius
double LocalRadius() const
This returns a local radius.
Definition: RingPlaneProjection.cpp:518
NaifStatus.h
Isis::PvlContainer::hasKeyword
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
Definition: PvlContainer.cpp:159
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::Projection::SetXY
void SetXY(double x, double y)
This protected method is a helper for derived classes.
Definition: Projection.cpp:804
WorldMapper.h
Isis::RingPlaneProjection::XYRange
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...
Definition: RingPlaneProjection.cpp:656
Isis::RingPlaneProjection::Has180Domain
bool Has180Domain() const
This indicates if the longitude domain is -180 to 180 (as opposed to 0 to 360).
Definition: RingPlaneProjection.cpp:326
Isis::WorldMapper::Resolution
virtual double Resolution() const
This virtual method will the resolution of the world system relative to one unit in the projection sy...
Definition: WorldMapper.h:100
Isis::RingPlaneProjection::m_maximumRingRadius
double m_maximumRingRadius
Contains the maximum ring radius for the entire ground range.
Definition: RingPlaneProjection.h:284
Isis::RingPlaneProjection::SetCoordinate
virtual bool SetCoordinate(const double x, const double y)
This method is used to set the projection x/y.
Definition: RingPlaneProjection.cpp:485
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
Isis::Longitude::force180Domain
Longitude force180Domain() const
This returns a longitude that is constricted to -180 to 180 degrees.
Definition: Longitude.cpp:289
Isis::RingPlaneProjection::m_ringRadius
double m_ringRadius
This contain a ring radius value in m.
Definition: RingPlaneProjection.h:261
Isis::RingPlaneProjection::Name
virtual QString Name() const =0
This method returns the name of the map projection.
IString.h
Isis::Projection::m_mappingGrp
PvlGroup m_mappingGrp
Mapping group that created this projection.
Definition: Projection.h:329
Isis::Projection::setProjectionType
void setProjectionType(const ProjectionType ptype)
Sets the projection subclass type.
Definition: Projection.cpp:188
Isis::RingPlaneProjection::XYRangeCheck
void XYRangeCheck(const double ringRadius, const double ringLongitude)
This convience function is established to assist in the development of the XYRange virtual method.
Definition: RingPlaneProjection.cpp:709
Isis::RingPlaneProjection::MaximumRingRadius
double MaximumRingRadius() const
This returns the maximum radius of the area of interest.
Definition: RingPlaneProjection.cpp:416
Isis::Longitude
This class is designed to encapsulate the concept of a Longitude.
Definition: Longitude.h:40
Isis::RingPlaneProjection::RingLongitudeDirectionString
std::string RingLongitudeDirectionString() const
This method returns the ring longitude direction as a string.
Definition: RingPlaneProjection.cpp:314
Isis::RingPlaneProjection::RingLongitudeDirection
RingLongitudeDirection
This enum defines the types of ring longitude directions supported in this class.
Definition: RingPlaneProjection.h:178
Isis::RingPlaneProjection::TrueScaleRingRadius
virtual double TrueScaleRingRadius() const
This method returns the radius of true scale.
Definition: RingPlaneProjection.cpp:199
Isis::RingPlaneProjection::RingLongitudeDomainString
std::string RingLongitudeDomainString() const
This method returns the ring longitude domain as a string.
Definition: RingPlaneProjection.cpp:393
Isis::Projection::IsGood
bool IsGood() const
This indicates if the last invocation of SetGround, SetCoordinate, SetUniversalGround,...
Definition: Projection.cpp:374
Isis::RingPlaneProjection
Base class for Map Projections of plane shapes.
Definition: RingPlaneProjection.h:147
Isis::Projection::m_minimumX
double m_minimumX
The data elements m_minimumX, m_minimumY, m_maximumX, and m_maximumY are convience data elements when...
Definition: Projection.h:317
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Pvl.h
Isis::RingPlaneProjection::RingPlaneProjection
RingPlaneProjection(Pvl &label)
Constructs an empty RingPlaneProjection object.
Definition: RingPlaneProjection.cpp:69
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::RingPlaneProjection::ToCounterClockwise
static double ToCounterClockwise(const double ringLongitude, const int domain)
This method converts an ring longitude into the counterclockwise direction.
Definition: RingPlaneProjection.cpp:280
Isis::Projection::m_good
bool m_good
Indicates if the contents of m_x, m_y, m_latitude, and m_longitude are valid.
Definition: Projection.h:300
Isis::RingPlaneProjection::IsClockwise
bool IsClockwise() const
This indicates if the longitude direction type is positive west (as opposed to postive east).
Definition: RingPlaneProjection.cpp:211
Isis::RingPlaneProjection::RingRadius
double RingRadius() const
This returns a radius.
Definition: RingPlaneProjection.cpp:506
Isis::RingPlaneProjection::MaximumRingLongitude
double MaximumRingLongitude() const
This returns the maximum ring longitude of the area of interest.
Definition: RingPlaneProjection.cpp:438
Isis::RingPlaneProjection::MinimumRingLongitude
double MinimumRingLongitude() const
This returns the minimum ring longitude of the area of interest.
Definition: RingPlaneProjection.cpp:427
Isis::RingPlaneProjection::MappingRingRadii
virtual PvlGroup MappingRingRadii()
This function returns the ring radius keywords that this projection uses.
Definition: RingPlaneProjection.cpp:1296
Isis::RingPlaneProjection::m_ringLongitude
double m_ringLongitude
This contain a ring longitude value.
Definition: RingPlaneProjection.h:263
Isis::Projection::RingPlane
@ RingPlane
These projections are used to map ring planes.
Definition: Projection.h:168
Isis::RingPlaneProjection::SetUniversalGround
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...
Definition: RingPlaneProjection.cpp:546
Isis::RingPlaneProjection::m_ringLongitudeDirection
RingLongitudeDirection m_ringLongitudeDirection
An enumerated type indicating the LongitudeDirection read from the labels.
Definition: RingPlaneProjection.h:267
Isis::RingPlaneProjection::IsCounterClockwise
bool IsCounterClockwise() const
This indicates if the longitude direction type is positive east (as opposed to postive west).
Definition: RingPlaneProjection.cpp:222
Isis::RingPlaneProjection::To180Domain
static double To180Domain(const double lon)
This method converts a ring longitude into the -180 to 180 domain.
Definition: RingPlaneProjection.cpp:352
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::Projection::m_groundRangeGood
bool m_groundRangeGood
Indicates if the ground range (min/max lat/lons) were read from the labels.
Definition: Projection.h:313
Isis::Null
const double Null
Value for an Isis Null pixel.
Definition: SpecialPixel.h:95
Isis::Projection::SetComputedXY
void SetComputedXY(double x, double y)
This protected method is a helper for derived classes.
Definition: Projection.cpp:780
Isis::RingPlaneProjection::~RingPlaneProjection
virtual ~RingPlaneProjection()
Destroys the Projection object.
Definition: RingPlaneProjection.cpp:169
IException.h
std
Namespace for the standard library.
Isis::RingPlaneProjection::Scale
double Scale() const
This method returns the scale for mapping world coordinates into projection coordinates.
Definition: RingPlaneProjection.cpp:607
RingPlaneProjection.h
Isis::RingPlaneProjection::operator==
virtual bool operator==(const Projection &proj)
This method determines whether two map projection objects are equal by comparing the ring longitude d...
Definition: RingPlaneProjection.cpp:181
PvlKeyword.h
Isis::Angle::degrees
double degrees() const
Get the angle in units of Degrees.
Definition: Angle.h:232
Projection.h
Isis::RingPlaneProjection::m_minimumRingRadius
double m_minimumRingRadius
Contains the minimum ring radius for the entire ground range.
Definition: RingPlaneProjection.h:281
Isis::RingPlaneProjection::ToClockwise
static double ToClockwise(const double ringLongitude, const int domain)
This method converts an ring longitude into the clockwise direction.
Definition: RingPlaneProjection.cpp:240
Isis::RingPlaneProjection::MappingRingLongitudes
virtual PvlGroup MappingRingLongitudes()
This function returns the ring longitude keywords that this projection uses.
Definition: RingPlaneProjection.cpp:1313
Isis::IString
Adds specific functionality to C++ strings.
Definition: IString.h:165
Isis::RingPlaneProjection::Clockwise
@ Clockwise
Ring longitude values increase in the clockwise direction.
Definition: RingPlaneProjection.h:178
Constants.h
Isis::Projection::YCoord
double YCoord() const
This returns the projection Y provided SetGround, SetCoordinate, SetUniversalGround,...
Definition: Projection.cpp:400
Isis::Projection::m_maximumY
double m_maximumY
See minimumX description.
Definition: Projection.h:328
Isis::RingPlaneProjection::m_minimumRingLongitude
double m_minimumRingLongitude
Contains the minimum longitude for the entire ground range.
Definition: RingPlaneProjection.h:287
Isis::RingPlaneProjection::m_ringLongitudeDomain
int m_ringLongitudeDomain
This integer is either 180 or 360 and is read from the labels.
Definition: RingPlaneProjection.h:275
Isis::Projection
Base class for Map Projections.
Definition: Projection.h:155
Isis::Projection::m_maximumX
double m_maximumX
See minimumX description.
Definition: Projection.h:326
Isis::Longitude::force360Domain
Longitude force360Domain() const
This returns a longitude that is constricted to 0-360 degrees.
Definition: Longitude.cpp:267
Isis::Projection::XCoord
double XCoord() const
This returns the projection X provided SetGround, SetCoordinate, SetUniversalGround,...
Definition: Projection.cpp:387
Isis::Projection::HasGroundRange
virtual bool HasGroundRange() const
This indicates if the longitude direction type is positive west (as opposed to postive east).
Definition: Projection.cpp:349
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::RingPlaneProjection::UniversalRingRadius
double UniversalRingRadius()
This returns a universal radius, which is just the radius in meters.
Definition: RingPlaneProjection.cpp:575