Unverified Commit 3793da6f authored by Austin Sanders's avatar Austin Sanders Committed by GitHub
Browse files

Fix autoseed SeedDomain = SampleLine (#5674)

* Fix SeedDomain SampleLine

* Updated changelog

* Removed ugmap
parent 038cc5f8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ file. Slightly modified the FunctionalTestJigsawBundleXYZ ctest accordingly. Iss
- Fixed XmlToJson namespaced key conversion [#5652](https://github.com/DOI-USGS/ISIS3/pull/5652)
- Fixed PHOTOMET not accepting backplanes [#5281](https://github.com/DOI-USGS/ISIS3/issues/5281)
- Fixed dstripe parallel test failing by converting tests to gtests [#5613](https://github.com/DOI-USGS/ISIS3/issues/5613)
- Fixed autoseed SeedDomain = SampleLine only working for first overlap [#5673](https://github.com/DOI-USGS/ISIS3/issues/5673)

## [8.3.0] - 2024-09-30

+4 −14
Original line number Diff line number Diff line
@@ -174,16 +174,10 @@ namespace Isis {
    //PolygonSeeder *seeder = PolygonSeederFactory::Create(seedDef);

    TProjection *proj = NULL;
    UniversalGroundMap *ugmap = NULL;
    mapGroup = Target::radiiGroup(cubeLab, mapGroup);
    if (seedDomain == XY) {
      proj = (TProjection *) ProjectionFactory::Create(maplab);
    }
    else if (seedDomain == SampleLine) {
      Cube cube;
      cube.open(serialNumbers.fileName(0));
      ugmap = new UniversalGroundMap(cube);
    }

    // Create the control net to store the points in.
    ControlNet cnet;
@@ -289,7 +283,7 @@ namespace Isis {
          mp = PolygonTools::LatLonToXY(*polygonOverlaps, proj);
        }
        else if (seedDomain == SampleLine) {
          mp = PolygonTools::LatLonToSampleLine(*polygonOverlaps, ugmap);
          mp = PolygonTools::LatLonToSampleLine(*polygonOverlaps, gMaps[(*overlaps[ov])[0]]);
        }
        points = seeder->Seed(mp);
      }
@@ -340,10 +334,10 @@ namespace Isis {
      else if (seedDomain == SampleLine) {
        // Convert the Sample/Line points back to Lat/Lon points
        for (unsigned int pt = 0; pt < points.size(); pt ++) {
          if (ugmap->SetImage(points[pt]->getX(), points[pt]->getY())) {
          if (gMaps[(*overlaps[ov])[0]]->SetImage(points[pt]->getX(), points[pt]->getY())) {
            seed.push_back(Isis::globalFactory->createPoint(
                             geos::geom::Coordinate(ugmap->UniversalLongitude(),
                                                    ugmap->UniversalLatitude())).release());
                             geos::geom::Coordinate(gMaps[(*overlaps[ov])[0]]->UniversalLongitude(),
                                                    gMaps[(*overlaps[ov])[0]]->UniversalLatitude())).release());
          }
          else {
            IString msg = "Unable to convert from Sample/Line to a (lon,lat)";
@@ -515,10 +509,6 @@ namespace Isis {
      delete proj;
      proj = NULL;
    }
    else if (seedDomain == SampleLine) {
      delete ugmap;
      ugmap = NULL;
    }

    delete seeder;
    seeder = NULL;