Loading CHANGELOG.md +2 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ release. ## [Unreleased] - Added check to determine if poles were a valid projection point in ImagePolygon when generating footprint for a map projected image. [#4390](https://github.com/USGS-Astrogeology/ISIS3/issues/4390) ### Changed ### Added Loading isis/src/base/objs/ImagePolygon/ImagePolygon.cpp +11 −5 Original line number Diff line number Diff line Loading @@ -641,6 +641,7 @@ namespace Isis { // Find the edge of the polygon geos::geom::Coordinate firstPoint = FindFirstPoint(); points.push_back(firstPoint); //************************ // Start walking the edge Loading @@ -653,8 +654,6 @@ namespace Isis { do { tempPoint = FindNextPoint(¤tPoint, lastPoint); //exit(1); // First check if the distance is within range of skipping bool snapToFirstPoint = true; Loading Loading @@ -687,7 +686,6 @@ namespace Isis { } } } // Failed to find the next point if (tempPoint.equals(currentPoint)) { geos::geom::Coordinate oldDuplicatePoint = tempPoint; Loading Loading @@ -852,7 +850,8 @@ namespace Isis { if (nPoleSample >= 0.5 && nPoleLine >= 0.5 && nPoleSample <= p_cube->sampleCount() + 0.5 && nPoleLine <= p_cube->lineCount() + 0.5) { nPoleLine <= p_cube->lineCount() + 0.5 && SetImage(nPoleSample, nPoleLine)) { hasNorthPole = true; } } Loading @@ -872,7 +871,8 @@ namespace Isis { if (sPoleSample >= 0.5 && sPoleLine >= 0.5 && sPoleSample <= p_cube->sampleCount() + 0.5 && sPoleLine <= p_cube->lineCount() + 0.5) { sPoleLine <= p_cube->lineCount() + 0.5 && SetImage(sPoleSample, sPoleLine)) { hasSouthPole = true; } } Loading Loading @@ -1153,6 +1153,7 @@ namespace Isis { for (unsigned int i = 1; i < p_pts->getSize(); i++) { lon = p_pts->getAt(i).x; lat = p_pts->getAt(i).y; // check to see if you just crossed the Meridian if (abs(lon - prevLon) > 180 && (prevLat != 90 && prevLat != -90)) { newCoords = true; Loading Loading @@ -1329,6 +1330,11 @@ namespace Isis { msg += "isis operation exception [" + IString(e.what()) + "]"; throw IException(e, IException::Unknown, msg, _FILEINFO_); } catch(std::exception &e) { std::string msg = "Caught std::exception: "; msg += e.what(); throw IException(IException::Unknown, msg, _FILEINFO_); } catch(...) { std::string msg = "Unable to create image footprint (Fix360Poly) due to "; msg += "unknown exception"; Loading Loading
CHANGELOG.md +2 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ release. ## [Unreleased] - Added check to determine if poles were a valid projection point in ImagePolygon when generating footprint for a map projected image. [#4390](https://github.com/USGS-Astrogeology/ISIS3/issues/4390) ### Changed ### Added Loading
isis/src/base/objs/ImagePolygon/ImagePolygon.cpp +11 −5 Original line number Diff line number Diff line Loading @@ -641,6 +641,7 @@ namespace Isis { // Find the edge of the polygon geos::geom::Coordinate firstPoint = FindFirstPoint(); points.push_back(firstPoint); //************************ // Start walking the edge Loading @@ -653,8 +654,6 @@ namespace Isis { do { tempPoint = FindNextPoint(¤tPoint, lastPoint); //exit(1); // First check if the distance is within range of skipping bool snapToFirstPoint = true; Loading Loading @@ -687,7 +686,6 @@ namespace Isis { } } } // Failed to find the next point if (tempPoint.equals(currentPoint)) { geos::geom::Coordinate oldDuplicatePoint = tempPoint; Loading Loading @@ -852,7 +850,8 @@ namespace Isis { if (nPoleSample >= 0.5 && nPoleLine >= 0.5 && nPoleSample <= p_cube->sampleCount() + 0.5 && nPoleLine <= p_cube->lineCount() + 0.5) { nPoleLine <= p_cube->lineCount() + 0.5 && SetImage(nPoleSample, nPoleLine)) { hasNorthPole = true; } } Loading @@ -872,7 +871,8 @@ namespace Isis { if (sPoleSample >= 0.5 && sPoleLine >= 0.5 && sPoleSample <= p_cube->sampleCount() + 0.5 && sPoleLine <= p_cube->lineCount() + 0.5) { sPoleLine <= p_cube->lineCount() + 0.5 && SetImage(sPoleSample, sPoleLine)) { hasSouthPole = true; } } Loading Loading @@ -1153,6 +1153,7 @@ namespace Isis { for (unsigned int i = 1; i < p_pts->getSize(); i++) { lon = p_pts->getAt(i).x; lat = p_pts->getAt(i).y; // check to see if you just crossed the Meridian if (abs(lon - prevLon) > 180 && (prevLat != 90 && prevLat != -90)) { newCoords = true; Loading Loading @@ -1329,6 +1330,11 @@ namespace Isis { msg += "isis operation exception [" + IString(e.what()) + "]"; throw IException(e, IException::Unknown, msg, _FILEINFO_); } catch(std::exception &e) { std::string msg = "Caught std::exception: "; msg += e.what(); throw IException(IException::Unknown, msg, _FILEINFO_); } catch(...) { std::string msg = "Unable to create image footprint (Fix360Poly) due to "; msg += "unknown exception"; Loading