File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
 |
Isis 3 Programmer Reference
|
13 #include "AlphaCube.h"
14 #include "Projection.h"
15 #include "ProjectionFactory.h"
16 #include "TProjection.h"
17 #include "IException.h"
60 void SubArea::SetSubArea(
const int orignl,
const int origns,
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";
76 throw IException(IException::Programmer, msg, _FILEINFO_);
80 string msg =
"Invalid start/end sample range [ss,es] specified for subarea";
81 throw IException(IException::Programmer, msg, _FILEINFO_);
86 string msg =
"Invalid line increment [linc] specified for subarea";
87 throw IException(IException::Programmer, msg, _FILEINFO_);
92 string msg =
"Invalid sample increment [sinc] specified for subarea";
93 throw IException(IException::Programmer, msg, _FILEINFO_);
132 if(p_linc != p_sinc) {
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")) {
151 if(p_sl != 1 || p_ss != 1) {
152 proj->
SetWorld(p_ss - 0.5, p_sl - 0.5);
153 PvlGroup &mapgroup = inlabel.
findObject(
"IsisCube").findGroup(
"Mapping", Pvl::Traverse);
162 if(p_linc == p_sinc && p_linc != 1.0) {
163 PvlGroup &mapgroup = inlabel.
findObject(
"IsisCube").findGroup(
"Mapping", Pvl::Traverse);
164 QString pixresUnit = mapgroup[
"PixelResolution"].unit();
165 double pixres =
toDouble(mapgroup[
"PixelResolution"][0]);
166 mapgroup[
"PixelResolution"] =
toString(pixres * p_linc);
167 mapgroup[
"PixelResolution"].setUnits(pixresUnit);
168 QString scaleUnit = mapgroup[
"Scale"].unit();
169 double scale = mapgroup[
"Scale"];
170 mapgroup[
"Scale"] =
toString(scale / p_linc);
171 mapgroup[
"Scale"].setUnits(scaleUnit);
176 if(p_sl != 1 || p_ss != 1 || p_el != p_nl || p_es != p_ns) {
177 PvlGroup &mapgroup = inlabel.
findObject(
"IsisCube").findGroup(
"Mapping", Pvl::Traverse);
179 double minlat, maxlat;
180 double minlon, maxlon;
245 if(inlabel.
findObject(
"IsisCube").hasGroup(
"Instrument")) {
247 inst = inlabel.
findObject(
"IsisCube").findGroup(
"Instrument");
254 if(inlabel.
findObject(
"IsisCube").hasGroup(
"Mapping")) {
256 mapgrp = inlabel.
findObject(
"IsisCube").findGroup(
"Mapping");
263 p_ss - 0.5, p_sl - 0.5, p_es + 0.5, p_el + 0.5);
static double ToPositiveWest(const double lon, const int domain)
This method converts a longitude into the positive west direction.
A single keyword-value pair.
virtual double UniversalLatitude()
This returns a universal latitude (planetocentric).
void addKeyword(const PvlKeyword &keyword, const InsertMode mode=Append)
Add a keyword to the container.
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 IsPlanetographic() const
This indicates if the latitude type is planetographic (as opposed to planetocentric).
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
Container for cube-like labels.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
bool IsGood() const
This indicates if the last invocation of SetGround, SetCoordinate, SetUniversalGround,...
Contains multiple PvlContainers.
bool IsPositiveEast() const
This indicates if the longitude direction type is positive west (as opposed to postive east).
void UpdateGroup(Cube &cube)
Writes or update the Alpha keywords (AlphaLines, AlphaSamples, AlphaStartingSamples,...
bool hasGroup(const QString &group) const
Return if the cube has a specified group in the labels.
Base class for Map TProjections.
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
IO Handler for Isis Cubes.
This class is used to rewrite the "alpha" keywords out of the AlphaCube group or Instrument group.
virtual bool SetWorld(const double x, const double y)
This method is used to set a world coordinate.
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).
void deleteKeyword(const QString &name)
Remove a specified keyword.
double toDouble(const QString &string)
Global function to convert from a string to a double.
Namespace for the standard library.
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
virtual double UniversalLongitude()
This returns a universal longitude (positive east in 0 to 360 domain).
double ToPlanetographic(const double lat) const
This method converts a planetocentric latitude to a planetographic latitude.
double YCoord() const
This returns the projection Y provided SetGround, SetCoordinate, SetUniversalGround,...
virtual bool IsEquatorialCylindrical()
This method returns true if the projection is equatorial cylindrical.
double XCoord() const
This returns the projection X provided SetGround, SetCoordinate, SetUniversalGround,...
Projection * projection()
This is free and unencumbered software released into the public domain.