mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-06 03:14:00 +00:00
address the final review of the voice outline fixes
- A building word ("Burj Khalifa Tower", "Sagrada Familia Church") passes
the last-word rule on a building-like result; enclosures stay out.
- The anchor chooses only among the best-named outlines, so a worse name
never wins by containment alone.
- An ask without a quadrant takes only the quadrant of the matching street
nearest the point; a leading quadrant ("SE Main St") may go unsaid too.
- On an unbuffered tile edge a fragment shows as an edge along the
boundary, so a whole building touching it at a corner is not cut.
- Drop two orphaned comments and correct the place-name key wording.
This commit is contained in:
1 parent
a61d0f4c2a
commit
0712db9891
8 files changed
+194
-42
No files matched your search
@@ -1347,6 +1347,40 @@ test('a landmark ask is not answered by the place around it', () => {
|
||||
landmark('Royal Botanic Park'),
|
||||
);
|
||||
assert.equal(every.outline.name, 'Royal Botanic Historic Park');
|
||||
// A building word passes on a building-like result, not on a park.
|
||||
for (const [query, result] of [
|
||||
[
|
||||
'Burj Khalifa Tower',
|
||||
at('Burj Khalifa', 'Burj Khalifa, Downtown Dubai, Dubai', {
|
||||
category: 'building',
|
||||
type: 'yes',
|
||||
}),
|
||||
],
|
||||
[
|
||||
'Sagrada Familia Church',
|
||||
at('Basílica de la Sagrada Família', 'Basílica, Barcelona, Spain', {
|
||||
category: 'amenity',
|
||||
type: 'place_of_worship',
|
||||
}),
|
||||
],
|
||||
])
|
||||
assert.ok(selectOutlineResult([result], landmark(query)).outline, query);
|
||||
assert.equal(
|
||||
selectOutlineResult([park('Central Park')], landmark('Central Park Tower'))
|
||||
.outline,
|
||||
null,
|
||||
);
|
||||
});
|
||||
|
||||
test('a worse name never wins the anchor by containment alone', () => {
|
||||
const building = {
|
||||
osm: 'way/1',
|
||||
polygons: [square(0, 0, 0.0001)],
|
||||
};
|
||||
const plaza = { osm: 'way/2', polygons: [square(-0.001, -0.001, 0.003)] };
|
||||
const anchor = [0.0002, 0.0002];
|
||||
assert.equal(outlineAt([building, plaza], ...anchor, [3, 2]).osm, 'way/1');
|
||||
assert.equal(outlineAt([building, plaza], ...anchor, [3, 3]).osm, 'way/2');
|
||||
});
|
||||
|
||||
test('outlineAt reads a ring crossing the antimeridian in its own frame', () => {
|
||||
|
||||
Reference in new issue
Block a user