This is an automated email from the git hooks/post-receive script. sebastic pushed a commit to branch master in repository mapnik-vector-tile.
commit c3fc3ec298196c89ba8a7b4838c244caf4f53834 Author: Bas Couwenberg <[email protected]> Date: Fri Mar 25 00:20:50 2016 +0100 Imported Upstream version 1.0.5+dfsg --- .npmignore | 1 + .travis.yml | 6 ++- CHANGELOG.md | 5 ++ Makefile | 2 +- bench/vtile-decode.cpp | 2 +- bench/vtile-encode.cpp | 2 +- bench/vtile-transform.cpp | 2 +- bin/vtile-edit.cpp | 2 +- bootstrap.sh | 7 ++- package.json | 2 +- src/vector_tile_geometry_intersects.cpp | 2 - src/vector_tile_geometry_intersects.hpp | 55 --------------------- src/vector_tile_geometry_intersects.ipp | 84 -------------------------------- src/vector_tile_processor.ipp | 1 - test/data/0.0.0.vector-b.mvt | Bin 2840 -> 2840 bytes test/geometry_visual_test.cpp | 2 +- test/test_utils.cpp | 4 +- test/utils/geometry_equal.hpp | 34 ++++++------- test/vector_tile.cpp | 2 +- test/vector_tile_pbf.cpp | 2 +- 20 files changed, 42 insertions(+), 175 deletions(-) diff --git a/.npmignore b/.npmignore index 77504b7..e8ee82f 100644 --- a/.npmignore +++ b/.npmignore @@ -19,4 +19,5 @@ gyp test CONTRIBUTING.md bootstrap.sh +bin bench diff --git a/.travis.yml b/.travis.yml index 77823e8..610888b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,11 +34,13 @@ matrix: - os: osx compiler: clang env: JOBS=10 COVERAGE=true BUILDTYPE=Debug - sudo: false + # https://docs.travis-ci.com/user/languages/objective-c/#Supported-OS-X-iOS-SDK-versions + osx_image: xcode7.3 # upgrades clang from 6 -> 7 - os: osx compiler: clang env: JOBS=10 - sudo: false + # https://docs.travis-ci.com/user/languages/objective-c/#Supported-OS-X-iOS-SDK-versions + osx_image: xcode7.3 # upgrades clang from 6 -> 7 before_install: - source ./bootstrap.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index d767b5d..5d6a1ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 1.0.5 + +- Several updates to the version of the clipper used. +- Removed the code and its requirements in `vector_tile_geometry_intersects.hpp` as it is no longer used. + ## 1.0.4 - Updated the version of the clipper again, fixing more problems with intersections. diff --git a/Makefile b/Makefile index df4348f..234363e 100755 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ MAPNIK_PLUGINDIR := $(shell mapnik-config --input-plugins) BUILDTYPE ?= Release -CLIPPER_REVISION=150f2c4f58a72c051bcad76c84f10362797bf5ab +CLIPPER_REVISION=3eb6a85910affdf070927bba3b6ab12a67a1381b PROTOZERO_REVISION=v1.3.0 GYP_REVISION=3464008 diff --git a/bench/vtile-decode.cpp b/bench/vtile-decode.cpp index ec11da5..2bb8313 100644 --- a/bench/vtile-decode.cpp +++ b/bench/vtile-decode.cpp @@ -25,7 +25,7 @@ int main(int argc, char** argv) } std::string vtile(argv[1]); mapnik::util::file input(vtile); - if (!input.open()) + if (!input.is_open()) { std::clog << std::string("failed to open ") + vtile << "\n"; return -1; diff --git a/bench/vtile-encode.cpp b/bench/vtile-encode.cpp index 1059a89..bc15088 100644 --- a/bench/vtile-encode.cpp +++ b/bench/vtile-encode.cpp @@ -101,7 +101,7 @@ int main(int argc, char** argv) // No features in geojson so lets try to process it differently as // it might be a partial geojson and we can use from_geojson mapnik::util::file input(geojson_file); - if (!input.open()) + if (!input.is_open()) { std::clog << "failed to open " << geojson_file << std::endl; return -1; diff --git a/bench/vtile-transform.cpp b/bench/vtile-transform.cpp index ae39f4e..d279c3f 100644 --- a/bench/vtile-transform.cpp +++ b/bench/vtile-transform.cpp @@ -39,7 +39,7 @@ int main() z15_extent,0,0); std::string geojson_file("./test/data/poly.geojson"); mapnik::util::file input(geojson_file); - if (!input.open()) + if (!input.is_open()) { throw std::runtime_error("failed to open geojson"); } diff --git a/bin/vtile-edit.cpp b/bin/vtile-edit.cpp index 7b3b54b..668482f 100644 --- a/bin/vtile-edit.cpp +++ b/bin/vtile-edit.cpp @@ -18,7 +18,7 @@ int main(int argc, char** argv) } std::string vtile(argv[1]); mapnik::util::file input(vtile); - if (!input.open()) + if (!input.is_open()) { std::clog << std::string("failed to open ") + vtile << "\n"; return -1; diff --git a/bootstrap.sh b/bootstrap.sh index 6be6c65..01767a2 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,11 +1,14 @@ #!/usr/bin/env bash +MASON_VERSION="694d08c" + function setup_mason() { if [[ ! -d ./.mason ]]; then - git clone --depth 1 https://github.com/mapbox/mason.git ./.mason + git clone https://github.com/mapbox/mason.git ./.mason + git checkout ${MASON_VERSION} else echo "Updating to latest mason" - (cd ./.mason && git pull) + (cd ./.mason && git fetch && git checkout ${MASON_VERSION}) fi export MASON_DIR=$(pwd)/.mason export PATH=$(pwd)/.mason:$PATH diff --git a/package.json b/package.json index a8db03d..5263cde 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mapnik-vector-tile", - "version": "1.0.4", + "version": "1.0.5", "description": "Mapnik Vector Tile API", "main": "./package.json", "repository" : { diff --git a/src/vector_tile_geometry_intersects.cpp b/src/vector_tile_geometry_intersects.cpp deleted file mode 100644 index 2238228..0000000 --- a/src/vector_tile_geometry_intersects.cpp +++ /dev/null @@ -1,2 +0,0 @@ -#include "vector_tile_geometry_intersects.hpp" -#include "vector_tile_geometry_intersects.ipp" diff --git a/src/vector_tile_geometry_intersects.hpp b/src/vector_tile_geometry_intersects.hpp deleted file mode 100644 index 1b71109..0000000 --- a/src/vector_tile_geometry_intersects.hpp +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef __MAPNIK_VECTOR_TILE_GEOMETRY_INTERSECTS_H__ -#define __MAPNIK_VECTOR_TILE_GEOMETRY_INTERSECTS_H__ - -// mapnik-vector-tile -#include "vector_tile_config.hpp" - -// mapnik -#include <mapnik/box2d.hpp> -#include <mapnik/geometry.hpp> -#include <mapnik/util/variant.hpp> - -namespace mapnik -{ - -namespace vector_tile_impl -{ - -struct geometry_intersects -{ - MAPNIK_VECTOR_INLINE geometry_intersects(mapnik::box2d<double> const& extent); - - MAPNIK_VECTOR_INLINE bool operator() (mapnik::geometry::geometry_empty const& geom); - - MAPNIK_VECTOR_INLINE bool operator() (mapnik::geometry::point<double> const& geom); - - MAPNIK_VECTOR_INLINE bool operator() (mapnik::geometry::multi_point<double> const& geom); - - MAPNIK_VECTOR_INLINE bool operator() (mapnik::geometry::geometry_collection<double> const& geom); - - MAPNIK_VECTOR_INLINE bool operator() (mapnik::geometry::line_string<double> const& geom); - - MAPNIK_VECTOR_INLINE bool operator() (mapnik::geometry::multi_line_string<double> const& geom); - - MAPNIK_VECTOR_INLINE bool operator() (mapnik::geometry::polygon<double> const& geom); - - MAPNIK_VECTOR_INLINE bool operator() (mapnik::geometry::multi_polygon<double> const& geom); - - mapnik::geometry::linear_ring<double> extent_; -}; - -inline bool intersects(mapnik::box2d<double> const& extent, mapnik::geometry::geometry<double> const& geom) -{ - return mapnik::util::apply_visitor(geometry_intersects(extent), geom); -} - -} // end ns vector_tile_impl - -} // end ns mapnik - -#if !defined(MAPNIK_VECTOR_TILE_LIBRARY) -#include "vector_tile_geometry_intersects.ipp" -#endif - -#endif // __MAPNIK_VECTOR_GEOMETRY_INTERSECTS_H__ - diff --git a/src/vector_tile_geometry_intersects.ipp b/src/vector_tile_geometry_intersects.ipp deleted file mode 100644 index 32fbc56..0000000 --- a/src/vector_tile_geometry_intersects.ipp +++ /dev/null @@ -1,84 +0,0 @@ -// mapnik -#include <mapnik/box2d.hpp> -#include <mapnik/geometry.hpp> -#include <mapnik/geometry_adapters.hpp> - -// boost -#include <boost/geometry.hpp> - -namespace mapnik -{ - -namespace vector_tile_impl -{ - -MAPNIK_VECTOR_INLINE geometry_intersects::geometry_intersects(mapnik::box2d<double> const & extent) - : extent_() -{ - extent_.reserve(5); - extent_.emplace_back(extent.minx(),extent.miny()); - extent_.emplace_back(extent.maxx(),extent.miny()); - extent_.emplace_back(extent.maxx(),extent.maxy()); - extent_.emplace_back(extent.minx(),extent.maxy()); - extent_.emplace_back(extent.minx(),extent.miny()); -} - -MAPNIK_VECTOR_INLINE bool geometry_intersects::operator() (mapnik::geometry::geometry_empty const& ) -{ - return false; -} - -MAPNIK_VECTOR_INLINE bool geometry_intersects::operator() (mapnik::geometry::point<double> const& ) -{ - // The query should gaurantee that a point is within the bounding box! - return true; -} - -MAPNIK_VECTOR_INLINE bool geometry_intersects::operator() (mapnik::geometry::multi_point<double> const& geom) -{ - for (auto const& g : geom) - { - if (boost::geometry::intersects(g, extent_)) - { - return true; - } - } - return false; -} - -MAPNIK_VECTOR_INLINE bool geometry_intersects::operator() (mapnik::geometry::line_string<double> const& geom) -{ - return boost::geometry::intersects(geom, extent_); -} - -MAPNIK_VECTOR_INLINE bool geometry_intersects::operator() (mapnik::geometry::multi_line_string<double> const& geom) -{ - return boost::geometry::intersects(geom, extent_); -} - -MAPNIK_VECTOR_INLINE bool geometry_intersects::operator() (mapnik::geometry::polygon<double> const& geom) -{ - return boost::geometry::intersects(geom, extent_); -} - -MAPNIK_VECTOR_INLINE bool geometry_intersects::operator() (mapnik::geometry::multi_polygon<double> const& geom) -{ - return boost::geometry::intersects(geom, extent_); -} - -MAPNIK_VECTOR_INLINE bool geometry_intersects::operator() (mapnik::geometry::geometry_collection<double> const& geom) -{ - for (auto const& g : geom) - { - if (mapnik::util::apply_visitor(*this, g)) - { - return true; - } - } - return false; -} - -} // end ns vector_tile_impl - -} // end ns mapnik - diff --git a/src/vector_tile_processor.ipp b/src/vector_tile_processor.ipp index c5bdc04..bf8aa33 100644 --- a/src/vector_tile_processor.ipp +++ b/src/vector_tile_processor.ipp @@ -1,7 +1,6 @@ // mapnik-vector-tile #include "vector_tile_geometry_clipper.hpp" #include "vector_tile_geometry_feature.hpp" -#include "vector_tile_geometry_intersects.hpp" #include "vector_tile_geometry_simplifier.hpp" #include "vector_tile_raster_clipper.hpp" #include "vector_tile_strategy.hpp" diff --git a/test/data/0.0.0.vector-b.mvt b/test/data/0.0.0.vector-b.mvt index 4ab38ac..25b6972 100644 Binary files a/test/data/0.0.0.vector-b.mvt and b/test/data/0.0.0.vector-b.mvt differ diff --git a/test/geometry_visual_test.cpp b/test/geometry_visual_test.cpp index 16698ea..e77e1ff 100644 --- a/test/geometry_visual_test.cpp +++ b/test/geometry_visual_test.cpp @@ -152,7 +152,7 @@ void clip_geometry(mapnik::Map const& map, else { mapnik::util::file input(file_path); - if (!input.open()) + if (!input.is_open()) { throw std::runtime_error("failed to open test geojson"); } diff --git a/test/test_utils.cpp b/test/test_utils.cpp index 5a3fca8..31b722a 100644 --- a/test/test_utils.cpp +++ b/test/test_utils.cpp @@ -61,7 +61,7 @@ std::shared_ptr<mapnik::memory_datasource> build_ds(double x,double y, bool seco std::shared_ptr<mapnik::memory_datasource> build_geojson_ds(std::string const& geojson_file) { mapnik::util::file input(geojson_file); - if (!input.open()) + if (!input.is_open()) { throw std::runtime_error("failed to open geojson"); } @@ -95,7 +95,7 @@ mapnik::datasource_ptr build_geojson_fs_ds(std::string const& geojson_file) mapnik::geometry::geometry<double> read_geojson(std::string const& geojson_file) { mapnik::util::file input(geojson_file); - if (!input.open()) + if (!input.is_open()) { throw std::runtime_error("failed to open geojson"); } diff --git a/test/utils/geometry_equal.hpp b/test/utils/geometry_equal.hpp index fa53446..65b0ee7 100644 --- a/test/utils/geometry_equal.hpp +++ b/test/utils/geometry_equal.hpp @@ -98,10 +98,8 @@ std::string type_name() return tname; } -using namespace mapnik::geometry; - template <typename T> -void assert_g_equal(geometry<T> const& g1, geometry<T> const& g2); +void assert_g_equal(mapnik::geometry::geometry<T> const& g1, mapnik::geometry::geometry<T> const& g2); struct geometry_equal_visitor { @@ -114,20 +112,20 @@ struct geometry_equal_visitor REQUIRE(false); } - void operator() (geometry_empty const&, geometry_empty const&) + void operator() (mapnik::geometry::geometry_empty const&, mapnik::geometry::geometry_empty const&) { REQUIRE(true); } template <typename T> - void operator() (point<T> const& p1, point<T> const& p2) + void operator() (mapnik::geometry::point<T> const& p1, mapnik::geometry::point<T> const& p2) { REQUIRE(p1.x == Approx(p2.x)); REQUIRE(p1.y == Approx(p2.y)); } template <typename T> - void operator() (line_string<T> const& ls1, line_string<T> const& ls2) + void operator() (mapnik::geometry::line_string<T> const& ls1, mapnik::geometry::line_string<T> const& ls2) { if (ls1.size() != ls2.size()) { @@ -142,9 +140,9 @@ struct geometry_equal_visitor } template <typename T> - void operator() (polygon<T> const& p1, polygon<T> const& p2) + void operator() (mapnik::geometry::polygon<T> const& p1, mapnik::geometry::polygon<T> const& p2) { - (*this)(static_cast<line_string<T> const&>(p1.exterior_ring), static_cast<line_string<T> const&>(p2.exterior_ring)); + (*this)(static_cast<mapnik::geometry::line_string<T> const&>(p1.exterior_ring), static_cast<mapnik::geometry::line_string<T> const&>(p2.exterior_ring)); if (p1.interior_rings.size() != p2.interior_rings.size()) { @@ -153,18 +151,18 @@ struct geometry_equal_visitor for (auto const& p : zip_crange(p1.interior_rings, p2.interior_rings)) { - (*this)(static_cast<line_string<T> const&>(p.template get<0>()),static_cast<line_string<T> const&>(p.template get<1>())); + (*this)(static_cast<mapnik::geometry::line_string<T> const&>(p.template get<0>()),static_cast<mapnik::geometry::line_string<T> const&>(p.template get<1>())); } } template <typename T> - void operator() (multi_point<T> const& mp1, multi_point<T> const& mp2) + void operator() (mapnik::geometry::multi_point<T> const& mp1, mapnik::geometry::multi_point<T> const& mp2) { - (*this)(static_cast<line_string<T> const&>(mp1), static_cast<line_string<T> const&>(mp2)); + (*this)(static_cast<mapnik::geometry::line_string<T> const&>(mp1), static_cast<mapnik::geometry::line_string<T> const&>(mp2)); } template <typename T> - void operator() (multi_line_string<T> const& mls1, multi_line_string<T> const& mls2) + void operator() (mapnik::geometry::multi_line_string<T> const& mls1, mapnik::geometry::multi_line_string<T> const& mls2) { if (mls1.size() != mls2.size()) { @@ -178,7 +176,7 @@ struct geometry_equal_visitor } template <typename T> - void operator() (multi_polygon<T> const& mpoly1, multi_polygon<T> const& mpoly2) + void operator() (mapnik::geometry::multi_polygon<T> const& mpoly1, mapnik::geometry::multi_polygon<T> const& mpoly2) { if (mpoly1.size() != mpoly2.size()) { @@ -192,10 +190,10 @@ struct geometry_equal_visitor } template <typename T> - void operator() (mapnik::util::recursive_wrapper<geometry_collection<T> > const& c1_, mapnik::util::recursive_wrapper<geometry_collection<T> > const& c2_) + void operator() (mapnik::util::recursive_wrapper<mapnik::geometry::geometry_collection<T> > const& c1_, mapnik::util::recursive_wrapper<mapnik::geometry::geometry_collection<T> > const& c2_) { - geometry_collection<T> const& c1 = static_cast<geometry_collection<T> const&>(c1_); - geometry_collection<T> const& c2 = static_cast<geometry_collection<T> const&>(c2_); + mapnik::geometry::geometry_collection<T> const& c1 = static_cast<mapnik::geometry::geometry_collection<T> const&>(c1_); + mapnik::geometry::geometry_collection<T> const& c2 = static_cast<mapnik::geometry::geometry_collection<T> const&>(c2_); if (c1.size() != c2.size()) { REQUIRE(false); @@ -208,7 +206,7 @@ struct geometry_equal_visitor } template <typename T> - void operator() (geometry_collection<T> const& c1, geometry_collection<T> const& c2) + void operator() (mapnik::geometry::geometry_collection<T> const& c1, mapnik::geometry::geometry_collection<T> const& c2) { if (c1.size() != c2.size()) { @@ -223,7 +221,7 @@ struct geometry_equal_visitor }; template <typename T> -void assert_g_equal(geometry<T> const& g1, geometry<T> const& g2) +void assert_g_equal(mapnik::geometry::geometry<T> const& g1, mapnik::geometry::geometry<T> const& g2) { return mapnik::util::apply_visitor(geometry_equal_visitor(), g1, g2); } diff --git a/test/vector_tile.cpp b/test/vector_tile.cpp index 7a8edd7..d3175cf 100644 --- a/test/vector_tile.cpp +++ b/test/vector_tile.cpp @@ -96,7 +96,7 @@ TEST_CASE("vector tile from simplified geojson") CHECK( mapnik::util::to_geojson(geojson_string,projected_geom) ); std::string geojson_file = "./test/data/simplified_geometry.geojson"; mapnik::util::file input(geojson_file); - if (input.open()) + if (input.is_open()) { std::string json_string(input.data().get(), input.size()); CHECK (geojson_string == json_string); diff --git a/test/vector_tile_pbf.cpp b/test/vector_tile_pbf.cpp index 21fdb66..5c3f5d9 100644 --- a/test/vector_tile_pbf.cpp +++ b/test/vector_tile_pbf.cpp @@ -417,7 +417,7 @@ TEST_CASE("pbf vector tile from simplified geojson") CHECK( mapnik::util::to_geojson(geojson_string,projected_geom) ); std::string geojson_file = "./test/data/simplified_geometry_pbf.geojson"; mapnik::util::file input(geojson_file); - if (input.open()) + if (input.is_open()) { std::string json_string(input.data().get(), input.size()); CHECK (geojson_string == json_string); -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/mapnik-vector-tile.git _______________________________________________ Pkg-grass-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

