14#include "Projection.h"
15#include "ProjectionFactory.h"
16#include "TProjection.h"
17#include "IException.h"
61 const int sl,
const int ss,
const int el,
62 const int es,
const double linc,
const double sinc) {
75 string msg =
"Invalid start/end line range [sl,el] specified for subarea";
80 string msg =
"Invalid start/end sample range [ss,es] specified for subarea";
86 string msg =
"Invalid line increment [linc] specified for subarea";
92 string msg =
"Invalid sample increment [sinc] specified for subarea";
133 if(inlabel.
findObject(
"IsisCube").hasGroup(
"Mapping")) {
134 inlabel.
findObject(
"IsisCube").deleteGroup(
"Mapping");
135 results +=
PvlKeyword(
"MappingGroupDeleted",
"True");
140 if(inlabel.
findObject(
"IsisCube").hasGroup(
"Instrument")) {
141 inlabel.
findObject(
"IsisCube").deleteGroup(
"Instrument");
142 results +=
PvlKeyword(
"InstrumentGroupDeleted",
"True");
147 if(inlabel.
findObject(
"IsisCube").hasGroup(
"Mapping")) {
164 QString pixresUnit = mapgroup[
"PixelResolution"].unit();
165 double pixres =
toDouble(mapgroup[
"PixelResolution"][0]);
167 mapgroup[
"PixelResolution"].setUnits(pixresUnit);
168 QString scaleUnit = mapgroup[
"Scale"].unit();
169 double scale = mapgroup[
"Scale"];
171 mapgroup[
"Scale"].setUnits(scaleUnit);
179 double minlat, maxlat;
180 double minlon, maxlon;
249 if(inlabel.
findObject(
"IsisCube").hasGroup(
"Instrument")) {
251 inst = inlabel.
findObject(
"IsisCube").findGroup(
"Instrument");
258 if(inlabel.
findObject(
"IsisCube").hasGroup(
"Mapping")) {
260 mapgrp = inlabel.
findObject(
"IsisCube").findGroup(
"Mapping");
This class is used to rewrite the "alpha" keywords out of the AlphaCube group or Instrument group.
void UpdateGroup(Cube &cube)
Writes or update the Alpha keywords (AlphaLines, AlphaSamples, AlphaStartingSamples,...
IO Handler for Isis Cubes.
void deleteGroup(const QString &group)
Deletes a group from the cube labels.
void putGroup(const PvlGroup &group)
Adds a group in a Label to the cube.
bool hasGroup(const QString &group) const
Return if the cube has a specified group in the labels.
Projection * projection()
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
@ Programmer
This error is for when a programmer made an API call that was illegal.
double XCoord() const
This returns the projection X provided SetGround, SetCoordinate, SetUniversalGround,...
virtual bool SetWorld(const double x, const double y)
This method is used to set a world coordinate.
double YCoord() const
This returns the projection Y provided SetGround, SetCoordinate, SetUniversalGround,...
bool IsGood() const
This indicates if the last invocation of SetGround, SetCoordinate, SetUniversalGround,...
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
void addKeyword(const PvlKeyword &keyword, const InsertMode mode=Append)
Add a keyword to the container.
void deleteKeyword(const QString &name)
Remove a specified keyword.
Contains multiple PvlContainers.
Container for cube-like labels.
A single keyword-value pair.
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
@ Traverse
Search child objects.
double p_sinc
Sample increment for subarea.
int p_ss
Starting sample of subarea.
int p_el
Ending line of subarea.
double p_linc
Line increment for subarea.
int p_nl
Number of lines in original file.
int p_es
Ending sample of subarea.
int p_sl
Starting line of subarea.
void UpdateLabel(Cube *icube, Cube *ocube, PvlGroup &results)
Modifies a label for a file containing a subarea.
void SetSubArea(const int orignl, const int origns, const int sl, const int ss, const int el, const int es, const double linc, const double sinc)
Defines the subarea.
int p_ns
Number of samples in original file.
Base class for Map TProjections.
static double To180Domain(const double lon)
This method converts a longitude into the -180 to 180 domain.
bool Has180Domain() const
This indicates if the longitude domain is -180 to 180 (as opposed to 0 to 360).
virtual double UniversalLongitude()
This returns a universal longitude (positive east in 0 to 360 domain).
static double ToPositiveWest(const double lon, const int domain)
This method converts a longitude into the positive west direction.
bool IsPlanetographic() const
This indicates if the latitude type is planetographic (as opposed to planetocentric).
virtual bool IsEquatorialCylindrical()
This method returns true if the projection is equatorial cylindrical.
bool Has360Domain() const
This indicates if the longitude domain is 0 to 360 (as opposed to -180 to 180).
virtual double UniversalLatitude()
This returns a universal latitude (planetocentric).
bool IsPositiveEast() const
This indicates if the longitude direction type is positive west (as opposed to postive east).
virtual double Longitude() const
This returns a longitude with correct longitude direction and domain as specified in the label object...
double ToPlanetographic(const double lat) const
This method converts a planetocentric latitude to a planetographic latitude.
This is free and unencumbered software released into the public domain.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
double toDouble(const QString &string)
Global function to convert from a string to a double.
Namespace for the standard library.