Skip to content

Commit 02d352b

Browse files
authored
Merge pull request #98 from mapbox/linestring-clipping-bug
Linestring clipping bug
2 parents baf3b42 + df0f462 commit 02d352b

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

src/feature_builder.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ struct overzoomed_feature_builder
196196
bool valid = false;
197197
for (auto const& l : result)
198198
{
199-
valid = false;
200199
if (l.size() > 1)
201200
{
202201
feature_builder.add_linestring(static_cast<unsigned>(l.size()));
6.29 KB
Binary file not shown.

test/vtcomposite-linestrings.test.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,23 @@ test('[composite] overzooming success (linestring), with buffer - different zoom
7070
assert.end();
7171
});
7272
});
73+
74+
75+
test('[composite] overzooming success (linestring), with buffer - z14 -> z15', function(assert) {
76+
const buffer1 = fs.readFileSync(__dirname + '/fixtures/z15-road-segments.mvt');
77+
78+
const tiles = [
79+
{buffer: buffer1, z:15, x: 29570, y:20109}
80+
];
81+
82+
const zxy = {z:16, x:59140, y:40218};
83+
84+
composite(tiles, zxy, {buffer_size:4080}, (err, vtBuffer) => {
85+
assert.notOk(err);
86+
const outputInfo = vtinfo(vtBuffer);
87+
// Currently failing since it drops a very large feature when buffer_size = 4080
88+
// Although it does not drop this feature when buffer_size = 4079 or 4081
89+
assert.equal(outputInfo.layers.roads._features.length,5);
90+
assert.end();
91+
});
92+
});

0 commit comments

Comments
 (0)