Isis 3 Developer Reference
RingPlaneProjection.h
Go to the documentation of this file.
1 #ifndef RingPlaneProjection_h
2 #define RingPlaneProjection_h
3 
25 #include <string>
26 #include <vector>
27 
28 #include "Projection.h"
29 #include "PvlGroup.h" // protected data member object (m_mappingGrp)
30 
31 namespace Isis {
32  class Displacement;
33  class Pvl;
34  class WorldMapper;
164  public:
165  // constructor
166  RingPlaneProjection(Pvl &label);
167  virtual ~RingPlaneProjection();
168  virtual bool operator== (const Projection &proj);
169 
170  // These return properties of the target
171  double LocalRadius() const; // requires SetGround or SetCoordinate
172 
173  // These return or change properties of the projection, independent of calculations
180  virtual QString Name() const = 0;
187  virtual QString Version() const = 0;
188  virtual double TrueScaleRingRadius() const;
189 
198  };
199 
200  // Check ring longitude direction or get ring longitude direction as a string
201  bool IsClockwise() const;
202  bool IsCounterClockwise() const;
203  std::string RingLongitudeDirectionString() const;
204 
205  // Check ring longitude domain or get ring longitude domain as a string TODO** check implementation to see if this can go in Projection
206  bool Has180Domain() const;
207  bool Has360Domain() const;
208  std::string RingLongitudeDomainString() const;
209 
210  // Get min/max ring rad/lon
211  double MinimumRingRadius() const;
212  double MaximumRingRadius() const;
213  double MinimumRingLongitude() const;
214  double MaximumRingLongitude() const;
215 
216  // Calculations
217  // Set ground position or x/y coordinate
218  virtual bool SetGround(const double ringRadius, const double ringLongitude);
219  virtual bool SetCoordinate(const double x, const double y);
220 
221  // Methods that depend on successful completion
222  // of SetGround/SetCoordinate Get ring rad,ring
223  // lon, x,y
224  double RingRadius() const;
225  double RingLongitude() const;
226 
227  // Set the universal ground coordinate (calls SetGround)
228  bool SetUniversalGround(const double ringRadius, const double ringLongitude);
229 
230  // Return the universal ground coordinate after successful SetCoordinate
231  double UniversalRingRadius();
232  double UniversalRingLongitude();
233 
234  // convert from world coordinate to projected coordinate
235  // double ToProjectionX(const double worldX) const;
236  // double ToProjectionY(const double worldY) const;
237 
238  // get resolution and scale for mapping world coordinates
239  double Scale() const;
240 
241  // Return the x/y range which covers the ring rad/lon range in the labels
242  virtual bool XYRange(double &minX, double &maxX,
243  double &minY, double &maxY);
244 
245  // get mapping information
246  virtual PvlGroup Mapping();
247  virtual PvlGroup MappingRingRadii();
249 
250  // change ring longitude direction
251  static double ToClockwise(const double ringLongitude, const int domain);
252  static double ToCounterClockwise(const double ringLongitude, const int domain);
253 
254  // change ring longitude domain
255  static double To180Domain(const double lon);
256  static double To360Domain(const double lon);
257 
258  protected:
259  void XYRangeCheck(const double ringRadius, const double ringLongitude);
260  // bool xyRangeOblique(double &minX, double &maxX,
261  // double &minY, double &maxY);
262 
263  private:
264  // These methods are not currectly being used by the ring plane projections
265  /* void doSearch(double minBorder, double maxBorder,
266  double &extremeVal, const double constBorder,
267  bool searchX, bool searchRingLongitude, bool findMin);
268  void findExtreme(double &minBorder, double &maxBorder,
269  double &minBorderX, double &minBorderY,
270  double &maxBorderX, double &maxBorderY,
271  const double constBorder, bool searchX,
272  bool searchRingLongitude, bool findMin);
273  void setSearchGround(const double variableBorder,
274  const double constBorder, bool variableIsRad);
275  */
276  protected:
277  double m_ringRadius;
290  // TODO** Can this be generalized for both longitude and ring longitude???
310  private:
311  };
312 };
313 #endif
314 
virtual bool SetCoordinate(const double x, const double y)
This method is used to set the projection x/y.
Definition: RingPlaneProjection.cpp:500
int m_ringLongitudeDomain
This integer is either 180 or 360 and is read from the labels.
Definition: RingPlaneProjection.h:291
bool IsCounterClockwise() const
This indicates if the longitude direction type is positive east (as opposed to postive west)...
Definition: RingPlaneProjection.cpp:237
double LocalRadius() const
This returns a local radius.
Definition: RingPlaneProjection.cpp:533
double m_maximumRingLongitude
Contains the maximum longitude for the entire ground range.
Definition: RingPlaneProjection.h:306
double MaximumRingLongitude() const
This returns the maximum ring longitude of the area of interest.
Definition: RingPlaneProjection.cpp:453
RingLongitudeDirection
This enum defines the types of ring longitude directions supported in this class. ...
Definition: RingPlaneProjection.h:194
bool IsClockwise() const
This indicates if the longitude direction type is positive west (as opposed to postive east)...
Definition: RingPlaneProjection.cpp:226
virtual PvlGroup MappingRingLongitudes()
This function returns the ring longitude keywords that this projection uses.
Definition: RingPlaneProjection.cpp:1328
double MinimumRingRadius() const
This returns the minimum radius of the area of interest.
Definition: RingPlaneProjection.cpp:420
virtual PvlGroup Mapping()
This method is used to find the XY range for oblique aspect projections (non-polar projections) by "w...
Definition: RingPlaneProjection.cpp:1268
bool Has360Domain() const
This indicates if the ring longitude domain is 0 to 360 (as opposed to -180 to 180).
Definition: RingPlaneProjection.cpp:352
Base class for Map Projections.
Definition: Projection.h:171
RingLongitudeDirection m_ringLongitudeDirection
An enumerated type indicating the LongitudeDirection read from the labels.
Definition: RingPlaneProjection.h:283
Contains multiple PvlContainers.
Definition: PvlGroup.h:57
double Scale() const
This method returns the scale for mapping world coordinates into projection coordinates.
Definition: RingPlaneProjection.cpp:622
virtual double TrueScaleRingRadius() const
This method returns the radius of true scale.
Definition: RingPlaneProjection.cpp:214
RingPlaneProjection(Pvl &label)
Constructs an empty RingPlaneProjection object.
Definition: RingPlaneProjection.cpp:84
double UniversalRingRadius()
This returns a universal radius, which is just the radius in meters.
Definition: RingPlaneProjection.cpp:590
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:471
std::string RingLongitudeDomainString() const
This method returns the ring longitude domain as a string.
Definition: RingPlaneProjection.cpp:408
virtual QString Name() const =0
This method returns the name of the map projection.
static double ToCounterClockwise(const double ringLongitude, const int domain)
This method converts an ring longitude into the counterclockwise direction.
Definition: RingPlaneProjection.cpp:295
Ring longitude values increase in the counterclockwise direction.
Definition: RingPlaneProjection.h:196
Container for cube-like labels.
Definition: Pvl.h:135
double m_ringLongitude
This contain a ring longitude value.
Definition: RingPlaneProjection.h:279
double MinimumRingLongitude() const
This returns the minimum ring longitude of the area of interest.
Definition: RingPlaneProjection.cpp:442
double RingRadius() const
This returns a radius.
Definition: RingPlaneProjection.cpp:521
double m_ringRadius
This contain a ring radius value in m.
Definition: RingPlaneProjection.h:277
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:724
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:196
Ring longitude values increase in the clockwise direction.
Definition: RingPlaneProjection.h:194
Base class for Map Projections of plane shapes.
Definition: RingPlaneProjection.h:163
double m_maximumRingRadius
Contains the maximum ring radius for the entire ground range.
Definition: RingPlaneProjection.h:300
double MaximumRingRadius() const
This returns the maximum radius of the area of interest.
Definition: RingPlaneProjection.cpp:431
static double To360Domain(const double lon)
This method converts an ring longitude into the 0 to 360 domain.
Definition: RingPlaneProjection.cpp:385
static double ToClockwise(const double ringLongitude, const int domain)
This method converts an ring longitude into the clockwise direction.
Definition: RingPlaneProjection.cpp:255
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
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:671
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:561
bool Has180Domain() const
This indicates if the longitude domain is -180 to 180 (as opposed to 0 to 360).
Definition: RingPlaneProjection.cpp:341
double RingLongitude() const
This returns a ring longitude with correct ring longitude direction and domain as specified in the la...
Definition: RingPlaneProjection.cpp:545
static double To180Domain(const double lon)
This method converts a ring longitude into the -180 to 180 domain.
Definition: RingPlaneProjection.cpp:367
virtual ~RingPlaneProjection()
Destroys the Projection object.
Definition: RingPlaneProjection.cpp:184
std::string RingLongitudeDirectionString() const
This method returns the ring longitude direction as a string.
Definition: RingPlaneProjection.cpp:329
double m_minimumRingLongitude
Contains the minimum longitude for the entire ground range.
Definition: RingPlaneProjection.h:303
double UniversalRingLongitude()
This returns a universal ring longitude (clockwise in 0 to 360 domain).
Definition: RingPlaneProjection.cpp:604
virtual PvlGroup MappingRingRadii()
This function returns the ring radius keywords that this projection uses.
Definition: RingPlaneProjection.cpp:1311
double m_minimumRingRadius
Contains the minimum ring radius for the entire ground range.
Definition: RingPlaneProjection.h:297
virtual QString Version() const =0
This method returns the Version of the map projection.