diff --git a/CMakeLists.txt b/CMakeLists.txt index 528300c..8dd2021 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,16 +11,9 @@ enable_testing() set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/build") -find_package(OpenMP) - # set compiler flags, see http://stackoverflow.com/questions/7724569/debug-vs-release-in-cmake -set(CMAKE_CXX_FLAGS "-march=native -Ofast -fno-signed-zeros -fno-trapping-math -Wall -Wno-format-extra-args -Wextra -Wformat-nonliteral -Wformat-security -Wformat=2 -Wextra -Wno-implicit-fallthrough -Wno-narrowing -pedantic") -set(CMAKE_C_FLAGS "-march=native -Ofast -fno-signed-zeros -fno-trapping-math -Wall -Wno-format-extra-args -Wextra -Wformat-nonliteral -Wformat-security -Wformat=2 -Wextra -Wno-implicit-fallthrough -Wno-narrowing -pedantic") - -if (OPENMP_FOUND) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") -endif() +set(CMAKE_CXX_FLAGS "-march=native -Ofast -ffast-math -fno-signed-zeros -fno-trapping-math -Wall -Wno-format-extra-args -Wextra -Wformat-nonliteral -Wformat-security -Wformat=2 -Wextra -Wno-implicit-fallthrough -Wno-narrowing -pedantic") +set(CMAKE_C_FLAGS "-march=native -Ofast -ffast-math -fno-signed-zeros -fno-trapping-math -Wall -Wno-format-extra-args -Wextra -Wformat-nonliteral -Wformat-security -Wformat=2 -Wextra -Wno-implicit-fallthrough -Wno-narrowing -pedantic") set(CMAKE_CXX_FLAGS_DEBUG "-Og -g -DLOGLEVEL=3") set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS} -DLOGLEVEL=2") diff --git a/src/spatialjoin/Sweeper.cpp b/src/spatialjoin/Sweeper.cpp index 921ea12..b7e0f29 100644 --- a/src/spatialjoin/Sweeper.cpp +++ b/src/spatialjoin/Sweeper.cpp @@ -41,7 +41,7 @@ using util::geo::intersectsLineStrict; using util::geo::LineSegment; using util::geo::webMercToLatLng; -const static size_t CUTOUTS_MIN_SIZE = 2000; +const static size_t CUTOUTS_MIN_SIZE = 100; const static size_t OBB_MIN_SIZE = 100; // _____________________________________________________________________________ @@ -134,14 +134,6 @@ void Sweeper::add(const I32Polygon& poly, const std::string& gid, const auto& hull = util::geo::convexHull(poly); I32XSortedPolygon spoly(poly); - if (!_cfg.useFastSweepSkip) { - spoly.setInnerMaxSegLen(std::numeric_limits::max()); - spoly.getOuter().setMaxSegLen(std::numeric_limits::max()); - for (auto& inner : spoly.getInners()) { - inner.setMaxSegLen(std::numeric_limits::max()); - } - } - double areaSize = area(poly); double outerAreaSize = outerArea(poly); BoxIdList boxIds; @@ -155,6 +147,14 @@ void Sweeper::add(const I32Polygon& poly, const std::string& gid, } } + if (!_cfg.useFastSweepSkip) { + spoly.setInnerMaxSegLen(std::numeric_limits::max()); + spoly.getOuter().setMaxSegLen(std::numeric_limits::max()); + for (auto& inner : spoly.getInners()) { + inner.setMaxSegLen(std::numeric_limits::max()); + } + } + util::geo::I32Polygon obb; obb = util::geo::convexHull(util::geo::getOrientedEnvelope(poly)); diff --git a/src/util b/src/util index a814647..4dad69a 160000 --- a/src/util +++ b/src/util @@ -1 +1 @@ -Subproject commit a8146475fb1cbeb0308fb2fccd2d046f5c6618c7 +Subproject commit 4dad69a295bf29170f1bb6df4762275582d44d9c