Fix cases where nodes were not being added at the tile boundary

This commit is contained in:
Erica Fischer
2023-05-24 12:27:16 -07:00
parent 8ef605393a
commit 5a022b1cdb
2 changed files with 23 additions and 6 deletions
+9 -1
View File
@@ -1408,10 +1408,18 @@ bool clip_to_tile(serial_feature &sf, int z, long long buffer) {
}
}
if (quick == 0) {
if (quick == 0) { // entirely outside the tile
return true;
}
// if quick == 3 the feature touches the buffer, not just the tile proper,
// so we need to clip to add intersection points at the tile edge.
// if quick == 2 it touches the buffer and beyond, so likewise
// if quick == 1 we should be able to get away without clipping, because
// the feature is entirely within the tile proper.
// 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]) {