Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build with GEOS 3.8.0 (error: no matching function for call to 'OssimPolyArea2dPrivate::setGeometry(std::unique_ptr<geos::geom::Geometry>)') #243

Closed
sebastic opened this issue Oct 13, 2019 · 13 comments

Comments

@sebastic
Copy link
Contributor

OSSIM fails to build with GEOS 3.8.0:

[ 15%] Building CXX object src/CMakeFiles/ossim.dir/base/ossimPolyArea2d.cpp.o
cd /build/ossim-2.9.1/debian/build/src && /usr/bin/c++  -Dossim_EXPORTS -I/build/ossim-2.9.1/include -I/build/ossim-2.9.1/debian/build/include -I/usr/include/geos -I/usr/include/geotiff -I/usr/include/x86_64-linux-gnu -I/usr/include/jsoncpp -I/usr/include/freetype2  -g -O2 -fdebug-prefix-map=/build/ossim-2.9.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -O3 -DNDEBUG -fPIC   -std=c++11 -o CMakeFiles/ossim.dir/base/ossimPolyArea2d.cpp.o -c /build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp
In file included from /usr/include/geos/geom/GeometryFactory.h:23,
                 from /build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:16:
/usr/include/geos/geom/Geometry.h:26:3: warning: #warning "The GEOS C++ API is unstable, please use the C API instead" [-Wcpp]
   26 | # warning "The GEOS C++ API is unstable, please use the C API instead"
      |   ^~~~~~~
/usr/include/geos/geom/Geometry.h:27:3: warning: #warning "HINT: #include geos_c.h" [-Wcpp]
   27 | # warning "HINT: #include geos_c.h"
      |   ^~~~~~~
[ 15%] Building CXX object src/CMakeFiles/ossim.dir/base/ossimPolyLine.cpp.o
cd /build/ossim-2.9.1/debian/build/src && /usr/bin/c++  -Dossim_EXPORTS -I/build/ossim-2.9.1/include -I/build/ossim-2.9.1/debian/build/include -I/usr/include/geos -I/usr/include/geotiff -I/usr/include/x86_64-linux-gnu -I/usr/include/jsoncpp -I/usr/include/freetype2  -g -O2 -fdebug-prefix-map=/build/ossim-2.9.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -O3 -DNDEBUG -fPIC   -std=c++11 -o CMakeFiles/ossim.dir/base/ossimPolyLine.cpp.o -c /build/ossim-2.9.1/src/base/ossimPolyLine.cpp
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp: In member function 'void OssimPolyArea2dPrivate::setGeometry(const ossimPolygon&, const std::vector<ossimPolygon>&)':
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:152:64: error: no matching function for call to 'geos::geom::GeometryFactory::createPolygon(geos::geom::LinearRing*&, std::vector<geos::geom::Geometry*>*&)'
  152 |          m_geometry = geomFactory()->createPolygon(shell, holes);
      |                                                                ^
In file included from /build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:16:
/usr/include/geos/geom/GeometryFactory.h:268:30: note: candidate: 'std::unique_ptr<geos::geom::Polygon> geos::geom::GeometryFactory::createPolygon() const'
  268 |     std::unique_ptr<Polygon> createPolygon() const;
      |                              ^~~~~~~~~~~~~
/usr/include/geos/geom/GeometryFactory.h:268:30: note:   candidate expects 0 arguments, 2 provided
/usr/include/geos/geom/GeometryFactory.h:271:14: note: candidate: 'geos::geom::Polygon* geos::geom::GeometryFactory::createPolygon(geos::geom::LinearRing*, std::vector<geos::geom::LinearRing*>*) const'
  271 |     Polygon* createPolygon(LinearRing* shell,
      |              ^~~~~~~~~~~~~
/usr/include/geos/geom/GeometryFactory.h:272:54: note:   no known conversion for argument 2 from 'std::vector<geos::geom::Geometry*>*' to 'std::vector<geos::geom::LinearRing*>*'
  272 |                            std::vector<LinearRing*>* holes) const;
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/geos/geom/GeometryFactory.h:274:30: note: candidate: 'std::unique_ptr<geos::geom::Polygon> geos::geom::GeometryFactory::createPolygon(std::unique_ptr<geos::geom::LinearRing>&&) const'
  274 |     std::unique_ptr<Polygon> createPolygon(std::unique_ptr<LinearRing> && shell) const;
      |                              ^~~~~~~~~~~~~
/usr/include/geos/geom/GeometryFactory.h:274:30: note:   candidate expects 1 argument, 2 provided
/usr/include/geos/geom/GeometryFactory.h:276:30: note: candidate: 'std::unique_ptr<geos::geom::Polygon> geos::geom::GeometryFactory::createPolygon(std::unique_ptr<geos::geom::LinearRing>&&, std::vector<std::unique_ptr<geos::geom::LinearRing> >&&) const'
  276 |     std::unique_ptr<Polygon> createPolygon(std::unique_ptr<LinearRing> && shell,
      |                              ^~~~~~~~~~~~~
/usr/include/geos/geom/GeometryFactory.h:276:75: note:   no known conversion for argument 1 from 'geos::geom::LinearRing*' to 'std::unique_ptr<geos::geom::LinearRing>&&'
  276 |     std::unique_ptr<Polygon> createPolygon(std::unique_ptr<LinearRing> && shell,
      |                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/geos/geom/GeometryFactory.h:280:14: note: candidate: 'geos::geom::Polygon* geos::geom::GeometryFactory::createPolygon(const geos::geom::LinearRing&, const std::vector<geos::geom::LinearRing*>&) const'
  280 |     Polygon* createPolygon(const LinearRing& shell,
      |              ^~~~~~~~~~~~~
/usr/include/geos/geom/GeometryFactory.h:280:46: note:   no known conversion for argument 1 from 'geos::geom::LinearRing*' to 'const geos::geom::LinearRing&'
  280 |     Polygon* createPolygon(const LinearRing& shell,
      |                            ~~~~~~~~~~~~~~~~~~^~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp: In member function 'const ossimPolyArea2d& ossimPolyArea2d::operator=(const ossimPolyArea2d&)':
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:379:75: error: no matching function for call to 'OssimPolyArea2dPrivate::setGeometry(std::unique_ptr<geos::geom::Geometry>)'
  379 |          m_privateData->setGeometry(rhs.m_privateData->m_geometry->clone());
      |                                                                           ^
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:99:6: note: candidate: 'void OssimPolyArea2dPrivate::setGeometry(const ossimPolygon&, const std::vector<ossimPolygon>&)'
   99 | void OssimPolyArea2dPrivate::setGeometry(
      |      ^~~~~~~~~~~~~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:100:24: note:   no known conversion for argument 1 from 'std::unique_ptr<geos::geom::Geometry>' to 'const ossimPolygon&'
  100 |    const ossimPolygon& exteriorRing, const vector<ossimPolygon>& interiorRings)
      |    ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:72:9: note: candidate: 'void OssimPolyArea2dPrivate::setGeometry(OssimPolyArea2dPrivate::GeometryPtr)'
   72 |    void setGeometry(GeometryPtr geom){deleteGeometry();m_geometry=geom;}
      |         ^~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:72:33: note:   no known conversion for argument 1 from 'std::unique_ptr<geos::geom::Geometry>' to 'OssimPolyArea2dPrivate::GeometryPtr' {aka 'geos::geom::Geometry*'}
   72 |    void setGeometry(GeometryPtr geom){deleteGeometry();m_geometry=geom;}
      |                     ~~~~~~~~~~~~^~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp: In member function 'ossimPolyArea2d ossimPolyArea2d::operator&(const ossimPolyArea2d&) const':
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:440:77: error: no matching function for call to 'OssimPolyArea2dPrivate::setGeometry(std::unique_ptr<geos::geom::Geometry>)'
  440 |                                               rhs.m_privateData->m_geometry));
      |                                                                             ^
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:99:6: note: candidate: 'void OssimPolyArea2dPrivate::setGeometry(const ossimPolygon&, const std::vector<ossimPolygon>&)'
   99 | void OssimPolyArea2dPrivate::setGeometry(
      |      ^~~~~~~~~~~~~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:100:24: note:   no known conversion for argument 1 from 'std::unique_ptr<geos::geom::Geometry>' to 'const ossimPolygon&'
  100 |    const ossimPolygon& exteriorRing, const vector<ossimPolygon>& interiorRings)
      |    ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:72:9: note: candidate: 'void OssimPolyArea2dPrivate::setGeometry(OssimPolyArea2dPrivate::GeometryPtr)'
   72 |    void setGeometry(GeometryPtr geom){deleteGeometry();m_geometry=geom;}
      |         ^~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:72:33: note:   no known conversion for argument 1 from 'std::unique_ptr<geos::geom::Geometry>' to 'OssimPolyArea2dPrivate::GeometryPtr' {aka 'geos::geom::Geometry*'}
   72 |    void setGeometry(GeometryPtr geom){deleteGeometry();m_geometry=geom;}
      |                     ~~~~~~~~~~~~^~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp: In member function 'ossimPolyArea2d ossimPolyArea2d::operator+(const ossimPolyArea2d&) const':
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:467:77: error: no matching function for call to 'OssimPolyArea2dPrivate::setGeometry(std::unique_ptr<geos::geom::Geometry>)'
  467 |                                               rhs.m_privateData->m_geometry));
      |                                                                             ^
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:99:6: note: candidate: 'void OssimPolyArea2dPrivate::setGeometry(const ossimPolygon&, const std::vector<ossimPolygon>&)'
   99 | void OssimPolyArea2dPrivate::setGeometry(
      |      ^~~~~~~~~~~~~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:100:24: note:   no known conversion for argument 1 from 'std::unique_ptr<geos::geom::Geometry>' to 'const ossimPolygon&'
  100 |    const ossimPolygon& exteriorRing, const vector<ossimPolygon>& interiorRings)
      |    ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:72:9: note: candidate: 'void OssimPolyArea2dPrivate::setGeometry(OssimPolyArea2dPrivate::GeometryPtr)'
   72 |    void setGeometry(GeometryPtr geom){deleteGeometry();m_geometry=geom;}
      |         ^~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:72:33: note:   no known conversion for argument 1 from 'std::unique_ptr<geos::geom::Geometry>' to 'OssimPolyArea2dPrivate::GeometryPtr' {aka 'geos::geom::Geometry*'}
   72 |    void setGeometry(GeometryPtr geom){deleteGeometry();m_geometry=geom;}
      |                     ~~~~~~~~~~~~^~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp: In member function 'ossimPolyArea2d ossimPolyArea2d::operator-(const ossimPolyArea2d&) const':
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:493:77: error: no matching function for call to 'OssimPolyArea2dPrivate::setGeometry(std::unique_ptr<geos::geom::Geometry>)'
  493 |                                               rhs.m_privateData->m_geometry));
      |                                                                             ^
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:99:6: note: candidate: 'void OssimPolyArea2dPrivate::setGeometry(const ossimPolygon&, const std::vector<ossimPolygon>&)'
   99 | void OssimPolyArea2dPrivate::setGeometry(
      |      ^~~~~~~~~~~~~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:100:24: note:   no known conversion for argument 1 from 'std::unique_ptr<geos::geom::Geometry>' to 'const ossimPolygon&'
  100 |    const ossimPolygon& exteriorRing, const vector<ossimPolygon>& interiorRings)
      |    ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:72:9: note: candidate: 'void OssimPolyArea2dPrivate::setGeometry(OssimPolyArea2dPrivate::GeometryPtr)'
   72 |    void setGeometry(GeometryPtr geom){deleteGeometry();m_geometry=geom;}
      |         ^~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:72:33: note:   no known conversion for argument 1 from 'std::unique_ptr<geos::geom::Geometry>' to 'OssimPolyArea2dPrivate::GeometryPtr' {aka 'geos::geom::Geometry*'}
   72 |    void setGeometry(GeometryPtr geom){deleteGeometry();m_geometry=geom;}
      |                     ~~~~~~~~~~~~^~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp: In member function 'const ossimPolyArea2d& ossimPolyArea2d::operator&=(const ossimPolyArea2d&)':
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:519:70: error: no matching function for call to 'OssimPolyArea2dPrivate::setGeometry(std::unique_ptr<geos::geom::Geometry>)'
  519 |                                        rhs.m_privateData->m_geometry));
      |                                                                      ^
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:99:6: note: candidate: 'void OssimPolyArea2dPrivate::setGeometry(const ossimPolygon&, const std::vector<ossimPolygon>&)'
   99 | void OssimPolyArea2dPrivate::setGeometry(
      |      ^~~~~~~~~~~~~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:100:24: note:   no known conversion for argument 1 from 'std::unique_ptr<geos::geom::Geometry>' to 'const ossimPolygon&'
  100 |    const ossimPolygon& exteriorRing, const vector<ossimPolygon>& interiorRings)
      |    ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:72:9: note: candidate: 'void OssimPolyArea2dPrivate::setGeometry(OssimPolyArea2dPrivate::GeometryPtr)'
   72 |    void setGeometry(GeometryPtr geom){deleteGeometry();m_geometry=geom;}
      |         ^~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:72:33: note:   no known conversion for argument 1 from 'std::unique_ptr<geos::geom::Geometry>' to 'OssimPolyArea2dPrivate::GeometryPtr' {aka 'geos::geom::Geometry*'}
   72 |    void setGeometry(GeometryPtr geom){deleteGeometry();m_geometry=geom;}
      |                     ~~~~~~~~~~~~^~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp: In member function 'const ossimPolyArea2d& ossimPolyArea2d::operator+=(const ossimPolyArea2d&)':
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:544:70: error: no matching function for call to 'OssimPolyArea2dPrivate::setGeometry(std::unique_ptr<geos::geom::Geometry>)'
  544 |                                        rhs.m_privateData->m_geometry));
      |                                                                      ^
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:99:6: note: candidate: 'void OssimPolyArea2dPrivate::setGeometry(const ossimPolygon&, const std::vector<ossimPolygon>&)'
   99 | void OssimPolyArea2dPrivate::setGeometry(
      |      ^~~~~~~~~~~~~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:100:24: note:   no known conversion for argument 1 from 'std::unique_ptr<geos::geom::Geometry>' to 'const ossimPolygon&'
  100 |    const ossimPolygon& exteriorRing, const vector<ossimPolygon>& interiorRings)
      |    ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:72:9: note: candidate: 'void OssimPolyArea2dPrivate::setGeometry(OssimPolyArea2dPrivate::GeometryPtr)'
   72 |    void setGeometry(GeometryPtr geom){deleteGeometry();m_geometry=geom;}
      |         ^~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:72:33: note:   no known conversion for argument 1 from 'std::unique_ptr<geos::geom::Geometry>' to 'OssimPolyArea2dPrivate::GeometryPtr' {aka 'geos::geom::Geometry*'}
   72 |    void setGeometry(GeometryPtr geom){deleteGeometry();m_geometry=geom;}
      |                     ~~~~~~~~~~~~^~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp: In member function 'const ossimPolyArea2d& ossimPolyArea2d::operator-=(const ossimPolyArea2d&)':
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:569:70: error: no matching function for call to 'OssimPolyArea2dPrivate::setGeometry(std::unique_ptr<geos::geom::Geometry>)'
  569 |                                        rhs.m_privateData->m_geometry));
      |                                                                      ^
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:99:6: note: candidate: 'void OssimPolyArea2dPrivate::setGeometry(const ossimPolygon&, const std::vector<ossimPolygon>&)'
   99 | void OssimPolyArea2dPrivate::setGeometry(
      |      ^~~~~~~~~~~~~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:100:24: note:   no known conversion for argument 1 from 'std::unique_ptr<geos::geom::Geometry>' to 'const ossimPolygon&'
  100 |    const ossimPolygon& exteriorRing, const vector<ossimPolygon>& interiorRings)
      |    ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:72:9: note: candidate: 'void OssimPolyArea2dPrivate::setGeometry(OssimPolyArea2dPrivate::GeometryPtr)'
   72 |    void setGeometry(GeometryPtr geom){deleteGeometry();m_geometry=geom;}
      |         ^~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:72:33: note:   no known conversion for argument 1 from 'std::unique_ptr<geos::geom::Geometry>' to 'OssimPolyArea2dPrivate::GeometryPtr' {aka 'geos::geom::Geometry*'}
   72 |    void setGeometry(GeometryPtr geom){deleteGeometry();m_geometry=geom;}
      |                     ~~~~~~~~~~~~^~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp: In member function 'void ossimPolyArea2d::add(const ossimPolyArea2d&)':
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:595:68: error: cannot convert 'std::unique_ptr<geos::geom::Geometry>' to 'geos::geom::Geometry*' in initialization
  595 |       geos::geom::Geometry* geom = m_privateData->m_geometry->Union(rhs.m_privateData->m_geometry);
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                    |
      |                                                                    std::unique_ptr<geos::geom::Geometry>
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp: In member function 'ossimPolyArea2d& ossimPolyArea2d::toMultiPolygon()':
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:776:67: error: no matching function for call to 'std::vector<geos::geom::Geometry*>::push_back(std::unique_ptr<geos::geom::Geometry>)'
  776 |                values.push_back(m_privateData->m_geometry->clone());
      |                                                                   ^
In file included from /usr/include/c++/9/vector:67,
                 from /build/ossim-2.9.1/include/ossim/base/ossimString.h:18,
                 from /build/ossim-2.9.1/include/ossim/base/ossimCommon.h:25,
                 from /build/ossim-2.9.1/include/ossim/base/ossimDpt.h:20,
                 from /build/ossim-2.9.1/include/ossim/base/ossimPolyArea2d.h:12,
                 from /build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:7:
/usr/include/c++/9/bits/stl_vector.h:1184:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = geos::geom::Geometry*; _Alloc = std::allocator<geos::geom::Geometry*>; std::vector<_Tp, _Alloc>::value_type = geos::geom::Geometry*]'
 1184 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1184:35: note:   no known conversion for argument 1 from 'std::unique_ptr<geos::geom::Geometry>' to 'geos::geom::Geometry* const&'
 1184 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/9/bits/stl_vector.h:1200:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = geos::geom::Geometry*; _Alloc = std::allocator<geos::geom::Geometry*>; std::vector<_Tp, _Alloc>::value_type = geos::geom::Geometry*]'
 1200 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1200:30: note:   no known conversion for argument 1 from 'std::unique_ptr<geos::geom::Geometry>' to 'geos::geom::Geometry*&&'
 1200 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:778:109: error: no matching function for call to 'geos::geom::GeometryFactory::createMultiPolygon(std::vector<geos::geom::Geometry*>&) const'
  778 |                m_privateData->setGeometry(m_privateData->m_geometry->getFactory()->createMultiPolygon(values));
      |                                                                                                             ^
In file included from /build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:16:
/usr/include/geos/geom/GeometryFactory.h:213:35: note: candidate: 'std::unique_ptr<geos::geom::MultiPolygon> geos::geom::GeometryFactory::createMultiPolygon() const'
  213 |     std::unique_ptr<MultiPolygon> createMultiPolygon() const;
      |                                   ^~~~~~~~~~~~~~~~~~
/usr/include/geos/geom/GeometryFactory.h:213:35: note:   candidate expects 0 arguments, 1 provided
/usr/include/geos/geom/GeometryFactory.h:216:19: note: candidate: 'geos::geom::MultiPolygon* geos::geom::GeometryFactory::createMultiPolygon(std::vector<geos::geom::Geometry*>*) const'
  216 |     MultiPolygon* createMultiPolygon(std::vector<Geometry*>* newPolys) const;
      |                   ^~~~~~~~~~~~~~~~~~
/usr/include/geos/geom/GeometryFactory.h:216:62: note:   no known conversion for argument 1 from 'std::vector<geos::geom::Geometry*>' to 'std::vector<geos::geom::Geometry*>*'
  216 |     MultiPolygon* createMultiPolygon(std::vector<Geometry*>* newPolys) const;
      |                                      ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/usr/include/geos/geom/GeometryFactory.h:219:19: note: candidate: 'geos::geom::MultiPolygon* geos::geom::GeometryFactory::createMultiPolygon(const std::vector<const geos::geom::Geometry*>&) const'
  219 |     MultiPolygon* createMultiPolygon(
      |                   ^~~~~~~~~~~~~~~~~~
/usr/include/geos/geom/GeometryFactory.h:220:45: note:   no known conversion for argument 1 from 'std::vector<geos::geom::Geometry*>' to 'const std::vector<const geos::geom::Geometry*>&'
  220 |         const std::vector<const Geometry*>& fromPolys) const;
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/usr/include/geos/geom/GeometryFactory.h:222:35: note: candidate: 'std::unique_ptr<geos::geom::MultiPolygon> geos::geom::GeometryFactory::createMultiPolygon(std::vector<std::unique_ptr<geos::geom::Polygon> >&&) const'
  222 |     std::unique_ptr<MultiPolygon> createMultiPolygon(
      |                                   ^~~~~~~~~~~~~~~~~~
/usr/include/geos/geom/GeometryFactory.h:223:50: note:   no known conversion for argument 1 from 'std::vector<geos::geom::Geometry*>' to 'std::vector<std::unique_ptr<geos::geom::Polygon> >&&'
  223 |         std::vector<std::unique_ptr<Polygon>> && fromPolys) const;
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/usr/include/geos/geom/GeometryFactory.h:225:35: note: candidate: 'std::unique_ptr<geos::geom::MultiPolygon> geos::geom::GeometryFactory::createMultiPolygon(std::vector<std::unique_ptr<geos::geom::Geometry> >&&) const'
  225 |     std::unique_ptr<MultiPolygon> createMultiPolygon(
      |                                   ^~~~~~~~~~~~~~~~~~
/usr/include/geos/geom/GeometryFactory.h:226:55: note:   no known conversion for argument 1 from 'std::vector<geos::geom::Geometry*>' to 'std::vector<std::unique_ptr<geos::geom::Geometry> >&&'
  226 |             std::vector<std::unique_ptr<Geometry>> && fromPolys) const;
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp: In member function 'bool ossimPolyArea2d::loadState(const ossimKeywordlist&, const char*)':
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:848:64: error: no matching function for call to 'OssimPolyArea2dPrivate::setGeometry(std::unique_ptr<geos::geom::Geometry>)'
  848 |             m_privateData->setGeometry(reader.read(wkt.c_str()));
      |                                                                ^
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:99:6: note: candidate: 'void OssimPolyArea2dPrivate::setGeometry(const ossimPolygon&, const std::vector<ossimPolygon>&)'
   99 | void OssimPolyArea2dPrivate::setGeometry(
      |      ^~~~~~~~~~~~~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:100:24: note:   no known conversion for argument 1 from 'std::unique_ptr<geos::geom::Geometry>' to 'const ossimPolygon&'
  100 |    const ossimPolygon& exteriorRing, const vector<ossimPolygon>& interiorRings)
      |    ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:72:9: note: candidate: 'void OssimPolyArea2dPrivate::setGeometry(OssimPolyArea2dPrivate::GeometryPtr)'
   72 |    void setGeometry(GeometryPtr geom){deleteGeometry();m_geometry=geom;}
      |         ^~~~~~~~~~~
/build/ossim-2.9.1/src/base/ossimPolyArea2d.cpp:72:33: note:   no known conversion for argument 1 from 'std::unique_ptr<geos::geom::Geometry>' to 'OssimPolyArea2dPrivate::GeometryPtr' {aka 'geos::geom::Geometry*'}
   72 |    void setGeometry(GeometryPtr geom){deleteGeometry();m_geometry=geom;}
      |                     ~~~~~~~~~~~~^~~~
@gpotts
Copy link
Member

gpotts commented Oct 14, 2019 via email

@sebastic
Copy link
Contributor Author

The ossim package in Debian needs to build with the geos package there, and that was updated to 3.8.0.

If OSSIM used the stable C API of GEOS like pretty much all other project there wouldn't be an issue, but hasn't happened despite #79.

OSSIM is a dependency of OTB, so we won't have either OSSIM nor OTB in the next Debian stable release as long as OSSIM doesn't support GEOS 3.8.0.

That fine with me, I don't use either, but is a disservice to users of OSSIM and OTB.

@gpotts
Copy link
Member

gpotts commented Oct 14, 2019

I would gladly take a pull request and merge any modifications

@kalxas
Copy link

kalxas commented Oct 28, 2019

@gpotts @sebastic has this been fixed?
I am getting the same error while trying to build for Ubuntu Bionic with geos 3.8.0

@sebastic
Copy link
Contributor Author

has this been fixed?

No.

You'll need to have an old build of ossim with geos 3.7.x to satisfy the build dependencies for otb.

@gpotts
Copy link
Member

gpotts commented Oct 29, 2019 via email

@lbartoletti
Copy link
Contributor

@omarossim
Copy link
Contributor

omarossim commented Oct 30, 2019 via email

@omarossim
Copy link
Contributor

omarossim commented Oct 31, 2019 via email

@sebastic
Copy link
Contributor Author

Both cherry-picking commit c456397 on top of 2.9.1 and building the dev branch fail with:

/build/ossim-2.9.1/src/init/ossimInit.cpp: In function 'void geosNoticeFunction(const char*, ...)':
/build/ossim-2.9.1/src/init/ossimInit.cpp:103:4: error: 'va_start' was not declared in this scope
  103 |    va_start(args, fmt);
      |    ^~~~~~~~
/build/ossim-2.9.1/src/init/ossimInit.cpp:105:4: error: 'va_end' was not declared in this scope
  105 |    va_end(args);
      |    ^~~~~~
/build/ossim-2.9.1/src/init/ossimInit.cpp: In function 'void geosErrorFunction(const char*, ...)':
/build/ossim-2.9.1/src/init/ossimInit.cpp:114:4: error: 'va_start' was not declared in this scope
  114 |    va_start(args, fmt);
      |    ^~~~~~~~
/build/ossim-2.9.1/src/init/ossimInit.cpp:116:4: error: 'va_end' was not declared in this scope
  116 |    va_end(args);
      |    ^~~~~~

@gpotts
Copy link
Member

gpotts commented Oct 31, 2019 via email

@gpotts
Copy link
Member

gpotts commented Oct 31, 2019 via email

@sebastic
Copy link
Contributor Author

Confirmed fixed with the changes from c456397, 0498f71 & c0d9753.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants