Unverified Commit ccdfc2ce authored by Amy Stamile's avatar Amy Stamile Committed by GitHub
Browse files

Geos 3.9 Update (#5140)



* Updated geos version

* GEOS 3.9 Chip (#4443)

* First round of PolygonTools changes (#4445)

* GEOS 3.9 ImageOverlap (#4447)

* GEOS 3.9 ProcessPolygons (#4448)

* GEOS 3.9 PolygonSeeder (#4449)

* GEOS 3.9 LimitPolygonSeeder (#4450)

* GEOS 3.9 ImageOverlapSet (#4452)

* GEOS 3.9 ImageOverlapSet

* Fixed fat finger paste

* GEOS 3.9 ProcessGroundPolygons (#4451)

* Geos 3.9 PolygonTools (#4454)

* First round of PolygonTools changes

* Fixed compilation errors

* GEOS 3.9 footprintmerge, cnetcheck, cnetwinnow, and HiJitCube (#4453)

* footprintmerge, cnetcheck, and cnetwinnow fit geos 3.9 api

* include HiJitCube changes

* GEOS 3.9 ImagePolygon (#4455)

* GEOS 3.9 PixelFOV (#4456)

* GEOS 3.9 imagepolygon

* GEOS 3.9 polygontools

* fix typo (#4459)

* GEOS 3.9 camtools

* GEOS 3.9 camtools

* large commit to get geos compiling (#4460)

* GEOS 3.9 unit tests

* GEOS 3.9 fix

* GEOS 3.9 fix

* GEOS 3.9

* GEOS 3.9

* fixes segfaults in tests

* Fixes gisoverlap test failure

* Add in missing change

* fixes pixel2map segfaults

* updates to csvdiff

* fixed csvdiff changes

* Added changelog

* Addressed PR feedback

* removed deletes causing test failures

---------

Co-authored-by: default avatarKaitlyn Lee <kdl222@nau.edu>
Co-authored-by: default avatarStuart Sides <ssides@usgs.gov>
Co-authored-by: default avatarTim Giroux <62255438+tgiroux@users.noreply.github.com>
parent cd667c8f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ release.
- Updated download location for Dawn source files to include updated pck from HAMO Dawn mosaic [#4001](https://github.com/USGS-Astrogeology/ISIS3/issues/4001)
- Pinned cspice version to 67 [#5083](https://github.com/USGS-Astrogeology/ISIS3/issues/5083) 
- Changed the `rsync` related commands in the ISIS SPICE Web Service document to `downloadIsisData` command
- Updated Geos from version 3.7 to 3.9 [#3627](https://github.com/DOI-USGS/ISIS3/issues/3627)

### Added
- Instructions on setting `channel_priority=flexible` for isis environment manually during installation [#5158](https://github.com/DOI-USGS/ISIS3/issues/5158)
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ dependencies:
  - eigen < 3.4
  - embree>=2.17,<3
  - ffmpeg
  - geos>=3.7,<3.8
  - geos>=3.9,<3.10
  - geotiff
  - gmp
  - graphviz
+7 −1
Original line number Diff line number Diff line
@@ -133,7 +133,7 @@ for i in range(len(csv_1)):
    if is_number(value_1) and is_number(value_2):
      # Generate the error and get the tolerance if provided, else assume 0.0
      error = math.fabs(float(value_1) - float(value_2))
      tolerance = 0.0
      tolerance = 1e-9
      if column_1 in tolerance_map:
        tolerance = tolerance_map[column_1]

@@ -141,6 +141,12 @@ for i in range(len(csv_1)):
      if error > tolerance:
        sys.exit("FAILURE Error '%.14f' is greater than tolerance '%.14f' " %
            (error, tolerance) + "(line %d, column %s)!" % (line_num, column_1))
    
    elif column_1 == "GISINTERSECTIONFOOTPRINT":
        if len(value_1) != len(value_2):
          sys.exit("FAILURE Value " +
            "'%s' length does not equal '%s' length " % (value_1, value_2) +
            "(line %d, column %s)!" % (line_num, column_1))
    else:
      # At least one of the values is a non-numeric type, so compare as strings
      if value_1 != value_2:
+8 −8
Original line number Diff line number Diff line
@@ -317,14 +317,14 @@ namespace Isis {
        poly.Create(cube, _sampleInc, _lineInc, 1, 1, 0, 0, band + 1,
            increasePrecision);
        geos::geom::MultiPolygon *multiP = poly.Polys();
        _polys.push_back(multiP->clone());
        _polys.push_back(multiP->clone().release());
        if(_combined == 0) {
          _combined = multiP->clone();
          _combined = multiP->clone().release();
        }
        else {
          //  Construct composite (union) polygon
          geos::geom::Geometry *old(_combined);
          _combined = old->Union(multiP);
          _combined = old->Union(multiP).release();
          delete old;
        }

@@ -336,8 +336,8 @@ namespace Isis {
        // Read the footprint from the image labels
        ImagePolygon poly = cube.readFootprint();
        geos::geom::MultiPolygon *multiP = poly.Polys();
        _polys.push_back(multiP->clone());
        _combined = multiP->clone();
        _polys.push_back(multiP->clone().release());
        _combined = multiP->clone().release();
        _mapping = getProjGeometry(camera, multiP, g);
      }

@@ -472,7 +472,7 @@ namespace Isis {
    //  Get the centroid point of the union polygon
    double plon(Null), plat(Null);
    if(_combined != 0) {
      geos::geom::Point *center = _combined->getCentroid();
      geos::geom::Point *center = _combined->getCentroid().release();
      plon = center->getX();
      plat = center->getY();
      delete center;
@@ -604,7 +604,7 @@ namespace Isis {

    TProjection *sinu = (TProjection *) ProjectionFactory::Create(sinuMap, true);
    geos::geom::MultiPolygon *sPoly = PolygonTools::LatLonToXY(*poly, sinu);
    geos::geom::Point *center = sPoly->getCentroid();
    geos::geom::Point *center = sPoly->getCentroid().release();

    sinu->SetCoordinate(center->getX(), center->getY());
    g.centroidLongitude = TProjection::To360Domain(sinu->UniversalLongitude());
@@ -731,7 +731,7 @@ namespace Isis {

  geos::geom::MultiPolygon *BandGeometry::makeMultiPolygon(
    geos::geom::Geometry *g) const {
    vector<geos::geom::Geometry *> polys;
    vector<const geos::geom::Geometry *> polys;
    polys.push_back(g);
    const geos::geom::GeometryFactory *gfactory = geos::geom::GeometryFactory::getDefaultInstance();
    return (gfactory->createMultiPolygon(polys));
+3 −3
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ void IsisMain() {
  prog.CheckStatus();

  //  For this first loop union all image polygons
  vector<geos::geom::Geometry *> allPolys;
  vector<const geos::geom::Geometry *> allPolys;
  vector<QString> files;
  bool conv360 = false;

@@ -84,7 +84,7 @@ void IsisMain() {
  //  Create union poly
  geos::geom::GeometryCollection *polyCollection =
    Isis::globalFactory->createGeometryCollection(allPolys);
  geos::geom::Geometry *unionPoly = polyCollection->buffer(0);
  geos::geom::Geometry *unionPoly = polyCollection->buffer(0).release();


  //  How many polygons are in unionPoly
@@ -98,7 +98,7 @@ void IsisMain() {
  else if(unionPoly->getGeometryTypeId() == geos::geom::GEOS_MULTIPOLYGON) {
    geos::geom::MultiPolygon *multi = PolygonTools::MakeMultiPolygon(unionPoly);
    for(unsigned int i = 0; i < multi->getNumGeometries(); ++i) {
      islandPolys.push_back(multi->getGeometryN(i)->clone());
      islandPolys.push_back(multi->getGeometryN(i)->clone().release());
    }
  }

Loading