Be more consistent about when longitudes beyond 180 are allowed

This commit is contained in:
Eric Fischer
2019-04-12 12:12:14 -07:00
parent b147ff22b1
commit 4d3e30773f
6 changed files with 44 additions and 7 deletions
+4 -3
View File
@@ -1214,9 +1214,6 @@ struct write_tile_args {
bool clip_to_tile(serial_feature &sf, int z, long long buffer) {
int quick = quick_check(sf.bbox, z, buffer);
if (quick == 0) {
return true;
}
if (z == 0) {
if (sf.bbox[0] <= (1LL << 32) * buffer / 256 || sf.bbox[2] >= (1LL << 32) - ((1LL << 32) * buffer / 256)) {
@@ -1244,6 +1241,10 @@ bool clip_to_tile(serial_feature &sf, int z, long long buffer) {
}
}
if (quick == 0) {
return true;
}
// Can't accept the quick check if guaranteeing no duplication, since the
// overlap might have been in the buffer.
if (quick != 1 || prevent[P_DUPLICATION]) {