mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
tighten remaining voice outline review items
- join street pieces at up to 3 m again (inclusive), as before the shared stitcher - share one default outline tile source across outline rung instances - cover Japanese and Thai street names that differ only by a mark - restore main's text for formatting-only CURRENT-STATE hunks
This commit is contained in:
1 parent
a71443a0ef
commit
e6ad7fe34f
6 files changed
+96
-9
No files matched your search
@@ -15,15 +15,18 @@ export function ringAreaM2(ring) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Join line pieces whose ends meet (within `toleranceM`) into as few chains as
|
||||
* possible. Each chain grows greedily from the first unused piece.
|
||||
* Join line pieces whose ends meet (closer than `toleranceM`, or at most it
|
||||
* when `inclusive`) into as few chains as possible. Each chain grows greedily
|
||||
* from the first unused piece.
|
||||
*/
|
||||
export function stitchLines(
|
||||
segments,
|
||||
{ toleranceM = 2, maxChains = Infinity } = {},
|
||||
{ toleranceM = 2, inclusive = false, maxChains = Infinity } = {},
|
||||
) {
|
||||
const same = (a, b) =>
|
||||
approximateDistanceM(a[1], a[0], b[1], b[0]) < toleranceM;
|
||||
const same = (a, b) => {
|
||||
const d = approximateDistanceM(a[1], a[0], b[1], b[0]);
|
||||
return inclusive ? d <= toleranceM : d < toleranceM;
|
||||
};
|
||||
const remaining = segments.map((s) => s.slice());
|
||||
const chains = [];
|
||||
while (remaining.length && chains.length < maxChains) {
|
||||
|
||||
Reference in new issue
Block a user