mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
address review findings on voice outlines
- remove the unused Nominatim reserve(); spacing tests now measure the actual transport start across processes - start each queued building's 2 s ground-sampling budget when it reaches the head of the queue, and request a frame on promotion - accept Nominatim and grounds outlines that cross the antimeridian - let an unnamed school, university, hospital, cemetery, stadium or zoo area answer a grounds ask whose head noun names that kind, using only the part that holds the point; compare grounds names symmetrically - charge shared OpenFreeMap consumers their own slice and keep the charged budget at the previous 64 MiB - share one place-name fold, point-in-polygon, line stitching and nextTask helper instead of duplicates - exclude Who's On First sources licensed only as "CC BY (equivalent)" or "CC0 (equivalent)"; rebuild the pack from the pinned archives - whole-word neighbourhood alias guard; correct the outline size-limit comment - restore DATA_SOURCES.md table formatting, keeping only real edits - test behaviour instead of private engine fields
This commit is contained in:
1 parent
5a1cfa6800
commit
2e82425d62
37 files changed
+921
-481
No files matched your search
@@ -42,6 +42,7 @@ import {
|
||||
rank,
|
||||
} from './adminBoundaries.js';
|
||||
import { loadBundledJson } from './bundledJson.js';
|
||||
import { foldPlaceName } from './placeNames.js';
|
||||
import { createRetryableLoader } from './retryableLoad.js';
|
||||
import * as placeFiles from './local_data/us_census_places/files.js';
|
||||
import * as neighborhoodFiles from './local_data/wof_neighborhoods/files.js';
|
||||
@@ -63,17 +64,6 @@ export const packLoads = {
|
||||
neighborhoodTiles: [],
|
||||
};
|
||||
|
||||
const FOLD = {
|
||||
ß: 'ss',
|
||||
ø: 'o',
|
||||
æ: 'ae',
|
||||
ł: 'l',
|
||||
đ: 'd',
|
||||
ı: 'i',
|
||||
œ: 'oe',
|
||||
þ: 'th',
|
||||
};
|
||||
|
||||
/**
|
||||
* A name as spelled: case and punctuation only. Every mark is kept, so
|
||||
* "की" and "क", "Й" and "И" stay distinct.
|
||||
@@ -87,20 +77,11 @@ export function exactPlaceName(value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Fold a name for matching: case, punctuation, accents on Latin letters
|
||||
* only, a leading "the", "saint". Other scripts keep their marks
|
||||
* ("渋谷", "Кунцево", "बांद्रा").
|
||||
* Fold a name for matching (see `foldPlaceName`), with "saint" and "sainte"
|
||||
* shortened the way US place names abbreviate them.
|
||||
*/
|
||||
export function normalizePlaceName(value) {
|
||||
return String(value || '')
|
||||
.toLowerCase()
|
||||
.replace(/[ßøæłđıœþ]/g, (c) => FOLD[c])
|
||||
.normalize('NFD')
|
||||
.replace(/(\p{Script=Latin})\p{M}+/gu, '$1')
|
||||
.normalize('NFC')
|
||||
.replace(/[^\p{L}\p{M}\p{N}]+/gu, ' ')
|
||||
.trim()
|
||||
.replace(/^the /, '')
|
||||
return foldPlaceName(value)
|
||||
.replace(/\bsaint\b/g, 'st')
|
||||
.replace(/\bsainte\b/g, 'ste');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user