Don't clip on read except in z0

This commit is contained in:
Erica Fischer
2024-02-02 11:23:15 -08:00
parent 23566e34d1
commit e507d82574
+4 -2
View File
@@ -526,7 +526,7 @@ void rewrite(drawvec &geom, int z, int nextzoom, int maxzoom, long long *bbox, u
geomfile[j]->serialize_long_long(feature.size(), &geompos[j], fname); geomfile[j]->serialize_long_long(feature.size(), &geompos[j], fname);
geomfile[j]->fwrite_check(feature.c_str(), sizeof(char), feature.size(), &geompos[j], fname); geomfile[j]->fwrite_check(feature.c_str(), sizeof(char), feature.size(), &geompos[j], fname);
} else { } else {
printf("clipped away\n"); // printf("clipped away\n");
} }
} }
} }
@@ -1638,10 +1638,12 @@ serial_feature next_feature(decompressor *geoms, std::atomic<long long> *geompos
// printf("%d/%d/%d: %lld,%lld\n", z, tx, ty, sf.geometry[0].x, sf.geometry[0].y); // printf("%d/%d/%d: %lld,%lld\n", z, tx, ty, sf.geometry[0].x, sf.geometry[0].y);
if (z == 0) { // in other zooms, features will have already been clipped
if (clip_to_tile(sf, z, buffer, true)) { if (clip_to_tile(sf, z, buffer, true)) {
printf("clipped away in %d\n", z); // printf("clipped away in %d\n", z);
continue; continue;
} }
}
if (sf.geometry.size() > 0) { if (sf.geometry.size() > 0) {
(*unclipped_features)++; (*unclipped_features)++;