Make it an error, not a warning, to have missing coordinates for a point

This commit is contained in:
Eric Fischer 2018-11-26 14:50:45 -08:00
parent 506526ddfa
commit cf28e6b88b
4 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,7 @@
## 1.32.6
* Make it an error, not a warning, to have missing coordinates for a point
## 1.32.5
* Use less memory on lines and polygons that are too small for the tile

View File

@ -1142,7 +1142,7 @@ drawvec stairstep(drawvec &geom, int z, int detail) {
for (size_t i = 0; i < geom.size(); i++) {
if (geom[i].op == VT_MOVETO) {
out.push_back(geom[i]);
} else {
} else if (out.size() > 0) {
long long x0 = out[out.size() - 1].x;
long long y0 = out[out.size() - 1].y;
long long x1 = geom[i].x;
@ -1202,6 +1202,9 @@ drawvec stairstep(drawvec &geom, int z, int detail) {
}
// out.push_back(draw(VT_LINETO, xx, yy));
} else {
fprintf(stderr, "Can't happen: stairstepping lineto with no moveto\n");
exit(EXIT_FAILURE);
}
}

View File

@ -86,6 +86,7 @@ void parse_geometry(int t, json_object *j, drawvec &out, int op, const char *fna
fprintf(stderr, "%s:%d: malformed point\n", fname, line);
json_context(j);
json_context(feature);
exit(EXIT_FAILURE);
}
}

View File

@ -1,6 +1,6 @@
#ifndef VERSION_HPP
#define VERSION_HPP
#define VERSION "v1.32.5"
#define VERSION "v1.32.6"
#endif