Unverified Commit d1084553 authored by Stuart Sides's avatar Stuart Sides Committed by GitHub
Browse files

GEOS 3.9 PolygonSeeder (#4449)

parent d79a0a06
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ namespace Isis {

    // Starting at the centroid of the xy polygon populate the polygon with a
    // grid of points with the requested spacing
    geos::geom::Point *centroid = multiPoly->getCentroid();
    geos::geom::Point *centroid = multiPoly->getCentroid().release();
    double centerX = centroid->getX();
    double centerY = centroid->getY();
    delete centroid;
@@ -136,7 +136,7 @@ namespace Isis {
      return points;
    }

    geos::geom::Point *centroid = multiPoly->getCentroid();
    geos::geom::Point *centroid = multiPoly->getCentroid().release();
    double centerX = centroid->getX();
    double centerY = centroid->getY();
    delete centroid;
+4 −4
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ int main() {
      cout << "Test 2, test a square polygon" << endl;
      try {
        // Call the seed member with a polygon
        geos::geom::CoordinateSequence *pts;
        geos::geom::CoordinateArraySequence *pts;
        vector<geos::geom::Geometry *> polys;

        // Create the A polygon
@@ -82,7 +82,7 @@ int main() {
        polys.push_back(Isis::globalFactory->createPolygon(
                          Isis::globalFactory->createLinearRing(pts), NULL));

        geos::geom::MultiPolygon *mp = Isis::globalFactory->createMultiPolygon(polys);
        geos::geom::MultiPolygon *mp = Isis::globalFactory->createMultiPolygon(&polys);

        cout << "Lon/Lat polygon = " << mp->toString() << endl;
        // Create the projection necessary for seeding
@@ -130,7 +130,7 @@ int main() {
      cout << "Test 3, test for too thin" << endl;
      try {
        // Call the seed member with a polygon
        geos::geom::CoordinateSequence *pts;
        geos::geom::CoordinateArraySequence *pts;
        vector<geos::geom::Geometry *> polys;

        // Create the A polygon
@@ -144,7 +144,7 @@ int main() {
        polys.push_back(Isis::globalFactory->createPolygon(
                          Isis::globalFactory->createLinearRing(pts), NULL));

        geos::geom::MultiPolygon *mp = Isis::globalFactory->createMultiPolygon(polys);
        geos::geom::MultiPolygon *mp = Isis::globalFactory->createMultiPolygon(&polys);

        cout << "Lon/Lat polygon = " << mp->toString() << endl;

+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ namespace Isis {

    // Starting at the centroid of the xy polygon populate the polygon with
    // staggered points with the requested spacing
    geos::geom::Point *centroid = multiPoly->getCentroid();
    geos::geom::Point *centroid = multiPoly->getCentroid().release();
    double centerX = centroid->getX();
    double centerY = centroid->getY();
    delete centroid;
+5 −5
Original line number Diff line number Diff line
@@ -57,10 +57,10 @@ int main() {
    std::cout << "MinimumThickness = " << ps->MinimumThickness() << std::endl;
    std::cout << "MinimumArea = " << ps->MinimumArea() << std::endl;

    cout << "Test 2, test a square polygon" << endl;
    std::cout << "Test 2, test a square polygon" << std::endl;
    try {
      // Call the seed member with a polygon
      geos::geom::CoordinateSequence *pts;
      geos::geom::CoordinateArraySequence *pts;
      vector<geos::geom::Geometry *> polys;

      // Create the A polygon
@@ -74,7 +74,7 @@ int main() {
      polys.push_back(Isis::globalFactory->createPolygon(
                        Isis::globalFactory->createLinearRing(pts), NULL));

      geos::geom::MultiPolygon *mp = Isis::globalFactory->createMultiPolygon(polys);
      geos::geom::MultiPolygon *mp = Isis::globalFactory->createMultiPolygon(&polys);

      cout << "Lon/Lat polygon = " << mp->toString() << endl;
      // Create the projection necessary for seeding
@@ -136,7 +136,7 @@ int main() {
    cout << "Test 3, test for too thin" << endl;
    try {
      // Call the seed member with a polygon
      geos::geom::CoordinateSequence *pts;
      geos::geom::CoordinateArraySequence *pts;
      vector<geos::geom::Geometry *> polys;

      // Create the A polygon
@@ -150,7 +150,7 @@ int main() {
      polys.push_back(Isis::globalFactory->createPolygon(
                        Isis::globalFactory->createLinearRing(pts), NULL));

      geos::geom::MultiPolygon *mp = Isis::globalFactory->createMultiPolygon(polys);
      geos::geom::MultiPolygon *mp = Isis::globalFactory->createMultiPolygon(&polys);

      cout << "Lon/Lat polygon = " << mp->toString() << endl;