diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..3960bb1 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,18 @@ +language: c + +sudo: false + +matrix: + include: + - os: linux + addons: + apt: + packages: [ 'protobuf-compiler', 'libprotobuf-dev' ] + + +install: + - make + +script: + - echo '{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[0,0]}}' > test.json + - ./tippecanoe -o test.mbtiles test.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 52a6daa..6ed8a05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.5.1 + +* Fix internal error when number of CPUs is not a power of 2 +* Add missing #include + ## 1.5.0 * Base zoom for dot-dropping can be specified independently of diff --git a/README.md b/README.md index 4f71c88..3ad7f94 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ tippecanoe Builds [vector tilesets](https://www.mapbox.com/developers/vector-tiles/) from large collections of [GeoJSON](http://geojson.org/) features. This is a tool for [making maps from huge datasets](MADE_WITH.md). +[![Build Status](https://travis-ci.org/mapbox/tippecanoe.svg)](https://travis-ci.org/mapbox/tippecanoe) + Intent ------ diff --git a/geojson.c b/geojson.c index 8544027..5378a92 100644 --- a/geojson.c +++ b/geojson.c @@ -71,6 +71,9 @@ void init_cpus() { CPUS = 1; } + // Round down to a power of 2 + CPUS = 1 << (int) (log(CPUS) / log(2)); + TEMP_FILES = 64; struct rlimit rl; if (getrlimit(RLIMIT_NOFILE, &rl) != 0) { diff --git a/tile.cc b/tile.cc index 6fe6509..f13ed6c 100644 --- a/tile.cc +++ b/tile.cc @@ -17,6 +17,7 @@ #include #include #include +#include #include "vector_tile.pb.h" #include "geometry.hh" diff --git a/version.h b/version.h index 955f192..21c9cfb 100644 --- a/version.h +++ b/version.h @@ -1 +1 @@ -#define VERSION "tippecanoe v1.5.0\n" +#define VERSION "tippecanoe v1.5.1\n"