106 Projection::Projection(
Pvl &label) : m_mappingGrp(
"Mapping") {
149 if (str.toUpper() ==
"SKY")
m_sky =
true;
157 QString msg =
"Projection failed. Invalid label group [Mapping]";
179 if (
Name() != proj.
Name())
return false;
194 return !(*
this == proj);
204 m_projectionType = ptype;
214 return m_projectionType;
433 if (coord1 ==
Null || coord2 ==
Null) {
492 projectionX = worldX;
493 projectionY = worldY;
496 return SetCoordinate(projectionX, projectionY);
553 if (projectionX ==
Null) {
555 "Unable to convert to world x. The given x-value ["
556 +
IString(projectionX) +
"] is invalid.",
581 if (projectionY ==
Null) {
583 "Unable to convert to world y. The given y-value ["
584 +
IString(projectionY) +
"] is invalid.",
609 if (worldX ==
Null) {
611 "Unable to convert to projection x. The given x-value ["
612 +
IString(worldX) +
"] is invalid.",
637 if (worldY ==
Null) {
639 "Unable to convert to projection y. The given y-value ["
640 +
IString(worldY) +
"] is invalid.",
693 int iangle = (int)angle;
694 double mins = abs(angle - iangle) * 60.0;
695 int imins = (int)mins;
696 double secs = (mins - imins) * 60.0;
697 int isecs = (int)secs;
698 double frac = (secs - isecs) * 1000.0;
699 if (frac >= 1000.0) {
712 s << iangle <<
" " << setw(2) << setfill(
'0')
713 << imins <<
"m " << setw(2) << setfill(
'0') << isecs <<
"." <<
714 setprecision(3) << frac <<
"s";
715 return s.str().c_str();
728 double tangle = angle;
729 while (tangle < 0.0) tangle += 360.0;
730 while (tangle > 360.0) tangle -= 360.0;
732 int ihrs = (int)(hrs);
733 double mins = (hrs - ihrs) * 60.0;
734 int imins = (int)(mins);
735 double secs = (mins - imins) * 60.0;
736 int isecs = (int)(secs);
737 double msecs = (secs - isecs) * 1000.0;
738 int imsecs = (int)(msecs + 0.5);
739 if (imsecs >= 1000) {
752 s << setw(2) << setfill(
'0') << ihrs <<
"h " << setw(2) << setfill(
'0') <<
753 imins <<
"m " << setw(2) << setfill(
'0') << isecs <<
"." << imsecs <<
"s";
754 return s.str().c_str();
777 m_x = x * cos(rot) + y * sin(rot);
778 m_y = y * cos(rot) - x * sin(rot);
807 return m_x * cos(rot) -
m_y * sin(rot);
818 return m_y * cos(rot) +
m_x * sin(rot);