From 16ca5cfeecf8479483394d7cbc7779c124ef2c74 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Thu, 17 Mar 2016 11:23:54 -0700 Subject: [PATCH] Clarify maximum resolution in README and warning --- CHANGELOG.md | 4 ++++ README.md | 4 ++++ geojson.c | 1 + man/tippecanoe.1 | 4 ++++ version.h | 2 +- 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dbe76d8..a0c252c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.9.3 + +* Don't get stuck in a loop trying to split up very small, very complicated polygons + ## 1.9.2 * Increase maximum tile size for tippecanoe-decode diff --git a/README.md b/README.md index 5a10435..b46b31f 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,10 @@ Options * -m _detail_: Minimum detail that it will try if tiles are too big at regular detail (default 7) * -b _pixels_: Buffer size where features are duplicated from adjacent tiles. Units are "screen pixels"--1/256th of the tile width or height. (default 5) +All internal math is done in terms of a 32-bit tile coordinate system, so 1/(2^32) of the size of Earth, +or about 1cm, is the smallest distinguishable distance. If _maxzoom_ + _detail_ > 32, no additional +resolution is obtained than by using a smaller _maxzoom_ or _detail_. + ### Properties * -x _name_: Exclude the named properties from all features diff --git a/geojson.c b/geojson.c index d1f024e..4c4382f 100644 --- a/geojson.c +++ b/geojson.c @@ -2268,6 +2268,7 @@ int main(int argc, char **argv) { geometry_scale = 32 - (full_detail + maxzoom); if (geometry_scale < 0) { geometry_scale = 0; + fprintf(stderr, "Full detail + maxzoom > 32, so you are asking for more detail than is available.\n"); } if ((basezoom < 0 || droprate < 0) && (gamma < 0)) { diff --git a/man/tippecanoe.1 b/man/tippecanoe.1 index 2d07947..1dd9ab5 100644 --- a/man/tippecanoe.1 +++ b/man/tippecanoe.1 @@ -102,6 +102,10 @@ compensate for the larger marker, or \-Bf\fInumber\fP to allow at most \fInumber .IP \(bu 2 \-b \fIpixels\fP: Buffer size where features are duplicated from adjacent tiles. Units are "screen pixels"\-\-1/256th of the tile width or height. (default 5) .RE +.PP +All internal math is done in terms of a 32\-bit tile coordinate system, so 1/(2 of the size of Earth, +or about 1cm, is the smallest distinguishable distance. If \fImaxzoom\fP + \fIdetail\fP > 32, no additional +resolution is obtained than by using a smaller \fImaxzoom\fP or \fIdetail\fP\&. .SS Properties .RS .IP \(bu 2 diff --git a/version.h b/version.h index a1d639e..1966d93 100644 --- a/version.h +++ b/version.h @@ -1 +1 @@ -#define VERSION "tippecanoe v1.9.2\n" +#define VERSION "tippecanoe v1.9.3\n"