mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 16:35:40 +02:00
Once features can't possibly fit in a tile, stop trying (#9)
* Stop adding features to a tile if it can't possibly work * Add --integer and --fraction options to tippecanoe-decode * Carry the strategies field from tileset metadata through tile-join * Update changelog * Assign different codes to different kinds of error exits
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <string.h>
|
||||
#include "milo/dtoa_milo.h"
|
||||
#include "milo/milo.h"
|
||||
#include "errors.hpp"
|
||||
|
||||
/**
|
||||
* Returns an empty string if `s` is valid utf8;
|
||||
@@ -132,7 +133,7 @@ int integer_zoom(std::string where, std::string text) {
|
||||
double d = atof(text.c_str());
|
||||
if (!isfinite(d) || d != floor(d) || d < 0 || d > 32) {
|
||||
fprintf(stderr, "%s: Expected integer zoom level in \"tippecanoe\" GeoJSON extension, not %s\n", where.c_str(), text.c_str());
|
||||
exit(EXIT_FAILURE);
|
||||
exit(EXIT_JSON);
|
||||
}
|
||||
return d;
|
||||
}
|
||||
@@ -179,7 +180,7 @@ char *dtoa_milo(double val) {
|
||||
char *dup = strdup(s.c_str());
|
||||
if (dup == NULL) {
|
||||
perror("strdup");
|
||||
exit(EXIT_FAILURE);
|
||||
exit(EXIT_MEMORY);
|
||||
}
|
||||
return dup;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user