From 134a5a30da4324212fb4e28c44fa13e7ace3f685 Mon Sep 17 00:00:00 2001 From: Vaclav Blazek Date: Fri, 17 Jul 2020 18:25:07 +0200 Subject: [PATCH] compilable on gcc-10+OpenCv-4+Boost-1.71 (i.e. Ubuntu 20.04) --- externals/buildsys/cmake | 2 +- externals/buildsys/common | 2 +- externals/gdal-drivers | 2 +- externals/libdbglog | 2 +- externals/libgeo | 2 +- externals/libgeometry | 2 +- externals/libhttp | 2 +- externals/libimgproc | 2 +- externals/libmath | 2 +- externals/libminiball | 2 +- externals/libpysupport | 2 +- externals/libsemantic | 2 +- externals/libservice | 2 +- externals/libutility | 2 +- externals/vts-libs | 2 +- mapproxy/CMakeLists.txt | 4 ++-- mapproxy/src/generatevrtwo/generatevrtwo.cpp | 10 +++++++--- .../src/mapproxy/generator/tms-raster-patchwork.cpp | 3 ++- .../src/mapproxy/support/mmapped/qtree-rasterize.hpp | 2 +- 19 files changed, 27 insertions(+), 22 deletions(-) diff --git a/externals/buildsys/cmake b/externals/buildsys/cmake index 68c7383..78a4ade 160000 --- a/externals/buildsys/cmake +++ b/externals/buildsys/cmake @@ -1 +1 @@ -Subproject commit 68c73838f968d0b292a5f1a30c5d184665b7ecb6 +Subproject commit 78a4ade005c8778b8381c4a035b94ead9c5da8d7 diff --git a/externals/buildsys/common b/externals/buildsys/common index 3f81292..93661c2 160000 --- a/externals/buildsys/common +++ b/externals/buildsys/common @@ -1 +1 @@ -Subproject commit 3f81292a333707d44748ac36bc2e75614c027953 +Subproject commit 93661c2a86011d0221a720cb47460ff714642f9d diff --git a/externals/gdal-drivers b/externals/gdal-drivers index 585cae6..c7a2dc6 160000 --- a/externals/gdal-drivers +++ b/externals/gdal-drivers @@ -1 +1 @@ -Subproject commit 585cae68bbaa5e3534f7c27f5a1f425756f032b3 +Subproject commit c7a2dc6f10e4779548f6ac47aa123693a6a81f92 diff --git a/externals/libdbglog b/externals/libdbglog index 3dfa84e..c35d8a0 160000 --- a/externals/libdbglog +++ b/externals/libdbglog @@ -1 +1 @@ -Subproject commit 3dfa84e6996f947cf149a3d79a96de0e8fa2e412 +Subproject commit c35d8a03ac39196f3eeb77529f0ad96d40e29113 diff --git a/externals/libgeo b/externals/libgeo index f5822f0..6aafeac 160000 --- a/externals/libgeo +++ b/externals/libgeo @@ -1 +1 @@ -Subproject commit f5822f052d0c634a38465115d0c3fc9184ba6ea7 +Subproject commit 6aafeac8dcb80d0205d0f4131d6d8a3cd83458f6 diff --git a/externals/libgeometry b/externals/libgeometry index 8548396..eb825a3 160000 --- a/externals/libgeometry +++ b/externals/libgeometry @@ -1 +1 @@ -Subproject commit 85483961fe82afbfe9cf513c111cb0eb3803523b +Subproject commit eb825a369aebd661c144f1eae6dccd0ce129fbbf diff --git a/externals/libhttp b/externals/libhttp index 2af00c0..2e4f289 160000 --- a/externals/libhttp +++ b/externals/libhttp @@ -1 +1 @@ -Subproject commit 2af00c05b4085834ca3f043137f08fa9d2e4492d +Subproject commit 2e4f28968c2000a7832d4c16ff1398265c5bff16 diff --git a/externals/libimgproc b/externals/libimgproc index a7fa6de..4e2ec60 160000 --- a/externals/libimgproc +++ b/externals/libimgproc @@ -1 +1 @@ -Subproject commit a7fa6de13e65c23bc151d511d7218f8eb19ee5b5 +Subproject commit 4e2ec606c28064069a5d6eaf9e5d0d2e8987e762 diff --git a/externals/libmath b/externals/libmath index ce94cf9..551c5fd 160000 --- a/externals/libmath +++ b/externals/libmath @@ -1 +1 @@ -Subproject commit ce94cf957964c328b178bc00cee38f62be119d56 +Subproject commit 551c5fdbfd95b42d5d1049bc322c70cea6fa7b3c diff --git a/externals/libminiball b/externals/libminiball index f1c7757..c55a784 160000 --- a/externals/libminiball +++ b/externals/libminiball @@ -1 +1 @@ -Subproject commit f1c7757200243b732e6850d281f71e9e58970955 +Subproject commit c55a784c9b518d4bf1b5c74580f50dc1511491b0 diff --git a/externals/libpysupport b/externals/libpysupport index 81a23b6..b042a28 160000 --- a/externals/libpysupport +++ b/externals/libpysupport @@ -1 +1 @@ -Subproject commit 81a23b6ad7c836690d6b1b2f132444fd4361a7b4 +Subproject commit b042a28535e45d06429091291a518fa85b36510d diff --git a/externals/libsemantic b/externals/libsemantic index a92e5c7..388bc4a 160000 --- a/externals/libsemantic +++ b/externals/libsemantic @@ -1 +1 @@ -Subproject commit a92e5c7953fe13de09d8cbac18acc1cb6fc25752 +Subproject commit 388bc4a638aaca62ef577b44c485e59cb38014b3 diff --git a/externals/libservice b/externals/libservice index 13bb283..72d3241 160000 --- a/externals/libservice +++ b/externals/libservice @@ -1 +1 @@ -Subproject commit 13bb283bfa219a5058104fb0d8fa91f3a818f649 +Subproject commit 72d324120efc9bc2a7ff2c609afdfbaca3230787 diff --git a/externals/libutility b/externals/libutility index 148d169..40a65eb 160000 --- a/externals/libutility +++ b/externals/libutility @@ -1 +1 @@ -Subproject commit 148d169a82597a141a688378d598f8aaf1f10da2 +Subproject commit 40a65eb301cd23ee00ca9f61a8c0d4599bc7477a diff --git a/externals/vts-libs b/externals/vts-libs index 408746b..97a15bd 160000 --- a/externals/vts-libs +++ b/externals/vts-libs @@ -1 +1 @@ -Subproject commit 408746ba75d32189399ba7eec395805b767d7a14 +Subproject commit 97a15bdb4284019631f07da8190696aeb82d87e5 diff --git a/mapproxy/CMakeLists.txt b/mapproxy/CMakeLists.txt index 1111e99..44110b5 100644 --- a/mapproxy/CMakeLists.txt +++ b/mapproxy/CMakeLists.txt @@ -1,5 +1,5 @@ # bootstrap build system -cmake_minimum_required(VERSION 2.8.11) +cmake_minimum_required(VERSION 3.3) enable_language(Fortran) project(vts-mapproxy) # by default, this is OSS build (can be overrided by customer machinery) @@ -58,7 +58,7 @@ include_directories(${EIGEN3_INCLUDE_DIR}) find_package(ICU COMPONENTS uc i18n REQUIRED) include_directories(${ICU_INCLUDE_DIRS}) -enable_python(2.7) +enable_python(3) include_directories(${PYTHONLIBS_INCLUDE_DIRS}) find_package(TinyXML2 REQUIRED) diff --git a/mapproxy/src/generatevrtwo/generatevrtwo.cpp b/mapproxy/src/generatevrtwo/generatevrtwo.cpp index e637a74..11ecd5c 100644 --- a/mapproxy/src/generatevrtwo/generatevrtwo.cpp +++ b/mapproxy/src/generatevrtwo/generatevrtwo.cpp @@ -396,7 +396,11 @@ void VrtDs::addSimpleSource(int band, const fs::path &filename // try to create simple source from parsed string std::unique_ptr< ::VRTSimpleSource> src(new ::VRTSimpleSource()); -#if GDAL_VERSION_NUM >= 2040000 +#if GDAL_VERSION_NUM >= 3000000 + std::map dsMap; + if (src->XMLInit(xmlNodeFromString(os.str()).get(), nullptr, nullptr + , dsMap) != CE_None) +#elif GDAL_VERSION_NUM >= 2040000 if (src->XMLInit(xmlNodeFromString(os.str()).get(), nullptr, nullptr) != CE_None) #else @@ -665,9 +669,9 @@ bool compare(const geo::GeoDataset::Block &block, const math::Size2 &size return compareValue(block.data, size, value); case ::GDT_UInt32: - return compareValue(block.data, size, value); - case ::GDT_Int32: + // use signed comparison for unsigned int since OpenCV 4 has no + // specialization for unsigned int return compareValue(block.data, size, value); case ::GDT_Float32: diff --git a/mapproxy/src/mapproxy/generator/tms-raster-patchwork.cpp b/mapproxy/src/mapproxy/generator/tms-raster-patchwork.cpp index 6d61110..8cc03e3 100644 --- a/mapproxy/src/mapproxy/generator/tms-raster-patchwork.cpp +++ b/mapproxy/src/mapproxy/generator/tms-raster-patchwork.cpp @@ -37,6 +37,7 @@ #include "imgproc/rastermask/cvmat.hpp" #include "imgproc/png.hpp" +#include "imgproc/cvcompat.hpp" #include "jsoncpp/json.hpp" #include "jsoncpp/as.hpp" @@ -136,7 +137,7 @@ cv::Mat TmsRasterPatchwork::generateTileImage(const vts::TileId &tileId) const }()); const auto label(boost::lexical_cast(tileId)); - const auto face(CV_FONT_HERSHEY_COMPLEX_SMALL); + const auto face(IMGPROC_FONT_HERSHEY(COMPLEX_SMALL)); const int thickness(1); int baseline; const auto size(cv::getTextSize(label, face, 1.0 diff --git a/mapproxy/src/mapproxy/support/mmapped/qtree-rasterize.hpp b/mapproxy/src/mapproxy/support/mmapped/qtree-rasterize.hpp index 9183fb1..4025bec 100644 --- a/mapproxy/src/mapproxy/support/mmapped/qtree-rasterize.hpp +++ b/mapproxy/src/mapproxy/support/mmapped/qtree-rasterize.hpp @@ -27,7 +27,7 @@ #ifndef mapproxy_support_qtree_rasterize_hpp_included_ #define mapproxy_support_qtree_rasterize_hpp_included_ -#include +#include "imgproc/gil.hpp" #include "dbglog/dbglog.hpp"