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";
 
 
  128    Pvl inlabel = *icube->label();
 
  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);
 
  178        if (proj->IsEquatorialCylindrical()) {
 
  179          double minlat, maxlat;
 
  180          double minlon, maxlon;
 
  182          if (proj->IsGood()) {
 
  183            maxlat = proj->UniversalLatitude();
 
  184            if (proj->IsPlanetographic()) {
 
  185              maxlat = proj->ToPlanetographic(maxlat);
 
  187            if (proj->IsPositiveEast()) {
 
  188              minlon = proj->UniversalLongitude();
 
  189              if (proj->Has180Domain()) {
 
  190                minlon = proj->To180Domain(minlon);
 
  194              if (proj->Has360Domain()) {
 
  195                minlon = proj->ToPositiveWest(proj->Longitude(), 360);
 
  198                minlon = proj->ToPositiveWest(proj->Longitude(), 180);
 
  202            if (proj->IsGood()) {
 
  203              minlat = proj->UniversalLatitude();
 
  204              if (proj->IsPlanetographic()) {
 
  205                minlat = proj->ToPlanetographic(minlat);
 
  207              if (proj->IsPositiveEast()) {
 
  208                maxlon = proj->UniversalLongitude();
 
  209                if (proj->Has180Domain()) {
 
  210                  maxlon = proj->To180Domain(maxlon);
 
  214                if (proj->Has360Domain()) {
 
  215                  maxlon = proj->ToPositiveWest(proj->Longitude(), 360);
 
  218                  maxlon = proj->ToPositiveWest(proj->Longitude(), 180);
 
  229          if(mapgroup.hasKeyword(
"MinimumLatitude")) {
 
  230            mapgroup.deleteKeyword(
"MinimumLatitude");
 
  232          if(mapgroup.hasKeyword(
"MaximumLatitude")) {
 
  233            mapgroup.deleteKeyword(
"MaximumLatitude");
 
  235          if(mapgroup.hasKeyword(
"MinimumLongitude")) {
 
  236            mapgroup.deleteKeyword(
"MinimumLongitude");
 
  238          if(mapgroup.hasKeyword(
"MaximumLongitude")) {
 
  239            mapgroup.deleteKeyword(
"MaximumLongitude");
 
  246    if(ocube->hasGroup(
"Instrument")) {
 
  247      ocube->deleteGroup(
"Instrument");
 
  249    if(inlabel.findObject(
"IsisCube").hasGroup(
"Instrument")) {
 
  251      inst = inlabel.findObject(
"IsisCube").findGroup(
"Instrument");
 
  252      ocube->putGroup(inst);
 
  255    if(ocube->hasGroup(
"Mapping")) {
 
  256      ocube->deleteGroup(
"Mapping");
 
  258    if(inlabel.findObject(
"IsisCube").hasGroup(
"Mapping")) {
 
  260      mapgrp = inlabel.findObject(
"IsisCube").findGroup(
"Mapping");
 
  261      ocube->putGroup(mapgrp);
 
  268    aCube.UpdateGroup(*ocube);
 
 
This class is used to rewrite the "alpha" keywords out of the AlphaCube group or Instrument group.
 
IO Handler for Isis Cubes.
 
@ Programmer
This error is for when a programmer made an API call that was illegal.
 
virtual bool SetWorld(const double x, const double y)
This method is used to set a world coordinate.
 
void addKeyword(const PvlKeyword &keyword, const InsertMode mode=Append)
Add a keyword to the container.
 
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.
 
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.