From 103f5d90de7a3e2ad2ad2a99fee5c5b69eff1a3a Mon Sep 17 00:00:00 2001 From: Vaclav Blazek Date: Fri, 12 Mar 2021 19:07:04 +0100 Subject: [PATCH 1/6] using v5 metatiles --- externals/libmath | 2 +- externals/vts-libs | 2 +- mapproxy/src/mapproxy/generator/metatile.cpp | 19 +++++++++++-------- .../mapproxy/generator/surface-spheroid.cpp | 12 ++++++------ 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/externals/libmath b/externals/libmath index 551c5fd..6b5b07e 160000 --- a/externals/libmath +++ b/externals/libmath @@ -1 +1 @@ -Subproject commit 551c5fdbfd95b42d5d1049bc322c70cea6fa7b3c +Subproject commit 6b5b07e2074d8faab044cd80b4f309c9b53a202e diff --git a/externals/vts-libs b/externals/vts-libs index f533edf..f5bff04 160000 --- a/externals/vts-libs +++ b/externals/vts-libs @@ -1 +1 @@ -Subproject commit f533edf55458ca2100cffcdb11af5c88c390a105 +Subproject commit f5bff04cde00ccb9cda5f57681cf9a535b036ffe diff --git a/mapproxy/src/mapproxy/generator/metatile.cpp b/mapproxy/src/mapproxy/generator/metatile.cpp index d564a50..55488da 100644 --- a/mapproxy/src/mapproxy/generator/metatile.cpp +++ b/mapproxy/src/mapproxy/generator/metatile.cpp @@ -70,10 +70,13 @@ struct Sample { , max(conv(math::Point3(x, y, value[2]))) , heightRange(navConv(math::Point3(x, y, value[1]))(2) , navConv(math::Point3(x, y, value[2]))(2)) - , ge(geConv(math::Point3(x, y, value[1]))(2) - , geConv(math::Point3(x, y, value[2]))(2) - , geConv(math::Point3(x, y, value[0]))(2)) - {} + { + // ge is invalid so far, update it with extremes + vts::update(ge, geConv(math::Point3(x, y, value[1]))); + vts::update(ge, geConv(math::Point3(x, y, value[2]))); + // set surrogate + ge.surrogate = geConv(math::Point3(x, y, value[0]))(2); + } }; const Sample* getSample(const Sample &sample) @@ -356,7 +359,7 @@ metatileFromDemImpl(const vts::TileId &tileId, Sink &sink, Arsenal &arsenal // compute tile extents and height range auto heightRange(HeightRange::emptyRange()); - math::Extents3 te(math::InvalidExtents{}); + // math::Extents3 te(math::InvalidExtents{}); double area(0.0); int triangleCount(0); double avgHeightSum(0.f); @@ -373,8 +376,8 @@ metatileFromDemImpl(const vts::TileId &tileId, Sink &sink, Arsenal &arsenal // update tile extents (if sample valid) if (p) { // update by both minimum and maximum - math::update(te, p->min); - math::update(te, p->max); + // math::update(te, p->min); + // math::update(te, p->max); vts::update(node.geomExtents, p->ge); avgHeightSum += p->ge.surrogate; ++avgHeightCount; @@ -403,7 +406,7 @@ metatileFromDemImpl(const vts::TileId &tileId, Sink &sink, Arsenal &arsenal setChildren(block, nodeId, node); // set extents - node.extents = vr::normalizedExtents(rf, te); + // node.extents = vr::normalizedExtents(rf, te); // build height range node.heightRange.min = std::floor(heightRange.min); diff --git a/mapproxy/src/mapproxy/generator/surface-spheroid.cpp b/mapproxy/src/mapproxy/generator/surface-spheroid.cpp index cca3afb..ea67892 100644 --- a/mapproxy/src/mapproxy/generator/surface-spheroid.cpp +++ b/mapproxy/src/mapproxy/generator/surface-spheroid.cpp @@ -368,7 +368,7 @@ void SurfaceSpheroid::generateMetatile(const vts::TileId &tileId // compute tile extents and height range auto heightRange(vs::Range::emptyRange()); - math::Extents3 te(math::InvalidExtents{}); + // math::Extents3 te(math::InvalidExtents{}); double area(0); int triangleCount(0); double avgHeightSum(0.f); @@ -383,14 +383,14 @@ void SurfaceSpheroid::generateMetatile(const vts::TileId &tileId // update tile extents (if point valid) if (p) { - math::update(te, *p); + // math::update(te, *p); // convert point to proper SDS - const auto sdsHeight(geConv(*p)[2]); + const auto sdPoint(geConv(*p)); // update geom extents - vts::update(node.geomExtents, sdsHeight); + vts::update(node.geomExtents, sdPoint); // accumulate average height (surrogate) calculator - avgHeightSum += sdsHeight; + avgHeightSum += sdPoint(2); ++avgHeightCount; } @@ -424,7 +424,7 @@ void SurfaceSpheroid::generateMetatile(const vts::TileId &tileId } // set extents - node.extents = vr::normalizedExtents(rf, te); + // node.extents = vr::normalizedExtents(rf, te); // build height range node.heightRange.min = std::floor(heightRange.min); From e6aac2691cffa4b06e7a36c7bf38cbad43a42f77 Mon Sep 17 00:00:00 2001 From: Vaclav Blazek Date: Wed, 17 Mar 2021 14:19:29 +0100 Subject: [PATCH 2/6] updated libhttp --- externals/libhttp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externals/libhttp b/externals/libhttp index 2e4f289..bdcf800 160000 --- a/externals/libhttp +++ b/externals/libhttp @@ -1 +1 @@ -Subproject commit 2e4f28968c2000a7832d4c16ff1398265c5bff16 +Subproject commit bdcf800b90c5f1f61da5941fba422976fdb079c3 From d86019303aaf54ca5116b4205de238fe1eec58ea Mon Sep 17 00:00:00 2001 From: Vaclav Blazek Date: Mon, 22 Mar 2021 19:19:52 +0100 Subject: [PATCH 3/6] updated dependencies --- externals/buildsys/cmake | 2 +- externals/buildsys/common | 2 +- externals/libgeo | 2 +- externals/libgeometry | 2 +- externals/libutility | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/externals/buildsys/cmake b/externals/buildsys/cmake index 543c567..334236f 160000 --- a/externals/buildsys/cmake +++ b/externals/buildsys/cmake @@ -1 +1 @@ -Subproject commit 543c567cfde952744a76a13ee893f2fc740435c2 +Subproject commit 334236f117fdb6b6c0002f74d84c7dc9d24f0c82 diff --git a/externals/buildsys/common b/externals/buildsys/common index 854bf8c..fd46f9e 160000 --- a/externals/buildsys/common +++ b/externals/buildsys/common @@ -1 +1 @@ -Subproject commit 854bf8c51cc26a77c94690acef0d63d92cb77303 +Subproject commit fd46f9e4f57ee3bcdbd377fdb26cde3b9daa2940 diff --git a/externals/libgeo b/externals/libgeo index cb59d65..776545e 160000 --- a/externals/libgeo +++ b/externals/libgeo @@ -1 +1 @@ -Subproject commit cb59d65e10938429d751bab148d2f7dfa0e0aa25 +Subproject commit 776545eb1b0d9a44368e47fb09814993329f5beb diff --git a/externals/libgeometry b/externals/libgeometry index fce4068..003c58c 160000 --- a/externals/libgeometry +++ b/externals/libgeometry @@ -1 +1 @@ -Subproject commit fce40686fca1d97a87d3ebf2d45f0003a5597e20 +Subproject commit 003c58cf92e46ac01d506987f47b770929cc799b diff --git a/externals/libutility b/externals/libutility index 9b817ae..50fb688 160000 --- a/externals/libutility +++ b/externals/libutility @@ -1 +1 @@ -Subproject commit 9b817aec16f75429fc3cba96093b0e9196266a6e +Subproject commit 50fb6885611040249576db584cc9de535c1d4d19 From 7586e21fe1bef7df066d6711056d11de4a52d027 Mon Sep 17 00:00:00 2001 From: Vaclav Blazek Date: Wed, 31 Mar 2021 17:13:01 +0200 Subject: [PATCH 4/6] using metatile v.5 --- externals/vts-libs | 2 +- mapproxy/src/mapproxy/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/externals/vts-libs b/externals/vts-libs index f5bff04..a2c1516 160000 --- a/externals/vts-libs +++ b/externals/vts-libs @@ -1 +1 @@ -Subproject commit f5bff04cde00ccb9cda5f57681cf9a535b036ffe +Subproject commit a2c15165da0667535265e97df9ad5a1ae6f1907f diff --git a/mapproxy/src/mapproxy/CMakeLists.txt b/mapproxy/src/mapproxy/CMakeLists.txt index e6c2c46..8637980 100644 --- a/mapproxy/src/mapproxy/CMakeLists.txt +++ b/mapproxy/src/mapproxy/CMakeLists.txt @@ -68,7 +68,7 @@ define_module(LIBRARY mapproxy-core DEPENDS qmf semantic pysupport pydbglog - vts-libs>=2.4 http>=1.0 geo>=1.28 geometry>=1.7 + vts-libs>=2.18 http>=1.0 geo>=1.28 geometry>=1.7 jsoncpp>=2.1 Boost_SERIALIZATION From 50032d2a738b3b9cf5b579b88c24ce031f69a7e4 Mon Sep 17 00:00:00 2001 From: Vaclav Blazek Date: Wed, 31 Mar 2021 17:16:44 +0200 Subject: [PATCH 5/6] updated for future boost version --- mapproxy/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mapproxy/CMakeLists.txt b/mapproxy/CMakeLists.txt index 44110b5..bb229b6 100644 --- a/mapproxy/CMakeLists.txt +++ b/mapproxy/CMakeLists.txt @@ -11,10 +11,17 @@ enable_OpenMP() find_package(Boost 1.46 REQUIRED COMPONENTS thread program_options filesystem system date_time - serialization regex chrono iostreams) + serialization regex chrono iostreams) link_directories(${Boost_LIBRARY_DIRS}) include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) +if(${Boost_VERSION_MAJOR}.${Boost_VERSION_MINOR} VERSION_GREATER_EQUAL 1.73) + # Since Boost.Python and Boost.Iostreams in Boost >=1.73 still include + # deprecated headers we need to silence compiler + add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS + -DBOOST_ALLOW_DEPRECATED_HEADERS) +endif() + find_package(OpenCV REQUIRED) find_package(GDAL REQUIRED) From 16b3a6c5a17b1c62c0e45da39d62ace265b4eed6 Mon Sep 17 00:00:00 2001 From: Vaclav Blazek Date: Wed, 31 Mar 2021 18:11:30 +0200 Subject: [PATCH 6/6] updated dependencies --- externals/buildsys/cmake | 2 +- externals/libgeo | 2 +- externals/libmath | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/externals/buildsys/cmake b/externals/buildsys/cmake index 334236f..b1f4435 160000 --- a/externals/buildsys/cmake +++ b/externals/buildsys/cmake @@ -1 +1 @@ -Subproject commit 334236f117fdb6b6c0002f74d84c7dc9d24f0c82 +Subproject commit b1f4435ec4e3729018b37757365c812637a1a331 diff --git a/externals/libgeo b/externals/libgeo index 776545e..674ddcf 160000 --- a/externals/libgeo +++ b/externals/libgeo @@ -1 +1 @@ -Subproject commit 776545eb1b0d9a44368e47fb09814993329f5beb +Subproject commit 674ddcff0b8b32db952a716f650a554ee4e66d4a diff --git a/externals/libmath b/externals/libmath index 6b5b07e..3d530c8 160000 --- a/externals/libmath +++ b/externals/libmath @@ -1 +1 @@ -Subproject commit 6b5b07e2074d8faab044cd80b4f309c9b53a202e +Subproject commit 3d530c8b064745db8c34c481b8d2e2f508f2c388