mapbox / mapnik-vector-tile

Mapnik implemention of Mapbox Vector Tile specification
BSD 3-Clause "New" or "Revised" License
553 stars 117 forks source link

Update to latest Mapnik API #193

Closed david-springer closed 8 years ago

david-springer commented 8 years ago

Update tests and benchmark code to the latest mapnik::util::file API - changed calls to file::is_open() to file::open().

Also updated the golden images for fixtures test.

make test now runs cleanly on my El Capitan Mac.

pnorman commented 8 years ago

Would this break compatibility with some versions of Mapnik?

david-springer commented 8 years ago

@pnorman: Good question. The version of Mapnik that was installed via brew install --with-gdal did not have the file::is_open() API - it has file::open() instead. The golden image update might break things, though. I ran all this on my Mac (El Cap 10.11.4) with these versions of clang and mapnik:

areyoukidding:mapnik-vector-tile daves$ **clang --version**
Apple LLVM version 7.3.0 (clang-703.0.29)
Target: x86_64-apple-darwin15.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
areyoukidding:mapnik-vector-tile daves$ **brew list mapnik**
/usr/local/Cellar/mapnik/3.0.9/bin/mapnik-config
/usr/local/Cellar/mapnik/3.0.9/bin/mapnik-index
/usr/local/Cellar/mapnik/3.0.9/bin/mapnik-render
/usr/local/Cellar/mapnik/3.0.9/bin/shapeindex
/usr/local/Cellar/mapnik/3.0.9/include/mapnik/ (444 files)
/usr/local/Cellar/mapnik/3.0.9/lib/libmapnik.dylib
/usr/local/Cellar/mapnik/3.0.9/lib/mapnik/ (30 files)
/usr/local/Cellar/mapnik/3.0.9/lib/ (2 other files)
pnorman commented 8 years ago

The version of Mapnik that was installed via brew install --with-gdal did not have the file::is_open() API - it has file::open() instead

If an API present in 3.0.x (x<9) is not present in 3.0.9 then this is a Mapnik bug as it violates their versioning and should be solved there.

david-springer commented 8 years ago

@pnorman Point taken. Maybe the best way for me to proceed is to work in my fork - these changes affect test code and not the core code of the tiler.

I'll close this PR for now, and maybe open a Mapnik issue about this API change. Thanks!