diff --git a/README.md b/README.md index a7630b41..3510dfe4 100644 --- a/README.md +++ b/README.md @@ -309,6 +309,17 @@ and perhaps make install +Tippecanoe now requires features from the 2014 C++ standard. If your compiler is older than +that, you will need to install a newer one. On MacOS, updating to the lastest XCode should +get you a new enough version of `clang++`. On Linux, you should be able to upgrade `g++` with + +``` +sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test +sudo apt-get update -y +sudo apt-get install -y g++-5 +export CXX=g++-5 +``` + Examples ------ diff --git a/geojson.cpp b/geojson.cpp index 2e6a83b1..005c4f2c 100644 --- a/geojson.cpp +++ b/geojson.cpp @@ -155,17 +155,32 @@ int serialize_geometry(json_object *geometry, json_object *properties, json_obje id_value = strtoull(id->string, &err, 10); if (err != NULL && *err != '\0') { - fprintf(stderr, "Warning: Can't represent non-integer feature ID %s\n", id->string); + static bool warned_frac = false; + + if (!warned_frac) { + fprintf(stderr, "Warning: Can't represent non-integer feature ID %s\n", id->string); + warned_frac = true; + } } else { has_id = true; } } else { - fprintf(stderr, "Warning: Can't represent negative feature ID %s\n", id->string); + static bool warned_neg = false; + + if (!warned_neg) { + fprintf(stderr, "Warning: Can't represent negative feature ID %s\n", id->string); + warned_neg = true; + } } } else { - char *s = json_stringify(id); - fprintf(stderr, "Warning: Can't represent non-numeric feature ID %s\n", s); - free(s); // stringify + static bool warned_nan = false; + + if (!warned_nan) { + char *s = json_stringify(id); + fprintf(stderr, "Warning: Can't represent non-numeric feature ID %s\n", s); + free(s); // stringify + warned_nan = true; + } } } diff --git a/man/tippecanoe.1 b/man/tippecanoe.1 index 08f07c81..664d2aea 100644 --- a/man/tippecanoe.1 +++ b/man/tippecanoe.1 @@ -369,6 +369,19 @@ and perhaps make install .fi .RE +.PP +Tippecanoe now requires features from the 2014 C++ standard. If your compiler is older than +that, you will need to install a newer one. On MacOS, updating to the lastest XCode should +get you a new enough version of \fB\fCclang++\fR\&. On Linux, you should be able to upgrade \fB\fCg++\fR with +.PP +.RS +.nf +sudo add\-apt\-repository \-y ppa:ubuntu\-toolchain\-r/test +sudo apt\-get update \-y +sudo apt\-get install \-y g++\-5 +export CXX=g++\-5 +.fi +.RE .SH Examples .PP Check out some examples of maps made with tippecanoe \[la]MADE_WITH.md\[ra]