Skip to content

Commit

Permalink
Revert "Geos 3.12 (#5350)" (#5359)
Browse files Browse the repository at this point in the history
This reverts commit 1d928a9.
  • Loading branch information
acpaquette authored Dec 5, 2023
1 parent 1d928a9 commit 8d1df45
Show file tree
Hide file tree
Showing 51 changed files with 689 additions and 654 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ print.prt
*/tsts/*/output/*
*/build/
build/
*build*/
install/

# Unignore the documentation build
Expand Down
56 changes: 27 additions & 29 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,74 +3,72 @@ channels:
- defaults

dependencies:
- ale>=0.9.1, <1
- kalasiris
- ale=0.9.1
- armadillo
- boost>=1.72.0, <2
- boost-cpp>=1.72.0, <2
- boost=1.72
- boost-cpp=1.72
- blas
- usgs-astrogeology::bullet
- bz2file
- bzip2
- cmake >=3.15, <4
- cmake >=3.15
- cspice=67
- csm>=3.0.3,<3.0.4
- curl>=8.3.0,<9.0a0
- cxx-compiler>=1.1.2
- curl
- cxx-compiler=1.1.2
- doxygen
- eigen>=3, <4
- embree>=2.17, <3
- eigen < 3.4
- embree>=2.17,<3
- ffmpeg
- geos>=3.12.1, <4
- geos =3.11.1
- geotiff
- gmp
- graphviz
- gsl>=2.6
- hdf5>=1.14.2,<1.14.3.0a0
- hdf5
- icu
- inja
- jama
- jpeg
- usgs-astrogeology::kakadu==1
- kalasiris
- krb5
- libboost>=1.72.0, <2
- libgdal >=3.7.2,<3.8.0a0
- libopencv>=4.5.2, <5
- libpng>=1.6.34, <2
- libprotobuf
- libtiff>=4.0, <5
- libopencv>=4.5.2
- libpng>=1.6.34
- libprotobuf<3.20
- libtiff>=4.0
- libxml2
- make
- mesalib
- mysql
- mysql-connector-c
- nanoflann<1.4
- nlohmann_json
- ninja>=1.7.2, <2
- ninja==1.7.2
- nn
- opencv>=4.5.2, <5
- openssl>=3.1.2,<4.0a0
- pcl >=1.10, <2
- opencv>=4.5.2
- openssl>=1.1.1k
- pcl >= 1.10.0
- plio
- protobuf
- python=3.12
- python_abi=3.12
- protobuf<3.20
- python>=3.7.11
- pytest
- rclone
- qhull
- qt-main
- qt>=5.9.6,<5.15.0
- qwt
- rclone
- sqlite>=3.43.0,<4.0a0
- sqlite
- suitesparse
- superlu
- swig
- texlive-core
- tnt
- x264
- xalan-c
- xerces-c>=3.2.4,<3.3.0a0
- xerces-c=3
- xorg-kbproto
- xorg-libice
- xorg-libsm
- xorg-libx11
- xorg-libxi
- zlib>=1.2.13,<1.3.0a0
- zlib
2 changes: 1 addition & 1 deletion gtest
Submodule gtest updated 291 files
12 changes: 6 additions & 6 deletions isis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ endif()
# sometimes third parties do not set their rpaths correctly
set(thirdPartyCppFlags -Wall
-fPIC
-std=c++17
-std=c++14
-DISIS_LITTLE_ENDIAN=1
-Wno-unused-parameter
-Wno-overloaded-virtual
Expand All @@ -171,7 +171,7 @@ set(thirdPartyCppFlags -Wall
-DENABLEJP2K=${JP2KFLAG}
)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 14)

# Append CPP flags set in the third party lib file to the string set in this file.
string(REPLACE ";" " " FLAGS_STR "${thirdPartyCppFlags}")
Expand All @@ -183,8 +183,8 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLAGS_STR}" )
# Add gold linker (and therefore, phtread) to speed up linux (spec. Ubuntu18.04) builds
if(NOT APPLE)
set(thirdPartyCppFlags ${thirdPartyCppFlags} -fuse-ld=gold
-pthread
-fext-numeric-literals
-pthread
-fext-numeric-literals
-Wl,-rpath,$ENV{CONDA_PREFIX}/lib)
endif()

Expand Down Expand Up @@ -279,7 +279,7 @@ find_package(Jama 125 REQUIRED)
find_package(NN REQUIRED)
find_package(OpenCV 3.1.0 REQUIRED)
find_package(PCL REQUIRED)
find_package(protobuf REQUIRED CONFIG)
find_package(Protobuf 2.6.1 REQUIRED)
find_package(Qwt 6 REQUIRED)
find_package(SuperLU 4.3 REQUIRED)
find_package(TIFF 4.0.0 REQUIRED)
Expand Down Expand Up @@ -352,7 +352,7 @@ foreach (_variableName ${_variableNames})
endforeach()

# add target based linkages to ALLLIBS variable
list(APPEND ALLLIBS pantor::inja sensorutilities protobuf::libprotobuf)
list(APPEND ALLLIBS pantor::inja sensorutilities)

# Sometimes we add the same lib more than once (especially with LIBDIRS)
list(REMOVE_DUPLICATES ALLLIBDIRS)
Expand Down
2 changes: 1 addition & 1 deletion isis/cmake/FindGeos.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# GEOS_LIBRARY

find_path(GEOS_INCLUDE_DIR
NAMES geos.h geos_c.h
NAMES geos.h
PATH_SUFFIXES "geos/geos${Geos_FIND_VERSION}" "geos"
)

Expand Down
2 changes: 1 addition & 1 deletion isis/cmake/FindPCL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

find_path(PCL_INCLUDE_DIR
NAME pcl_base.h
PATH_SUFFIXES "pcl-1.8/pcl" "pcl-1.9/pcl" "pcl-1.11/pcl" "pcl-1.12/pcl" "pcl-1.13/pcl"
PATH_SUFFIXES "pcl-1.8/pcl" "pcl-1.9/pcl" "pcl-1.11/pcl"
)

find_library(PCL_COMMON_LIBRARY NAMES pcl_common)
Expand Down
2 changes: 1 addition & 1 deletion isis/src/base/apps/caminfo/CamTools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ namespace Isis {
vector<const geos::geom::Geometry *> polys;
polys.push_back(g);
const geos::geom::GeometryFactory *gfactory = geos::geom::GeometryFactory::getDefaultInstance();
return (gfactory->createMultiPolygon(polys).release());
return (gfactory->createMultiPolygon(polys));
}


Expand Down
21 changes: 11 additions & 10 deletions isis/src/base/apps/cubediff/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
#include "IString.h"
#include "Pixel.h"

using namespace std;
using namespace Isis;

void compare(std::vector<Buffer *> &in, std::vector<Buffer *> &out);
void compare(vector<Buffer *> &in, vector<Buffer *> &out);

void diffTable(std::ofstream &target, int precision);
void diffTable(ofstream &target, int precision);

// This is only used for the difference table
struct Difference {
Expand All @@ -35,7 +36,7 @@ int sample, line, band, spCount, diffCount, colWidth;
Statistics stats;
bool doTable;
unsigned int sigFigAccuracy = DBL_DIG; // DBL_DIG is maximum accuracy for a double
std::vector<Difference> diffset;
vector<Difference> diffset;
int sigFigLine = 0;
int sigFigSample = 0;
int sigFigBand = 0;
Expand Down Expand Up @@ -63,7 +64,7 @@ void IsisMain() {
doTable = true;
diffCount = ui.GetInteger("COUNT");
if(!ui.WasEntered("TO")) {
std::string message = "A target file is required for difference output";
string message = "A target file is required for difference output";
throw IException(IException::User, message, _FILEINFO_);
}

Expand Down Expand Up @@ -122,15 +123,15 @@ void IsisMain() {
}
if(doTable) {
QString filename = FileName(ui.GetFileName("TO", "txt")).expanded();
std::ofstream ofile(filename.toLatin1().data(), std::ios_base::app);
ofstream ofile(filename.toLatin1().data(), ios_base::app);
diffTable(ofile, ui.GetInteger("PRECISION"));
}

p.EndProcess();
filesEqual = true;
}

void compare(std::vector<Buffer *> &in, std::vector<Buffer *> &out) {
void compare(vector<Buffer *> &in, vector<Buffer *> &out) {
Buffer &input1 = *in[0];
Buffer &input2 = *in[1];
int inputSize = input1.size();
Expand Down Expand Up @@ -251,8 +252,8 @@ void compare(std::vector<Buffer *> &in, std::vector<Buffer *> &out) {
}

//Function to prepare the table to append to the
void diffTable(std::ofstream &target, int precision) {
std::vector<int> temp;
void diffTable(ofstream &target, int precision) {
vector<int> temp;

//Make a list of all samples present
for(unsigned int i = 0; i < diffset.size(); i++) {
Expand All @@ -263,14 +264,14 @@ void diffTable(std::ofstream &target, int precision) {
sort(temp.begin(), temp.end());

//Remove duplicates
std::vector<int> samps;
vector<int> samps;
samps.push_back(temp[0]);
for(unsigned int i = 1; i < temp.size(); i++) {
if(temp[i] != samps.back()) {
samps.push_back(temp[i]);
}
}
std::vector<Column> cols;
vector<Column> cols;
//Add the first Column
Column first("Line#", 7, Column::Integer);
cols.push_back(first);
Expand Down
1 change: 1 addition & 0 deletions isis/src/base/apps/fakecube/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "ProcessByLine.h"
#include "SpecialPixel.h"

using namespace std;
using namespace Isis;

void SumLineSample(Buffer &in, Buffer &out);
Expand Down
2 changes: 1 addition & 1 deletion isis/src/base/apps/footprintmerge/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void IsisMain() {

// Create union poly
geos::geom::GeometryCollection *polyCollection =
Isis::globalFactory->createGeometryCollection(allPolys).release();
Isis::globalFactory->createGeometryCollection(allPolys);
geos::geom::Geometry *unionPoly = polyCollection->buffer(0).release();


Expand Down
6 changes: 3 additions & 3 deletions isis/src/base/objs/Chip/Chip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -959,8 +959,8 @@ namespace Isis {
interp.Interpolate(CubeSample(), CubeLine(), port.DoubleBuffer());
}
else {
std::unique_ptr<geos::geom::Point> pnt = globalFactory->createPoint(
geos::geom::Coordinate(CubeSample(), CubeLine()));
geos::geom::Point *pnt = globalFactory->createPoint(
geos::geom::Coordinate(CubeSample(), CubeLine()));
if (pnt->within(m_clipPolygon)) {
port.SetPosition(CubeSample(), CubeLine(), band);
cube.read(port);
Expand All @@ -970,7 +970,7 @@ namespace Isis {
else {
m_buf[line-1][samp-1] = Isis::NULL8;
}
pnt.reset();
delete pnt;
}
}
}
Expand Down
20 changes: 10 additions & 10 deletions isis/src/base/objs/Chip/unitTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ find files of those names at the top level of this repository. **/
#include "Preference.h"
#include "SpecialPixel.h"
#include "geos/geom/Coordinate.h"
#include "geos/geom/CoordinateSequence.h"
#include "geos/geom/CoordinateArraySequence.h"
#include "geos/geom/GeometryFactory.h"
#include "geos/geom/Polygon.h"
#include "geos/geom/MultiPolygon.h"
Expand Down Expand Up @@ -134,16 +134,16 @@ int main() {
cout << "Test load chip from cube with rotation and clipping polygon " << endl;
chip.TackCube(26.0, 25.0);

geos::geom::CoordinateSequence pts;
pts.add(geos::geom::Coordinate(23.0, 22.0));
pts.add(geos::geom::Coordinate(28.0, 22.0));
pts.add(geos::geom::Coordinate(28.0, 27.0));
pts.add(geos::geom::Coordinate(25.0, 28.0));
pts.add(geos::geom::Coordinate(23.0, 22.0));
vector <const geos::geom::Geometry *> polys;
geos::geom::CoordinateArraySequence *pts = new geos::geom::CoordinateArraySequence();
pts->add(geos::geom::Coordinate(23.0, 22.0));
pts->add(geos::geom::Coordinate(28.0, 22.0));
pts->add(geos::geom::Coordinate(28.0, 27.0));
pts->add(geos::geom::Coordinate(25.0, 28.0));
pts->add(geos::geom::Coordinate(23.0, 22.0));
vector<geos::geom::Geometry *> *polys = new vector<geos::geom::Geometry *>;
geos::geom::GeometryFactory::Ptr gf = geos::geom::GeometryFactory::create();
polys.push_back(gf->createPolygon(gf->createLinearRing(pts)).release());
geos::geom::MultiPolygon *mPolygon = gf->createMultiPolygon(polys).release();
polys->push_back(gf->createPolygon(gf->createLinearRing(pts), NULL));
geos::geom::MultiPolygon *mPolygon = gf->createMultiPolygon(polys);

chip.SetClipPolygon(*mPolygon);
chip.Load(junk, 45.0);
Expand Down
1 change: 0 additions & 1 deletion isis/src/base/objs/EmbreeShapeModel/EmbreeShapeModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ find files of those names at the top level of this repository. **/
#include "EmbreeShapeModel.h"

#include <numeric>
#include <float.h>

#include <QtGlobal>
#include <QList>
Expand Down
1 change: 0 additions & 1 deletion isis/src/base/objs/GisTopology/GisTopology.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ namespace Isis {
GEOSWKTWriter *GisTopology::wktWriter() {
if (!m_WKTwriter) {
m_WKTwriter = GEOSWKTWriter_create();
GEOSWKTWriter_setTrim(m_WKTwriter, 1);
}
return (m_WKTwriter);
}
Expand Down
4 changes: 2 additions & 2 deletions isis/src/base/objs/GisTopology/GisTopology.truth

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions isis/src/base/objs/GridPolygonSeeder/GridPolygonSeeder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ namespace Isis {
for(double y = dRealMinY; y <= polyBoundBox->getMaxY(); y += p_Yspacing) {
for(double x = dRealMinX; x <= polyBoundBox->getMaxX(); x += p_Xspacing) {
geos::geom::Coordinate c(x, y);
geos::geom::Point *p = Isis::globalFactory->createPoint(c).release();
geos::geom::Point *p = Isis::globalFactory->createPoint(c);

if(p->within(multiPoly)) {
points.push_back(Isis::globalFactory->createPoint(c).release());
points.push_back(Isis::globalFactory->createPoint(c));
}
else {
delete p;
Expand Down Expand Up @@ -224,7 +224,7 @@ namespace Isis {
throw iException::Message(iException::Programmer, msg, _FILEINFO_);
}*/
points.push_back(Isis::globalFactory->createPoint(
geos::geom::Coordinate(p->getX(), p->getY())).release());
geos::geom::Coordinate(p->getX(), p->getY())));

// We found something new and need a new pass
bGridCleared = false;
Expand Down Expand Up @@ -359,9 +359,9 @@ namespace Isis {
double xPos = centerX + (x - gridSize / 2) * deltaXSize;
double yPos = centerY + (y - gridSize / 2) * deltaYSize;
geos::geom::Coordinate c(xPos, yPos);
geos::geom::Point *p = Isis::globalFactory->createPoint(c).release();
geos::geom::Point *p = Isis::globalFactory->createPoint(c);
if(p->within(&xymp)) {
result = p->clone().release();
result = p;
}
else {
delete p;
Expand Down
Loading

0 comments on commit 8d1df45

Please sign in to comment.