Add feature to fill null table entries with as-the-crow-flies estimates.

This commit is contained in:
Daniel Patterson
2018-10-31 22:02:54 -07:00
parent cb1db646f2
commit 985ab58f45
15 changed files with 376 additions and 14 deletions
+18 -1
View File
@@ -234,7 +234,7 @@ tables.forEach(function(annotation) {
});
test('table: ' + annotation + ' table in Monaco without motorways', function(assert) {
assert.plan(1);
assert.plan(2);
var osrm = new OSRM({path: mld_data_path, algorithm: 'MLD'});
var options = {
coordinates: two_test_coordinates,
@@ -243,7 +243,24 @@ tables.forEach(function(annotation) {
};
osrm.table(options, function(err, response) {
assert.equal(response[annotation].length, 2);
assert.strictEqual(response.estimated_cells, undefined);
});
});
test('table: ' + annotation + ' table in Monaco with fallback speeds', function(assert) {
assert.plan(2);
var osrm = new OSRM({path: mld_data_path, algorithm: 'MLD'});
var options = {
coordinates: two_test_coordinates,
annotations: [annotation.slice(0,-1)],
fallback_speed: 1,
fallback_coordinate: 'input'
};
osrm.table(options, function(err, response) {
assert.equal(response[annotation].length, 2);
assert.equal(response['estimated_cells'].length, 0);
});
});
});