mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 18:22:25 +00:00
Merge upstream main into feat/iss-3d-model
Translation files: kept both sides' new keys. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
commit
349b3a04ec
407 files changed
+23411
-2582
No files matched your search
@@ -0,0 +1,455 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* Build the bundled world cities pack read by `src/data/wikidataCities.js`:
|
||||
*
|
||||
* src/data/local_data/wikidata_cities/cities.json
|
||||
*
|
||||
* Source: Wikidata (CC0), read once from the public query service at build
|
||||
* time. The app itself never calls Wikidata: it reads this file.
|
||||
*
|
||||
* What goes in: items that are a human settlement (an instance of any subclass
|
||||
* of Q486972), have coordinates (P625) and a population (P1082) at or above
|
||||
* the cut-off. Each row keeps the English label, coordinates to three
|
||||
* decimals, the largest stated population, the ISO 3166-1 alpha-2 country
|
||||
* code and the Wikidata id. Groupings of settlements (metropolitan areas,
|
||||
* agglomerations, conurbations) and places that no longer stand are left out.
|
||||
*
|
||||
* The query service limits each query to 60 s, so the population range is
|
||||
* read in bands without labels, the settlement test runs here against the
|
||||
* class list, and labels and countries are read afterwards in batches. One
|
||||
* request runs at a time, with a pause between requests, and a refusal's
|
||||
* Retry-After is honoured.
|
||||
*
|
||||
* Usage:
|
||||
* node scripts/build-wikidata-cities.mjs [--min-population 15000]
|
||||
*/
|
||||
|
||||
import { mkdir, writeFile } from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const ENDPOINT = 'https://query.wikidata.org/sparql';
|
||||
const USER_AGENT =
|
||||
'gods-eye-view-places-builder/0.2 (offline data pack; one-off build; https://github.com/bilawalsidhu/gods-eye-view)';
|
||||
const SETTLEMENT = 'Q486972';
|
||||
const PAUSE_MS = 1500;
|
||||
const LABEL_BATCH = 400;
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
const flag = (name) =>
|
||||
args.includes(name) ? Number(args[args.indexOf(name) + 1]) : NaN;
|
||||
const minPopulation = flag('--min-population') || 15000;
|
||||
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||||
const outDir = path.join(root, 'src/data/local_data/wikidata_cities');
|
||||
|
||||
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
||||
const qid = (uri) => uri.slice(uri.lastIndexOf('/') + 1);
|
||||
|
||||
/** The service ran out of time on a query: a smaller one may still answer. */
|
||||
class QueryTimeout extends Error {}
|
||||
|
||||
async function sparql(query, attempt = 1) {
|
||||
let response;
|
||||
try {
|
||||
response = await fetch(ENDPOINT, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'User-Agent': USER_AGENT,
|
||||
Accept: 'application/sparql-results+json',
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
body: `query=${encodeURIComponent(query)}`,
|
||||
// The service stops a query at 60 s; past that the answer is lost.
|
||||
signal: AbortSignal.timeout(90000),
|
||||
});
|
||||
} catch (error) {
|
||||
// Our own time limit: the query is too big, as with a 504.
|
||||
if (error.name === 'TimeoutError' && attempt >= 2)
|
||||
throw new QueryTimeout('Wikidata did not answer in time');
|
||||
if (attempt >= 4) throw error;
|
||||
console.warn(` ${error.message}; waiting ${20 * attempt} s`);
|
||||
await sleep(20000 * attempt);
|
||||
return sparql(query, attempt + 1);
|
||||
}
|
||||
if (response.status === 504 && attempt >= 2)
|
||||
throw new QueryTimeout('Wikidata answered 504');
|
||||
// A malformed query fails the same way every time.
|
||||
if (
|
||||
response.status >= 400 &&
|
||||
response.status < 500 &&
|
||||
response.status !== 429
|
||||
)
|
||||
throw new Error(
|
||||
`Wikidata answered ${response.status}: ${(await response.text()).slice(0, 300)}`,
|
||||
);
|
||||
if (!response.ok) {
|
||||
if (attempt >= 4) throw new Error(`Wikidata answered ${response.status}`);
|
||||
const wait =
|
||||
Number(response.headers.get('retry-after')) * 1000 || 20000 * attempt;
|
||||
console.warn(` ${response.status}; waiting ${Math.round(wait / 1000)} s`);
|
||||
await sleep(wait);
|
||||
return sparql(query, attempt + 1);
|
||||
}
|
||||
// The service can stop a long answer partway; that arrives as broken JSON.
|
||||
let rows;
|
||||
try {
|
||||
rows = JSON.parse(await response.text()).results.bindings;
|
||||
} catch (error) {
|
||||
// The service stops a query that runs too long partway through its answer.
|
||||
if (attempt >= 2)
|
||||
throw new QueryTimeout(`Wikidata answer was cut short: ${error.message}`);
|
||||
console.warn(` answer cut short; waiting ${20 * attempt} s`);
|
||||
await sleep(20000 * attempt);
|
||||
return sparql(query, attempt + 1);
|
||||
}
|
||||
await sleep(PAUSE_MS);
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* Population bands, narrow where places are many, so each answer stays well
|
||||
* under the service's 60 s limit (about 35,000 places a band).
|
||||
*/
|
||||
function bands(min, max) {
|
||||
const stepAt = (pop) =>
|
||||
pop < 2000
|
||||
? 200
|
||||
: pop < 5000
|
||||
? 500
|
||||
: pop < 10000
|
||||
? 1000
|
||||
: pop < 20000
|
||||
? 2500
|
||||
: pop < 30000
|
||||
? 10000
|
||||
: pop < 50000
|
||||
? 20000
|
||||
: pop < 100000
|
||||
? 50000
|
||||
: Infinity;
|
||||
const list = [];
|
||||
for (let low = min; low < max;) {
|
||||
const high = Math.min(max, low + stepAt(low));
|
||||
list.push([low, high]);
|
||||
low = high;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
console.log('Settlement classes…');
|
||||
const classes = new Set(
|
||||
(await sparql(`SELECT ?c WHERE { ?c wdt:P279* wd:${SETTLEMENT} }`)).map(
|
||||
(row) => qid(row.c.value),
|
||||
),
|
||||
);
|
||||
console.log(` ${classes.size} classes`);
|
||||
|
||||
// Groupings of settlements (metropolitan areas, agglomerations, conurbations,
|
||||
// capital regions)
|
||||
// are settlements in Wikidata too, and are left out so a view is named after
|
||||
// the city rather than the area around it. An item stated as one of these
|
||||
// classes goes, whatever else it is ("New York metropolitan area" is also a
|
||||
// megacity). An item of a narrower kind only goes when it is nothing else:
|
||||
// Istanbul is a "metropolitan municipality in Turkey", a kind of
|
||||
// metropolitan area, and a megacity, so it stays.
|
||||
const GROUPING_TREES = [
|
||||
'Q1907114', // metropolitan area
|
||||
'Q159313', // urban agglomeration
|
||||
'Q245260', // conurbation
|
||||
'Q1062177', // capital region
|
||||
'Q1768043', // metropolitan statistical area
|
||||
'Q3175539', // functional urban area
|
||||
];
|
||||
// Left out as stated only: "city in the United States" is a subclass of
|
||||
// these, so their subclasses must stay.
|
||||
const GROUPING_CLASSES = [
|
||||
'Q702492', // urban area
|
||||
'Q2342385', // urban area (statistical)
|
||||
'Q5951278', // urban area of the United States
|
||||
];
|
||||
// Places that no longer stand as settlements (former entities, ghost towns,
|
||||
// abandoned villages, archaeological sites) are settlements in Wikidata too.
|
||||
// An item typed only as one of these, with every subclass, is left out; one
|
||||
// that is also a living settlement (a city that is also a former capital)
|
||||
// stays.
|
||||
const HISTORICAL_TREES = [
|
||||
'Q15893266', // former entity
|
||||
'Q19953632', // former administrative territorial entity
|
||||
'Q74047', // ghost town
|
||||
'Q350895', // abandoned village
|
||||
'Q839954', // archaeological site
|
||||
];
|
||||
const former = new Set(
|
||||
(
|
||||
await sparql(
|
||||
`SELECT ?c WHERE { VALUES ?top { ${HISTORICAL_TREES.map((id) => `wd:${id}`).join(' ')} } ?c wdt:P279* ?top }`,
|
||||
)
|
||||
).map((row) => qid(row.c.value)),
|
||||
);
|
||||
console.log(` ${former.size} former-place classes`);
|
||||
const groupings = new Set([
|
||||
...(
|
||||
await sparql(
|
||||
`SELECT ?c WHERE { VALUES ?top { ${GROUPING_TREES.map((id) => `wd:${id}`).join(' ')} } ?c wdt:P279* ?top }`,
|
||||
)
|
||||
).map((row) => qid(row.c.value)),
|
||||
...GROUPING_CLASSES,
|
||||
]);
|
||||
console.log(` ${groupings.size} grouping classes left out`);
|
||||
// A band's rows; one the service cannot answer in time is asked again in two
|
||||
// halves.
|
||||
async function bandRows(low, high) {
|
||||
const range = Number.isFinite(high)
|
||||
? `?pop >= ${low} && ?pop < ${high}`
|
||||
: `?pop >= ${low}`;
|
||||
try {
|
||||
return await sparql(
|
||||
`SELECT ?item ?pop ?coord ?type WHERE { ?item wdt:P1082 ?pop . FILTER(${range}) ?item wdt:P625 ?coord ; wdt:P31 ?type . }`,
|
||||
);
|
||||
} catch (error) {
|
||||
const mid = Number.isFinite(high) ? Math.round((low + high) / 2) : low * 4;
|
||||
if (!(error instanceof QueryTimeout) || mid <= low || mid === high)
|
||||
throw error;
|
||||
console.warn(` splitting ${low}–${high} at ${mid}`);
|
||||
return [...(await bandRows(low, mid)), ...(await bandRows(mid, high))];
|
||||
}
|
||||
}
|
||||
|
||||
const GROUPING_STATED = new Set([...GROUPING_TREES, ...GROUPING_CLASSES]);
|
||||
const living = new Set();
|
||||
const stated = new Set();
|
||||
const grouped = new Set();
|
||||
const settled = new Set();
|
||||
|
||||
const places = new Map();
|
||||
for (const [low, high] of bands(minPopulation, Infinity)) {
|
||||
console.log(`Population ${low}–${Number.isFinite(high) ? high : '∞'}…`);
|
||||
const rows = await bandRows(low, high);
|
||||
let kept = 0;
|
||||
for (const row of rows) {
|
||||
const type = qid(row.type.value);
|
||||
if (GROUPING_STATED.has(type)) stated.add(qid(row.item.value));
|
||||
if (groupings.has(type)) grouped.add(qid(row.item.value));
|
||||
if (!classes.has(type)) continue;
|
||||
if (!groupings.has(type) && !former.has(type))
|
||||
settled.add(qid(row.item.value));
|
||||
if (!former.has(type)) living.add(qid(row.item.value));
|
||||
const match = /^Point\(([-\d.eE]+) ([-\d.eE]+)\)$/.exec(row.coord.value);
|
||||
if (!match) continue;
|
||||
const id = qid(row.item.value);
|
||||
const pop = Math.round(Number(row.pop.value));
|
||||
const known = places.get(id);
|
||||
if (known) {
|
||||
known.pop = Math.max(known.pop, pop);
|
||||
// Of several stated coordinates, the same one on every build.
|
||||
const lon = Number(match[1]);
|
||||
const lat = Number(match[2]);
|
||||
if (lat < known.lat || (lat === known.lat && lon < known.lon)) {
|
||||
known.lat = lat;
|
||||
known.lon = lon;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
places.set(id, { id, pop, lon: Number(match[1]), lat: Number(match[2]) });
|
||||
kept++;
|
||||
}
|
||||
console.log(` ${rows.length} rows, ${kept} new settlements`);
|
||||
}
|
||||
|
||||
let groupingsLeftOut = 0;
|
||||
for (const id of grouped) {
|
||||
if ((settled.has(id) && !stated.has(id)) || !places.delete(id)) continue;
|
||||
groupingsLeftOut++;
|
||||
}
|
||||
console.log(`${groupingsLeftOut} groupings left out`);
|
||||
// A place typed only as a former kind is held until its end date is known: a
|
||||
// unit dissolved in a recent reform still stands (below).
|
||||
for (const [id, place] of places) if (!living.has(id)) place.formerOnly = true;
|
||||
const ids = [...places.keys()];
|
||||
console.log(`Labels and countries for ${ids.length} places…`);
|
||||
for (let start = 0; start < ids.length; start += LABEL_BATCH) {
|
||||
const values = ids
|
||||
.slice(start, start + LABEL_BATCH)
|
||||
.map((id) => `wd:${id}`)
|
||||
.join(' ');
|
||||
const rows = await sparql(
|
||||
`SELECT ?item ?label ?iso ?ended WHERE { VALUES ?item { ${values} } OPTIONAL { ?item rdfs:label ?label . FILTER(LANG(?label) = "en") } OPTIONAL { ?item wdt:P17 ?country . ?country wdt:P297 ?iso } OPTIONAL { ?item wdt:P576 ?ended } }`,
|
||||
);
|
||||
for (const row of rows) {
|
||||
const place = places.get(qid(row.item.value));
|
||||
if (!place) continue;
|
||||
if (row.label && !place.name) place.name = row.label.value;
|
||||
// Of several stated countries, the same one on every build.
|
||||
if (row.iso && (!place.cc || row.iso.value < place.cc))
|
||||
place.cc = row.iso.value;
|
||||
// Dissolved, abolished or merged as a unit (P576), and when.
|
||||
if (row.ended) {
|
||||
place.ended = true;
|
||||
const year = Number(/^-?\d+/.exec(row.ended.value)?.[0]);
|
||||
if (Number.isFinite(year))
|
||||
place.endedYear = Math.max(place.endedYear ?? -Infinity, year);
|
||||
}
|
||||
}
|
||||
if ((start / LABEL_BATCH) % 10 === 0)
|
||||
console.log(
|
||||
` ${Math.min(start + LABEL_BATCH, ids.length)} / ${ids.length}`,
|
||||
);
|
||||
}
|
||||
|
||||
// A dissolved place goes only where another place still names the spot (a
|
||||
// city merged into its neighbour, a former district inside its city). Where
|
||||
// nothing else does, the town is still there under its name and stays: many
|
||||
// of Vietnam's provincial cities ended as units in 2025, and with them their
|
||||
// class, so they are typed only as a former kind. A place typed only as a
|
||||
// former kind stays only that way: dissolved within the last ten years with
|
||||
// nothing else near it. Ghost towns and ancient cities go.
|
||||
const SUCCESSOR_KM = 15;
|
||||
const RECENT_YEARS = 10;
|
||||
const recent = new Date().getUTCFullYear() - RECENT_YEARS;
|
||||
const standing = [...places.values()].filter(
|
||||
(place) => place.name && !place.ended && !place.formerOnly,
|
||||
);
|
||||
const near = (a, b) => {
|
||||
const rad = Math.PI / 180;
|
||||
const h =
|
||||
Math.sin(((b.lat - a.lat) * rad) / 2) ** 2 +
|
||||
Math.cos(a.lat * rad) *
|
||||
Math.cos(b.lat * rad) *
|
||||
Math.sin(((b.lon - a.lon) * rad) / 2) ** 2;
|
||||
return 2 * 6371 * Math.asin(Math.min(1, Math.sqrt(h))) <= SUCCESSOR_KM;
|
||||
};
|
||||
const byCell = new Map();
|
||||
const cellOf = (lat, lon) => `${Math.floor(lat)},${Math.floor(lon)}`;
|
||||
for (const place of standing) {
|
||||
const key = cellOf(place.lat, place.lon);
|
||||
if (!byCell.has(key)) byCell.set(key, []);
|
||||
byCell.get(key).push(place);
|
||||
}
|
||||
let dissolved = 0;
|
||||
let formerOnly = 0;
|
||||
for (const [id, place] of places) {
|
||||
if (place.formerOnly && !(place.ended && place.endedYear >= recent)) {
|
||||
places.delete(id);
|
||||
formerOnly++;
|
||||
continue;
|
||||
}
|
||||
if (!place.ended) continue;
|
||||
let succeeded = false;
|
||||
for (let dLat = -1; dLat <= 1 && !succeeded; dLat++)
|
||||
for (let dLon = -1; dLon <= 1 && !succeeded; dLon++)
|
||||
succeeded = (
|
||||
byCell.get(cellOf(place.lat + dLat, place.lon + dLon)) || []
|
||||
).some((other) => near(place, other));
|
||||
if (succeeded) dissolved++;
|
||||
else place.ended = false;
|
||||
}
|
||||
console.log(`${formerOnly} former places left out`);
|
||||
console.log(`${dissolved} dissolved places left out`);
|
||||
|
||||
// A place whose stated country is a former one (no ISO code) takes the
|
||||
// country of the area it lies in, one area level up at a time (a path of
|
||||
// several levels in one query runs past the service's time limit).
|
||||
const COUNTRY_BATCH = 50;
|
||||
const countryless = () =>
|
||||
[...places.values()]
|
||||
.filter((place) => place.name && !place.cc && !place.ended)
|
||||
.map((place) => place.id);
|
||||
for (const hops of [1, 2, 3]) {
|
||||
const ids = countryless();
|
||||
if (!ids.length) break;
|
||||
console.log(`Countries ${hops} area level(s) up for ${ids.length} places…`);
|
||||
const pathToArea = Array.from({ length: hops }, () => 'wdt:P131').join('/');
|
||||
for (let start = 0; start < ids.length; start += COUNTRY_BATCH) {
|
||||
const values = ids
|
||||
.slice(start, start + COUNTRY_BATCH)
|
||||
.map((id) => `wd:${id}`)
|
||||
.join(' ');
|
||||
const rows = await sparql(
|
||||
`SELECT ?item ?iso WHERE { VALUES ?item { ${values} } ?item ${pathToArea} ?area . ?area wdt:P17 ?country . ?country wdt:P297 ?iso }`,
|
||||
);
|
||||
for (const row of rows) {
|
||||
const place = places.get(qid(row.item.value));
|
||||
if (!place || (place.cc && place.hops !== hops)) continue;
|
||||
if (!place.cc || row.iso.value < place.cc) {
|
||||
place.cc = row.iso.value;
|
||||
place.hops = hops;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(` ${countryless().length} places still without a country`);
|
||||
|
||||
const rows = [...places.values()]
|
||||
.filter(
|
||||
(place) =>
|
||||
place.name &&
|
||||
!place.ended &&
|
||||
Math.abs(place.lat) <= 90 &&
|
||||
Math.abs(place.lon) <= 180,
|
||||
)
|
||||
.sort((a, b) => b.pop - a.pop || a.id.localeCompare(b.id))
|
||||
.map((place) => [
|
||||
place.name,
|
||||
Number(place.lat.toFixed(3)),
|
||||
Number(place.lon.toFixed(3)),
|
||||
place.pop,
|
||||
place.cc || '',
|
||||
place.id,
|
||||
]);
|
||||
|
||||
// A filter that is too wide drops real cities without any error; these must
|
||||
// survive, and no settlement grouping may.
|
||||
const MUST_HAVE = {
|
||||
Q1490: 'Tokyo',
|
||||
Q84: 'London',
|
||||
Q16559: 'Austin',
|
||||
Q16555: 'Houston',
|
||||
Q1355: 'Bengaluru',
|
||||
Q3630: 'Jakarta',
|
||||
Q174: 'São Paulo',
|
||||
Q34600: 'Kyoto',
|
||||
Q656: 'Saint Petersburg',
|
||||
Q406: 'Istanbul',
|
||||
Q8678: 'Rio de Janeiro',
|
||||
Q1345: 'Philadelphia',
|
||||
Q586: 'Bonn',
|
||||
Q1449: 'Genoa',
|
||||
Q1563: 'Havana',
|
||||
// Provincial cities dissolved as units in 2025 that still stand.
|
||||
Q19491: 'Nha Trang',
|
||||
Q36081: 'Quy Nhon',
|
||||
};
|
||||
// Groupings that are also typed as cities; none may get in.
|
||||
const MUST_NOT = {
|
||||
Q683705: 'New York metropolitan area',
|
||||
Q665894: 'Greater Mexico City',
|
||||
Q13580: 'Metro Manila',
|
||||
Q3114019: 'Katowice urban area',
|
||||
};
|
||||
const present = new Set(rows.map((row) => row[5]));
|
||||
const missing = Object.entries(MUST_HAVE).filter(([id]) => !present.has(id));
|
||||
const intruders = Object.entries(MUST_NOT).filter(([id]) => present.has(id));
|
||||
if (intruders.length) {
|
||||
throw new Error(
|
||||
`Groupings got in: ${intruders.map(([id, name]) => `${name} (${id})`).join(', ')}`,
|
||||
);
|
||||
}
|
||||
if (missing.length) {
|
||||
throw new Error(
|
||||
`Expected cities are missing: ${missing.map(([id, name]) => `${name} (${id})`).join(', ')}`,
|
||||
);
|
||||
}
|
||||
|
||||
const meta = {
|
||||
source: 'Wikidata (https://www.wikidata.org), via the Wikidata Query Service',
|
||||
license: 'CC0 1.0',
|
||||
built: new Date().toISOString(),
|
||||
minPopulation,
|
||||
count: rows.length,
|
||||
columns: ['name', 'lat', 'lon', 'population', 'country', 'wikidata'],
|
||||
};
|
||||
|
||||
await mkdir(outDir, { recursive: true });
|
||||
const file = path.join(outDir, 'cities.json');
|
||||
await writeFile(file, `${JSON.stringify({ meta, rows })}\n`);
|
||||
console.log(`Wrote ${rows.length} places to ${path.relative(root, file)}`);
|
||||
@@ -180,6 +180,9 @@
|
||||
"src/search/google.js",
|
||||
"src/search/coordinateParser.js",
|
||||
"src/search/coordinateParser.test.mjs",
|
||||
"src/search/gridReference.js",
|
||||
"src/search/gridReference.test.mjs",
|
||||
"src/search/plusCode.js",
|
||||
"src/search/coordinateGeocoder.js",
|
||||
"src/search/presetGeocoder.js",
|
||||
"src/search/offlineGeocoders.test.mjs",
|
||||
@@ -456,6 +459,7 @@
|
||||
"src/layers/satellites/ingestion.js",
|
||||
"src/layers/satellites/index.js",
|
||||
"src/layers/satellites/orbits.js",
|
||||
"src/layers/satellites/motion.js",
|
||||
"src/layers/launches/lifecycle.js",
|
||||
"src/layers/launches/controls.js",
|
||||
"src/layers/launches/panel.js",
|
||||
@@ -483,6 +487,8 @@
|
||||
"src/data/rocketLaunches.js",
|
||||
"src/layers/satellites/source.test.mjs",
|
||||
"src/layers/satellites/stale.test.mjs",
|
||||
"src/layers/satellites/motion.test.mjs",
|
||||
"src/layers/satellites/reckon.test.mjs",
|
||||
"src/layers/launches/source.test.mjs",
|
||||
"src/layers/launches/ingestion.test.mjs",
|
||||
"src/layers/launches/failedEntry.test.mjs",
|
||||
@@ -936,8 +942,6 @@
|
||||
"src/ui/weatherPanel.test.mjs",
|
||||
"src/ui/railCards.js",
|
||||
"src/ui/railCards.test.mjs",
|
||||
"src/ui/railTimeline.js",
|
||||
"src/ui/railTimeline.test.mjs",
|
||||
"src/layers/weather/imageryOrder.js",
|
||||
"src/layers/weather/imageryOrder.test.mjs",
|
||||
"server/providers/cyclones.js",
|
||||
@@ -1436,8 +1440,37 @@
|
||||
"src/data/placePacksLoading.test.mjs",
|
||||
"src/ui/placePacksLoading.js",
|
||||
"src/ui/placePacksLoading.test.mjs",
|
||||
"src/cockpitSubjectProviders.js",
|
||||
"src/cockpitSubjectProviders.test.mjs",
|
||||
"src/cockpitProgress.js",
|
||||
"src/cockpitProgress.test.mjs",
|
||||
"src/ui/cockpitSubjectView.test.mjs",
|
||||
"src/ui/styles/cockpitSubject.css",
|
||||
"src/layers/rail/cockpitSubject.js",
|
||||
"src/layers/rail/cockpitSubject.test.mjs",
|
||||
"src/layers/transit/cockpitSubject.js",
|
||||
"src/data/fleetModels.test.mjs",
|
||||
"src/data/fleetModelInstances.test.mjs",
|
||||
"src/testSupport/fleetGlb.mjs",
|
||||
"scripts/measure-fleet-trail-anchors.mjs"
|
||||
"src/testSupport/fleetModelFakes.mjs",
|
||||
"scripts/measure-fleet-trail-anchors.mjs",
|
||||
"src/ui/panelEdge.js",
|
||||
"src/ui/railEdgeScroll.js",
|
||||
"src/ui/railEdgeScroll.test.mjs",
|
||||
"src/ui/kit/UiPanelEdge.vue",
|
||||
"src/ui/styles/rail-edge.css",
|
||||
"src/ui/styles/rail-split.css",
|
||||
"src/ui/styles/left-tools.css",
|
||||
"src/ui/styles/panel-edge.css",
|
||||
"src/data/placementProvider.test.mjs",
|
||||
"src/layers/vessels/placement.test.mjs",
|
||||
"src/ui/styles/visual-panel.css",
|
||||
"src/ui/styles/scope-off-shadows.css",
|
||||
"src/ui/styles/cockpit-panels.css",
|
||||
"src/ui/styles/layer-section-index.css",
|
||||
"src/ui/styles/layer-finder.css",
|
||||
"src/ui/layerFinder.test.mjs",
|
||||
"src/data/wikidataCities.js",
|
||||
"src/data/wikidataCities.test.mjs",
|
||||
"scripts/build-wikidata-cities.mjs"
|
||||
]
|
||||
@@ -22,6 +22,9 @@
|
||||
"src/ui/vueRuntime.js",
|
||||
"src/ui/views/index.js",
|
||||
"src/ui/views/CockpitView.vue",
|
||||
"src/ui/views/panels/CockpitProgress.vue",
|
||||
"src/cockpitProgress.js",
|
||||
"src/cockpitSubjectProviders.js",
|
||||
"src/ui/views/CommandDockView.vue",
|
||||
"src/ui/views/ContextView.vue",
|
||||
"src/ui/views/panels/RadioPanel.vue",
|
||||
@@ -99,6 +102,7 @@
|
||||
"src/ui/stores/streetLevel.js",
|
||||
"src/ui/rail/RailChips.vue",
|
||||
"src/ui/views/panels/DisplayPanel.vue",
|
||||
"src/ui/views/panels/VisualPresets.vue",
|
||||
"src/ui/views/panels/GeoImport.vue",
|
||||
"src/ui/views/panels/DrawControls.vue",
|
||||
"src/ui/views/panels/DrawMarkList.vue",
|
||||
@@ -109,6 +113,8 @@
|
||||
"src/ui/views/panels/DataLibraryCard.vue",
|
||||
"src/ui/views/panels/DataLibraryDialog.vue",
|
||||
"src/ui/views/panels/DataLibraryBrowse.vue",
|
||||
"src/ui/views/panels/LayerFinder.vue",
|
||||
"src/ui/views/panels/LayerSectionIndex.vue",
|
||||
"src/ui/libraryBrowser.js",
|
||||
"src/ui/localSdrPresentation.js",
|
||||
"src/ui/unitLabels.js",
|
||||
@@ -151,6 +157,8 @@
|
||||
"src/ui/kit/UiSegmented.vue",
|
||||
"src/ui/rail/RailPanel.vue",
|
||||
"src/ui/kit/UiPanel.vue",
|
||||
"src/ui/kit/UiPanelEdge.vue",
|
||||
"src/ui/panelEdge.js",
|
||||
"src/ui/kit/UiPanelToggle.vue",
|
||||
"src/ui/stores/panelChrome.js",
|
||||
"src/ui/rail/PanelCollapseButton.vue",
|
||||
@@ -248,6 +256,7 @@
|
||||
"src/data/adsbLolFallback.js",
|
||||
"src/data/aisStreamAdapter.js",
|
||||
"src/data/aisWatchdog.js",
|
||||
"src/data/vesselTypes.js",
|
||||
"src/sources/httpBody.js",
|
||||
"src/i18n/marker.js",
|
||||
"server/providers/acartia.js",
|
||||
@@ -661,6 +670,8 @@
|
||||
"src/search/alpsGeocoder.js",
|
||||
"src/search/coordinateGeocoder.js",
|
||||
"src/search/coordinateParser.js",
|
||||
"src/search/gridReference.js",
|
||||
"src/search/plusCode.js",
|
||||
"src/search/presetGeocoder.js",
|
||||
"src/search/nominatim.js",
|
||||
"src/nominatimGeocode.js",
|
||||
@@ -795,7 +806,6 @@
|
||||
"src/ui/layerPanel/RowSwitch.vue",
|
||||
"src/ui/layerPanel/RowRange.vue",
|
||||
"src/ui/layerPanel/RowSlider.vue",
|
||||
"src/ui/railTimeline.js",
|
||||
"src/ui/clearLayersControl.js",
|
||||
"src/loadingFeedback.js",
|
||||
"src/data/installationFeedback.js",
|
||||
@@ -828,7 +838,6 @@
|
||||
"src/ui/rail/RailCard.vue",
|
||||
"src/ui/rail/RailCards.vue",
|
||||
"src/ui/rail/utcClock.js",
|
||||
"src/ui/rail/RailTimeline.vue",
|
||||
"src/ui/rail/rangeValue.js",
|
||||
"src/ui/weather/WeatherReadout.vue",
|
||||
"src/ui/newsPanel.js",
|
||||
@@ -1010,6 +1019,8 @@
|
||||
"src/ui/cockpitInput.js",
|
||||
"src/data/inputOwnership.js",
|
||||
"src/ui/cockpitInstruments.js",
|
||||
"src/cockpitSubjectProviders.js",
|
||||
"src/cockpitProgress.js",
|
||||
"src/ui/cockpitLayout.js",
|
||||
"src/ui/cockpitPresentation.js",
|
||||
"src/ui/cockpitSignals.js",
|
||||
@@ -1130,6 +1141,7 @@
|
||||
"src/styles/surveillance.js",
|
||||
"src/styles/thermal.js",
|
||||
"src/ui/applicationShell.js",
|
||||
"src/ui/railEdgeScroll.js",
|
||||
"src/ui/localePicker.js",
|
||||
"src/ui/cyberSonarControls.js",
|
||||
"src/ui/locationNavigation.js",
|
||||
@@ -1175,6 +1187,8 @@
|
||||
"src/ui/cockpitInput.js",
|
||||
"src/data/inputOwnership.js",
|
||||
"src/ui/cockpitInstruments.js",
|
||||
"src/cockpitSubjectProviders.js",
|
||||
"src/cockpitProgress.js",
|
||||
"src/ui/cockpitLayout.js",
|
||||
"src/ui/cockpitPresentation.js",
|
||||
"src/ui/cockpitSignals.js",
|
||||
@@ -1203,7 +1217,6 @@
|
||||
"src/ui/layerPanel/RowSwitch.vue",
|
||||
"src/ui/layerPanel/RowRange.vue",
|
||||
"src/ui/layerPanel/RowSlider.vue",
|
||||
"src/ui/railTimeline.js",
|
||||
"src/ui/layers.js",
|
||||
"src/ui/leftPanelRail.js",
|
||||
"src/ui/location.js",
|
||||
@@ -1298,7 +1311,6 @@
|
||||
"src/ui/rail/RailCard.vue",
|
||||
"src/ui/rail/RailCards.vue",
|
||||
"src/ui/rail/utcClock.js",
|
||||
"src/ui/rail/RailTimeline.vue",
|
||||
"src/ui/rail/rangeValue.js",
|
||||
"src/ui/weather/WeatherReadout.vue",
|
||||
"src/ui/newsPanel.js",
|
||||
@@ -1342,7 +1354,8 @@
|
||||
"src/ui/views/panels/WildlifeSightingCard.vue",
|
||||
"src/ui/wildlifeSightingPlacement.js",
|
||||
"src/overlays/worldOverlayChrome.js",
|
||||
"src/layers/wildlifeSightings/photoText.js"
|
||||
"src/layers/wildlifeSightings/photoText.js",
|
||||
"src/time/frameWait.js"
|
||||
],
|
||||
"external": ["cesium", "vue", "pinia", "vue-i18n"]
|
||||
},
|
||||
@@ -1357,6 +1370,7 @@
|
||||
"src/ui/styles/status.css",
|
||||
"src/ui/styles/cockpit.css",
|
||||
"src/ui/styles/cockpitBridge.css",
|
||||
"src/ui/styles/cockpitSubject.css",
|
||||
"src/ui/styles/cockpitRadar.css",
|
||||
"src/ui/styles/overlays.css",
|
||||
"src/ui/styles/layers.css",
|
||||
@@ -1506,6 +1520,7 @@
|
||||
"exports": ["./layers/flights"],
|
||||
"modules": [
|
||||
"src/data/fleetModels.js",
|
||||
"src/data/vesselTypes.js",
|
||||
"src/data/fleetTrailAnchors.js",
|
||||
"src/data/fleetModelInstances.js",
|
||||
"src/data/headingDegrees.js",
|
||||
@@ -1551,6 +1566,8 @@
|
||||
"src/layers/flights/records.js",
|
||||
"src/layers/flights/clockFollow.js",
|
||||
"src/time/snapshotTimeline.js",
|
||||
"src/data/timelineHistory.js",
|
||||
"src/time/timelineFixes.js",
|
||||
"src/sources/live/contract.js",
|
||||
"src/layers/flights/recordPolicy.js",
|
||||
"src/layers/flights/snapshotRenderer.js",
|
||||
@@ -1575,7 +1592,9 @@
|
||||
"src/ui/unitLabels.js",
|
||||
"src/time/worldClock.js",
|
||||
"src/time/julian.js",
|
||||
"src/data/planespottersPhoto.js"
|
||||
"src/data/planespottersPhoto.js",
|
||||
"src/layers/flights/placed.js",
|
||||
"src/data/courseFromFixes.js"
|
||||
],
|
||||
"external": ["cesium"]
|
||||
},
|
||||
@@ -1585,6 +1604,7 @@
|
||||
"src/layers/flights/modelSpec.js",
|
||||
"src/layers/flights/policy.js",
|
||||
"src/data/fleetModels.js",
|
||||
"src/data/vesselTypes.js",
|
||||
"src/data/fleetTrailAnchors.js",
|
||||
"src/data/fleetModelInstances.js",
|
||||
"src/data/headingDegrees.js",
|
||||
@@ -1615,6 +1635,8 @@
|
||||
"src/layers/military/ingestion.js",
|
||||
"src/layers/military/clockFollow.js",
|
||||
"src/time/snapshotTimeline.js",
|
||||
"src/data/timelineHistory.js",
|
||||
"src/time/timelineFixes.js",
|
||||
"src/sources/live/contract.js",
|
||||
"src/layers/military/lifecycle.js",
|
||||
"src/layers/military/motion.js",
|
||||
@@ -1647,7 +1669,10 @@
|
||||
"src/i18n/locales/zh-Hant.json",
|
||||
"src/ui/unitLabels.js",
|
||||
"src/time/worldClock.js",
|
||||
"src/time/julian.js"
|
||||
"src/time/julian.js",
|
||||
"src/layers/flights/placed.js",
|
||||
"src/data/courseFromFixes.js",
|
||||
"src/data/approxDistance.js"
|
||||
],
|
||||
"external": ["cesium"]
|
||||
},
|
||||
@@ -1700,6 +1725,7 @@
|
||||
"src/layers/vessels/ingestion.js",
|
||||
"src/layers/vessels/motion.js",
|
||||
"src/time/snapshotTimeline.js",
|
||||
"src/time/timelineFixes.js",
|
||||
"src/time/worldClock.js",
|
||||
"src/sources/live/contract.js",
|
||||
"src/layers/vessels/cameraArea.js",
|
||||
@@ -1708,6 +1734,7 @@
|
||||
"src/layers/vessels/policy.js",
|
||||
"src/layers/vessels/queries.js",
|
||||
"src/layers/vessels/rendering.js",
|
||||
"src/data/windowProjection.js",
|
||||
"src/layers/vessels/selection.js",
|
||||
"src/layers/vessels/state.js",
|
||||
"src/layers/vessels/testing.js",
|
||||
@@ -1747,7 +1774,8 @@
|
||||
"src/layers/earthquakes/index.js",
|
||||
"src/layers/earthquakes/model.js",
|
||||
"src/layers/earthquakes/source.js",
|
||||
"src/layers/earthquakes/records.js"
|
||||
"src/layers/earthquakes/records.js",
|
||||
"src/time/worldClock.js"
|
||||
],
|
||||
"external": ["cesium"]
|
||||
},
|
||||
@@ -1842,6 +1870,7 @@
|
||||
"src/layers/satellites/issCommand.js",
|
||||
"src/layers/satellites/labels.js",
|
||||
"src/layers/satellites/lifecycle.js",
|
||||
"src/layers/satellites/motion.js",
|
||||
"src/layers/satellites/orbits.js",
|
||||
"src/layers/satellites/records.js",
|
||||
"src/layers/satellites/policy.js",
|
||||
@@ -2879,6 +2908,8 @@
|
||||
"src/layers/flights/index.js",
|
||||
"src/layers/flights/clockFollow.js",
|
||||
"src/time/snapshotTimeline.js",
|
||||
"src/data/timelineHistory.js",
|
||||
"src/time/timelineFixes.js",
|
||||
"src/layers/flights/ingestion.js",
|
||||
"src/layers/flights/lifecycle.js",
|
||||
"src/layers/flights/motion.js",
|
||||
@@ -2964,6 +2995,7 @@
|
||||
"src/layers/satellites/issCommand.js",
|
||||
"src/layers/satellites/labels.js",
|
||||
"src/layers/satellites/lifecycle.js",
|
||||
"src/layers/satellites/motion.js",
|
||||
"src/layers/satellites/orbits.js",
|
||||
"src/sources/tle.js",
|
||||
"src/layers/satellites/records.js",
|
||||
@@ -3015,6 +3047,7 @@
|
||||
"src/layers/vessels/policy.js",
|
||||
"src/layers/vessels/queries.js",
|
||||
"src/layers/vessels/rendering.js",
|
||||
"src/data/windowProjection.js",
|
||||
"src/layers/vessels/selection.js",
|
||||
"src/layers/vessels/state.js",
|
||||
"src/layers/vessels/testing.js",
|
||||
@@ -3084,6 +3117,7 @@
|
||||
"src/styles/surveillance.js",
|
||||
"src/styles/thermal.js",
|
||||
"src/ui/applicationShell.js",
|
||||
"src/ui/railEdgeScroll.js",
|
||||
"src/ui/mobileShell.js",
|
||||
"src/exclusiveSurfaces.js",
|
||||
"src/ui/localePicker.js",
|
||||
@@ -3124,6 +3158,8 @@
|
||||
"src/ui/displayPanelScroll.js",
|
||||
"src/ui/cockpitInput.js",
|
||||
"src/ui/cockpitInstruments.js",
|
||||
"src/cockpitSubjectProviders.js",
|
||||
"src/cockpitProgress.js",
|
||||
"src/ui/cockpitLayout.js",
|
||||
"src/ui/cockpitPresentation.js",
|
||||
"src/ui/cockpitSignals.js",
|
||||
@@ -3154,7 +3190,6 @@
|
||||
"src/ui/layerPanel/RowSwitch.vue",
|
||||
"src/ui/layerPanel/RowRange.vue",
|
||||
"src/ui/layerPanel/RowSlider.vue",
|
||||
"src/ui/railTimeline.js",
|
||||
"src/ui/layers.js",
|
||||
"src/ui/leftPanelRail.js",
|
||||
"src/ui/location.js",
|
||||
@@ -3256,6 +3291,8 @@
|
||||
"src/app/layers/directions.js",
|
||||
"src/search/coordinateGeocoder.js",
|
||||
"src/search/coordinateParser.js",
|
||||
"src/search/gridReference.js",
|
||||
"src/search/plusCode.js",
|
||||
"src/search/presetGeocoder.js",
|
||||
"src/voice/session.js",
|
||||
"src/voice/sessionCommands.js",
|
||||
@@ -3312,6 +3349,7 @@
|
||||
"src/app/layers/rail.js",
|
||||
"src/data/railFeeds.js",
|
||||
"src/layers/rail/index.js",
|
||||
"src/layers/rail/cockpitSubject.js",
|
||||
"src/layers/rail/source.js",
|
||||
"src/layers/rail/policy.js",
|
||||
"src/layers/rail/ingestion.js",
|
||||
@@ -3338,6 +3376,7 @@
|
||||
"src/layers/transit/controls.js",
|
||||
"src/layers/transit/height.js",
|
||||
"src/layers/transit/index.js",
|
||||
"src/layers/transit/cockpitSubject.js",
|
||||
"src/layers/transit/ingestion.js",
|
||||
"src/layers/transit/lifecycle.js",
|
||||
"src/layers/transit/policy.js",
|
||||
@@ -3708,7 +3747,6 @@
|
||||
"src/ui/rail/RailCards.vue",
|
||||
"src/ui/rail/RailCardBlocks.vue",
|
||||
"src/ui/rail/utcClock.js",
|
||||
"src/ui/rail/RailTimeline.vue",
|
||||
"src/ui/rail/rangeValue.js",
|
||||
"src/ui/weather/WeatherReadout.vue",
|
||||
"src/ui/newsPanel.js",
|
||||
@@ -3813,7 +3851,11 @@
|
||||
"src/data/planespottersPhoto.js",
|
||||
"src/ui/stores/dataLibrary.js",
|
||||
"src/data/openVesselPhoto.js",
|
||||
"src/layers/vessels/photos.js"
|
||||
"src/layers/vessels/photos.js",
|
||||
"src/layers/flights/placed.js",
|
||||
"src/data/placementProvider.js",
|
||||
"src/data/courseFromFixes.js",
|
||||
"src/time/frameWait.js"
|
||||
],
|
||||
"external": [
|
||||
"hls.js",
|
||||
@@ -3827,6 +3869,7 @@
|
||||
"@jtarrio/webrtlsdr",
|
||||
"hyparquet",
|
||||
"fzstd",
|
||||
"h3-js",
|
||||
"vue",
|
||||
"pinia",
|
||||
"vue-i18n"
|
||||
@@ -4064,6 +4107,8 @@
|
||||
"src/layers/flights/index.js",
|
||||
"src/layers/flights/clockFollow.js",
|
||||
"src/time/snapshotTimeline.js",
|
||||
"src/data/timelineHistory.js",
|
||||
"src/time/timelineFixes.js",
|
||||
"src/sources/live/contract.js",
|
||||
"src/layers/flights/ingestion.js",
|
||||
"src/layers/flights/lifecycle.js",
|
||||
@@ -4150,6 +4195,7 @@
|
||||
"src/layers/satellites/issCommand.js",
|
||||
"src/layers/satellites/labels.js",
|
||||
"src/layers/satellites/lifecycle.js",
|
||||
"src/layers/satellites/motion.js",
|
||||
"src/layers/satellites/orbits.js",
|
||||
"src/sources/tle.js",
|
||||
"src/layers/satellites/records.js",
|
||||
@@ -4200,6 +4246,7 @@
|
||||
"src/layers/vessels/policy.js",
|
||||
"src/layers/vessels/queries.js",
|
||||
"src/layers/vessels/rendering.js",
|
||||
"src/data/windowProjection.js",
|
||||
"src/layers/vessels/selection.js",
|
||||
"src/layers/vessels/state.js",
|
||||
"src/layers/vessels/testing.js",
|
||||
@@ -4252,6 +4299,8 @@
|
||||
"src/app/layers/directions.js",
|
||||
"src/search/coordinateGeocoder.js",
|
||||
"src/search/coordinateParser.js",
|
||||
"src/search/gridReference.js",
|
||||
"src/search/plusCode.js",
|
||||
"src/search/presetGeocoder.js",
|
||||
"src/app/localGeojsonServices.js",
|
||||
"src/data/displayText.js",
|
||||
@@ -4304,6 +4353,7 @@
|
||||
"src/app/layers/rail.js",
|
||||
"src/data/railFeeds.js",
|
||||
"src/layers/rail/index.js",
|
||||
"src/layers/rail/cockpitSubject.js",
|
||||
"src/layers/rail/source.js",
|
||||
"src/layers/rail/policy.js",
|
||||
"src/layers/rail/ingestion.js",
|
||||
@@ -4329,6 +4379,7 @@
|
||||
"src/layers/transit/controls.js",
|
||||
"src/layers/transit/height.js",
|
||||
"src/layers/transit/index.js",
|
||||
"src/layers/transit/cockpitSubject.js",
|
||||
"src/layers/transit/ingestion.js",
|
||||
"src/layers/transit/lifecycle.js",
|
||||
"src/layers/transit/policy.js",
|
||||
@@ -4533,7 +4584,11 @@
|
||||
"src/data/imagingSensors.js",
|
||||
"src/data/planespottersPhoto.js",
|
||||
"src/layers/vessels/photos.js",
|
||||
"src/data/openVesselPhoto.js"
|
||||
"src/data/openVesselPhoto.js",
|
||||
"src/layers/flights/placed.js",
|
||||
"src/data/placementProvider.js",
|
||||
"src/data/courseFromFixes.js",
|
||||
"src/time/frameWait.js"
|
||||
],
|
||||
"external": [
|
||||
"hls.js",
|
||||
@@ -4545,6 +4600,7 @@
|
||||
"mgrs",
|
||||
"mapillary-js",
|
||||
"@jtarrio/webrtlsdr",
|
||||
"h3-js",
|
||||
"vue",
|
||||
"pinia",
|
||||
"vue-i18n"
|
||||
@@ -4593,6 +4649,8 @@
|
||||
"src/services/terrainHeights.js",
|
||||
"src/search/coordinateGeocoder.js",
|
||||
"src/search/coordinateParser.js",
|
||||
"src/search/gridReference.js",
|
||||
"src/search/plusCode.js",
|
||||
"src/search/presetGeocoder.js",
|
||||
"src/search/nominatim.js",
|
||||
"src/nominatimGeocode.js",
|
||||
@@ -4813,7 +4871,11 @@
|
||||
"src/data/approxDistance.js",
|
||||
"src/data/renderAltitude.js",
|
||||
"src/data/aircraftClass.js",
|
||||
"src/data/aircraftEmergency.js"
|
||||
"src/data/aircraftEmergency.js",
|
||||
"src/data/fleetModels.js",
|
||||
"src/data/vesselTypes.js",
|
||||
"src/data/fleetTrailAnchors.js",
|
||||
"src/data/courseFromFixes.js"
|
||||
],
|
||||
"external": []
|
||||
},
|
||||
@@ -4835,7 +4897,9 @@
|
||||
"src/data/aircraftMeta.js",
|
||||
"src/data/renderAltitude.js",
|
||||
"src/data/aircraftClass.js",
|
||||
"src/data/aircraftEmergency.js"
|
||||
"src/data/aircraftEmergency.js",
|
||||
"src/data/courseFromFixes.js",
|
||||
"src/data/approxDistance.js"
|
||||
],
|
||||
"external": []
|
||||
},
|
||||
@@ -4851,7 +4915,8 @@
|
||||
"exports": ["./layers/vessels/records"],
|
||||
"modules": [
|
||||
"src/layers/vessels/records.js",
|
||||
"src/layers/vessels/recordPolicy.js"
|
||||
"src/layers/vessels/recordPolicy.js",
|
||||
"src/time/timelineFixes.js"
|
||||
],
|
||||
"external": []
|
||||
},
|
||||
@@ -5203,6 +5268,7 @@
|
||||
"exports": ["./layers/transit/standalone"],
|
||||
"modules": [
|
||||
"src/data/fleetModels.js",
|
||||
"src/data/vesselTypes.js",
|
||||
"src/data/aircraftClass.js",
|
||||
"src/i18n/marker.js",
|
||||
"src/data/fleetModelInstances.js",
|
||||
@@ -5240,6 +5306,7 @@
|
||||
"src/layers/transit/controls.js",
|
||||
"src/layers/transit/height.js",
|
||||
"src/layers/transit/index.js",
|
||||
"src/layers/transit/cockpitSubject.js",
|
||||
"src/layers/transit/ingestion.js",
|
||||
"src/layers/transit/lifecycle.js",
|
||||
"src/layers/transit/movement.js",
|
||||
@@ -5294,6 +5361,7 @@
|
||||
"modules": [
|
||||
"src/i18n/marker.js",
|
||||
"src/data/fleetModels.js",
|
||||
"src/data/vesselTypes.js",
|
||||
"src/data/fleetModelInstances.js",
|
||||
"src/data/aircraftClass.js",
|
||||
"src/data/aircraftModelLighting.js",
|
||||
@@ -5310,6 +5378,7 @@
|
||||
"src/layers/transit/controls.js",
|
||||
"src/layers/transit/height.js",
|
||||
"src/layers/transit/index.js",
|
||||
"src/layers/transit/cockpitSubject.js",
|
||||
"src/layers/transit/ingestion.js",
|
||||
"src/layers/transit/lifecycle.js",
|
||||
"src/layers/transit/policy.js",
|
||||
@@ -5499,7 +5568,7 @@
|
||||
"src/ui/statusText.js",
|
||||
"src/ui/layerNames.js"
|
||||
],
|
||||
"external": ["cesium"]
|
||||
"external": ["cesium", "h3-js"]
|
||||
},
|
||||
"gnss-source": {
|
||||
"exports": ["./layers/gnss/source"],
|
||||
@@ -5932,5 +6001,10 @@
|
||||
"src/layers/wildlifeSightings/performance.js"
|
||||
],
|
||||
"external": []
|
||||
},
|
||||
"rail-paths": {
|
||||
"exports": ["./layers/rail/paths"],
|
||||
"modules": ["src/data/railPaths.js"],
|
||||
"external": []
|
||||
}
|
||||
}
|
||||
@@ -339,6 +339,45 @@ try {
|
||||
'#cctv-frame',
|
||||
(image) => !image.getAttribute('src') && image.dataset.cameraId === '',
|
||||
);
|
||||
// The address bar follows the share state after a short delay: wait for the
|
||||
// CCTV panel token (1 collapsed, 0 open) the step expects.
|
||||
const panelState = async (expectedToken) => {
|
||||
const settled = await page
|
||||
.waitForFunction(
|
||||
(token) =>
|
||||
new RegExp(`(?:^|_)v\\.c\\.${token}(?:_|$)`).test(
|
||||
new URLSearchParams(location.hash.slice(1)).get('ui') || '',
|
||||
),
|
||||
{ timeout: 5000 },
|
||||
expectedToken,
|
||||
)
|
||||
.then(
|
||||
() => true,
|
||||
() => false,
|
||||
);
|
||||
return page.evaluate(
|
||||
(shared) => ({
|
||||
collapsed: document
|
||||
.getElementById('cctv-panel')
|
||||
.classList.contains('collapsed'),
|
||||
shared,
|
||||
ui: new URLSearchParams(location.hash.slice(1)).get('ui'),
|
||||
}),
|
||||
settled ? expectedToken : null,
|
||||
);
|
||||
};
|
||||
const closedOnDisable = await panelState('1');
|
||||
check(
|
||||
'disable collapses the panel and its share preference',
|
||||
closedOnDisable.collapsed && closedOnDisable.shared === '1',
|
||||
JSON.stringify(closedOnDisable),
|
||||
);
|
||||
// The switch sits inside the collapsed panel: reopen it from the right rail.
|
||||
await page.click('[data-rail-item="cctv-panel"]');
|
||||
await page.waitForFunction(
|
||||
() =>
|
||||
!document.getElementById('cctv-panel').classList.contains('collapsed'),
|
||||
);
|
||||
await page.click('#cctv-enable-btn');
|
||||
await page.waitForFunction(
|
||||
() =>
|
||||
@@ -351,6 +390,42 @@ try {
|
||||
'disable clears the preview and re-enable reacquires the camera frame',
|
||||
disabledCleanly,
|
||||
);
|
||||
// Contacts switches CCTV off to isolate itself and restores it on the way
|
||||
// out: the open panel and its share preference survive the round trip.
|
||||
const cameraBeforeContacts = await page.evaluate(
|
||||
() =>
|
||||
window.__godsEyeView.styleManager._cctvControls.getState()
|
||||
?.activeCameraId,
|
||||
);
|
||||
const entered = await page.evaluate(() =>
|
||||
window.__godsEyeView.styleManager.setContextMode('flights'),
|
||||
);
|
||||
await page.waitForFunction(
|
||||
() => !window.__godsEyeView.dataManager.isEnabled('cctv'),
|
||||
);
|
||||
const duringContacts = await panelState('0');
|
||||
await page.evaluate(() =>
|
||||
window.__godsEyeView.styleManager.setContextMode(null),
|
||||
);
|
||||
await page.waitForFunction(() =>
|
||||
window.__godsEyeView.dataManager.isEnabled('cctv'),
|
||||
);
|
||||
const afterContacts = await panelState('0');
|
||||
check(
|
||||
'Contacts isolation keeps the open CCTV panel and restores its camera',
|
||||
entered?.ok === true &&
|
||||
!duringContacts.collapsed &&
|
||||
duringContacts.shared === '0' &&
|
||||
!afterContacts.collapsed &&
|
||||
afterContacts.shared === '0' &&
|
||||
(await page.evaluate(
|
||||
(cameraId) =>
|
||||
window.__godsEyeView.styleManager._cctvControls.getState()
|
||||
?.activeCameraId === cameraId,
|
||||
cameraBeforeContacts,
|
||||
)),
|
||||
JSON.stringify({ entered, duringContacts, afterContacts }),
|
||||
);
|
||||
await page.$eval('#cctv-frame', (image) =>
|
||||
image.scrollIntoView({ block: 'nearest' }),
|
||||
);
|
||||
|
||||
+32
-27
@@ -11,15 +11,17 @@
|
||||
* (i) LIVE — over Poland and the southern Baltic the layer settles with no error,
|
||||
* one geometry per cell and legend band counts that sum to the cell
|
||||
* count; cells are required only when the returned rows, binned
|
||||
* with the layer's own rules, reach the per-cell minimum (live
|
||||
* traffic varies by hour). Requires a non-stale response no older than 60 s.
|
||||
* into H3 cells with the layer's own rules, give at least one cell
|
||||
* (live traffic varies by hour). Requires a non-stale response no older than 60 s.
|
||||
* (ii) BANDS (synthetic) — a 10-aircraft cell with 5 degraded is high,
|
||||
* a 30-aircraft cell with 2 degraded is medium, a 3-aircraft cell
|
||||
* with 1 degraded is low (first bad discounted), a clean cell at sea
|
||||
* is low, a 2-aircraft cell is withheld; `stale: true` reaches
|
||||
* is low, a 2-aircraft cell with 2 degraded is shown high (no
|
||||
* minimum aircraft count, as on gpsjam.org); `stale: true` reaches
|
||||
* getStats. Every band is drawn and low is shown over land and sea.
|
||||
* The row reads as low navigation accuracy, and stats carry the
|
||||
* machine-readable provenance (GEV classifier, gpsjam bands, window).
|
||||
* machine-readable provenance (GEV classifier, gpsjam bands and H3
|
||||
* grid, window).
|
||||
* PICK verifies actual perimeter and empty-ground clicks under GNSS.
|
||||
* CAMERA/GLOBE verify automatic sampling and the screen-centre anchor.
|
||||
* (iii) FAILURE — the route stubbed to 502: stats.error is set and the
|
||||
@@ -195,7 +197,7 @@ function cellStates(id) {
|
||||
return [ds.get(0).ready ? 0 : 1];
|
||||
}
|
||||
|
||||
/** Wait until every GNSS cell's ground rectangle has finished building. */
|
||||
/** Wait until every GNSS cell's ground polygon has finished building. */
|
||||
async function waitForBuiltCells(page, timeoutMs = 60000) {
|
||||
const built = await page
|
||||
.waitForFunction(
|
||||
@@ -223,22 +225,23 @@ const fixtureRow = (hex, lat, lon, degraded) => ({
|
||||
});
|
||||
|
||||
/**
|
||||
* Synthetic 0.5° cells: high at sea (5/10 bad), medium on land (2/30 bad),
|
||||
* low on land (1/3 bad), low at sea (0/4 bad), withheld (2 aircraft).
|
||||
* Synthetic H3 res-4 cells, each group inside one hexagon: high at sea
|
||||
* (5/10 bad), medium on land (2/30 bad), low on land (1/3 bad), low at sea
|
||||
* (0/4 bad), and high from only 2 aircraft (2/2 bad; no minimum count).
|
||||
*/
|
||||
function fixturePayload() {
|
||||
const rows = [];
|
||||
const hex = (prefix, i) => `${prefix}${i.toString(16).padStart(2, '0')}`;
|
||||
for (let i = 0; i < 10; i++)
|
||||
rows.push(fixtureRow(hex('a000', i), 55.1 + i * 0.01, 19.1, i < 5));
|
||||
rows.push(fixtureRow(hex('a000', i), 55.1 + i * 0.001, 19.1, i < 5));
|
||||
for (let i = 0; i < 30; i++)
|
||||
rows.push(fixtureRow(hex('d000', i), 54.1 + i * 0.01, 19.6, i < 2));
|
||||
rows.push(fixtureRow(hex('d000', i), 54.1 + i * 0.001, 19.6, i < 2));
|
||||
for (let i = 0; i < 3; i++)
|
||||
rows.push(fixtureRow(hex('b000', i), 54.1 + i * 0.01, 18.1, i === 0));
|
||||
rows.push(fixtureRow(hex('b000', i), 54.1 + i * 0.001, 18.1, i === 0));
|
||||
for (let i = 0; i < 4; i++)
|
||||
rows.push(fixtureRow(hex('e000', i), 55.1 + i * 0.01, 18.1, false));
|
||||
rows.push(fixtureRow(hex('e000', i), 55.1 + i * 0.001, 18.1, false));
|
||||
for (let i = 0; i < 2; i++)
|
||||
rows.push(fixtureRow(hex('c000', i), 53.1 + i * 0.01, 17.1, true));
|
||||
rows.push(fixtureRow(hex('c000', i), 53.1 + i * 0.001, 17.1, true));
|
||||
return {
|
||||
fetchedAt: Date.now(),
|
||||
anchor: { lat: 55, lon: 19 },
|
||||
@@ -385,8 +388,8 @@ async function main() {
|
||||
const l = await enableAndSettle(live);
|
||||
const legendTotal = l.legend.reduce((sum, { count }) => sum + count, 0);
|
||||
// Bin what adsb.lol actually returned with the layer's own rules: live
|
||||
// traffic varies by hour, so cells are required only when some cell
|
||||
// really reached the minimum aircraft count.
|
||||
// traffic varies by hour, so cells are required only when the rows
|
||||
// really bin into some cell.
|
||||
const liveSnapshots = (await Promise.allSettled(liveBodies))
|
||||
.filter((r) => r.status === 'fulfilled')
|
||||
.map((r) => r.value);
|
||||
@@ -429,7 +432,7 @@ async function main() {
|
||||
);
|
||||
} else {
|
||||
console.log(
|
||||
` [info] ${liveRows} live rows, no cell reaches the minimum — cell count not asserted`,
|
||||
` [info] ${liveRows} live rows bin into no cell — cell count not asserted`,
|
||||
);
|
||||
}
|
||||
record(
|
||||
@@ -439,7 +442,7 @@ async function main() {
|
||||
);
|
||||
const liveBuilt = await waitForBuiltCells(live);
|
||||
record(
|
||||
'LIVE: every cell rectangle is built on a parked camera',
|
||||
'LIVE: every cell polygon is built on a parked camera',
|
||||
liveBuilt.built,
|
||||
liveBuilt.detail,
|
||||
);
|
||||
@@ -454,7 +457,7 @@ async function main() {
|
||||
await page.setViewport({ width: 1440, height: 900 });
|
||||
page.on('pageerror', (e) => errors.push(e.message));
|
||||
// Stub the route in-page rather than with request interception: an
|
||||
// intercepted page stalls Cesium's geometry workers, so ground rectangles
|
||||
// intercepted page stalls Cesium's geometry workers, so ground polygons
|
||||
// never finish building and the screenshot would not show real behaviour.
|
||||
await stubRoute(page);
|
||||
await boot(page, { lon: 18.6, lat: 54.6, height: 450_000 });
|
||||
@@ -462,25 +465,27 @@ async function main() {
|
||||
const band = (prefix) =>
|
||||
f.legend.find(({ label }) => label.startsWith(prefix))?.count;
|
||||
record(
|
||||
'BANDS: 4 cells shown, the 2-aircraft cell withheld',
|
||||
f.stats.count === 4 && f.entities === 4,
|
||||
'BANDS: 5 cells shown, the 2-aircraft cell included',
|
||||
f.stats.count === 5 && f.entities === 5,
|
||||
`cells=${f.stats.count} entities=${f.entities}`,
|
||||
);
|
||||
record(
|
||||
'BANDS: 5/10 is high, 2/30 is medium, 1/3 and 0/4 are low',
|
||||
band('Low-accuracy score >') === 1 &&
|
||||
'BANDS: 5/10 and 2/2 are high, 2/30 is medium, 1/3 and 0/4 are low',
|
||||
band('Low-accuracy score >') === 2 &&
|
||||
band('Low-accuracy score 2') === 1 &&
|
||||
band('Low-accuracy score <') === 2,
|
||||
JSON.stringify(f.legend),
|
||||
);
|
||||
const prov = f.stats.provenance;
|
||||
record(
|
||||
'PROVENANCE: GEV classifier, gpsjam bands and visited-view window are machine-readable',
|
||||
'PROVENANCE: GEV classifier, gpsjam bands and H3 grid, and visited-view window are machine-readable',
|
||||
prov?.classifier?.id === 'gev-nic-nacp-v2' &&
|
||||
prov.classifier.definedBy === 'GEV' &&
|
||||
prov.classifier.validated === false &&
|
||||
prov.aggregation?.source === 'https://gpsjam.org/faq' &&
|
||||
JSON.stringify(prov.aggregation.bands) === '[2,10]' &&
|
||||
prov.aggregation.grid === 'h3' &&
|
||||
prov.aggregation.h3Resolution === 4 &&
|
||||
prov.window?.minutes === 30 &&
|
||||
prov.window.scope === 'visited-view' &&
|
||||
prov.interpretation?.validated === false,
|
||||
@@ -503,7 +508,7 @@ async function main() {
|
||||
);
|
||||
const bandsBuilt = await waitForBuiltCells(page);
|
||||
record(
|
||||
'BANDS: every cell rectangle is built on a parked camera',
|
||||
'BANDS: every cell polygon is built on a parked camera',
|
||||
bandsBuilt.built,
|
||||
bandsBuilt.detail,
|
||||
);
|
||||
@@ -769,7 +774,7 @@ async function main() {
|
||||
const e = await enableAndSettle(page, { refresh: true });
|
||||
record(
|
||||
'FAILURE: error surfaced, cells kept',
|
||||
Boolean(e.stats.error) && e.stats.count === 4 && e.entities === 4,
|
||||
Boolean(e.stats.error) && e.stats.count === 5 && e.entities === 5,
|
||||
`error=${JSON.stringify(e.stats.error)} cells=${e.stats.count}`,
|
||||
);
|
||||
await shoot(page, 'failure');
|
||||
@@ -797,7 +802,7 @@ async function main() {
|
||||
'KEYBOARD: Enter on the focused toggle enables the layer and keeps focus',
|
||||
on.enabled &&
|
||||
on.focused &&
|
||||
on.count === 4 &&
|
||||
on.count === 5 &&
|
||||
/^GNSS Integrity: /.test(on.label) &&
|
||||
!/OFF$/.test(on.label),
|
||||
JSON.stringify(on),
|
||||
@@ -906,7 +911,7 @@ async function main() {
|
||||
return (
|
||||
layer.enabled &&
|
||||
layer.module.getStats().error === null &&
|
||||
layer.module.getStats().count === 4
|
||||
layer.module.getStats().count === 5
|
||||
);
|
||||
},
|
||||
{ timeout: 20000 },
|
||||
@@ -957,7 +962,7 @@ async function main() {
|
||||
const recent = await enableAndSettle(aged, { refresh: true });
|
||||
record(
|
||||
'AGE: the same snapshot observed 29 min ago is still inside the window',
|
||||
recent.stats.count === 4 && recent.entities === 4,
|
||||
recent.stats.count === 5 && recent.entities === 5,
|
||||
`cells=${recent.stats.count} entities=${recent.entities}`,
|
||||
);
|
||||
await aged.close();
|
||||
|
||||
Reference in new issue
Block a user