Merge main into fix/earthquake-click-details

Resolves conflicts with main: a world focus target's own range past its
framed radius replaces the kind's range (#1832), so a quake asks for its
own range only past M6 and the earthquake framing stays its floor; FIRMS
keeps main's marker stand-in under the card-on-top rule; launches keep
main's label click and also read the card on top through the pick
registry.
This commit is contained in:
Sameh Khamis committed 2026-11-18 18:58:07 -08:00
commit e87aa5190d
1337 files changed
+38638 -9950

No files matched your search

+9 -2
View File
@@ -98,7 +98,7 @@ export function normalizeAdsbLolAircraftState(aircraft, nowSeconds) {
* Normalize an adsb.lol point response to an OpenSky-compatible response.
* Invalid rows and positionless contacts are intentionally excluded.
* @param {object} payload adsb.lol v2 response.
* @returns {{time:number,states:Array[]}}
* @returns {{time:number,states:Array[],emergencyByIcao?:object,typeByIcao?:object}}
*/
export function normalizeAdsbLolPointResponse(payload) {
const responseNow = finiteNumber(payload?.now);
@@ -111,9 +111,10 @@ export function normalizeAdsbLolPointResponse(payload) {
const aircraft = Array.isArray(payload?.ac) ? payload.ac : [];
const states = [];
// Keep the OpenSky vectors unchanged. The regional fallback's extra readsb
// status travels alongside them, keyed only to admitted aircraft.
// status and type travel alongside them, keyed only to admitted aircraft.
const admitted = new Set();
const statuses = [];
const types = [];
for (const row of aircraft) {
const state = normalizeAdsbLolAircraftState(row, nowSeconds);
if (!state) continue;
@@ -125,11 +126,17 @@ export function normalizeAdsbLolPointResponse(payload) {
admitted.add(id);
if (typeof row.emergency === 'string')
statuses.push([id, row.emergency.trim().toLowerCase()]);
const type = typeof row.t === 'string' ? row.t.trim().toUpperCase() : '';
if (type) types.push([id, type]);
}
const emergencyByIcao = Object.fromEntries(statuses);
const typeByIcao = Object.fromEntries(types);
return {
time: nowSeconds,
states,
...(Object.keys(emergencyByIcao).length ? { emergencyByIcao } : {}),
// The ICAO type designator (readsb `t`), so the aircraft is classed from
// its first fix instead of after a lookup.
...(types.length ? { typeByIcao } : {}),
};
}
+19
View File
@@ -61,3 +61,22 @@ test('an aircraft with no track takes its true heading, never its magnetic one',
assert.equal(at({ mag_heading: 278.44 }), null, 'not magnetic');
assert.equal(at({}), null, 'none');
});
test('the point response sends each admitted aircraft type alongside the vectors', () => {
const response = normalizeAdsbLolPointResponse({
now: 1000,
ac: [
{ hex: 'A1B2C3', lat: 30, lon: -97, t: 'ec45' },
{ hex: 'A1B2C3', lat: 31, lon: -97, t: 'B738' },
{ hex: 'D4E5F6', lat: 30, lon: -98 },
{ hex: 'BAD000', t: 'A320' },
],
});
assert.equal(response.states.length, 3);
assert.deepEqual(response.typeByIcao, { a1b2c3: 'EC45' });
const untyped = normalizeAdsbLolPointResponse({
now: 1000,
ac: [{ hex: 'D4E5F6', lat: 30, lon: -98 }],
});
assert.equal(Object.hasOwn(untyped, 'typeByIcao'), false);
});
+35 -13
View File
@@ -401,6 +401,11 @@ const OPENSKY_CATEGORY = {
7: 'fastjet', // High performance (>5g, >400 kt)
8: 'helicopter', // Rotorcraft
9: 'glider',
16: 'vehicle', // Surface vehicle, emergency
17: 'vehicle', // Surface vehicle, service
18: 'station', // Point obstacle
19: 'station', // Cluster obstacle
20: 'station', // Line obstacle
};
/** ADS-B emitter-category string → class. */
@@ -413,13 +418,35 @@ const EMITTER_CATEGORY = {
A6: 'fastjet',
A7: 'helicopter',
B1: 'glider',
C1: 'vehicle', // Surface vehicle, emergency
C2: 'vehicle', // Surface vehicle, service
C3: 'station', // Point obstacle
C4: 'station', // Cluster obstacle
C5: 'station', // Line obstacle
};
/**
* The type codes feeds give what is not an aircraft: an airport vehicle
* (ZVEH) and a ground station (GRND).
*/
const GROUND_TYPE_CLASS = { ZVEH: 'vehicle', GRND: 'station' };
/**
* The class an aircraft draws and reads as, from its ICAO type code (which
* outranks the category), else its OpenSky integer or ADS-B emitter category.
* Besides the aircraft classes, `vehicle` is an airport vehicle (type ZVEH,
* emitter C1 or C2) and `station` a ground station or obstacle (type GRND,
* emitter C3 to C5). A known type code outside every set is an airliner, and
* so is a contact with nothing to go on.
* @param {{typeCode?: string|null, category?: string|number|null}} [record]
* @returns {string}
*/
export function classifyAircraft({ typeCode, category } = {}) {
const code = String(typeCode || '')
.trim()
.toUpperCase();
if (code) {
if (GROUND_TYPE_CLASS[code]) return GROUND_TYPE_CLASS[code];
if (FASTJET.has(code)) return 'fastjet';
if (UAV.has(code)) return 'uav';
if (HELI.has(code)) return 'helicopter';
@@ -452,18 +479,13 @@ export const AIRCRAFT_CLASS_LABELS = Object.freeze({
fastjet: msg('Fast jet'),
bizjet: msg('Business jet'),
uav: msg('Drone'),
vehicle: msg('Airport vehicle'),
station: msg('Ground station / obstacle'),
});
/** Billboard scale multipliers (skylight GLYPH_SCALE, + fastjet). */
export const CLASS_SCALE_2D = {
light: 0.62,
glider: 0.58,
turboprop: 0.86,
airliner: 1.0,
widebody: 1.3,
quadjet: 1.45,
helicopter: 0.82,
fastjet: 0.8,
bizjet: 0.72,
uav: 0.75,
};
/**
* The tint an airport vehicle's sprite draws with in Flights and Local
* ADS-B: an orange amber, apart from aircraft white and the military layer's
* yellow amber (#FFB800).
*/
export const VEHICLE_TINT_CSS = '#FF8F1F';
+49 -4
View File
@@ -1,7 +1,7 @@
// src/data/aircraftClass.test.mjs
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { classifyAircraft, CLASS_SCALE_2D } from './aircraftClass.js';
import { AIRCRAFT_CLASS_LABELS, classifyAircraft } from './aircraftClass.js';
test('type-code classification (military layer path)', () => {
assert.equal(classifyAircraft({ typeCode: 'F16' }), 'fastjet');
@@ -48,8 +48,53 @@ test('typeCode outranks category; unknown → airliner', () => {
assert.equal(classifyAircraft({ typeCode: null, category: 0 }), 'airliner');
});
test('the icon scale table covers every class', () => {
for (const kind of ['light','glider','turboprop','airliner','widebody','quadjet','helicopter','fastjet','bizjet','uav']) {
assert.ok(Number.isFinite(CLASS_SCALE_2D[kind]), kind);
test('every class has a label', () => {
for (const kind of [
'light',
'glider',
'turboprop',
'airliner',
'widebody',
'quadjet',
'helicopter',
'fastjet',
'bizjet',
'uav',
'vehicle',
'station',
]) {
assert.ok(AIRCRAFT_CLASS_LABELS[kind], kind);
}
});
test('airport vehicles and ground stations class apart from aircraft', () => {
// A feed's own types, in any case.
assert.equal(classifyAircraft({ typeCode: 'ZVEH' }), 'vehicle');
assert.equal(classifyAircraft({ typeCode: ' zveh ' }), 'vehicle');
assert.equal(classifyAircraft({ typeCode: 'GRND' }), 'station');
// Emitter categories: surface vehicles, then obstacles.
assert.equal(classifyAircraft({ category: 'C1' }), 'vehicle');
assert.equal(classifyAircraft({ category: 'C2' }), 'vehicle');
for (const category of ['C3', 'C4', 'C5'])
assert.equal(classifyAircraft({ category }), 'station', category);
// OpenSky's integer categories for the same.
assert.equal(classifyAircraft({ category: 16 }), 'vehicle');
assert.equal(classifyAircraft({ category: 17 }), 'vehicle');
assert.equal(classifyAircraft({ category: 18 }), 'station');
// A type code still outranks the category.
assert.equal(
classifyAircraft({ typeCode: 'ZVEH', category: 'A3' }),
'vehicle',
);
assert.equal(
classifyAircraft({ typeCode: 'A320', category: 'C1' }),
'airliner',
);
});
test('helicopter types and categories', () => {
for (const typeCode of ['EC35', 'R44', 'S76', 'H60', 'AS50', 'B407'])
assert.equal(classifyAircraft({ typeCode }), 'helicopter', typeCode);
assert.equal(classifyAircraft({ category: 'A7' }), 'helicopter');
assert.equal(classifyAircraft({ category: 8 }), 'helicopter');
});
+5 -6
View File
@@ -1,5 +1,3 @@
import { TRACKED_ICON_COLOR } from '../layers/military/policy.js';
import { TRACKED_CYAN } from '../layers/flights/policy.js';
import { createRendering as civilRendering } from '../layers/flights/rendering.js';
import { createRendering as militaryRendering } from '../layers/military/rendering.js';
import { createMilitarySnapshotRenderer } from '../layers/military/snapshotRenderer.js';
@@ -463,15 +461,16 @@ test('tint priorities cover normal, priority, emergency, tracking and Cockpit do
assert.equal(rendering._modelColor('civil'), red);
if (rendering._cockpitContactColor)
assert.equal(rendering._cockpitContactColor('civil'), red);
// Tracking never recolours: a tracked emergency stays red.
flightState._trackedIcao = 'civil';
assert.equal(
rendering._modelColor('civil'),
factory === civilRendering ? TRACKED_CYAN : TRACKED_ICON_COLOR,
);
assert.equal(rendering._modelColor('civil'), red);
flightState._trackedIcao = null;
flightState.records.data.set('civil', { emergency: null });
// An ordinary model draws its mesh's own colours, whatever the billboard's.
assert.deepEqual([...rendering._modelColor('civil')], [1, 1, 1, 1]);
flightState._trackedIcao = 'civil';
assert.deepEqual([...rendering._modelColor('civil')], [1, 1, 1, 1]);
flightState._trackedIcao = null;
}
});
+161 -8
View File
@@ -32,6 +32,7 @@ import {
TRACKED_ICON_PX,
} from './aircraftIcons.js';
import { cockpitContactDotImage } from './cockpitContactDot.js';
import { rotorFrame, rotorTurns } from './rotorFrames.js';
import { aircraftRecedeSpec } from './aircraftRecession.js';
import { TIMELINE_UNSEEN_MS } from '../time/timelineFixes.js';
@@ -456,6 +457,14 @@ export function createAircraftIcons({
const { focusPassIsNeeded } = services.focus;
// The near-image switch the rows were last written with (CSS px).
let switchPx = nearImageSwitchPx(1);
/**
* Airborne helicopters drawn as their glyph, whose rotor turns: the rotor
* frame each was last drawn at, and the frame it was last judged at
* (`_turnRotors`), so one out of view is judged again only once its frame
* has stepped on.
* @type {Map<string, {drawn: number, checked: number}>}
*/
const rotors = new Map();
/** The delayed instant (epoch ms) every untracked contact is drawn at. */
const _displayMs = () =>
@@ -473,6 +482,9 @@ export function createAircraftIcons({
* back before it (`_replanExpired`).
*/
const planFrom = new Map();
/** When each placed contact's running ease ends (epoch ms): a new answer
* while it runs eases on from where it is drawn instead of cutting it. */
const easeEnds = new Map();
/** The display time the rows were last checked against. */
let replannedAt = -Infinity;
@@ -543,7 +555,9 @@ export function createAircraftIcons({
state._icons?.dispose();
state._icons = null;
liveSet = null;
rotors.clear();
planFrom.clear();
easeEnds.clear();
replannedAt = -Infinity;
}
@@ -607,13 +621,19 @@ export function createAircraftIcons({
* Following the clock, a contact not there yet at the time drawn
* (`regime.unseen`) is not drawn until its warm-up begins.
* @param {string} icao24
* @param {{fromCourseDeg?: number|null, rewound?: boolean}} [options]
* @param {{fromCourseDeg?: number|null, rewound?: boolean,
* handover?: boolean}} [options]
* `fromCourseDeg`: nose to glide from when the row's own motion is not
* what was on screen (tracking handoff). `rewound`: the time drawn moved
* back before the row's motion; it is drawn where it was then, with no
* easing from where it is drawn now.
* easing from where it is drawn now. `handover`: the clock came back to
* live and this is the contact's first live fix: it eases from where it
* is drawn onto its live path, however its last plan ran out.
*/
function _planIcon(icao24, { fromCourseDeg, rewound = false } = {}) {
function _planIcon(
icao24,
{ fromCourseDeg, rewound = false, handover = false } = {},
) {
const icons = state._icons;
if (!icons?.has(icao24) || holdsPlan(icao24)) return;
const history = state._positionHistory.get(icao24);
@@ -628,7 +648,7 @@ export function createAircraftIcons({
// A host-supplied placement decides where a live contact is drawn; with
// none, or no answer for this contact, the layer's own motion below does.
if (_planPlaced(icao24, info, history, t)) return;
if (_planPlaced(icao24, info, history, t, handover)) return;
const regime = parts.motion._motionRegime(history, info, renderTime);
if (regime.unseen) {
@@ -745,7 +765,7 @@ export function createAircraftIcons({
fromCourseDeg == null &&
!rewound &&
icons.shown(icao24) &&
icons.expires(icao24) > t - RECOVER_STALE_PLAN_MS
(handover || icons.expires(icao24) > t - RECOVER_STALE_PLAN_MS)
) {
const prev = icons.item(icao24);
const drawn = motionPosition(prev.motion, prev.pos, t);
@@ -804,13 +824,21 @@ export function createAircraftIcons({
* @returns {boolean} False when there is no placement, the layer follows
* the world clock, or it has no answer for this contact.
*/
function _planPlaced(icao24, info, history, t) {
function _planPlaced(icao24, info, history, t, handover = false) {
if (!placeAt || followsClock()) return false;
const leadMs = displayDelay.currentMs;
const from = vec();
const start = placeAt(icao24, t + leadMs, info, history, from);
if (!start) return false;
const { courseDeg: course } = start;
// Back at live, or while an ease runs, it eases on from where it is drawn.
const easing = easeEnds.get(icao24) > t;
if (
(handover || easing) &&
_easePlaced(icao24, info, history, t, from, start)
)
return true;
easeEnds.delete(icao24);
const t1 = t + PLACED_PLAN_MS;
const to = vec();
const end = placeAt(icao24, t1 + leadMs, info, history, to);
@@ -835,6 +863,40 @@ export function createAircraftIcons({
return true;
}
/**
* Back at live, a placed contact still on screen eases from where it is
* drawn onto where it is placed, as the layer's own motion recovers (and a
* new answer while that ease runs eases on from where it is then): along
* the straight line to where the placement has it when the ease ends, nose
* along that line, unless it is nearer than a recovery or farther than a
* jump would be.
* @returns {boolean} Whether the contact was planned to ease.
*/
function _easePlaced(icao24, info, history, t, placed, start) {
const icons = state._icons;
if (!icons.shown(icao24)) return false;
const prev = icons.item(icao24);
const drawn = motionPosition(prev.motion, prev.pos, t);
const errorM = distance(drawn, placed);
if (!(errorM > RECOVER_MIN_M && errorM < RECOVER_SNAP_M)) return false;
const speed = start.speedMps ?? info?.velocity ?? 0;
const end = t + recoveryMs(errorM, speed);
const target = vec();
if (!placeAt(icao24, end + displayDelay.currentMs, info, history, target))
return false;
const motion = straightSegment(drawn, t, end, target);
const course = motionCourse(motion, undefined, t);
icons.setUnseen(icao24, false);
icons.update(
icao24,
{ pos: clone(drawn), course, motion, courseGlide: undefined },
{ expiresAt: end },
);
planFrom.set(icao24, t);
easeEnds.set(icao24, end);
return true;
}
/**
* Re-plan every row whose regime ended by `t` (epoch ms), and, following
* the clock, every row whose motion starts after `t` once the time drawn
@@ -906,26 +968,94 @@ export function createAircraftIcons({
* @returns {{image: string, imageLod: {near: string, switchPx: number},
* size: [number, number], scale: number, scaleByDistance: object}}
*/
function _fleetLook(icao24, info = state.records.data.get(icao24)) {
function _fleetLook(
icao24,
info = state.records.data.get(icao24),
frame = _rotorFrameOf(icao24, info, Date.now()),
) {
const rendering = parts.rendering;
return {
image: aircraftIcon(
rendering._iconKind(icao24, info?.klass),
FLEET_ICON_PX,
frame,
),
imageLod: {
near: aircraftIcon(
rendering._iconKind(icao24, info?.klass),
TRACKED_ICON_PX,
frame,
),
switchPx,
},
size: [FLEET_ICON_SIZE_PX, FLEET_ICON_SIZE_PX],
scale: rendering._fleetBillboardScale(icao24, info?.klass),
scale: rendering._fleetBillboardScale(icao24),
scaleByDistance: NORMAL_SCALE_BY_DISTANCE,
};
}
/**
* The rotor frame a contact draws at `nowMs` (`rotorFrames.js`): a
* helicopter's, which holds still on the ground unless it taxis; undefined
* for every other kind.
*/
function _rotorFrameOf(icao24, info, nowMs) {
if (parts.rendering._iconKind(icao24, info?.klass) !== 'helicopter')
return undefined;
return rotorFrame(icao24, nowMs, _rotorState(info));
}
/** What turns a contact's rotor: whether it is grounded, and its speed (m/s). */
function _rotorState(info) {
const speed = info?.velocity ?? info?.speedMps;
return {
onGround: info?.onGround === true,
speedMps: Number.isFinite(speed) ? speed : null,
};
}
/**
* Turn the rotors of the airborne helicopters in view: each one's images
* are written again only when its rotor frame changed (`ROTOR_FPS`, run
* from the fleet pass). One out of view, below the horizon, or hidden for
* its 3D model keeps its frame. The tracked one is drawn by the tracked
* icon, which is given its new images. With no airborne helicopter drawn
* this does nothing.
* @param {number} nowMs Epoch ms the frame is chosen at.
* @param {number} t The display instant, epoch ms (where icons are drawn).
* @param {((position: {x: number, y: number, z: number}) => boolean)|null}
* [inView] Whether a position is in the camera's view; none: all are.
*/
function _turnRotors(nowMs, t, inView = null) {
const icons = state._icons;
if (!rotors.size || !icons) return;
let occluder;
for (const [id, rotor] of rotors) {
const frame = rotorFrame(id, nowMs);
// Drawn at this frame, or already judged at it: nothing to do.
if (frame === rotor.drawn || frame === rotor.checked) continue;
rotor.checked = frame;
const tracked = id === state._trackedIcao;
if (!icons.has(id) || (!tracked && !icons.shown(id))) continue;
const position = icons.position(id, t);
if (!position) continue;
if (occluder === undefined) occluder = _occluder();
if (!_aboveHorizon(position, occluder)) continue;
if (inView && !inView(position)) continue;
rotor.drawn = frame;
if (tracked) {
parts.tracking?._syncTrackedBillboardImage?.();
continue;
}
const { image, imageLod } = _fleetLook(
id,
state.records.data.get(id),
frame,
);
icons.update(id, { image, imageLod });
}
}
/** Image, size, scale, tint and freshness for one row under the current
* normal/cockpit contract. Motion and course stay with `_planIcon`. */
function _applyIconPresentation(icao24) {
@@ -953,8 +1083,27 @@ export function createAircraftIcons({
color: rgba(rendering._fleetBillboardColor(icao24, info)),
rotationMode: 'course',
};
// A ground station's mast stands upright.
if (!cockpitDot && info?.klass === 'station') {
look.rotationMode = 'screen';
look.rotation = 0;
}
look.alpha = state.records.missingPolls.get(icao24) ? staleAlpha : 1;
icons.update(icao24, look);
// An airborne helicopter drawn as its glyph turns its rotor.
const frame = cockpitDot
? undefined
: _rotorFrameOf(icao24, info, Date.now());
if (frame === undefined || !rotorTurns(_rotorState(info))) {
// A tracked helicopter that lands shows the still frame at once.
if (rotors.delete(icao24) && tracked)
parts.tracking?._syncTrackedBillboardImage?.();
} else rotors.set(icao24, { drawn: frame, checked: frame });
}
/** Whether any airborne helicopter's rotor turns (`_turnRotors` has work). */
function _rotorsTurning() {
return rotors.size > 0;
}
/** Add a row for a new contact, hidden while it is the tracked one. */
@@ -990,7 +1139,9 @@ export function createAircraftIcons({
/** Drop a contact and everything the layer keeps for it. */
function _forgetContact(icao24) {
state._icons?.remove(icao24);
rotors.delete(icao24);
planFrom.delete(icao24);
easeEnds.delete(icao24);
parts.rendering._releaseModel(icao24);
state.records.forget(icao24);
// The host-supplied placement, if any, forgets it as well.
@@ -1025,6 +1176,8 @@ export function createAircraftIcons({
_focusIcons,
_applyIconPresentation,
_fleetLook,
_turnRotors,
_rotorsTurning,
_addIcon,
_forgetContact,
_iconIds,
+283 -1
View File
@@ -6,10 +6,12 @@ import {
createContactIcons,
floorCoastArc,
} from './aircraftIconLayer.js';
import { COAST_FLOOR_LIFT_M } from './motionModel.js';
import { COAST_FLOOR_LIFT_M, recoveryMs } from './motionModel.js';
import { fromDegrees, toCartographicRadians } from '../geo/ellipsoid.js';
import { bindFakeDraw } from '../testSupport/fakeDrawPort.mjs';
import { createDisplayDelay } from './displayDelay.js';
import { aircraftIcon, FLEET_ICON_PX } from './aircraftIcons.js';
import { ROTOR_STILL_FRAME } from './rotorFrames.js';
const WORLD_MS = Date.UTC(2026, 10, 1, 12, 0);
@@ -199,3 +201,283 @@ test('a coast over known ground that never rises is planned once', () => {
'held on the ground where the coast stopped',
);
});
test('only airborne helicopters in view turn their rotor, written when the frame steps', (t) => {
t.mock.timers.enable({ apis: ['Date'], now: WORLD_MS });
const here = fromDegrees(0, 30, 300);
const away = fromDegrees(90, 30, 300);
const records = new Map([
['h1', { klass: 'helicopter', onGround: false }],
['h2', { klass: 'helicopter', onGround: true }],
['p1', { klass: 'airliner', onGround: false }],
['h3', { klass: 'helicopter', onGround: false }],
]);
const state = {
now: () => Date.now(),
_icons: createContactIcons(),
_positionHistory: new Map(),
_cockpitNearContacts: new Set(),
records: { data: records, missingPolls: new Map() },
};
const icons = createAircraftIcons({
state,
services: { focus: { focusPassIsNeeded: () => false } },
parts: {
rendering: {
_iconKind: (_id, klass) => klass,
_fleetBillboardColor: () => [1, 1, 1, 1],
_fleetBillboardScale: () => 1,
},
},
layerId: 'flights',
courseMaxDps: 3,
cockpitContactSizePx: 8,
});
for (const id of records.keys()) {
state._icons.put(
{
id,
pos: id === 'h3' ? away : here,
motion: { kind: 'hold', courseDeg: 0 },
size: [20, 20],
},
{ expiresAt: Infinity },
);
icons._applyIconPresentation(id);
}
const image = (id) => state._icons.item(id).image;
// The grounded helicopter holds the still frame.
assert.equal(
image('h2'),
aircraftIcon('helicopter', FLEET_ICON_PX, ROTOR_STILL_FRAME),
);
const h3Before = image('h3');
const writes = new Map();
const update = state._icons.update;
state._icons.update = (id, patch, options) => {
writes.set(id, (writes.get(id) ?? 0) + 1);
return update(id, patch, options);
};
// The fleet pass, every 80 ms for a second; h3 is out of view.
const inView = (p) => Math.abs(p.x - here.x) < 1;
const seen = new Set();
for (let step = 0; step <= 12; step++) {
if (step) t.mock.timers.tick(80);
icons._turnRotors(Date.now(), Date.now(), inView);
seen.add(image('h1'));
}
// Through every frame, written only on the steps its frame changed.
assert.equal(seen.size, 3);
for (const frame of [0, 1, 2])
assert.ok(seen.has(aircraftIcon('helicopter', FLEET_ICON_PX, frame)));
assert.ok(
writes.get('h1') >= 8 && writes.get('h1') <= 11,
`${writes.get('h1')} writes`,
);
assert.equal(writes.get('h2') ?? 0, 0, 'grounded: frozen');
assert.equal(writes.get('p1') ?? 0, 0, 'not a helicopter');
assert.equal(writes.get('h3') ?? 0, 0, 'out of view');
assert.equal(image('h3'), h3Before);
// Landing freezes it on the still frame.
records.get('h1').onGround = true;
icons._applyIconPresentation('h1');
const landed = writes.get('h1');
t.mock.timers.tick(400);
icons._turnRotors(Date.now(), Date.now(), inView);
assert.equal(writes.get('h1'), landed);
assert.equal(
image('h1'),
aircraftIcon('helicopter', FLEET_ICON_PX, ROTOR_STILL_FRAME),
);
});
/** An icon layer over helicopters `ids`, all at `here`, for the rotor tests. */
function rotorFixture(records, positions, tracking = {}) {
const state = {
now: () => Date.now(),
_icons: createContactIcons(),
_positionHistory: new Map(),
_cockpitNearContacts: new Set(),
records: { data: records, missingPolls: new Map() },
};
const icons = createAircraftIcons({
state,
services: { focus: { focusPassIsNeeded: () => false } },
parts: {
rendering: {
_iconKind: (_id, klass) => klass,
_fleetBillboardColor: () => [1, 1, 1, 1],
_fleetBillboardScale: () => 1,
},
tracking,
},
layerId: 'flights',
courseMaxDps: 3,
cockpitContactSizePx: 8,
});
for (const id of records.keys()) {
state._icons.put(
{
id,
pos: positions[id],
motion: { kind: 'hold', courseDeg: 0 },
size: [20, 20],
},
{ expiresAt: Infinity },
);
icons._applyIconPresentation(id);
}
return { state, icons };
}
test('a tracked helicopter that lands shows the still frame at once', (t) => {
t.mock.timers.enable({ apis: ['Date'], now: WORLD_MS });
const records = new Map([['h1', { klass: 'helicopter', onGround: false }]]);
let synced = 0;
const { state, icons } = rotorFixture(
records,
{ h1: fromDegrees(0, 30, 300) },
{ _syncTrackedBillboardImage: () => synced++ },
);
state._trackedIcao = 'h1';
assert.equal(icons._rotorsTurning(), true);
records.get('h1').onGround = true;
icons._applyIconPresentation('h1');
assert.equal(synced, 1, 'the tracked billboard is given its images again');
assert.equal(icons._rotorsTurning(), false);
assert.equal(
icons._fleetLook('h1').image,
aircraftIcon('helicopter', FLEET_ICON_PX, ROTOR_STILL_FRAME),
);
// Taxiing faster than 1 m/s, its rotor turns again, as the model's does.
records.get('h1').velocity = 5;
icons._applyIconPresentation('h1');
assert.equal(icons._rotorsTurning(), true);
records.get('h1').velocity = 0;
icons._applyIconPresentation('h1');
assert.equal(synced, 2);
assert.equal(icons._rotorsTurning(), false);
// An untracked one landing does not touch the tracked billboard.
records.get('h1').onGround = false;
icons._applyIconPresentation('h1');
state._trackedIcao = null;
records.get('h1').onGround = true;
icons._applyIconPresentation('h1');
assert.equal(synced, 2);
});
test('a helicopter out of view is judged once per rotor frame, not every pass', (t) => {
t.mock.timers.enable({ apis: ['Date'], now: WORLD_MS });
const records = new Map();
const positions = {};
for (let i = 0; i < 300; i++) {
const id = `h${i}`;
records.set(id, { klass: 'helicopter', onGround: false });
positions[id] = fromDegrees(90, 30, 300);
}
const { state, icons } = rotorFixture(records, positions);
let judged = 0;
const inView = () => {
judged++;
return false;
};
const writes = [];
const update = state._icons.update;
state._icons.update = (id, ...rest) => {
writes.push(id);
return update(id, ...rest);
};
// Passes 10 ms apart for 2 s: 200 passes over 300 helicopters, all out of
// view. Each is judged at most once per frame step (20 steps), and not on
// a step back onto the frame it is drawn at.
for (let pass = 0; pass < 200; pass++) {
t.mock.timers.tick(10);
icons._turnRotors(Date.now(), Date.now(), inView);
}
assert.ok(judged <= 300 * 21, `${judged} judgements`);
assert.ok(judged >= 300 * 10, `${judged} judgements`);
assert.equal(writes.length, 0, 'none in view: no image written');
});
test('back at live, a placed contact eases from where it is drawn over a recovery, nose along the way', (t) => {
t.mock.timers.enable({ apis: ['Date'], now: WORLD_MS });
const drawnAt = fromDegrees(0, 30, 3_000);
const SPEED = 200;
// The placement has it 2 km east of where it is drawn, flying east.
const placedAt = (wallMs) => {
const east = 2_000 + (SPEED * (wallMs - WORLD_MS)) / 1000;
return fromDegrees(east / (111_320 * Math.cos(Math.PI / 6)), 30, 3_000);
};
const plan = (handover, keep = {}) => {
const state = {
now: () => Date.now(),
_icons: createContactIcons(),
_positionHistory: new Map([['c', [{ epochMs: WORLD_MS }]]]),
records: { data: new Map([['c', {}]]) },
};
const icons = createAircraftIcons({
state,
services: { focus: { focusPassIsNeeded: () => false } },
parts: {
motion: { _displayTimeAt: (ms) => ms, _fixEpochMs: (f) => f.epochMs },
},
layerId: 'flights',
courseMaxDps: 3,
cockpitContactSizePx: 8,
placeAt: (_id, wallMs, _info, _history, out) => {
Object.assign(out, placedAt(wallMs));
return { courseDeg: 90, speedMps: SPEED };
},
});
state._icons.put(
{
id: 'c',
pos: drawnAt,
motion: { kind: 'hold', courseDeg: 0 },
course: 0,
size: [20, 20],
},
{ expiresAt: -Infinity },
);
icons._planIcon('c', handover ? { handover: true } : undefined);
keep.icons = icons;
return state._icons;
};
const metres = (a, b) => Math.hypot(a.x - b.x, a.y - b.y, a.z - b.z);
const eased = plan(true);
const end = eased.expires('c');
assert.equal(end, WORLD_MS + recoveryMs(2_000, SPEED));
assert.ok(end - WORLD_MS > 1_000, 'longer than a placed plan');
assert.ok(metres(eased.position('c', WORLD_MS, {}), drawnAt) < 1);
assert.ok(metres(eased.position('c', end, {}), placedAt(end)) < 1);
// The nose points along the way from where it is drawn to where it goes.
assert.ok(Math.abs(eased.course('c', WORLD_MS) - 90) < 1);
const plain = plan(false);
assert.ok(
metres(plain.position('c', WORLD_MS, {}), placedAt(WORLD_MS)) < 1,
'without the handover it is drawn where it is placed',
);
// The next answer comes 15 s in, the ease still running: it eases on from
// where it is drawn then, not cut to where it is placed.
const keep = {};
const easing = plan(true, keep);
const firstEnd = easing.expires('c');
assert.ok(firstEnd - WORLD_MS > 15_000, 'an ease longer than a poll');
t.mock.timers.tick(15_000);
const at = Date.now();
const drawnThen = easing.position('c', at, {});
keep.icons._planIcon('c');
assert.ok(metres(easing.position('c', at, {}), drawnThen) < 1);
const reEnd = easing.expires('c');
assert.ok(reEnd > at + 1_000, 'eases on');
assert.ok(metres(easing.position('c', reEnd, {}), placedAt(reEnd)) < 1);
// Once it has caught up, the next answer draws it where it is placed.
t.mock.timers.tick(reEnd - at + 1);
keep.icons._planIcon('c');
assert.ok(
metres(easing.position('c', Date.now(), {}), placedAt(Date.now())) < 1,
);
});
+115 -28
View File
@@ -8,9 +8,9 @@
* width/height 20 (24 tracked) in flights.js / militaryFlights.js, so Cesium
* DOWN-samples this larger, higher-precision source to the same on-screen
* footprint — crisp anti-aliased edges instead of an upscaled 32px bitmap. The
* on-screen size is unchanged and CLASS_SCALE_2D is untouched (no scale
* compensation needed: the billboard's explicit width/height, not the SVG's,
* sets the pixel size — the intrinsic SVG size only controls raster fidelity).
* on-screen size is unchanged (the billboard's explicit width/height, not the
* SVG's, sets the pixel size — the intrinsic SVG size only controls raster
* fidelity).
*
* All glyphs are nose-up (nose toward -Y at rotation 0; the screen-projected
* rotation pipeline in iconOrientation.js spins the whole glyph). Fill is white
@@ -23,12 +23,19 @@
* quadjet/glider use the "bold" chart-symbol redraw; light/fastjet keep the
* original drawings. Raster fidelity doubled (192px source, same 96 coords).
*
* The helicopter is a top-down body under a four-blade rotor drawn in three
* frames (`aircraftIcon('helicopter', px, frame)`, turned by
* `rotorFrames.js`). Two kinds are not aircraft: `vehicle`, one sprite for
* every airport vehicle, and `station`, a mast for ground stations, drawn
* upright.
*
* Silhouette language follows skylight's type-aware glyphs (MIT,
* https://github.com/cpaczek/skylight): slender fuselages, swept wings for
* jets, long high-aspect wings for the glider, straight wings + prop discs for
* props, a rotor disc + tail boom + tail-rotor for the helicopter, and a delta
* for the fast jet. Each class has a DISTINCT planform so it reads at ~20px by
* shape, not just by footprint size.
* shape alone: every glyph is fitted to the same extent, so none is bigger
* than another.
*/
const VIEW = 96;
@@ -130,23 +137,6 @@ const BODIES = {
L -3,-25 C -3,-29 -2.4,-33 0,-35 Z" fill="white" ${STROKE_BOLD}/>
<rect x="-10.5" y="32.5" width="21" height="5" rx="1.5" fill="white" ${STROKE_BOLD}/>`,
// ── Helicopter: a SOLID translucent main-rotor disc (survives downscale as an
// obvious circle, unlike a thin ring) with a bold two-blade cross, a
// teardrop cabin, a tail boom, and a tail rotor. Unmistakable "disc on top"
// silhouette that never reads as a fixed-wing.
helicopter: `
<circle cx="0" cy="-6" r="31" fill="white" fill-opacity="0.22"/>
<g transform="rotate(45 0 -6)">
<rect x="-30.5" y="-8.2" width="61" height="4.4" rx="2.2" fill="white" fill-opacity="0.9"/>
<rect x="-30.5" y="-8.2" width="61" height="4.4" rx="2.2" fill="white" fill-opacity="0.9" transform="rotate(90 0 -6)"/>
</g>
<path d="M0,-22 C 8,-20 10.5,-13 10.5,-6 C 10.5,2 7.5,7 0,8.5
C -7.5,7 -10.5,2 -10.5,-6 C -10.5,-13 -8,-20 0,-22 Z" fill="white" ${STROKE}/>
<path d="M-2.6,8 L 2.6,8 L 1.8,32 L -1.8,32 Z" fill="white" ${STROKE}/>
<path d="M-8,27 L 8,27 L 8,30.6 L -8,30.6 Z" fill="white"/>
<circle cx="5.6" cy="35" r="6" fill="white" fill-opacity="0.6"/>
<circle cx="5.6" cy="35" r="2.1" fill="white"/>`,
// ── Fast jet: sharp delta/cropped-delta with a pointed nose, LERX root
// blend, and twin tail fins. Aggressive, all-wing.
fastjet: `
@@ -236,6 +226,87 @@ const BODIES = {
L -1.6,30 L -13,36 L -13,32 L -2.1,24
L -2.3,0 L -43,-2.5 L -43,-7 L -2.4,-12
L -4.4,-30 C -4.6,-35 -3.6,-40 0,-40 Z" fill="white" ${STROKE}/>`,
// ── Airport vehicle (type ZVEH, emitter C1/C2): one service van seen from
// above, front up, for every kind (fire truck, tug, car, de-icer). A
// boxy body, a dark windscreen band and a roof light bar; the layer
// tints it amber so it reads apart from aircraft.
vehicle: `
<path d="M-12,-39 L 12,-39 L 15,-36 L 15,38 L 13,40 L -13,40 L -15,38
L -15,-36 Z" fill="white" ${STROKE}/>
<path d="M-18.5,-25 h4 v3 h-4 Z M14.5,-25 h4 v3 h-4 Z" fill="white" ${STROKE}/>
<path d="M-13,-32 L 13,-32 L 12,-21 L -12,-21 Z" fill="rgba(0,0,0,0.62)"/>
<rect x="-10" y="-13" width="20" height="5" rx="1.5" fill="rgba(0,0,0,0.45)"/>`,
// ── Ground station or obstacle (type GRND, emitter C3–C5): a radio mast
// with two pairs of signal arcs, drawn upright on screen, never turned.
station: `
<path d="M7.1,-38.4 A 11 11 0 0 1 7.1,-21.6 M-7.1,-38.4 A 11 11 0 0 0 -7.1,-21.6
M12.2,-44.6 A 19 19 0 0 1 12.2,-15.4 M-12.2,-44.6 A 19 19 0 0 0 -12.2,-15.4"
fill="none" stroke="rgba(0,0,0,0.32)" stroke-width="5" stroke-linecap="round"/>
<path d="M7.1,-38.4 A 11 11 0 0 1 7.1,-21.6 M-7.1,-38.4 A 11 11 0 0 0 -7.1,-21.6
M12.2,-44.6 A 19 19 0 0 1 12.2,-15.4 M-12.2,-44.6 A 19 19 0 0 0 -12.2,-15.4"
fill="none" stroke="white" stroke-width="3.4" stroke-linecap="round"/>
<circle cx="0" cy="-30" r="4.5" fill="white" ${STROKE}/>
<path d="M-2.5,-25 L 2.5,-25 L 7,34 L 13,34 L 13,38 L -13,38 L -13,34
L -7,34 Z" fill="white" ${STROKE}/>`,
};
/**
* The helicopter, seen from above: a cabin, tail boom and tail plane under a
* four-blade main rotor. The rotor turns in {@link ROTOR_FRAMES} frames 30°
* apart; four blades repeat every 90°, so the third frame steps back onto
* the first and the loop is seamless. The middle frame (blades as an X) is
* the still one.
*/
const HELI_ROTOR_CENTRE_Y = -11.2;
const HELI_DISC = `<circle cx="0" cy="${HELI_ROTOR_CENTRE_Y}" r="32.8" fill="white" fill-opacity="0.22"/>`;
const HELI_BODY = `
<path d="M0,-33.4 L -2.3,-32.1 L -4.2,-28 L -4.3,-30.6 L -6.2,-30.6
L -6.2,0.2 L -4.3,0.2 L -4.2,-3.1 L -1.9,7.9 L -1.7,18.9
L -7.4,19.2 L -7.8,24 L -2.9,24.4 L -3.2,35.6 L -1.2,36
L 0,34.3 L 1.2,36 L 3.2,35.6 L 2.9,24.4 L 7.8,24 L 7.4,19.2
L 1.7,18.9 L 1.9,7.9 L 4.2,-3.1 L 4.3,0.2 L 6.2,0.2 L 6.2,-30.6
L 4.3,-30.6 L 4.2,-28 L 2.3,-32.1 Z" fill="white" ${STROKE}/>
<circle cx="0" cy="${HELI_ROTOR_CENTRE_Y}" r="3.2" fill="white" ${STROKE}/>`;
/** Main-rotor blade angle of each frame, degrees clockwise. */
const ROTOR_ANGLES_DEG = [15, 45, 75];
/** How many rotor frames the helicopter turns through. */
export const ROTOR_FRAMES = ROTOR_ANGLES_DEG.length;
/** The frame a helicopter holds when its rotor does not turn. */
export const ROTOR_STILL_FRAME = 1;
/** One rotor frame: the disc, two crossed blades at `angle`, the body over them. */
function helicopterBody(frame) {
const angle = ROTOR_ANGLES_DEG[frame] ?? ROTOR_ANGLES_DEG[ROTOR_STILL_FRAME];
const blade = (deg) =>
`<rect x="-32.2" y="${HELI_ROTOR_CENTRE_Y - 2.2}" width="64.4" height="4.4" rx="2.2" fill="white" fill-opacity="0.92" stroke="rgba(0,0,0,0.25)" stroke-width="0.8" transform="rotate(${deg} 0 ${HELI_ROTOR_CENTRE_Y})"/>`;
return `${HELI_DISC}${blade(angle)}${blade(angle + 90)}${HELI_BODY}`;
}
/**
* Every sprite draws at one size. The bodies were drawn at different spans
* (a light aircraft's half-extent is 32.8 units, a quadjet's 47), so each is
* scaled until its farthest painted edge, stroke included, sits
* {@link GLYPH_HALF_EXTENT} units from the centre. Values are each body's
* measured half-extent; aircraftIcons.test.mjs re-measures the rasters.
*/
const GLYPH_HALF_EXTENT = 44;
const BODY_HALF_EXTENT = {
airliner: 42.7,
widebody: 45.7,
quadjet: 47.0,
turboprop: 40.7,
light: 32.8,
glider: 46.0,
fastjet: 44.7,
bizjet: 42.7,
uav: 43.7,
helicopter: 44.0,
vehicle: 40.7,
station: 47.1,
tr3b: 40.8,
tr3bHot: 42.3,
};
const _iconCache = new Map();
@@ -259,16 +330,32 @@ export const FLEET_ICON_PX = FLEET_RASTER_PX;
* it stays crisp at its biggest on-screen sizes. */
const TRACKED_RASTER_PX = 192;
/** Data URI for a class silhouette (lazily built, cached per kind+size).
* Default size serves the fleet; pass `aircraftIcon(kind, TRACKED_ICON_PX)`
* (re-exported below) for the tracked billboard. */
/** Raster size of the tracked glyph and every glyph's near image. */
export const TRACKED_ICON_PX = TRACKED_RASTER_PX;
export function aircraftIcon(kind, px = FLEET_RASTER_PX) {
const k = BODIES[kind] ? kind : 'airliner';
const key = `${k}@${px}`;
/**
* Data URI for a class silhouette (lazily built, cached per kind, size and
* frame). The default size serves the fleet; pass
* `aircraftIcon(kind, TRACKED_ICON_PX)` for the near image.
* @param {string} kind A `classifyAircraft()` class, or a TR-3B kind.
* @param {number} [px] Raster size.
* @param {number} [frame] A helicopter's rotor frame, 0 to `ROTOR_FRAMES - 1`
* (the still frame by default); other kinds have one image.
* @returns {string}
*/
export function aircraftIcon(kind, px = FLEET_RASTER_PX, frame) {
const heli = kind === 'helicopter';
const k = heli || BODIES[kind] ? kind : 'airliner';
const f = heli
? Number.isInteger(frame) && frame >= 0 && frame < ROTOR_FRAMES
? frame
: ROTOR_STILL_FRAME
: 0;
const key = `${k}@${px}#${f}`;
let uri = _iconCache.get(key);
if (!uri) {
const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${px}" height="${px}" viewBox="0 0 ${VIEW} ${VIEW}"><g transform="translate(${C},${C})">${BODIES[k]}</g></svg>`;
const body = heli ? helicopterBody(f) : BODIES[k];
const fit = +(GLYPH_HALF_EXTENT / BODY_HALF_EXTENT[k]).toFixed(4);
const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${px}" height="${px}" viewBox="0 0 ${VIEW} ${VIEW}"><g transform="translate(${C},${C}) scale(${fit})">${body}</g></svg>`;
uri = 'data:image/svg+xml;base64,' + _b64(svg);
_iconCache.set(key, uri);
}
+57
View File
@@ -0,0 +1,57 @@
// src/data/aircraftIcons.test.mjs
import { test } from 'node:test';
import assert from 'node:assert/strict';
import sharp from 'sharp';
import { aircraftIcon, ROTOR_FRAMES } from './aircraftIcons.js';
const KINDS = [
'airliner',
'widebody',
'quadjet',
'turboprop',
'light',
'glider',
'fastjet',
'bizjet',
'uav',
'helicopter',
'vehicle',
'station',
'tr3b',
'tr3bHot',
];
const PX = 480;
/** Farthest painted pixel from the centre, in the 96-unit glyph space. */
async function halfExtent(uri) {
const svg = Buffer.from(uri.split(',')[1], 'base64');
const { data, info } = await sharp(svg)
.ensureAlpha()
.raw()
.toBuffer({ resolveWithObject: true });
let half = 0;
const c = info.width / 2;
for (let y = 0; y < info.height; y++) {
for (let x = 0; x < info.width; x++) {
if (data[(y * info.width + x) * 4 + 3] <= 8) continue;
half = Math.max(half, c - x, x + 1 - c, c - y, y + 1 - c);
}
}
return (half * 96) / info.width;
}
test('every sprite fills the same extent, whatever its class', async () => {
const extents = {};
for (const kind of KINDS) {
extents[kind] = await halfExtent(aircraftIcon(kind, PX));
}
for (let frame = 0; frame < ROTOR_FRAMES; frame++) {
extents[`helicopter#${frame}`] = await halfExtent(
aircraftIcon('helicopter', PX, frame),
);
}
for (const [kind, half] of Object.entries(extents)) {
assert.ok(Math.abs(half - 44) <= 0.6, `${kind}: ${half.toFixed(2)}`);
}
});
+190 -53
View File
@@ -14,7 +14,8 @@ import {
showModel,
} from './modelRecord.js';
import { modelDrawnScale } from './modelVisualAnchor.js';
import { fleetModelSet } from './fleetModels.js';
import { fleetModelSet, fleetPartTable } from './fleetModels.js';
import { aircraftLayerPartState } from './modelPartDrivers.js';
import { findCamera, findDraw, rendererOf } from '../render/rendererOf.js';
import { fromDegrees, toLonLatH } from '../geo/ellipsoid.js';
import {
@@ -225,10 +226,10 @@ export function createAircraftModels({
return sets ? [sets.fleet.id, sets.tracked.id] : [];
}
/** The FLEET's 3D-model regime: models3d enabled AND the camera zoomed in past the altitude
* ceiling. Since 2026-08-22 the toggle DEFAULTS ON in `proximity`, which is itself the
* budget: models only appear below MODEL_ALT_CEIL_M and only for the nearest MODEL_MAX in
* view. The toggle still OWNS the fleet — an operator who wants every in-view plane arms
/** The FLEET's 3D-model regime: models3d enabled AND the camera below the altitude ceiling,
* above which no contact can be within the model radius. Since 2026-08-22 the toggle DEFAULTS
* ON in `proximity`, which is itself the budget: models only appear within MODEL_ADD_M of the
* camera and only for the nearest MODEL_MAX. The toggle still OWNS the fleet — an operator who wants every in-view plane arms
* `all`, and one who wants none turns 3D off — this predicate is unchanged. The TRACKED
* contact routes through here too (`_trackedModelRegimeActive`), with its place in the
* fleet's cap, so selecting a contact never changes its form. */
@@ -254,20 +255,17 @@ export function createAircraftModels({
: mapCap;
}
/** Active ADD radius (m) — new planes inside this range get a model. Mode-aware: 'all' reaches far. */
/** ADD radius (m) — new planes inside this range get a model. Both modes
* share it; they differ by their caps. */
function _modelAddDistM() {
return state._models3dMode === 'all'
? policy.MODEL_ALL_ADD_M
: policy.MODEL_PROX_ADD_M;
return policy.MODEL_ADD_M;
}
/** Active KEEP radius (m) — a modeled plane keeps its model out to here (hysteresis vs ADD). */
/** KEEP radius (m) — a modeled plane keeps its model out to here (hysteresis vs ADD). */
function _modelKeepDistM() {
return state._models3dMode === 'all'
? policy.MODEL_ALL_KEEP_M
: policy.MODEL_PROX_KEEP_M;
return policy.MODEL_KEEP_M;
}
/** What a grounded model's ground sample sees through: the vertical sample
@@ -341,6 +339,54 @@ export function createAircraftModels({
record.tint = [base[0], base[1], base[2], alpha];
}
/** A finite number of the first of `values` that is one, else null. */
const _finite = (...values) =>
values.find((v) => typeof v === 'number' && Number.isFinite(v)) ?? null;
/**
* How high an aircraft flies above the ground under it: its render
* altitude over the cached ground floor there; null where that floor is
* not known (the gear then follows the approach rule instead).
*/
function _heightAboveGround(meta) {
const altitude = _finite(meta.renderAltitudeM);
const floor =
Number.isFinite(meta.rawLat) && Number.isFinite(meta.rawLon)
? services.groundFloor?.cachedGroundFloor?.(meta.rawLat, meta.rawLon)
: null;
return altitude !== null && Number.isFinite(floor)
? altitude - floor
: null;
}
/**
* The moving parts a contact's model is posed with, from its record
* (`aircraftLayerPartState`): gear, doors and flaps by its height and climb,
* fans, propellers and rotors while it flies or taxis. An airport vehicle
* is a road vehicle (`groundVehiclePartState`): its wheels roll with its
* speed. Undefined for a model without parts.
*/
function _partsOf(meta, spec) {
if (!meta) return undefined;
const table = fleetPartTable(fleetModelSet(), spec?.model);
if (!table) return undefined;
return aircraftLayerPartState(table, {
klass: meta.klass,
onGround: meta.onGround === true,
heightAboveGroundM: _heightAboveGround(meta),
altitudeM: _finite(meta.altitude, meta.altitudeM),
verticalRateMps: _finite(meta.verticalRate, meta.verticalRateMps),
speedMps: _finite(meta.velocity, meta.speedMps),
});
}
/** Pose a record's parts as its contact's record says, and key them for `_send`. */
function _poseParts(record, meta, spec) {
const pose = _partsOf(meta, spec);
record.parts = pose;
record.partsKey = pose ? JSON.stringify(pose) : '';
}
/** The record's item, as its set draws it. */
function _itemOf(id, record) {
return {
@@ -354,10 +400,11 @@ export function createAircraftModels({
minPixelSize: record.minPixelSize,
shading: _shadingOf(),
tint: record.tint ?? WHITE,
// The mesh's own colours, tinted while tracked or in an emergency;
// The mesh's own colours, tinted red in an emergency;
// the IR boost draws it flat white.
colorBlend: aircraftModelBlend(state._irBoost === true),
colorBlend: aircraftModelBlend(state._irBoost === true, record.tint),
environmentMap: AIRCRAFT_ENVIRONMENT_MAP_OPTIONS.enabled,
...(record.parts ? { parts: record.parts } : {}),
show: record.show,
};
}
@@ -367,7 +414,7 @@ export function createAircraftModels({
if (!set) return;
const p = record.position;
const t = record.tint ?? WHITE;
const key = `${record.url}|${p.x},${p.y},${p.z}|${record.heading}|${record.scale}|${record.minPixelSize}|${t[0]},${t[1]},${t[2]},${t[3]}|${state._irBoost === true}|${record.show}`;
const key = `${record.url}|${p.x},${p.y},${p.z}|${record.heading}|${record.scale}|${record.minPixelSize}|${t[0]},${t[1]},${t[2]},${t[3]}|${state._irBoost === true}|${record.show}|${record.partsKey ?? ''}`;
if (key === record.sent) return;
record.sent = key;
const item = _itemOf(id, record);
@@ -426,6 +473,7 @@ export function createAircraftModels({
// Placed BEFORE the readiness test on purpose: a model can turn ready
// between ticks, and its first drawn frame must be at this placement.
placeModel(record, displayPos, _modelHeading(course, meta));
_poseParts(record, meta, spec);
if (!record.ready) {
showModel(record, false); // not loaded yet → keep the 2D icon, no half-model flash
_send(set, icao24, record, spec, out);
@@ -565,12 +613,11 @@ export function createAircraftModels({
state._lastFleetTickMs = 0;
}
/** Admit a fleet model for an aircraft; the icon shows until it is ready. */
/** Admit a fleet model for an aircraft; the icon shows until it is ready.
* The selected aircraft's is admitted too, and kept loaded but hidden
* while its tracked model draws it (`_keepTrackedFleetModel`). */
function _ensureModel(icao24) {
// Never model the TRACKED aircraft — it owns a separate entity billboard, and the fleet
// tick skips it, so a model here would be orphaned + double-rendered.
if (icao24 === state._trackedIcao) return;
onModelEligible(icao24);
if (state._models.has(icao24)) return;
// Without model sets (the renderer draws none) the icon stays.
@@ -585,7 +632,6 @@ export function createAircraftModels({
specKey: _specKeyFor(meta), // type-change sync compares against this
bellyM: spec.bellyM,
scale: spec.scale,
minPixelSize: policy.MODEL_MIN_PX,
});
record.url = resolveAsset(spec.url);
record.gltf = _gltfOf(spec);
@@ -676,24 +722,115 @@ export function createAircraftModels({
);
}
/** A fleet model still drawing the tracked contact (it was a model when
* it was selected) lets go once the tracked model draws, or once the
* contact is no longer drawn as a model at all. */
/** The tracked contact's fleet model lets go once the contact is no
* longer drawn as a model at all (out of range, 3D off, cockpit). */
function _releaseTrackedFleetModel() {
if (state._trackedIcao && state._models.has(state._trackedIcao))
_releaseModel(state._trackedIcao);
}
/** The tracked contact's fleet model (it was a model when it was
* selected, or was admitted since) stops drawing once the tracked model
* draws, or while the tracked icon carries the contact, but stays loaded:
* deselecting hands the contact straight back to it
* (`_handBackDeselected`), with no load and no icon in between. */
function _hideTrackedFleetModel() {
const icao24 = state._trackedIcao;
const record = icao24 ? state._models.get(icao24) : null;
if (!record?.show) return;
showModel(record, false);
_send(state._modelSets?.fleet, icao24, record, _modelSpec(_metaOf(icao24)));
}
/** Keep the tracked contact's fleet model loaded and placed where its icon
* is, one fleet tick at a time, so it is ready to take the contact back
* the moment it is deselected. It never shows here: it draws the contact
* only while the tracked model loads, as it did before the selection. */
function _keepTrackedFleetModel(icao24, position, course, out) {
_ensureModel(icao24);
const record = state._models.get(icao24);
if (!record) return;
const meta = _metaOf(icao24);
const set = state._modelSets?.fleet ?? null;
_retryFailedFleetModel(set, icao24, record);
const displayPos = _modelDisplayPosition(icao24, position);
if (displayPos) placeModel(record, displayPos, _modelHeading(course, meta));
else showModel(record, false); // nowhere safe to draw it
_send(set, icao24, record, _modelSpec(meta), out);
}
/**
* Hand a contact just deselected back to the fleet in the same frame: to
* its fleet model when one is loaded (kept while it was selected), placed
* where its icon is and shown, else to its icon. Runs once the contact no
* longer reads as tracked.
* @param {string} icao24
*/
function _handBackDeselected(icao24) {
const icons = state._icons;
const record = state._models.get(icao24);
if (!icons?.has(icao24)) {
if (record) _releaseModel(icao24);
return;
}
if (!record) {
icons.setShown(icao24, true);
return;
}
const pose = _pose();
if (!pose || !_modelRegimeActive(pose) || isTr3b(icao24)) {
_releaseModel(icao24); // the icon takes it back
return;
}
const t = parts.icons._displayMs();
const position = icons.position(icao24, t);
_driveFleetModelHandoff(
icao24,
record,
position,
icons.course(icao24, t),
() =>
_treatFleetModel(
icao24,
record,
distance(pose.position, position),
pose,
),
);
}
/** A fleet model's tint and alpha this tick: the contact's colour, faded
* as its icon is (focus, recession), or the IR boost's full-strength
* white. */
function _treatFleetModel(icao24, record, cameraDistanceM, pose) {
const icons = state._icons;
_treat(record, {
// IR boost must survive the per-tick treatment write — otherwise
// any alpha change would repaint the ordinary tint over the hot
// white. Boosted models also skip the recession fade: hot targets
// stay full-strength at any range (icons keep their normal
// fade — full-opacity glyph walls read as overwhelming).
base: state._irBoost ? WHITE : rgba(_modelColor(icao24)),
alpha: state._irBoost
? 1
: aircraftTreatmentAlpha({
baseAlpha: icons.alpha(icao24),
focusFactor: icons.focus(icao24),
cameraDistanceM,
cameraHeightM: pose.height,
}),
});
}
/** Per-frame driver for the standalone tracked model. Runs every preUpdate (not the 80 ms fleet
* cadence) so the centered plane moves smoothly. The tracked entity stays a pure billboard, so the
* follow-camera's bounding sphere is ALWAYS ready — toggling 3D, or tracking while already zoomed
* in, can never stall or freeze the centering (the old model-graphic-on-entity failure mode).
*
* The model draws exactly as the fleet would draw this contact: the same
* asset at the same scale and `minPixelSize` (`MODEL_MIN_PX`), only its
* tint the tracked colour; whether it draws at all is the fleet's rule too
* (`_trackedModelRegimeActive`). Selecting a contact changes its colour,
* never its size or form. */
* asset at the same scale (its true size) in the same colours; whether it
* draws at all is the fleet's rule too (`_trackedModelRegimeActive`).
* Selecting a contact changes neither its colour nor its size or form. */
function _updateTrackedModel() {
// A failed load is let go (the icon carries the contact); the budget
@@ -717,7 +854,7 @@ export function createAircraftModels({
parts.icons._iconPosition(state._trackedIcao);
if (!pos) {
_hideTrackedModel();
_releaseTrackedFleetModel();
_hideTrackedFleetModel();
return;
}
const icao24 = state._trackedIcao;
@@ -729,14 +866,13 @@ export function createAircraftModels({
// The icon carries it: after the load budget is spent, or until the
// fleet model set has loaded.
if (!_trackedModelLoadAllowed() || !spec.url) {
_releaseTrackedFleetModel();
_hideTrackedFleetModel();
return;
}
const record = createModelRecord({
specKey: _specKeyFor(meta), // type-change sync compares against this
bellyM: spec.bellyM,
scale: spec.scale,
minPixelSize: policy.MODEL_MIN_PX,
});
record.id = icao24;
record.url = resolveAsset(spec.url);
@@ -758,7 +894,7 @@ export function createAircraftModels({
const displayPos = _modelDisplayPosition(icao24, pos);
if (!displayPos) {
_hideTrackedModel(); // no ground evidence → the icon carries it
_releaseTrackedFleetModel();
_hideTrackedFleetModel();
return;
}
placeModel(
@@ -766,9 +902,10 @@ export function createAircraftModels({
displayPos,
_modelHeading(parts.motion._trackedDisplayCourse(), meta),
);
_poseParts(record, meta, spec);
showModel(record, record.ready);
_send(state._modelSets.tracked, icao24, record, spec);
if (record.ready) _releaseTrackedFleetModel();
if (record.ready) _hideTrackedFleetModel();
}
/**
@@ -841,6 +978,13 @@ export function createAircraftModels({
afterReplan(renderTime, t, nowMs, pose?.position ?? null);
const focusTarget = getFocusTarget();
parts.icons._focusIcons(t, nowMs, focusTarget);
// Airborne helicopters in view step their rotor frame (none: no work).
if (parts.icons._rotorsTurning?.())
parts.icons._turnRotors(
Date.now(),
t,
pose ? (position) => inView(pose, position) : null,
);
// 3D model regime: only when enabled AND the camera is zoomed in past the altitude ceiling.
// Drop all models the moment we leave it (toggled off / zoomed out) so icons resume.
@@ -920,8 +1064,6 @@ export function createAircraftModels({
const items = pendingItems;
for (const icao24 of modelEligible) {
if (isTr3b(icao24)) continue;
// The tracked contact's model is `_updateTrackedModel`'s.
if (icao24 === state._trackedIcao) continue;
if (!icons.has(icao24)) continue;
const position = icons.position(icao24, t);
if (
@@ -944,6 +1086,17 @@ export function createAircraftModels({
}
continue;
}
// The tracked contact draws as `_updateTrackedModel` says; its fleet
// model is only kept ready for when it is deselected.
if (icao24 === state._trackedIcao) {
_keepTrackedFleetModel(
icao24,
position,
icons.course(icao24, t),
items,
);
continue;
}
_ensureModel(icao24);
const record = state._models.get(icao24);
const cameraDistanceM = distance(camPos, position);
@@ -952,24 +1105,7 @@ export function createAircraftModels({
record,
position,
icons.course(icao24, t),
() => {
_treat(record, {
// IR boost must survive the per-tick treatment write — otherwise
// any alpha change would repaint the ordinary tint over the hot
// white. Boosted models also skip the recession fade: hot targets
// stay full-strength at any range (icons keep their normal
// fade — full-opacity glyph walls read as overwhelming).
base: state._irBoost ? WHITE : rgba(_modelColor(icao24)),
alpha: state._irBoost
? 1
: aircraftTreatmentAlpha({
baseAlpha: icons.alpha(icao24),
focusFactor: icons.focus(icao24),
cameraDistanceM,
cameraHeightM: pose.height,
}),
});
},
() => _treatFleetModel(icao24, record, cameraDistanceM, pose),
items,
);
}
@@ -997,6 +1133,7 @@ export function createAircraftModels({
_releaseModels,
_showReleasedIcon,
_releaseTrackedModel,
_handBackDeselected,
_updateTrackedModel,
_fleetTick,
};
+107 -20
View File
@@ -4,25 +4,18 @@ import { createAircraftModels } from './aircraftModelLayer.js';
import { fakeDrawPort } from '../testSupport/fakeDrawPort.mjs';
import { bindRenderer } from '../render/rendererOf.js';
import { fromDegrees } from '../geo/ellipsoid.js';
import * as flightsPolicy from '../layers/flights/policy.js';
// The flights layer's own model policy: its radii, ceiling and caps.
const POLICY = {
MODEL_ALT_CEIL_M: 800_000,
...flightsPolicy,
MODEL_MAX: 40,
MODEL_MAX_ALL: 350,
COCKPIT_MODEL_MAX: 60,
MODEL_PROX_ADD_M: 150_000,
MODEL_PROX_KEEP_M: 185_000,
MODEL_ALL_ADD_M: 400_000,
MODEL_ALL_KEEP_M: 450_000,
MODEL_MIN_PX: 24,
TRACKED_MODEL_MIN_PX: 48,
TRACKED_MODEL_MAX_PX: 600,
MODEL_HEADING_OFFSET_DEG: 0,
FLEET_DR_INTERVAL_MS: 80,
TRACKED_MODEL_MAX_LOAD_FAILS: 3,
TRACKED_MODEL_RETRY_BACKOFF_MS: 1500,
};
/** The eye's height (m): 1 km above the contacts. */
const EYE_M = 11_000;
const SPEC = {
url: 'plane.glb',
scale: 1,
@@ -34,9 +27,9 @@ const SPEC = {
/**
* A fleet of airborne contacts at `positions` (icao → ECEF), drawn by a
* models layer over a fake draw port whose fleet set can be told to fail a
* write. The eye sits above them at 30 km.
* write. The eye sits at `eyeM`, by default 1 km above them (`EYE_M`).
*/
function fleetFixture(positions) {
function fleetFixture(positions, { eyeM = EYE_M } = {}) {
const base = fakeDrawPort();
const removes = [];
let failNextUpsert = false;
@@ -67,7 +60,7 @@ function fleetFixture(positions) {
};
},
};
const eye = fromDegrees(-97.71, 30.21, 30_000);
const eye = fromDegrees(-97.71, 30.21, eyeM);
const viewer = {};
bindRenderer(viewer, {
draw,
@@ -79,7 +72,7 @@ function fleetFixture(positions) {
right: { x: 1, y: 0, z: 0 },
fovy: Math.PI / 3,
aspectRatio: 1,
height: 30_000,
height: eyeM,
}),
},
});
@@ -185,7 +178,10 @@ function fleetFixture(positions) {
};
}
const near = (k) => fromDegrees(-97.71 + k * 0.01, 30.21, 10_000);
// About 0.5 km apart, within 2 km of the eye.
const near = (k) => fromDegrees(-97.71 + k * 0.005, 30.21, 10_000);
/** A contact at the eye's height, `m` metres north of it. */
const north = (m) => fromDegrees(-97.71, 30.21 + m / 110_850, EYE_M);
const far = (k) => fromDegrees(-90 + k * 0.01, 30.21, 10_000);
test('the fleet tick hands contacts to ready models and back without a gap', () => {
@@ -326,7 +322,7 @@ test('fleet model alpha is worked out once a fleet tick from the camera then, as
const position = near(1);
const f = fleetFixture(new Map([['a1', position]]));
assert.equal(f.fleet().spec.recede ?? null, null, 'the set does not recede');
const eye = fromDegrees(-97.71, 30.21, 30_000);
const eye = fromDegrees(-97.71, 30.21, EYE_M);
const expected = (focusFactor) =>
aircraftTreatmentAlpha({
baseAlpha: 0.8,
@@ -336,7 +332,7 @@ test('fleet model alpha is worked out once a fleet tick from the camera then, as
eye.y - position.y,
eye.z - position.z,
),
cameraHeightM: 30_000,
cameraHeightM: EYE_M,
});
try {
// Recede from the eye on, so the haze is not 1 here.
@@ -389,3 +385,94 @@ test('a contact not there yet at the time drawn has its fleet model hidden, as o
f.tick();
assert.equal(f.fleet().items.get('a1').show, true, 'drawn again');
});
test('aircraft draw as models only within 3 km of the camera, in either mode', () => {
for (const mode of ['proximity', 'all']) {
const positions = new Map([
['inside', north(2_900)],
['outside', north(3_100)],
]);
const f = fleetFixture(positions);
f.state._models3dMode = mode;
f.tick();
for (const id of positions.keys())
if (f.fleet().items.has(id)) f.draw.ready(f.fleetId, id);
f.tick();
assert.equal(f.shown.get('inside'), false, `${mode}: a model at 2.9 km`);
assert.equal(f.fleet().items.get('inside').show, true);
assert.equal(f.shown.get('outside'), true, `${mode}: an icon at 3.1 km`);
assert.equal(f.fleet().items.has('outside'), false);
}
});
test('a model is kept out to about 3.6 km, then its icon takes over', () => {
const positions = new Map([['a1', north(2_000)]]);
const f = fleetFixture(positions);
f.tick();
f.draw.ready(f.fleetId, 'a1');
f.tick();
assert.equal(f.shown.get('a1'), false, 'a model at 2 km');
positions.set('a1', north(3_500));
f.tick();
assert.equal(f.shown.get('a1'), false, 'kept at 3.5 km');
assert.equal(f.fleet().items.get('a1').show, true);
positions.set('a1', north(3_700));
f.tick();
assert.equal(f.shown.get('a1'), true, 'released at 3.7 km');
assert.equal(f.fleet().items.has('a1'), false);
positions.set('a1', north(3_300));
f.tick();
assert.equal(
f.fleet().items.has('a1'),
false,
'not taken again until it is back within 3 km',
);
});
test('a camera high above the ground still models an aircraft within 3 km of it', () => {
// A plane at 30 km with the camera 2 km above it: the altitude ceiling
// sits above every contact's height plus the keep radius.
const plane = fromDegrees(-97.71, 30.21, 30_000);
const f = fleetFixture(new Map([['high', plane]]), { eyeM: 32_000 });
f.tick();
f.draw.ready(f.fleetId, 'high');
f.tick();
assert.equal(f.shown.get('high'), false, 'its model draws it');
assert.equal(
POLICY.MODEL_ALT_CEIL_M,
POLICY.MODEL_HIGHEST_CONTACT_M + POLICY.MODEL_KEEP_M,
);
});
test('models are drawn at their true size, with no minimum pixel size', () => {
const f = fleetFixture(new Map([['a1', near(1)]]));
f.tick();
assert.equal(f.fleet().items.get('a1').minPixelSize ?? 0, 0);
});
test('the selected contact keeps a loaded, hidden fleet model that takes it back on deselect', () => {
const positions = new Map([['a1', near(1)]]);
const f = fleetFixture(positions);
// Selected while an icon: the fleet pass admits its model all the same.
f.state._trackedIcao = 'a1';
f.shown.set('a1', false); // selecting it hides its icon
f.tick();
assert.ok(f.fleet().items.has('a1'), 'admitted and loading while selected');
f.draw.ready(f.fleetId, 'a1');
positions.set('a1', near(2));
f.tick();
const item = f.fleet().items.get('a1');
assert.equal(item.show, false, 'never drawn while selected');
assert.deepEqual(
item.pos,
{ x: near(2).x, y: near(2).y, z: near(2).z },
'placed where its icon is',
);
assert.equal(f.shown.get('a1'), false, 'the icon stays hidden');
// Deselected: its model draws it in the same frame, its icon never shows.
f.state._trackedIcao = null;
f.models._handBackDeselected('a1');
assert.equal(f.fleet().items.get('a1').show, true);
assert.equal(f.shown.get('a1'), false);
});
+20 -6
View File
@@ -17,15 +17,29 @@ export const AIRCRAFT_ENVIRONMENT_MAP_OPTIONS = Object.freeze({
const HIGHLIGHT = Object.freeze({ mode: 'highlight' });
const FLAT = Object.freeze({ mode: 'mix', amount: 1 });
/**
* How much of an emergency colour a model takes over its paint. Multiplying
* by a saturated tint zeroes every channel the tint lacks: a cyan tint (no
* red) draws a red helicopter black and a white Cessna flat cyan. Mixed in at
* this share, the paint stays readable and the colour still marks the model.
*/
export const AIRCRAFT_MODEL_TINT_MIX = 0.3;
const TINTED = Object.freeze({ mode: 'mix', amount: AIRCRAFT_MODEL_TINT_MIX });
/**
* How an aircraft model's colour meets its mesh, as a draw item's
* `colorBlend`. `highlight` multiplies, so white draws the mesh's own
* colours as built, and the tracked or emergency colour tints the mesh
* without hiding its paint. The IR boost draws the model flat white instead
* (`mix` at 1, unlit).
* `colorBlend`. White (no tint) multiplies (`highlight`), which draws the
* mesh's own colours as built. An emergency colour is mixed in at
* `AIRCRAFT_MODEL_TINT_MIX`, so it tints the mesh without hiding its paint.
* The IR boost draws the model flat white instead (`mix` at 1, unlit).
* @param {boolean} irBoost
* @param {ArrayLike<number>|null} [tint] The model's RGBA tint, 0..1; white
* or none draws the mesh's own colours.
* @returns {{mode: 'highlight'|'mix', amount?: number}}
*/
export function aircraftModelBlend(irBoost) {
return irBoost ? FLAT : HIGHLIGHT;
export function aircraftModelBlend(irBoost, tint = null) {
if (irBoost) return FLAT;
const white = !tint || (tint[0] >= 1 && tint[1] >= 1 && tint[2] >= 1);
return white ? HIGHLIGHT : TINTED;
}
+66 -1
View File
@@ -2,7 +2,12 @@ import test from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import { readLayerSource } from '../testSupport/readLayerSource.mjs';
import { AIRCRAFT_ENVIRONMENT_MAP_OPTIONS } from './aircraftModelLighting.js';
import {
AIRCRAFT_ENVIRONMENT_MAP_OPTIONS,
aircraftModelBlend,
} from './aircraftModelLighting.js';
import * as flightsPolicy from '../layers/flights/policy.js';
import * as militaryPolicy from '../layers/military/policy.js';
/**
* Every aircraft model drawn in the scene skips the renderer's dynamic
@@ -48,3 +53,63 @@ test('localAdsb: its draw-port models skip the dynamic environment map', () => {
/\benvironmentMap:\s*AIRCRAFT_ENVIRONMENT_MAP_OPTIONS\.enabled\b/,
);
});
/**
* The colour a model draws in, as the renderer blends its tint over the
* shaded paint (`ModelItem.colorBlend`, Cesium's model colour stage): `mix`
* moves the paint toward the tint by `amount`; `highlight` multiplies.
*/
function blended(paint, tint, blend) {
if (blend.mode === 'mix')
return paint.map((c, i) => c + (tint[i] - c) * blend.amount);
if (blend.mode === 'highlight') return paint.map((c, i) => c * tint[i]);
return tint.slice(0, 3);
}
/** Paints the fleet models carry: a red helicopter, a white airliner, a dark blue tail. */
const PAINTS = {
red: [0.8, 0.05, 0.05],
white: [0.9, 0.9, 0.9],
blue: [0.05, 0.1, 0.5],
};
test('an untinted model draws its mesh in its own colours', () => {
for (const tint of [null, [1, 1, 1, 1], flightsPolicy.MODEL_WHITE]) {
const blend = aircraftModelBlend(false, tint);
for (const paint of Object.values(PAINTS))
assert.deepEqual(blended(paint, [1, 1, 1], blend), paint);
}
});
test('the emergency tints keep every paint, never black or one flat colour', () => {
const tints = {
emergency: flightsPolicy.EMERGENCY_TINT,
'military emergency': militaryPolicy.EMERGENCY_ICON_COLOR,
// Any saturated tint: one with no red once drew a red helicopter black.
cyan: [0, 1, 1, 1],
};
for (const [tintName, tint] of Object.entries(tints)) {
const blend = aircraftModelBlend(false, tint);
const drawn = {};
for (const [paintName, paint] of Object.entries(PAINTS)) {
const out = blended(paint, tint, blend);
drawn[paintName] = out;
// Multiplying by a tint with no red drew a red helicopter black.
paint.forEach((c, i) =>
assert.ok(
out[i] >= c * 0.6,
`${tintName} over ${paintName}: channel ${i} ${out[i].toFixed(2)} keeps most of ${c}`,
),
);
}
// Paints that differ still differ: the tint is not one flat colour.
const spread = (a, b) => Math.max(...a.map((c, i) => Math.abs(c - b[i])));
assert.ok(spread(drawn.red, drawn.white) > 0.4, `${tintName}: red and white apart`);
assert.ok(spread(drawn.blue, drawn.white) > 0.4, `${tintName}: blue and white apart`);
}
});
test('the IR boost draws every model flat white whatever its tint', () => {
for (const tint of [null, flightsPolicy.EMERGENCY_TINT])
assert.deepEqual(aircraftModelBlend(true, tint), { mode: 'mix', amount: 1 });
});
+30
View File
@@ -1473,6 +1473,36 @@ test('enable owns one grace timer and disable/re-enable starts a new session', a
}
});
test('the layer turns on and off when its feed fails', async () => {
const harness = installWireHarness(undefined, { enabled: false });
const priorFetch = globalThis.fetch;
const priorWarn = console.warn;
const clock = makeFakeAisRuntime();
_setAisRuntimeForTest(clock.runtime);
globalThis.fetch = async () => ({
ok: false,
status: 503,
json: async () => ({
status: 'missing-key',
error: 'AISSTREAM_API_KEY is not set',
}),
});
console.warn = () => {};
try {
// Turning it on succeeds; the failure is shown on the layer.
assert.notEqual(await aisLiveVesselsLayer.enable(harness.viewer), false);
const feed = _getVesselFeedStateForTest();
assert.equal(feed.status, 'unavailable');
assert.equal(feed.error, 'AISSTREAM_API_KEY not set');
assert.notEqual(aisLiveVesselsLayer.disable(), false);
} finally {
globalThis.fetch = priorFetch;
console.warn = priorWarn;
harness.cleanup();
_setAisRuntimeForTest();
}
});
test('vessel trail lifecycle: deselect clears the selected-vessel trail', () => {
const harness = installWireHarness(undefined);
try {
+15 -10
View File
@@ -70,19 +70,24 @@ for (const layer of LAYERS) {
'the tracked-model driver uses the cockpit-aware predicate');
});
test(`${layer.name}: Cockpit uses standard Proximity and All radii with a lower cap`, () => {
assert.equal(numericConstant(source, 'MODEL_PROX_ADD_M'), 150_000);
assert.equal(numericConstant(source, 'MODEL_PROX_KEEP_M'), 185_000);
assert.equal(numericConstant(source, 'MODEL_ALL_ADD_M'), 400_000);
assert.equal(numericConstant(source, 'MODEL_ALL_KEEP_M'), 450_000);
test(`${layer.name}: models draw within 3 km in both modes; Cockpit's AIR band keeps its own radii`, () => {
assert.equal(numericConstant(source, 'MODEL_ADD_M'), 3000);
assert.equal(numericConstant(source, 'MODEL_KEEP_M'), 3600);
assert.equal(numericConstant(source, 'COCKPIT_MODEL_MAX'), 60);
const add = /^([ \t]*)function _modelAddDistM\b[\s\S]*?\n\1\}/m.exec(source)?.[0];
const keep = /^([ \t]*)function _modelKeepDistM\b[\s\S]*?\n\1\}/m.exec(source)?.[0];
assert.match(add, /(?:(?:flightState|state)\.)?_models3dMode\s*===\s*'all'\s*\?\s*(?:policy\.)?MODEL_ALL_ADD_M\s*:\s*(?:policy\.)?MODEL_PROX_ADD_M/);
assert.match(keep, /(?:(?:flightState|state)\.)?_models3dMode\s*===\s*'all'\s*\?\s*(?:policy\.)?MODEL_ALL_KEEP_M\s*:\s*(?:policy\.)?MODEL_PROX_KEEP_M/);
assert.doesNotMatch(add, /COCKPIT_MODEL_ADD_M/);
assert.doesNotMatch(keep, /COCKPIT_MODEL_KEEP_M/);
assert.match(add, /return\s+(?:policy\.)?MODEL_ADD_M;/, 'Proximity and All share the add radius');
assert.match(keep, /return\s+(?:policy\.)?MODEL_KEEP_M;/, 'Proximity and All share the keep radius');
// The AIR silhouettes are icons, not models: their band stays mode-aware.
assert.equal(numericConstant(source, 'COCKPIT_AIR_PROX_ADD_M'), 150_000);
assert.equal(numericConstant(source, 'COCKPIT_AIR_PROX_KEEP_M'), 185_000);
assert.equal(numericConstant(source, 'COCKPIT_AIR_ALL_ADD_M'), 400_000);
assert.equal(numericConstant(source, 'COCKPIT_AIR_ALL_KEEP_M'), 450_000);
const near = /^([ \t]*)function _refreshCockpitNearContacts\b[\s\S]*?\n\1\}/m.exec(source)?.[0];
assert.match(near, /all\s*\?\s*COCKPIT_AIR_ALL_ADD_M\s*:\s*COCKPIT_AIR_PROX_ADD_M/);
assert.match(near, /all\s*\?\s*COCKPIT_AIR_ALL_KEEP_M\s*:\s*COCKPIT_AIR_PROX_KEEP_M/);
const cap = /^([ \t]*)function _modelCap\b[\s\S]*?\n\1\}/m.exec(source)?.[0];
assert.match(cap, /Math\.min\(\s*(?:policy\.)?COCKPIT_MODEL_MAX/,
@@ -97,7 +102,7 @@ for (const layer of LAYERS) {
// `_iconKind` is identity for every unconverted contact (see
// tr3bRegistry.test.mjs) — it only swaps the glyph for a contact the
// operator explicitly converted into a TR-3B.
assert.match(source, /aircraftIcon\(\s*(?:parts\.)?rendering\._iconKind\(icao24, info\?\.klass\),?\s*(?:FLEET_ICON_PX,?\s*)?\)/,
assert.match(source, /aircraftIcon\(\s*(?:parts\.)?rendering\._iconKind\(icao24, info\?\.klass\),?\s*(?:FLEET_ICON_PX,?\s*)?(?:frame,?\s*)?\)/,
'near contacts and model fallbacks retain the class-derived aircraft silhouette');
assert.match(source, /color: rgba\(rendering\._cockpitContactColor\(icao24, info\)\),\s*rotationMode: 'screen',/,
'far dots are reset to a rotation-free presentation');
+1 -1
View File
@@ -53,7 +53,7 @@ test('the echo bracket pulses outward from the contact bracket and fades', (t) =
assert.ok(half.spreadPx > echo.spreadPx * 0.5);
assert.ok(half.spreadPx < echo.spreadPx);
assert.ok(half.band < STEPS && half.band >= 1);
// The bracket's own dimming (keyhole fade, Cyber sonar sweep) carries
// The bracket's own dimming (keyhole fade, sonar sweep) carries
// over, and the echo is never drawn brighter than its bracket: a bracket
// too dim for even one band draws no echo.
assert.equal(at(arrival, 0.25).band, 2);
+4 -4
View File
@@ -941,13 +941,13 @@ test('a Global Context echo bracket is drawn outside its contact bracket and dim
}
});
test('under the Cyber sonar sweep an echo is never brighter than its own bracket', () => {
test('under the sonar sweep an echo is never brighter than its own bracket', () => {
const env = installEnvironment();
// The cyber theme with its HUD open turns the contact sonar on; its sweep
// dims brackets it is not passing over.
// Sonar on with its HUD open turns the contact sonar on; its sweep dims
// brackets it is not passing over.
env.document.documentElement = {
// The lowest sweep floor, so dimmed brackets drop a whole alpha band.
dataset: { uiTheme: 'cyber', cyberSonarOpacity: '35' },
dataset: { cyberSonar: 'on', cyberSonarOpacity: '35' },
style: { setProperty() {}, removeProperty() {} },
};
const hud = env.document.createElement('div');
+2 -3
View File
@@ -19,9 +19,8 @@
* marker the scene itself hides behind geometry. Everything else keeps its
* label exactly as before, which covers contacts high above the ground
* (aircraft, satellites): their markers are drawn on top of the scene by
* design, their 3D models can be scaled up to a minimum pixel size and so fill
* the very pixel being read, and a label that hid while its marker stayed on
* screen would be the worse mismatch.
* design, their 3D models can fill the very pixel being read, and a label
* that hid while its marker stayed on screen would be the worse mismatch.
*
* This file is plain arithmetic; it never touches the renderer.
*/
+2
View File
@@ -1285,6 +1285,8 @@ const AIRCRAFT_CLASS_NAMES = {
turboprop: msg('Turboprops'),
fastjet: msg('Fast jets'),
quadjet: msg('Four-engine jets'),
vehicle: msg('Airport vehicles'),
station: msg('Ground stations / obstacles'),
};
/**
+170
View File
@@ -30,6 +30,8 @@ import { fakeDrawPort } from '../testSupport/fakeDrawPort.mjs';
import { fakeGlobePort } from '../testSupport/fakeGlobePort.mjs';
import { bindRenderer } from '../render/rendererOf.js';
import { HEAT_REBUILD_MS } from '../layers/firms/policy.js';
import { registerStyleStages } from '../styles/styleStages.js';
import { sensorPickPosition } from '../input/sensorPick.js';
const LAYER_SOURCE = readLayerSource(
path.join(path.dirname(fileURLToPath(import.meta.url)), 'firmsHeatmap.js'),
@@ -836,6 +838,16 @@ test('far zoom drapes one heatmap and the hand-off cross-fades it with the marke
assert.equal(added[0].alpha, 0.5);
assert.equal(glow(1).alpha, 0.5, 'rebuilt markers get the fade');
// An application drawing the detections in their place hides both.
h.layer.setMarkerStandIn({ hitTest: () => null });
assert.equal(added[0].show, false, 'a stand-in hides the heatmap');
assert.equal(markers().show, false, 'and the markers');
h.layer._renderLodForTest('global');
assert.equal(added[0].show, false, 'through a rebuild too');
h.layer.setMarkerStandIn(null);
assert.equal(added[0].show, true);
assert.equal(markers().show, true);
h.layer.disable();
assert.equal(added[0].show, false, 'disable hides the heatmap');
@@ -847,3 +859,161 @@ test('far zoom drapes one heatmap and the hand-off cross-fades it with the marke
restoreDocument();
}
});
test('a click on a fire an application draws in place of the markers selects it as a marker click does', () => {
const fire = makeFire();
const other = makeFire({ index: 8, lat: 31.2, lon: -97.9, frp: 40 });
// The application's records come from the same source, adapted on their own.
let answer = { ...fire };
const asked = [];
const h = harness({ fires: [fire, other], picked: glowPick('firms-8') });
try {
h.layer.setMarkerStandIn({
hitTest: (screen) => {
asked.push(screen);
return answer;
},
});
assert.equal(h.icons().show, false, 'the glows are hidden');
h.published.length = 0;
h.click();
assert.deepEqual(asked, [{ x: 400, y: 300 }]);
assert.equal(h.requests.length, 1, 'the camera moves as for a marker');
assert.equal(h.requests[0].kind, 'fire');
assert.equal(
h.requests[0].id,
fireDetectionKey(fire),
'the stand-in decides, not the hidden glow under the click',
);
assert.equal('rangeM' in h.requests[0], false, 'the usual fire framing');
assert.equal(h.layer.getSelectedInfo().id, fireDetectionKey(fire));
assert.equal(getSelectedEntityContext().label, 'Fire · FRP 1520 MW');
assert.deepEqual(
h.published.map((entry) => entry.id),
[`selected-fire:${fireDetectionKey(fire)}`],
"only the selected fire's card shows",
);
// Nothing of the application's under the click: empty space.
answer = null;
h.click();
assert.equal(h.requests.length, 1, 'no camera move');
assert.equal(h.layer.getSelectedInfo(), null, 'the selection is cleared');
} finally {
h.cleanup();
}
});
test('a stand-in that draws a fire larger says how far the camera stands from it', () => {
const fire = makeFire();
const asked = [];
let range = 24_000;
const h = harness({ fires: [fire] });
try {
h.layer.setMarkerStandIn({
hitTest: () => ({ ...fire }),
focusRangeM: (record) => {
asked.push(fireDetectionKey(record));
return range;
},
});
h.click();
assert.deepEqual(asked, [fireDetectionKey(fire)]);
assert.equal(h.requests.at(-1).rangeM, 24_000);
// No range for this fire: the usual fire framing.
range = null;
h.click();
assert.equal(h.requests.length, 2);
assert.equal('rangeM' in h.requests.at(-1), false);
} finally {
h.cleanup();
}
});
test('a stand-in hit on a fire the layer does not show selects nothing', () => {
const fire = makeFire();
const h = harness({ fires: [fire] });
try {
h.layer.setMarkerStandIn({
hitTest: () => makeFire({ lat: 12.5, lon: 40.1 }),
});
h.click();
assert.equal(h.requests.length, 0);
assert.equal(h.layer.getSelectedInfo(), null);
} finally {
h.cleanup();
}
});
test('taking the stand-in away brings the markers and their cards back and keeps the selection', () => {
const fire = makeFire();
const h = harness({
fires: [fire],
// Near enough for the markers rather than the heatmap.
cameraPosition: Cesium.Cartesian3.fromDegrees(fire.lon, fire.lat, 500_000),
});
try {
h.layer.setMarkerStandIn({ hitTest: () => fire });
assert.equal(h.icons().show, false);
h.click();
h.layer.setMarkerStandIn(null);
assert.equal(h.icons().show, true);
assert.equal(h.layer.getSelectedInfo().id, fireDetectionKey(fire));
const ids = h.published.map((entry) => entry.id);
assert.ok(ids.includes(`selected-fire:${fireDetectionKey(fire)}`));
} finally {
h.cleanup();
}
});
test('the stand-in is asked where a marker is picked: the click as the sensor style draws it', () => {
const fire = makeFire();
const asked = [];
const h = harness({ fires: [fire] });
try {
registerStyleStages(h.viewer.scene, {
surveillance: {
enabled: true,
uniforms: { intensity: 1, pixelation: 4 },
},
});
h.layer.setMarkerStandIn({
hitTest: (screen) => {
asked.push(screen);
return fire;
},
});
h.click();
const expected = sensorPickPosition(
h.viewer.scene,
{ x: 400, y: 300 },
h.viewer.scene.canvas,
);
assert.notDeepEqual([expected.x, expected.y], [400, 300]);
assert.deepEqual([asked[0].x, asked[0].y], [expected.x, expected.y]);
} finally {
h.cleanup();
}
});
test("a sibling layer's item over a stand-in fire wins the click", () => {
const fire = makeFire();
let asked = 0;
registerPickOwner('flights', (pickedId) => pickedId === 'a1b2c3');
const h = harness({ fires: [fire], picked: { id: 'a1b2c3' } });
try {
h.layer.setMarkerStandIn({
hitTest: () => {
asked++;
return fire;
},
});
h.click();
assert.equal(asked, 0, 'the stand-in is not asked');
assert.equal(h.requests.length, 0, 'no camera move');
assert.equal(h.layer.getSelectedInfo(), null);
} finally {
h.cleanup();
unregisterPickOwner('flights');
}
});
+33
View File
@@ -0,0 +1,33 @@
/**
* How a fleet model's draw item is turned, stretched and coloured
* (`fleetModelInstances.js`): pure, no renderer, so it can be read without
* the draw port.
*/
/** Every fleet GLB is nose -X: opposite the draw contract's heading 0. */
export const FLEET_HEADING_OFFSET_DEG = 180;
/**
* A colour as the draw contract takes it: a CSS string or `[r, g, b, a]`
* as given, `{red, green, blue, alpha}` as an array; null for none.
*/
export function fleetColor(color) {
if (color === undefined || color === null) return null;
if (typeof color === 'string' || Array.isArray(color)) return color;
if (typeof color.red === 'number')
return [color.red, color.green, color.blue, color.alpha ?? 1];
return null;
}
/**
* The per-axis stretch a fleet spec draws with on top of its length scale,
* along the model's glTF axes (`x` its length, `y` its height, `z` its
* beam), or undefined when it keeps its proportions.
* @param {object} spec `fleetModelSpec`.
* @returns {[number, number, number]|undefined}
*/
export function fleetAxisScale(spec) {
const [length, beam, height] = spec?.scaleXYZ ?? [];
if (!(length > 0) || (beam === length && height === length)) return;
return [1, height / length, beam / length];
}
+35 -36
View File
@@ -1,6 +1,11 @@
import { selectModelEligible } from './modelEligibility.js';
import {
FLEET_HEADING_OFFSET_DEG,
fleetAxisScale,
fleetColor,
} from './fleetModelDraw.js';
import { AIRCRAFT_ENVIRONMENT_MAP_OPTIONS } from './aircraftModelLighting.js';
import { fleetModelSet } from './fleetModels.js';
import { fleetModelSet, fleetPartTable } from './fleetModels.js';
import { findCamera, findDraw } from '../render/rendererOf.js';
import { fromDegrees, toLonLatH } from '../geo/ellipsoid.js';
import { horizonFrom } from '../geo/horizon.js';
@@ -17,8 +22,11 @@ import {
* and Rail layers share.
*/
/** Every fleet GLB is nose -X: opposite the draw contract's heading 0. */
export const FLEET_HEADING_OFFSET_DEG = 180;
export {
FLEET_HEADING_OFFSET_DEG,
fleetAxisScale,
fleetColor,
} from './fleetModelDraw.js';
/** How long (ms) a model whose load failed waits before it loads again. */
const RETRY_MS = 5000;
@@ -26,31 +34,6 @@ const RETRY_MS = 5000;
/** A white tint: what a model under the NVG/FLIR styles draws with. */
const WHITE = Object.freeze([1, 1, 1, 1]);
/**
* A colour as the draw contract takes it: a CSS string or `[r, g, b, a]`
* as given, `{red, green, blue, alpha}` as an array; null for none.
*/
export function fleetColor(color) {
if (color === undefined || color === null) return null;
if (typeof color === 'string' || Array.isArray(color)) return color;
if (typeof color.red === 'number')
return [color.red, color.green, color.blue, color.alpha ?? 1];
return null;
}
/**
* The per-axis stretch a fleet spec draws with on top of its length scale,
* along the model's glTF axes (`x` its length, `y` its height, `z` its
* beam), or undefined when it keeps its proportions.
* @param {object} spec `fleetModelSpec`.
* @returns {[number, number, number]|undefined}
*/
export function fleetAxisScale(spec) {
const [length, beam, height] = spec?.scaleXYZ ?? [];
if (!(length > 0) || (beam === length && height === length)) return;
return [1, height / length, beam / length];
}
/**
* Whether `point` is inside the eye's view cone (`pose`), a metre's slack.
* @param {object} pose The camera port's pose.
@@ -111,10 +94,15 @@ let instances = 0;
* @param {object} options.viewer The scene host.
* @param {() => object|null} [options.display] `{models3d, models3dMode,
* irBoost}`.
* @param {object} options.policy `{altitudeCeilingM, minimumPixelSize,
* cap, capAll, addM, addAllM, keepM, keepAllM, intervalMs}`.
* @param {object} options.policy `{altitudeCeilingM, cap, capAll, addM,
* keepM, intervalMs}`: both 3D modes share the add/keep radii and differ
* by their caps. Models are drawn at their true size.
* @param {(url: string) => string} [options.resolveAsset]
* @param {boolean} [options.waterline] Clip each model at its waterline.
* @param {(item: object, table: object) => object|undefined} [options.partState]
* The moving parts a vehicle's model is posed with (`ModelItem.parts`),
* from its item and its model's part table (`modelPartDrivers.js`); asked
* only for a model that has a part table.
* @param {object} [options.draw] Stands in for the viewer's draw port (tests).
* @returns {object}
*/
@@ -124,6 +112,7 @@ export function createFleetModelLayer({
policy,
waterline = false,
resolveAsset = (url) => url,
partState = null,
draw,
}) {
const port = draw ?? findDraw(viewer);
@@ -202,8 +191,7 @@ export function createFleetModelLayer({
function refreshEligibility(items, prefs, eye) {
const all = prefs.models3dMode === 'all';
const cap = all ? policy.capAll : policy.cap;
const addM = all ? policy.addAllM : policy.addM;
const keepM = all ? policy.keepAllM : policy.keepM;
const { addM, keepM } = policy;
const candidates = [];
for (const [id, item] of items) {
if (!item.position || item.show === false || !item.spec?.url) continue;
@@ -230,8 +218,15 @@ export function createFleetModelLayer({
return fromDegrees(at.lon, at.lat, at.height + lift);
}
/** The part state an item's model is posed with, or undefined. */
function partsOf(item) {
if (!partState) return undefined;
const table = fleetPartTable(fleetModelSet(), item.spec?.model);
return table ? partState(item, table) : undefined;
}
/** The draw item for an admitted model, as the set draws it, at `at`. */
function itemOf(id, record, item, show, boost, at = placement(item)) {
function itemOf(id, record, item, show, boost, at, parts) {
const mask = item.spec.tinted && !boost ? fleetColor(item.tint) : null;
return {
id,
@@ -249,7 +244,6 @@ export function createFleetModelLayer({
...(fleetAxisScale(item.spec)
? { axisScale: fleetAxisScale(item.spec) }
: {}),
minPixelSize: policy.minimumPixelSize,
environmentMap: AIRCRAFT_ENVIRONMENT_MAP_OPTIONS.enabled,
...(boost
? {
@@ -260,6 +254,7 @@ export function createFleetModelLayer({
: { shading: 'pbr' }),
...(mask ? { maskColor: mask } : {}),
...(waterline ? { clip: 'belowOrigin' } : {}),
...(parts ? { parts } : {}),
meta: item.pickId ?? id,
show,
};
@@ -276,6 +271,8 @@ export function createFleetModelLayer({
const heading = item.headingDeg || 0;
const mask = item.spec.tinted && !boost ? fleetColor(item.tint) : null;
const meta = item.pickId ?? id;
const parts = partsOf(item);
const partsKey = parts ? JSON.stringify(parts) : '';
const sent = record.sent;
if (
sent !== null &&
@@ -287,7 +284,8 @@ export function createFleetModelLayer({
sameColor(sent.mask, mask) &&
sent.boost === boost &&
sent.show === show &&
sent.meta === meta
sent.meta === meta &&
sent.partsKey === partsKey
)
return null;
const next = (record.sent ??= {});
@@ -301,7 +299,8 @@ export function createFleetModelLayer({
next.boost = boost;
next.show = show;
next.meta = meta;
return itemOf(id, record, item, show, boost, at);
next.partsKey = partsKey;
return itemOf(id, record, item, show, boost, at, parts);
}
return {
+36 -7
View File
@@ -19,6 +19,7 @@ import {
vesselModelSpec,
} from './fleetModels.js';
import { fetchPublicFile } from '../testSupport/fleetGlb.mjs';
import { FLEET_MODEL_POLICY } from '../layers/flights/policy.js';
import { bindFakeDraw } from '../testSupport/fakeDrawPort.mjs';
import { eastNorthUp } from '../geo/frames.js';
import { fromDegrees, toLonLatH } from '../geo/ellipsoid.js';
@@ -29,15 +30,11 @@ console.info = () => {};
const set = await loadFleetModelSet({ fetchImpl: fetchPublicFile });
console.info = realInfo;
// The layers' own policy (3 km add, about 3.6 km keep), with small caps.
const POLICY = Object.freeze({
altitudeCeilingM: 800_000,
minimumPixelSize: 16,
...FLEET_MODEL_POLICY,
cap: 2,
capAll: 4,
addM: 5_000,
addAllM: 20_000,
keepM: 6_000,
keepAllM: 24_000,
intervalMs: 80,
});
@@ -117,7 +114,7 @@ test('the icon stays the visual until the model is ready; only the nearest are d
);
const near = models.items.get('near');
assert.equal(near.scale, spec.scale, 'drawn life size');
assert.equal(near.minPixelSize, POLICY.minimumPixelSize);
assert.equal(near.minPixelSize ?? 0, 0, 'at its true size: no pixel floor');
assert.equal(near.meta, 'near', 'picked as its vehicle');
assert.equal(near.show, false, 'hidden until ready');
@@ -158,6 +155,38 @@ test('the icon stays the visual until the model is ready; only the nearest are d
assert.equal(models.disposed, true);
});
test('vehicles draw as models within 3 km in either mode, and keep them to about 3.6 km', () => {
// The camera 1 km up: a vehicle `metres` east is sqrt(1 km² + metres²) away.
const at = (km) => Math.sqrt(km * km - 1) * 1_000;
for (const mode of ['proximity', 'all']) {
const { viewer, draw } = fakeViewer();
const layer = createFleetModelLayer({
viewer,
display: () => ({ models3d: true, models3dMode: mode }),
policy: POLICY,
});
const spec = transitModelSpec(set, { mode: 'tram' });
const items = new Map([
['in', itemAt(at(2.9), spec, { pickId: 'in' })],
['out', itemAt(at(3.1), spec, { pickId: 'out' })],
]);
layer.frame(items, 0);
const models = modelSet(draw);
assert.deepEqual(
[...models.items.keys()],
['in'],
`${mode}: 2.9 km, not 3.1 km`,
);
items.set('in', itemAt(at(3.5), spec, { pickId: 'in' }));
layer.frame(items, 100);
assert.ok(models.items.has('in'), `${mode}: kept at 3.5 km`);
items.set('in', itemAt(at(3.7), spec, { pickId: 'in' }));
layer.frame(items, 200);
assert.equal(models.items.size, 0, `${mode}: released at 3.7 km`);
layer.destroy();
}
});
test('models stay off above the altitude ceiling', () => {
const { viewer, draw } = fakeViewer(POLICY.altitudeCeilingM + 1);
const layer = createFleetModelLayer({
+29
View File
@@ -20,6 +20,7 @@
*/
import { classifyAircraft } from './aircraftClass.js';
import { readPartTable } from '../render/modelParts.js';
import { FLEET_TRAIL_ANCHORS } from './fleetTrailAnchors.js';
import { isAidToNavigation } from './vesselTypes.js';
@@ -527,6 +528,34 @@ export function namedFleetModels(types) {
]);
}
/** Each loaded set's part tables by model name (null for a model without one). */
const partTables = new WeakMap();
/**
* The part table of model `name` in a loaded set, read once from its GLB:
* which moving parts it has (`render/modelParts.js`); null for a model
* without one, or whose GLB did not load.
* @param {{bytes?: Map<string, Uint8Array>}|null|undefined} set
* @param {string|null|undefined} name
* @returns {import('../render/modelParts').PartTable|null}
*/
export function fleetPartTable(set, name) {
const bytes = name ? set?.bytes?.get(name) : undefined;
if (!bytes) return null;
let tables = partTables.get(set);
if (!tables) partTables.set(set, (tables = new Map()));
if (!tables.has(name)) {
let table = null;
try {
table = readPartTable(bytes);
} catch {
// A malformed table: the model draws whole.
}
tables.set(name, table);
}
return tables.get(name);
}
let loading = null;
let loaded = null;
+3 -2
View File
@@ -1,6 +1,7 @@
import { msg } from '../i18n/marker.js';
// layers/installations/controls.js translates describeInstallationFeedback().
// installationFeedback() stays English for the analyst. ui/statusText.js and
// ui/shellFeedback.js (HUD) translate it: keep both in step with this wording.
const REASONS = Object.freeze({
rate_limited: msg('Overpass rate-limited'),
timeout: msg('Overpass timed out'),
@@ -19,7 +20,7 @@ const FALLBACK_REASON = msg('Overpass temporarily unavailable');
* @param {number} [now]
* @returns {{text: string, reason?: string, seconds?: number}|{count: number, km: ?number}}
*/
export function describeInstallationFeedback(stats = {}, now = Date.now()) {
function describeInstallationFeedback(stats = {}, now = Date.now()) {
const reason = REASONS[stats.failureReason] || FALLBACK_REASON;
if (stats.loading)
return {
+38
View File
@@ -1827,6 +1827,44 @@ export class LayerLifecycle {
await entry.toggleChain.catch(() => {});
}
/**
* Wait until a layer's lifecycle queue is idle, following any request that
* joins it while waiting, but no longer than `timeoutMs` or `signal` allows.
* @param {string} layerId Layer id.
* @param {{signal?: AbortSignal, timeoutMs?: number}} [options]
* @returns {Promise<boolean>} true once idle; false on timeout or abort.
*/
async waitForLayerIdle(layerId, { signal, timeoutMs = 30000 } = {}) {
const entry = this.layers.get(layerId);
if (!entry) return true;
if (signal?.aborted) return false;
let timer = null;
let onAbort = null;
const givenUp = new Promise((resolve) => {
timer = setTimeout(() => resolve(false), timeoutMs);
onAbort = () => resolve(false);
signal?.addEventListener('abort', onAbort, { once: true });
});
try {
let pending;
do {
pending = entry.toggleChain;
const idle = await Promise.race([
pending.then(
() => true,
() => true,
),
givenUp,
]);
if (!idle) return false;
} while (pending !== entry.toggleChain);
return true;
} finally {
clearTimeout(timer);
signal?.removeEventListener('abort', onAbort);
}
}
_reserveLayerParamsIntent(layerId, params, origin = 'programmatic') {
const entry = this.layers.get(layerId);
if (
@@ -0,0 +1 @@
{"rows":[["São Vicente",-7.442,-37.093,2601,"BR","Q120069910"]]}
@@ -0,0 +1 @@
{"rows":[["Acrelândia",-9.828,-66.883,14021,"BR","Q953086"],["Manoel Urbano",-8.839,-69.26,11996,"BR","Q1772688"]]}
@@ -0,0 +1 @@
{"rows":[["Rodrigues Alves",-7.742,-72.647,14938,"BR","Q1800776"],["Porto Walter",-8.269,-72.744,10735,"BR","Q1772588"],["Jordão",-9.434,-71.884,9222,"BR","Q1800793"],["Santa Rosa do Purus",-9.433,-70.493,6723,"BR","Q1772719"],["Esperanza",-9.799,-70.753,4405,"PE","Q3344870"],["Puerto Inca",-9.379,-74.964,2856,"PE","Q3348305"],["Tournavista",-8.934,-74.703,1472,"PE","Q137700491"],["Honoria",-8.769,-74.709,1422,"PE","Q137700481"],["Yuyapichis",-9.628,-74.975,1286,"PE","Q137700493"]]}
@@ -0,0 +1 @@
{"rows":[["San José de Sisa",-6.614,-76.694,14639,"PE","Q11034041"],["Soritor",-6.139,-77.104,14310,"PE","Q27194589"],["Saposoa",-6.936,-76.772,12951,"PE","Q3344065"],["Castillo Grande",-9.278,-76.009,12438,"PE","Q137700501"],["Cayaltí",-6.892,-79.562,12257,"PE","Q116762746"],["Bellavista",-7.067,-76.585,12117,"PE","Q3344055"],["Salaverry",-8.221,-78.976,11751,"PE","Q7403730"],["Lamas",-6.422,-76.516,11165,"PE","Q3139869"],["Ascope",-7.714,-79.108,10560,"PE","Q3344017"],["Namballe District",-5.003,-79.088,10492,"PE","Q6319417"],["Picsi",-6.718,-79.77,9251,"PE","Q49278067"],["Morropón",-5.187,-79.971,8949,"PE","Q6024431"],["Picota",-6.921,-76.33,8376,"PE","Q3344087"],["Yungay",-9.139,-77.744,8000,"PE","Q919678"],["Chongoyape",-6.637,-79.394,7842,"PE","Q5767159"],["Lagunas",-5.227,-75.675,7215,"PE","Q27194615"],["Mochumí",-6.548,-79.864,7188,"PE","Q27194530"],["Uchiza",-8.459,-76.463,6997,"PE","Q20621865"],["Tabalosos",-6.388,-76.634,6642,"PE","Q27194591"],["Pucalá",-6.781,-79.611,6445,"PE","Q106098771"],["Llata",-9.55,-76.817,6027,"PE","Q3344864"],["Naranjos",-5.739,-77.504,5913,"PE","Q137684978"],["Oyotún",-6.85,-79.304,5735,"PE","Q27557971"],["Chicama",-7.845,-79.145,5692,"PE","Q5095918"],["Pomabamba",-8.82,-77.461,5667,"PE","Q3322611"],["Orellana",-6.912,-75.157,5432,"PE","Q7101524"],["Pedro Ruiz Gallo",-5.946,-77.977,5361,"PE","Q27194454"],["Quiruvilca",-8.001,-78.31,5181,"PE","Q16623750"],["Huallanca",-9.899,-76.941,5064,"PE","Q5903856"],["Illimo",-6.474,-79.855,5037,"PE","Q17073502"],["Chocopeu",-7.792,-79.223,5037,"PE","Q5103685"],["Mendoza",-6.394,-77.486,4989,"PE","Q3305659"],["Panao",-9.901,-75.998,4848,"PE","Q3344024"],["Mocupe",-6.991,-79.622,4818,"PE","Q116763392"],["Chazuta",-6.571,-76.138,4595,"PE","Q49277326"],["Huicungo",-7.319,-76.776,4548,"PE","Q33446632"],["Pulán",-6.739,-78.92,4492,"PE","Q16623296"],["Zaña",-6.923,-79.584,4253,"PE","Q6171043"],["Pueblo Nuevo",-7.189,-79.514,4014,"PE","Q7258457"],["San Miguel de Pallaques",-7.001,-78.849,3989,"PE","Q11002429"],["Naranjillo",-9.249,-75.994,3945,"PE","Q2884961"],["Huacrachuco",-8.607,-77.149,3945,"PE","Q3344853"],["Moro",-9.139,-78.183,3926,"PE","Q130326439"],["Juan Guerra",-6.584,-76.324,3745,"PE","Q137684968"],["Pomacochas",-5.826,-77.969,3739,"PE","Q27194453"],["Santa Lucía",-8.345,-76.386,3636,"PE","Q137715155"],["Pacanga",-7.171,-79.486,3593,"PE","Q7121871"],["Calzada",-6.03,-77.067,3550,"PE","Q137684952"],["Nuevo Progreso",-8.451,-76.326,3532,"PE","Q130388430"],["Yuracyacu",-5.931,-77.226,3428,"PE","Q137684991"],["Buenos Aires",-5.267,-79.968,3418,"PE","Q49277301"],["Tembladera",-7.252,-79.13,3238,"PE","Q13190929"],["Jesús",-7.249,-78.38,3209,"PE","Q131323854"],["Chaglla",-9.845,-75.903,3108,"PE","Q137700471"],["Hualgayoc",-6.764,-78.607,3101,"PE","Q130336639"],["La Peca",-5.611,-78.437,3081,"PE","Q11982882"],["Jepelacio",-6.108,-76.915,3081,"PE","Q49277624"],["Cacatachi",-6.462,-76.451,3019,"PE","Q137684951"],["Salas",-6.274,-79.605,3008,"PE","Q107851677"],["Molino",-9.91,-76.016,2931,"PE","Q137700498"],["Lonya Grande",-6.096,-78.423,2896,"PE","Q131451947"],["Cátac",-9.802,-77.431,2776,"PE","Q1050130"],["Ripán",-9.829,-76.803,2755,"PE","Q13190560"],["Sócota",-6.315,-78.7,2698,"PE","Q131323944"],["San Martín",-6.514,-76.741,2644,"PE","Q137684992"],["Yaután",-9.512,-77.997,2446,"PE","Q130316672"],["La Jalca",-6.486,-77.816,2390,"PE","Q3374297"],["Chavín de Huántar",-9.589,-77.178,2384,"PE","Q17449251"],["Luya",-6.165,-77.945,2358,"PE","Q13189994"],["Roque",-6.356,-76.775,2339,"PE","Q137684944"],["Jequetepeque",-7.338,-79.563,2313,"PE","Q15229508"],["Chiriaco",-5.161,-78.286,2278,"PE","Q11963566"],["Julcán",-8.05,-78.5,2260,"PE","Q3344059"],["Piscobamba",-8.883,-77.35,2252,"PE","Q3319310"],["Samanco",-9.262,-78.496,2233,"PE","Q130327433"],["Bigote",-5.319,-79.786,2205,"PE","Q124738480"],["Piscoyacu",-6.981,-76.77,2181,"PE","Q137684979"],["San Fernando",-5.901,-77.269,2173,"PE","Q137684964"],["Barranquita",-6.252,-76.033,2163,"PE","Q137684949"],["Huipoca",-8.979,-75.445,2102,"PE","Q107569131"],["Yacus",-9.986,-76.505,2094,"PE","Q137700499"],["Santiago de Cao",-7.959,-79.242,2090,"PE","Q15275280"],["Santa María del Valle",-9.863,-76.17,2064,"PE","Q137700457"],["Chilete",-7.221,-78.84,2023,"PE","Q131323858"],["Acomayo",-9.802,-76.071,2012,"PE","Q135194231"],["Lámud",-6.139,-77.952,1996,"PE","Q2475775"],["Codo del Pozuzo",-9.67,-75.463,1988,"PE","Q20024777"],["Yorongos",-6.139,-77.144,1962,"PE","Q137684990"],["Shamboyacu",-7.024,-76.132,1914,"PE","Q137684984"],["Tres Unidos",-6.806,-76.233,1911,"PE","Q137684989"],["Copallín",-5.675,-78.423,1907,"PE","Q11964086"],["Lluchubamba",-7.519,-77.969,1896,"PE","Q130336589"],["Nepeña",-9.172,-78.359,1873,"PE","Q15919329"],["Cabana",-8.396,-78.016,1858,"PE","Q3305646"],["Malacasí",-5.344,-79.858,1850,"PE","Q125712172"],["Magdalena",-7.251,-78.659,1846,"PE","Q130336591"],["Cajaruro",-5.737,-78.43,1829,"PE","Q49277314"],["Llamellín",-9.101,-77.017,1817,"PE","Q3317415"],["ChontalLine truncated
@@ -0,0 +1 @@
{"rows":[["La Legua",-5.235,-80.658,8863,"PE","Q125828154"],["Mórrope",-6.542,-80.015,8680,"PE","Q27194532"],["La Matanza",-5.211,-80.088,6787,"PE","Q27194507"],["Vice",-5.422,-80.774,5972,"PE","Q49278395"],["Bernal",-5.463,-80.742,4007,"PE","Q49277262"],["Laynas",-5.232,-80.052,2493,"PE","Q130436047"],["Yacila",-5.133,-81.173,1690,"PE","Q27968636"],["Port of Bayóvar",-5.824,-81.035,1538,"PE","Q7231083"]]}
@@ -0,0 +1 @@
{"rows":[["Bula Atumba",-8.675,14.795,13454,"AO","Q979174"]]}
@@ -0,0 +1 @@
{"rows":[["Sindang Jaya",-6.903,107.68,14896,"ID","Q11175510"],["Sukawarna",-6.886,107.578,14324,"ID","Q11186629"],["Cipadung Kulon",-6.922,107.706,13997,"ID","Q11173868"],["Isola",-6.852,107.593,13513,"ID","Q11176203"],["Karasak",-6.95,107.608,13493,"ID","Q11174115"],["Sukarasa",-6.877,107.589,13442,"ID","Q11183012"],["Pasir Impun",-6.895,107.677,13333,"ID","Q12503577"],["Cibaduyut",-6.953,107.592,13265,"ID","Q11197161"],["Kebon Pisang",-6.919,107.617,12445,"ID","Q11182775"],["Margasuka",-6.954,107.575,12444,"ID","Q14641123"],["Cisaranten Bina Harapan",-6.914,107.684,12328,"ID","Q12479313"],["Cirangrang",-6.959,107.585,11777,"ID","Q11173692"],["Cipaganti",-6.89,107.604,11694,"ID","Q11175864"],["Ancol",-6.94,107.614,11628,"ID","Q12471984"],["Rancabolang",-6.964,107.692,11340,"ID","Q12507881"],["Cigereleng",-6.94,107.611,11233,"ID","Q12478819"],["Merdeka",-6.913,107.621,11222,"ID","Q12498194"],["Lebak Gede",-6.892,107.616,11063,"ID","Q13199701"],["Mekar Wangi",-6.955,107.606,10935,"ID","Q11174976"],["Ledeng",-6.863,107.599,10792,"ID","Q12494268"],["Situsaeur",-6.945,107.595,10720,"ID","Q11175419"],["Garuda",-6.912,107.576,10565,"ID","Q12483556"],["Cibaduyut Kidul",-6.961,107.592,9461,"ID","Q11190536"],["Pasirkaliki",-6.907,107.602,9148,"ID","Q12503629"],["Cibaduyut Wetan",-6.959,107.599,8630,"ID","Q12478700"],["Babakan Ciamis",-6.913,107.606,8501,"ID","Q11182550"],["Balong Gede",-6.925,107.607,8269,"ID","Q12473848"],["Pamoyanan",-6.903,107.593,7803,"ID","Q12502373"],["Pungkur",-6.93,107.608,7498,"ID","Q13200180"],["Babakan Penghulu",-6.941,107.692,7385,"ID","Q13544024"],["Pakemitan",-6.914,107.698,6481,"ID","Q13544023"],["Braga",-6.918,107.609,6155,"ID","Q11184258"],["Cipetir",-6.839,106.946,5716,"ID","Q11161898"],["Cihapit",-6.907,107.626,4058,"ID","Q12478837"],["Cipadung Wetan",-6.932,107.713,3583,"ID","Q12479213"],["Palugon",-7.237,108.671,2672,"ID","Q10969606"],["Citarum",-6.905,107.616,2250,"ID","Q12479343"]]}
@@ -0,0 +1 @@
{"rows":[["Wukirsari",-7.658,110.444,11500,"ID","Q12524899"],["Sambungmacan",-7.361,111.112,5009,"ID","Q4264536"],["Musi",-8.171,114.743,3085,"ID","Q18366899"],["Sumberejo",-7.93,110.861,2654,"ID","Q4208636"],["Tambong",-8.255,114.303,2579,"ID","Q12519030"],["Solor",-7.829,114.067,2527,"ID","Q12515858"],["Kecer",-6.95,113.802,2154,"ID","Q14634390"]]}
@@ -0,0 +1 @@
{"rows":[["Ubud",-8.497,115.263,10873,"ID","Q12522907"],["Kediri",-8.565,115.132,10353,"ID","Q20463891"],["Besakih",-8.375,115.45,7197,"ID","Q2899831"],["Canggu",-8.641,115.143,7088,"ID","Q2543000"],["Padangbai",-8.532,115.51,3294,"ID","Q1910262"],["Bengkala",-8.114,115.175,3000,"ID","Q13568788"],["Bengkel",-8.59,115.093,2390,"ID","Q13490146"]]}
@@ -0,0 +1 @@
{"rows":[["Pante Macassar",-9.2,124.383,8793,"TL","Q263005"],["Batugade",-8.959,124.951,3164,"TL","Q811044"],["Fatukoto",-9.709,124.216,2030,"ID","Q14627747"],["Inbate",-9.426,124.375,1187,"ID","Q12486427"],["Pulau Buaya",-8.176,124.373,1171,"ID","Q12506723"]]}
@@ -0,0 +1 @@
{"rows":[["Baucau",-8.467,126.45,14961,"TL","Q811130"],["Ermera",-8.752,125.397,13142,"TL","Q1355919"],["Lospalos",-8.517,127.033,12782,"TL","Q1017098"],["Turiscai",-8.823,125.707,11258,"TL","Q2460763"],["Manatuto",-8.517,126.017,9022,"TL","Q1011873"],["Suai",-9.3,125.25,8243,"TL","Q582712"],["Gleno",-8.723,125.435,8133,"TL","Q1018872"],["Bobonaro",-9.032,125.325,6110,"TL","Q55574072"],["Viqueque",-8.85,126.367,6078,"TL","Q1011863"],["Liquiçá",-8.594,125.327,5152,"TL","Q946959"],["Metinaro",-8.533,125.733,4316,"TL","Q18201468"],["Maubisse",-8.838,125.597,3370,"TL","Q1506450"],["Ainaro",-8.983,125.5,3085,"TL","Q108908310"],["Aileu",-8.717,125.567,2927,"TL","Q405087"],["Acanuno",-8.556,125.648,2562,"TL","Q22045079"],["Same",-9,125.65,2100,"TL","Q932640"]]}
@@ -0,0 +1 @@
{"rows":[["Daru",-9.083,143.2,12879,"PG","Q499375"],["Kiunga",-6.117,141.3,8265,"PG","Q985928"]]}
@@ -0,0 +1 @@
{"rows":[["Alexishaven",-5.083,145.8,10377,"PG","Q1626709"],["Wau",-7.339,146.717,9442,"PG","Q954956"],["Finschhafen",-6.6,147.85,1240,"PG","Q15217719"]]}
@@ -0,0 +1 @@
{"rows":[["Gizo",-8.1,156.85,7177,"SB","Q1236908"],["Munda",-8.328,157.271,4850,"SB","Q617069"],["Wagina Island",-7.439,157.767,1636,"SB","Q2713838"]]}
@@ -0,0 +1 @@
{"rows":[["Auki",-8.768,160.697,6811,"SB","Q538476"],["Burns Creek, Honiara",-9.423,160.024,5000,"SB","Q25042019"]]}
@@ -0,0 +1 @@
{"rows":[["Funafuti",-8.505,179.117,6025,"TV","Q34126"]]}
@@ -0,0 +1 @@
{"rows":[["Kaputa",-8.517,29.317,9210,"ZM","Q770286"],["Chienge",-8.774,29.08,9161,"ZM","Q996085"]]}
@@ -0,0 +1 @@
{"rows":[["Imalinyi",-9.183,34.633,10272,"TZ","Q10998287"],["Mdandu",-9.147,34.692,9497,"TZ","Q6802855"],["Lupata",-9.3,33.85,8552,"TZ","Q6704665"],["Matamba",-8.983,33.967,7505,"TZ","Q13123967"],["Lusungo",-9.5,33.983,7337,"TZ","Q6705340"],["Kabula",-9.267,33.767,6368,"TZ","Q6344457"],["Masukulu",-9.4,33.75,5521,"TZ","Q6785674"],["Wangama",-6.933,34.317,5387,"TZ","Q7967795"],["Ikama",-9.267,33.833,4732,"TZ","Q5995334"],["Ikolo",-9.65,33.9,4647,"TZ","Q5996092"],["Mwansanga",-8.767,33.533,2939,"TZ","Q6944690"]]}
@@ -0,0 +1 @@
{"rows":[["Makunduchi",-6.413,39.552,14728,"TZ","Q3843701"],["Mwaya",-8.917,36.833,12122,"TZ","Q6272943"],["Kalenga",-7.8,35.6,11491,"TZ","Q6352119"],["Ikondo, Njombe",-9.1,35.266,6655,"TZ","Q5996149"],["Mahanje",-9.933,35.333,6002,"TZ","Q35722686"],["Nyamisati",-7.795,39.275,1142,"TZ","Q10604328"]]}
@@ -0,0 +1 @@
{"rows":[["Tafuna",-14.336,-170.72,7988,"US","Q1019488"],["Vaitele",-13.82,-171.78,7972,"WS","Q9368101"],["Nuʻuuli",-14.319,-170.724,6345,"US","Q3879172"],["Pago Pago",-14.279,-170.701,3656,"US","Q51678"],["Faleniu",-14.332,-170.744,3426,"US","Q3738616"],["Leone",-14.344,-170.785,2902,"AS","Q1773774"],["'Ili'ili",-14.352,-170.747,2497,"US","Q3596207"],["Aua",-14.267,-170.65,2336,"US","Q609232"],["Afega",-13.8,-171.817,1998,"WS","Q2038921"],["Fagatogo",-14.283,-170.69,1445,"US","Q1257213"],["Lepa, Samoa",-14.033,-171.517,1429,"WS","Q2586194"],["Leulumoega",-13.817,-171.917,1184,"WS","Q1944685"],["Fagaʻalu",-14.296,-170.684,1122,"US","Q3738319"]]}
@@ -0,0 +1 @@
{"rows":[["Mata-Utu",-13.283,-176.174,1075,"FR","Q31002"]]}
@@ -0,0 +1 @@
{"rows":[["Historic Centre of Salvador da Bahia",-12.967,-38.5,2253,"BR","Q5572706"],["Maragogipinho",-13.054,-38.965,1720,"BR","Q61727521"]]}
@@ -0,0 +1 @@
{"rows":[["Alvorada",-12.48,-49.125,8802,"BR","Q22060164"]]}
@@ -0,0 +1 @@
{"rows":[["Costa Marques",-12.445,-64.227,12627,"BR","Q656758"],["Alto Alegre dos Parecis",-12.128,-61.851,11479,"BR","Q1802050"],["Cabixi",-13.498,-60.554,8174,"BR","Q940433"],["Pimenteiras do Oeste",-13.482,-61.047,2156,"BR","Q1803105"],["Baures",-13.583,-63.583,2127,"BO","Q811831"]]}
@@ -0,0 +1 @@
{"rows":[["Santa Ana del Yacuma",-13.744,-65.427,12783,"BO","Q1819433"],["Reyes",-14.296,-67.335,11478,"BO","Q913102"],["Capixaba",-10.573,-67.676,10392,"BR","Q1800737"],["Assis Brasil",-10.911,-69.582,8100,"BR","Q1754403"],["Sandia",-14.233,-69.433,8000,"PE","Q3344209"],["Usicayos",-14.125,-69.967,2409,"PE","Q130541387"],["Quilcapuncu",-14.893,-69.73,2280,"PE","Q130541411"],["San Buenaventura",-14.435,-67.541,2264,"BO","Q164003"],["Apolo",-14.716,-68.418,2123,"BO","Q2307341"],["Iñapari",-10.945,-69.577,1890,"PE","Q1899785"],["Muñani",-14.768,-69.953,1885,"PE","Q130541380"],["Putina Punco",-14.112,-69.048,1756,"PE","Q131399964"],["Ixiamas",-13.768,-68.126,1733,"BO","Q2068157"],["San Juan del Oro",-14.221,-69.154,1582,"PE","Q130541416"],["Limbani",-14.15,-69.691,1497,"PE","Q130541414"],["Phara",-14.152,-69.665,1306,"PE","Q130541419"],["Planchón",-12.278,-69.153,1297,"PE","Q107860650"],["Massiapo",-14.09,-69.243,1200,"PE","Q130541420"],["Cuyocuyo",-14.47,-69.537,1106,"PE","Q130541417"]]}
@@ -0,0 +1 @@
{"rows":[["Ascensión",-12.784,-74.978,14915,"PE","Q131451556"],["Atalaya",-10.733,-73.75,12946,"PE","Q3322627"],["Pichari",-12.52,-73.828,12050,"PE","Q7190625"],["Macusani",-14.069,-70.431,11707,"PE","Q3348229"],["Talavera de la Reyna",-13.654,-73.429,11691,"PE","Q9355344"],["Urcos",-13.686,-71.623,10614,"PE","Q2989619"],["Satipo",-11.254,-74.637,10052,"PE","Q3057885"],["Pampas",-12.399,-74.867,9973,"PE","Q2725364"],["Písac",-13.421,-71.85,9796,"PE","Q950398"],["Tamburco",-13.622,-72.873,9171,"PE","Q131187833"],["Puerto Bermúdez",-10.296,-74.938,6168,"PE","Q27213542"],["Kimbiri",-12.488,-73.842,5913,"PE","Q11687201"],["Mariscal Cáceres",-12.39,-74.858,5420,"PE","Q131176125"],["Río Negro",-11.208,-74.66,5262,"PE","Q130483344"],["Nuñoa",-14.478,-70.636,4641,"PE","Q27194667"],["Acomayo",-13.917,-71.681,4532,"PE","Q2582682"],["Paucartambo",-13.316,-71.592,4309,"PE","Q2989631"],["Chalhuanca",-14.295,-73.244,4297,"PE","Q879065"],["Tambobamba",-13.946,-72.175,4063,"PE","Q879051"],["Chinchero",-13.396,-72.06,3765,"PE","Q26764442"],["Palmapampa",-12.768,-73.656,3608,"PE","Q130369727"],["Coasa",-13.987,-70.018,3388,"PE","Q130541388"],["Yanaoca",-14.218,-71.432,3307,"PE","Q2989624"],["Churcampa",-12.723,-74.421,3306,"PE","Q3348281"],["Llochegua",-12.41,-73.906,3224,"PE","Q130369715"],["Chuquibambilla",-14.105,-72.708,3105,"PE","Q879071"],["Ollantaytambo",-13.258,-72.263,3050,"PE","Q916382"],["Antauta",-14.3,-70.292,2908,"PE","Q130541403"],["Maranganí",-14.357,-71.169,2887,"PE","Q13190024"],["Velille",-14.508,-71.886,2883,"PE","Q131399783"],["Santa Rosa",-14.607,-70.787,2858,"PE","Q131399949"],["Quichuas",-12.473,-74.767,2706,"PE","Q130371068"],["Ollachea",-13.794,-70.472,2700,"PE","Q130541390"],["Urubamba",-13.304,-72.117,2700,"PE","Q2304483"],["Ayapata",-13.777,-70.323,2622,"PE","Q130541385"],["Lucre",-13.635,-71.746,2612,"PE","Q13189987"],["Vilcashuamán",-13.653,-73.954,2577,"PE","Q2475760"],["Macari",-14.772,-70.903,2527,"PE","Q13190027"],["Huancabamba",-13.734,-73.35,2492,"PE","Q131187838"],["Quebrada Honda",-12.682,-72.278,2433,"PE","Q13191015"],["Boca Colorado",-12.619,-70.394,2252,"PE","Q107860921"],["Huancarama",-13.645,-73.086,2225,"PE","Q131451845"],["Pampa Cangallo",-13.558,-74.196,2115,"PE","Q130369697"],["Antabamba",-14.365,-72.878,2061,"PE","Q879057"],["Mantaro",-12.324,-73.94,2039,"PE","Q130492438"],["Ancahuasi",-13.457,-72.3,1921,"PE","Q130492417"],["Cabana",-14.289,-73.967,1891,"PE","Q131324820"],["Pillcopata",-12.911,-71.405,1858,"PE","Q21294423"],["Pucyura",-13.479,-72.112,1853,"PE","Q130492418"],["Huancarani",-13.503,-71.655,1842,"PE","Q130492443"],["Huaro",-13.69,-71.641,1833,"PE","Q20622303"],["Querobamba",-14.012,-73.839,1799,"PE","Q2918849"],["Chincheros",-13.518,-73.723,1797,"PE","Q878820"],["Quince Mil",-13.231,-70.754,1759,"PE","Q5573415"],["Paruro",-13.763,-71.849,1750,"PE","Q2989645"],["Huancapi",-13.75,-74.064,1748,"PE","Q950080"],["Maras",-13.333,-72.156,1730,"PE","Q1026235"],["Llalli",-14.933,-70.881,1709,"PE","Q130541405"],["Cachimayo",-13.477,-72.068,1673,"PE","Q130492416"],["Huyro",-13.007,-72.554,1619,"PE","Q130492433"],["Cotabambas",-13.747,-72.356,1604,"PE","Q13189891"],["Mollepata",-13.509,-72.528,1589,"PE","Q130489438"],["Lanlacuni Bajo",-13.439,-70.402,1572,"PE","Q130541389"],["Limatambo",-13.48,-72.443,1562,"PE","Q11161861"],["Huanoquite",-13.682,-72.018,1546,"PE","Q130492440"],["Poroy",-13.497,-72.043,1502,"PE","Q20619475"],["Quellouno",-12.636,-72.557,1496,"PE","Q130312712"],["San Pedro de Coris",-12.578,-74.412,1460,"PE","Q131176072"],["Huando",-12.564,-74.947,1447,"PE","Q131176078"],["Acopía",-14.057,-71.493,1440,"PE","Q13189157"],["Zurite",-13.456,-72.255,1437,"PE","Q130492420"],["El Descanso",-14.534,-71.307,1434,"PE","Q130492423"],["Colquemarca",-14.284,-72.04,1427,"PE","Q131399801"],["Canayre",-12.282,-74.023,1413,"PE","Q130369710"],["Livitaca",-14.313,-71.689,1407,"PE","Q130492427"],["Huamanguilla",-13.011,-74.173,1400,"PE","Q130369713"],["Ajoyani",-14.23,-70.224,1381,"PE","Q130541384"],["San Salvador",-13.492,-71.778,1372,"PE","Q20620856"],["Tawantinsuyo",-12.792,-73.622,1362,"PE","Q130492439"],["San Pedro de Hualla",-13.85,-73.951,1360,"PE","Q62779711"],["Sarhua",-13.667,-74.317,1322,"PE","Q13190743"],["Lucanas",-14.622,-74.233,1297,"PE","Q130369735"],["Acoria",-12.643,-74.862,1280,"PE","Q130312758"],["San José",-14.68,-70.16,1258,"PE","Q130541379"],["Huaccana",-13.388,-73.69,1246,"PE","Q131187855"],["Chuschi",-13.585,-74.352,1245,"PE","Q3655811"],["Accha",-13.971,-71.832,1217,"PE","Q96972647"],["Challabamba",-13.216,-71.648,1205,"PE","Q98550153"],["Villa Virgen",-13.002,-73.513,1155,"PE","Q130492435"],["Mara",-14.086,-72.102,1146,"PE","Q131187857"],["San Cristóbal",-14.743,-74.222,1125,"PE","Q130369740"],["Chirumpiari",-12.808,-73.604,1122,"PE","Q130492437"],["Progreso",-14.073,-72.476,1113,"PE","Q131187866"],["Julcamarca",-13.014,-74.445,1099,"PE","Q131451558"],["La Esmeralda",-12.683,-74.587,1063,"PE","Q131176066"],["Huachocolpa",-13.032,-74.947,1053,Line truncated
@@ -0,0 +1 @@
{"rows":[["Pucusana",-12.482,-76.798,14891,"PE","Q7258273"],["San Agustín",-11.972,-75.256,14310,"PE","Q49278126"],["Chilca",-12.519,-76.739,13920,"PE","Q16890238"],["Oxapampa",-10.58,-75.4,12826,"PE","Q1014523"],["Supe Puerto",-10.805,-77.743,12786,"PE","Q3504032"],["Supe",-10.797,-77.713,12492,"PE","Q33499647"],["San Jerónimo de Tunán",-11.949,-75.283,11601,"PE","Q33479561"],["Pativilca",-10.696,-77.774,11467,"PE","Q3368805"],["Yanahuanca",-10.491,-76.514,11333,"PE","Q3344095"],["Quilmaná",-12.95,-76.384,10491,"PE","Q27194717"],["Santa Eulalia",-11.897,-76.663,9941,"PE","Q33481268"],["Chupaca",-12.062,-75.287,9877,"PE","Q3344173"],["Santa Rosa de Sacco",-11.567,-75.956,8956,"PE","Q130483348"],["Yauyos",-11.781,-75.499,8637,"PE","Q130483296"],["Caleta de Carquín",-11.092,-77.627,8049,"PE","Q34789278"],["Ambo",-10.131,-76.205,7444,"PE","Q3317423"],["Huayllay",-11.001,-76.373,6736,"PE","Q13191218"],["Huamancaca Chico",-12.081,-75.242,6581,"PE","Q130483323"],["Aucallama",-11.562,-77.173,6504,"PE","Q137716780"],["Huayucachi",-12.138,-75.223,6477,"PE","Q49277584"],["Huariaca",-10.442,-76.19,6175,"PE","Q137708733"],["Saño",-11.957,-75.257,5491,"PE","Q130483293"],["Ricardo Palma",-11.924,-76.66,5358,"PE","Q33475284"],["Hualhuas",-11.972,-75.251,5251,"PE","Q130483291"],["Sayán",-11.133,-77.195,4422,"PE","Q33481992"],["Chongos Bajo",-12.134,-75.268,3764,"PE","Q131394414"],["San Mateo, Huarochirí Province",-11.761,-76.309,3669,"PE","Q27783597"],["Chiquián",-10.151,-77.156,3641,"PE","Q1074644"],["Matahuasi",-11.894,-75.344,3268,"PE","Q130483339"],["Ahuac",-12.086,-75.321,3137,"PE","Q27194427"],["Sausa",-11.794,-75.484,3060,"PE","Q131394441"],["Yauli",-11.666,-76.087,2993,"PE","Q130483360"],["Quilcas",-11.937,-75.259,2989,"PE","Q130483295"],["Palca",-11.346,-75.569,2724,"PE","Q115164510"],["Tres de Diciembre",-12.11,-75.246,2665,"PE","Q130483326"],["El Carmen",-13.5,-76.058,2639,"PE","Q28314364"],["Santa Ana de Tusi",-10.472,-76.354,2632,"PE","Q137708743"],["Lunahuaná",-12.963,-76.142,2617,"PE","Q1877336"],["Viques",-12.16,-75.232,2589,"PE","Q130483294"],["Tate de La Capilla",-14.156,-75.708,2544,"PE","Q33505671"],["San Pedro de Cajas",-11.251,-75.861,2495,"PE","Q25400021"],["Pucucho",-11.822,-75.392,2459,"PE","Q130483300"],["Ninacaca",-10.856,-76.113,2400,"PE","Q55129680"],["Muquiyauyo",-11.814,-75.454,2311,"PE","Q131394979"],["Pucará",-12.172,-75.145,2220,"PE","Q131395032"],["San Lorenzo",-11.847,-75.382,2165,"PE","Q130483315"],["San Rafael",-10.338,-76.182,2056,"PE","Q137700490"],["Santo Domingo del Prado",-11.898,-75.318,2023,"PE","Q130483338"],["Huácar",-10.16,-76.237,2019,"PE","Q137700482"],["Ocros",-10.404,-77.396,2000,"PE","Q3317427"],["Leticia",-11.377,-75.752,1999,"PE","Q119109056"],["Tomayquichua",-10.078,-76.213,1950,"PE","Q26980595"],["Churin",-10.817,-76.883,1834,"PE","Q5118292"],["Iscozacín",-10.184,-75.15,1814,"PE","Q137708750"],["Cauri",-10.142,-76.626,1704,"PE","Q113368834"],["Canta",-11.467,-76.624,1646,"PE","Q3322638"],["Tapuc",-10.455,-76.462,1644,"PE","Q137708744"],["Sincos",-11.892,-75.387,1454,"PE","Q131394982"],["Castrovirreyna",-13.278,-75.316,1449,"PE","Q3348254"],["Vicco",-10.841,-76.236,1400,"PE","Q42894269"],["Río Grande",-14.52,-75.201,1394,"PE","Q33476950"],["San Miguel",-12.015,-75.346,1387,"PE","Q130483331"],["Vilcabamba",-10.479,-76.447,1364,"PE","Q137708746"],["Margos",-10.005,-76.523,1324,"PE","Q137700452"],["Huancaní",-11.864,-75.414,1321,"PE","Q131395005"],["Goyllarisquizga",-10.475,-76.408,1320,"PE","Q137708737"],["Huáchac",-12.02,-75.341,1311,"PE","Q130483322"],["Pazos",-12.259,-75.07,1301,"PE","Q131176134"],["Huacrapuquio",-12.174,-75.219,1297,"PE","Q130483290"],["Huamalí",-11.807,-75.424,1290,"PE","Q130483306"],["Cajatambo",-10.473,-76.994,1275,"PE","Q2638247"],["Chontabamba",-10.603,-75.439,1221,"PE","Q137708736"],["Huachón",-10.636,-75.951,1221,"PE","Q137708738"],["Paccha",-11.473,-75.96,1213,"PE","Q130312656"],["Ticlacayán",-10.534,-76.164,1212,"PE","Q137708742"],["Aco",-11.958,-75.368,1209,"PE","Q130483333"],["Apata",-11.855,-75.354,1206,"PE","Q131394386"],["Asia",-12.779,-76.557,1198,"PE","Q126021564"],["Santa Rosa",-11.877,-75.295,1198,"PE","Q13190718"],["Pozuzo",-10.067,-75.533,1194,"PE","Q278871"],["San Antonio de Rancas",-10.69,-76.317,1193,"PE","Q137708741"],["Marca",-10.089,-77.474,1191,"PE","Q13190032"],["Huay-Huay",-11.723,-75.905,1130,"PE","Q130483346"],["Quichuay",-11.89,-75.286,1128,"PE","Q13190448"],["San Pedro de Pillao",-10.439,-76.495,1099,"PE","Q137708749"],["Jarpa",-12.126,-75.436,1073,"PE","Q131394496"],["Muqui",-11.833,-75.434,1013,"PE","Q130483302"],["Huancabamba",-10.426,-75.524,1012,"PE","Q137708739"],["Huaricolca",-11.512,-75.653,1011,"PE","Q115239543"],["Ataura",-11.803,-75.438,1006,"PE","Q131394405"]]}
@@ -0,0 +1 @@
{"rows":[["Flying Fish Cove",-10.422,105.678,1599,"AU","Q30980"]]}
@@ -0,0 +1 @@
{"rows":[["Wadeye",-14.233,129.517,2280,"AU","Q18028"]]}
@@ -0,0 +1 @@
{"rows":[["Darwin",-12.462,130.842,6464,"AU","Q5225948"],["Katherine",-14.467,132.267,5980,"AU","Q17980"],["Howard Springs",-12.492,131.053,5132,"AU","Q5920924"],["Karama",-12.401,130.917,4944,"AU","Q6368250"],["Leanyer",-12.379,130.898,4597,"AU","Q6509883"],["Humpty Doo",-12.575,131.102,4380,"AU","Q17966"],["Rosebery",-12.505,130.992,4218,"AU","Q7368077"],["Stuart Park",-12.449,130.842,4149,"AU","Q7626934"],["Zuccoli",-12.512,131.003,4131,"AU","Q30694176"],["Larrakeyah",-12.459,130.822,3943,"AU","Q6489783"],["Nightcliff",-12.383,130.849,3884,"AU","Q7033778"],["Durack",-12.475,130.973,3730,"AU","Q5316121"],["Muirhead",-12.358,130.896,3689,"AU","Q6933244"],["Gray",-12.492,130.979,3288,"AU","Q5598128"],["Rapid Creek",-12.381,130.862,3282,"AU","Q7294152"],["Woodroffe",-12.499,130.981,3233,"AU","Q8033152"],["Katherine East",-14.466,132.285,3114,"AU","Q6376354"],["Bakewell",-12.499,130.993,3091,"AU","Q4849343"],["Moulden",-12.51,130.976,3053,"AU","Q6918971"],["Coconut Grove",-12.399,130.852,3050,"AU","Q5139826"],["Malak",-12.393,130.904,3013,"AU","Q6741113"],["Driver",-12.485,130.973,2884,"AU","Q5307982"],["Fannie Bay",-12.425,130.836,2875,"AU","Q5433948"],["Parap",-12.421,130.844,2819,"AU","Q7135606"],["Gunn",-12.489,130.992,2664,"AU","Q5618901"],["Millner",-12.391,130.863,2576,"AU","Q6859897"],["Tiwi",-12.363,130.88,2562,"AU","Q7810475"],["Maningrida",-12.05,134.217,2518,"AU","Q17988"],["Wulagi",-12.384,130.893,2510,"AU","Q8039143"],["Bellamack",-12.521,130.98,2458,"AU","Q4883440"],["Johnston",-12.486,131.01,2386,"AU","Q6268601"],["Anula",-12.393,130.89,2385,"AU","Q4777772"],["Lyons",-12.379,130.888,2302,"AU","Q6709756"],["Wagaman",-12.383,130.885,2163,"AU","Q7959471"],["Alawa",-12.38,130.873,2127,"AU","Q4708892"],["Moil",-12.389,130.879,2000,"AU","Q6894595"],["Nakara",-12.369,130.878,1978,"AU","Q6960299"],["Holtze",-12.461,130.984,1940,"AU","Q5884778"],["Wanguri",-12.373,130.888,1876,"AU","Q7967917"],["Jingili",-12.387,130.875,1841,"AU","Q6202323"],["Virginia",-12.548,131.017,1836,"AU","Q7934081"],["Ludmilla",-12.43,130.852,1743,"AU","Q6698920"],["Herbert",-12.542,131.157,1730,"AU","Q5733379"],["Bayview",-12.44,130.86,1702,"AU","Q4874996"],["Girraween",-12.524,131.092,1668,"AU","Q5564818"],["Farrar",-12.478,130.991,1650,"AU","Q5436240"],["Wurrumiyanga",-11.759,130.635,1563,"AU","Q18034"],["Marrara",-12.398,130.88,1549,"AU","Q6772795"],["Katherine South",-14.469,132.259,1507,"AU","Q18165876"],["Cossack",-14.447,132.176,1293,"AU","Q31203555"],["Brinkin",-12.37,130.867,1268,"AU","Q4968417"],["Milingimbi",-12.103,134.921,1225,"AU","Q1934778"],["Berrimah",-12.434,130.923,1199,"AU","Q4894715"],["Gunbalanya",-12.317,133.05,1177,"AU","Q18002"],["Ngukurr",-14.73,134.731,1149,"AU","Q21074864"],["Jabiru",-12.667,132.833,1081,"AU","Q17969"]]}
@@ -0,0 +1 @@
{"rows":[["Nhulunbuy",-12.182,136.782,3350,"AU","Q17996"],["Galiwinku",-12.024,135.566,2206,"AU","Q30400333"],["East Arnhem",-12.635,135.84,1194,"AU","Q31230672"]]}
@@ -0,0 +1 @@
{"rows":[["Weipa",-12.643,141.864,4097,"AU","Q1026439"],["Thursday Island",-10.579,142.22,2805,"AU","Q20669958"],["Rocky Point",-12.619,141.886,2214,"AU","Q31202450"],["Aurukun",-13.35,141.717,1269,"AU","Q1879882"],["Bamaga",-10.883,142.383,1186,"AU","Q3604590"]]}
@@ -0,0 +1 @@
{"rows":[["Sola",-13.88,167.55,1065,"VU","Q1423143"]]}
@@ -0,0 +1 @@
{"rows":[["Manyinga",-13.419,24.331,12760,"ZM","Q123174109"],["Lukulu",-14.408,23.267,10575,"ZM","Q1629398"],["Zambezi",-13.55,23.117,10299,"ZM","Q145470"],["Kabompo",-13.583,24.231,9865,"ZM","Q1001226"],["Chavuma",-13.075,22.688,4652,"ZM","Q1022152"]]}
@@ -0,0 +1 @@
{"rows":[["Mpongwe",-13.513,28.155,14979,"ZM","Q996118"],["Lubwe",-11.114,29.647,12643,"ZM","Q132861372"],["Luwingu",-10.262,29.927,10766,"ZM","Q1878272"],["Kasempa",-13.461,25.839,10700,"ZM","Q1734917"],["Mufumbwe",-13.139,25.006,9576,"ZM","Q996108"],["Chibombo",-14.664,28.078,4310,"ZM","Q1071771"],["Chilubi",-11.15,29.917,4295,"ZM","Q1022154"]]}
@@ -0,0 +1 @@
{"rows":[["Ntcheu",-14.817,34.633,14642,"MW","Q1022517"],["Monkey Bay",-14.083,34.917,14591,"MW","Q1944901"],["Nyoni, Tanzania",-11.084,34.919,12899,"TZ","Q65331304"],["Litembo",-10.967,34.85,12432,"TZ","Q6647539"],["Mungwi",-10.167,31.367,7831,"ZM","Q1952800"],["Chama",-11.208,33.158,7029,"ZM","Q1060403"],["Nyimba",-14.443,31.087,6821,"ZM","Q162131"],["Chadiza",-14.064,32.435,5670,"ZM","Q1058666"]]}
@@ -0,0 +1 @@
{"rows":[["Kigonsera",-10.8,35.067,13323,"TZ","Q6405967"],["Lilambo",-10.683,35.549,12642,"TZ","Q6547546"],["Maposeni",-10.583,35.4,4670,"TZ","Q13123938"]]}
@@ -0,0 +1 @@
{"rows":[["Tsimbeo",-12.2,44.467,12472,"KM","Q1885248"],["Ongoujou",-12.312,44.508,11736,"KM","Q3120986"],["Adda-Douéni",-12.3,44.5,11165,"KM","Q2824136"],["Sima",-12.199,44.274,11000,"KM","Q3110104"],["Ouani",-12.135,44.428,10000,"KM","Q3143004"],["Bazimini",-12.179,44.449,9205,"KM","Q548071"],["Iconi",-11.745,43.233,8817,"KM","Q3120964"],["Ivémbéni-Bandasamoulini",-11.478,43.318,8786,"KM","Q3156386"],["Moya",-12.3,44.433,8475,"KM","Q786648"],["Mkazi",-11.732,43.267,8438,"KM","Q939788"],["Dindri",-12.214,44.453,8037,"KM","Q3028292"],["Mbéni",-11.5,43.383,7725,"KM","Q3121010"],["Mitsamiouli",-11.382,43.3,7235,"KM","Q3109029"],["Koni-Djodjo",-12.23,44.482,7232,"KM","Q3119166"],["Barakani",-12.136,44.432,6854,"KM","Q2883788"],["Chandra",-12.2,44.467,6354,"KM","Q2956006"],["Chezani",-11.428,43.388,6250,"KM","Q2963196"],["Ngandzalé",-12.27,44.51,6097,"KM","Q3339276"],["Foumbouni",-11.867,43.483,5331,"KM","Q3043023"],["Mbambao Mtsanga",-12.31,44.44,5067,"KM","Q3303484"],["Mitsoudjé",-11.817,43.267,5004,"KM","Q3317188"],["Dembéni",-11.877,43.406,4723,"KM","Q3022078"],["Moidja",-11.468,43.287,4441,"KM","Q17076248"],["Hahaya-Aéroport",-11.537,43.271,4005,"KM","Q3125727"],["Hajoho",-12.117,44.483,3873,"KM","Q3125818"],["Ntsaweni",-11.466,43.263,3846,"KM","Q3345984"],["Bandracouni",-11.86,43.404,3309,"KM","Q2878564"],["Djoièzi",-12.297,43.773,3271,"KM","Q3033049"],["Djomani-Mchenazi",-11.43,43.259,3029,"KM","Q3033054"],["Daji",-12.333,44.483,3012,"KM","Q14525823"],["Itsinkoundi",-11.584,43.376,2859,"KM","Q2399910"],["Boungoueni",-12.2,44.3,2775,"KM","Q2922202"],["Bandra Lamahalé",-12.147,44.499,2771,"KM","Q2882377"],["Heroumbili",-11.544,43.38,2745,"KM","Q3134319"],["Chironkamba",-12.191,44.352,2692,"KM","Q2963954"],["Dzidri-I",-12.22,44.45,2675,"KM","Q3042208"],["Chouani",-11.819,43.284,2615,"KM","Q2964567"],["Singani",-11.847,43.328,2552,"KM","Q3484935"],["Bangoi-Hamtsaha-Madjeoué",-11.717,43.368,2514,"KM","Q2882482"],["Djoumoichongo-Nyoumbadjou",-11.807,43.286,2478,"KM","Q3033071"],["Chiroroni",-12.377,44.501,2395,"KM","Q2963964"],["Hantsindzi",-11.429,43.402,2290,"KM","Q507363"],["Idjinkoundzi",-11.711,43.414,2241,"KM","Q3147877"],["Akibani",-12.193,44.362,2170,"KM","Q2829022"],["Boeni ya Bambao",-11.631,43.352,2077,"KM","Q601473"],["Batsa",-11.628,43.26,2075,"KM","Q2891632"],["Bandajou",-12.183,44.283,2044,"KM","Q2882134"],["Hamchako",-12.371,44.513,2036,"KM","Q2384497"],["Douniani",-11.421,43.289,2031,"KM","Q3038137"],["Dzahadjou",-11.848,43.34,2002,"KM","Q3042177"],["Bandamadji-Ladomba",-11.784,43.444,1995,"KM","Q2882144"],["Dziani",-12.183,44.483,1974,"KM","Q3042198"],["Harembo",-12.15,44.5,1911,"KM","Q3127418"],["Héléindjé-Salimani-Zounda",-11.437,43.305,1757,"KM","Q3144897"],["Chindini",-11.921,43.481,1680,"KM","Q2963751"],["Hachimpenda",-12.2,44.256,1657,"KM","Q3125454"],["Dimadjou",-11.474,43.364,1655,"KM","Q3028026"],["Dzahani",-11.657,43.276,1587,"KM","Q3042180"],["Itsandzéni",-11.473,43.384,1578,"KM","Q3155989"],["Bambadjani",-11.479,43.377,1549,"KM","Q923118"],["Hantsambou",-11.66,43.256,1542,"KM","Q2385256"],["Bahani",-11.64,43.284,1454,"KM","Q2879261"],["Bandrani",-12.073,44.471,1377,"KM","Q4854696"],["Dzahadjou Lamzandé",-11.853,43.349,1349,"KM","Q3042179"],["Chamlé",-11.445,43.267,1345,"KM","Q2948523"],["Antsahé",-12.356,44.523,1328,"KM","Q2857608"],["Bouni",-11.492,43.398,1261,"KM","Q2922203"],["Assimpao",-12.233,44.32,1252,"KM","Q2867178"],["Hoani",-12.25,43.667,1245,"KM","Q3138871"],["Bandar Salama",-12.29,43.759,1232,"KM","Q2882147"],["Chitrouni",-12.186,44.336,1218,"KM","Q2964025"],["Bambani",-12.233,44.32,1214,"KM","Q4853332"],["Hadjambou",-11.736,43.233,1202,"KM","Q3125556"],["Founga-Anihani",-11.411,43.295,1112,"KM","Q3079943"],["Dar-Salama",-12.251,44.388,1089,"KM","Q3015900"],["Ifoundihé Chamboini",-11.9,43.412,1085,"KM","Q3148105"],["Bada la Djandza",-12.299,44.497,1040,"KM","Q2878567"],["Bangoi-Mafousa Nkoa",-11.717,43.368,1015,"KM","Q2882481"],["Dimadjou-Mdé",-11.476,43.374,1010,"KM","Q3028029"]]}
@@ -0,0 +1 @@
{"rows":[["Handrema",-12.681,45.1,1829,"FR","Q5647547"],["Mtsangamboua",-12.69,45.11,1304,"FR","Q6930490"]]}
@@ -0,0 +1 @@
{"rows":[["Jamestown",-15.925,-5.718,1516,"SH","Q30970"]]}
@@ -0,0 +1 @@
{"rows":[["Bora Bora",-16.498,-151.736,10605,"FR","Q183113"],["Vaitape",-16.506,-151.749,4927,"FR","Q3498189"],["Opoa",-16.836,-151.365,1205,"FR","Q39483295"]]}
@@ -0,0 +1 @@
{"rows":[["Neiafu",-18.651,-173.983,6000,"TO","Q1025393"],["Pangai",-19.803,-174.349,2000,"TO","Q1027037"]]}
@@ -0,0 +1 @@
{"rows":[["Trancoso",-16.593,-39.103,11006,"BR","Q938536"]]}
@@ -0,0 +1 @@
{"rows":[["Vera Cruz de Minas",-19.698,-44.05,4208,"BR","Q10389767"],["Lapinha",-19.571,-43.953,3921,"BR","Q61767236"],["Cocais",-19.865,-43.457,2803,"BR","Q62128689"],["Fidalgo (Pedro Leopoldo)",-19.534,-43.966,2595,"BR","Q61767099"],["Senador Mourão",-17.808,-43.419,2390,"BR","Q10370003"],["Brejaubinha",-18.776,-42.216,2328,"BR","Q18464151"],["Boa Vista da Serra",-19.929,-44.402,2305,"BR","Q61793444"],["Desembargador Otoni",-17.695,-43.333,2102,"BR","Q10265519"],["Hematita",-19.502,-43.009,1992,"BR","Q10294609"],["São João da Chapada",-18.088,-43.741,1581,"BR","Q10375812"],["Tabajara",-19.586,-41.769,1558,"BR","Q10377696"],["São Gonçalo do Rio das Pedras",-18.415,-43.495,1479,"BR","Q10267312"],["Planalto de Minas",-17.651,-43.322,1318,"BR","Q10350224"]]}
@@ -0,0 +1 @@
{"rows":[["Cana-Brava",-17.393,-45.834,3107,"BR","Q62032011"],["Luislândia do Oeste",-17.987,-45.607,3017,"BR","Q62030713"],["Canoeiros",-18.041,-45.521,1662,"BR","Q62032111"]]}
@@ -0,0 +1 @@
{"rows":[["Porto Esperidião",-15.853,-58.46,10204,"BR","Q2012385"],["Paradero",-18.992,-57.791,2022,"BO","Q1149273"]]}
@@ -0,0 +1 @@
{"rows":[["Zudáñez",-19.119,-64.701,13694,"BO","Q228153"],["Villa Vaca Guzmán",-19.894,-63.75,13282,"BO","Q842347"],["Pampagrande",-18.097,-64.116,10500,"BO","Q931053"],["Charagua",-19.792,-63.201,6780,"BO","Q1712242"],["San Javier",-16.275,-62.507,6048,"BO","Q281844"],["Rivas Palacio Colony",-18.171,-63.029,5728,"BO","Q134127576"],["Concepción",-16.132,-62.026,5586,"BO","Q751077"],["San Miguel de Velasco",-16.699,-60.968,4484,"BO","Q473144"],["Puerto Rico",-18.008,-63.393,4219,"BO","Q2117446"],["Nueva Esperanza Colony",-17.457,-60.57,3925,"BO","Q141708152"],["Mairana",-18.119,-63.956,3884,"BO","Q1003511"],["Entre Ríos",-17.197,-64.535,3796,"BO","Q1345127"],["Kansas Colony",-19.859,-63.059,3750,"BO","Q141635808"],["Pinondi",-19.771,-63.014,3139,"BO","Q141698923"],["Campanero",-17.734,-62.951,3020,"BO","Q1030202"],["Swift Current",-18.067,-63.043,2925,"BO","Q134127632"],["Durango Colony",-19.823,-62.848,2917,"BO","Q141706678"],["Villa Serrano",-19.123,-64.324,2877,"BO","Q842355"],["Valle Hermoso (Schöntal) Colony",-17.52,-61.111,2569,"BO","Q141708189"],["Belize Colony",-17.532,-62.113,2502,"BO","Q141708284"],["California Colony",-17.402,-61.448,2462,"BO","Q141708294"],["Tarabuco",-19.183,-64.915,2442,"BO","Q1982115"],["Abapó",-18.906,-63.399,2386,"BO","Q305531"],["Canadiense II Colony",-17.888,-62.577,2300,"BO","Q31838708"],["Valle Nuevo Colony",-17.817,-62.338,2262,"BO","Q56293233"],["El Dorado (Gnadenhof) Colony",-18.395,-63.024,2247,"BO","Q141680563"],["Manitoba Colony",-17.398,-61.974,2208,"BO","Q16888523"],["Santa Rita Colony",-17.948,-62.894,2194,"BO","Q141680520"],["Nuevo Mexico Colony",-17.576,-61,2150,"BO","Q141708170"],["Valle Esperanza",-17.178,-62.513,2121,"BO","Q141618235"],["Valle Esperanza Colony",-17.178,-62.513,2121,"BO","Q141711326"],["Santa Anita",-16.115,-64.828,2100,"BO","Q111770581"],["Pucará",-18.715,-64.184,2076,"BO","Q1563343"],["San Rafael de Velasco",-16.787,-60.674,2057,"BO","Q746773"],["La Honda Colony",-17.738,-60.29,1990,"BO","Q141707819"],["Berlin Colony",-17.562,-60.431,1943,"BO","Q141707821"],["Chihuahua Colony",-17.21,-62.117,1811,"BO","Q141618380"],["La Milagrosa Colony",-18.083,-62.014,1713,"BO","Q141710895"],["Tajibo (Nordenheim) Colony",-16.18,-61.341,1431,"BO","Q141706918"],["Valle de Merced",-16.325,-61.548,1396,"BO","Q141621054"],["El Tinto Colony",-17.774,-61.544,1332,"BO","Q141708249"],["Del Norte Colony",-17.112,-62.476,1290,"BO","Q141619105"],["Valle Roca Colony",-16.175,-61.59,1280,"BO","Q141706826"],["Yanahigua Colony",-17.003,-62.356,1262,"BO","Q141711319"],["Casa Grande",-19.708,-62.897,1229,"BO","Q141635833"],["Porvenir Oriente (Nordenhof) Colony",-16.214,-61.478,1197,"BO","Q141706910"],["Primavera Colony",-17.817,-61.247,1085,"BO","Q141708226"],["Oriente Colony",-17.826,-62.208,1063,"BO","Q105211245"]]}
@@ -0,0 +1 @@
{"rows":[["San Benito",-17.523,-65.894,13562,"BO","Q1416961"],["Chulumani",-16.41,-67.525,13204,"BO","Q1766619"],["Yunguyo",-16.244,-69.093,12625,"PE","Q2306609"],["Colquencha",-16.934,-68.249,12490,"BO","Q491521"],["Torotoro",-18.134,-65.763,10535,"BO","Q1001951"],["Achocalla",-16.568,-68.171,10369,"BO","Q340576"],["Achacachi",-16.044,-68.685,8857,"BO","Q1553175"],["Aiquile",-18.167,-65.167,7381,"BO","Q1617416"],["Colquiri",-17.397,-67.131,6610,"BO","Q1014448"],["Lahuachaca",-17.377,-67.675,5874,"BO","Q1800652"],["Uncía",-18.468,-66.565,5709,"BO","Q1642052"],["Betanzos",-19.553,-65.454,5021,"BO","Q830983"],["Ironcollo",-17.358,-66.284,4778,"BO","Q916733"],["Yucumo",-15.146,-67.034,4693,"BO","Q1646153"],["Santiago de Machaca",-17.067,-69.193,4593,"BO","Q1002013"],["Villa Porvenir",-16.826,-65.347,4258,"BO","Q21044734"],["Santuario de Quillacas",-19.233,-66.942,3983,"BO","Q2223784"],["Guanay",-15.498,-67.879,3890,"BO","Q959746"],["Sica Sica",-17.333,-67.739,3831,"BO","Q494377"],["Colomi",-17.338,-65.868,3699,"BO","Q990698"],["Arani",-17.573,-65.768,3512,"BO","Q1026281"],["Huara",-19.967,-69.767,3510,"CL","Q13081"],["Tarata",-17.611,-66.023,3323,"BO","Q1016289"],["Irpa Irpa",-17.717,-66.283,2721,"BO","Q1673170"],["Tipuani",-15.561,-67.983,2563,"BO","Q1026260"],["Huacullani",-16.63,-69.322,2466,"PE","Q130541392"],["Moho",-15.361,-69.5,2365,"PE","Q934450"],["Coroico",-16.189,-67.728,2319,"BO","Q1026263"],["Sorata",-15.774,-68.649,2217,"BO","Q1428069"],["Tolata",-17.534,-65.963,2207,"BO","Q590883"],["Ocurí",-18.843,-65.796,2200,"BO","Q2014005"],["German Busch",-16.994,-65.255,2000,"BO","Q130482643"],["Senda III",-16.995,-65.182,1980,"BO","Q106944598"],["Collana",-16.904,-68.284,1936,"BO","Q1108876"],["Coro Coro",-17.177,-68.454,1884,"BO","Q1353228"],["Irupana",-16.466,-67.455,1882,"BO","Q1014423"],["Colquechaca",-18.7,-66.004,1816,"BO","Q338235"],["Taraco",-15.298,-69.978,1804,"PE","Q130541372"],["Santa Rosa Eñe",-17.078,-65.223,1800,"BO","Q116908135"],["Amarete",-15.239,-68.984,1741,"BO","Q454982"],["Taquile Island",-15.777,-69.684,1700,"PE","Q1761551"],["Colchane",-19.275,-68.64,1649,"CL","Q3839"],["Totora",-17.736,-65.191,1597,"BO","Q2038566"],["Anzaldo",-17.833,-65.917,1576,"BO","Q614151"],["Apillapampa",-17.861,-66.257,1523,"BO","Q618627"],["Senda F",-16.874,-65.132,1511,"BO","Q106939562"],["Zepita",-16.497,-69.103,1503,"PE","Q8069335"],["Teoponte",-15.496,-67.819,1421,"BO","Q1026231"],["Santiváñez",-17.55,-66.25,1400,"BO","Q990723"],["Cojata",-15.015,-69.365,1378,"PE","Q130541369"],["Huatasani",-15.06,-69.802,1358,"PE","Q130541370"],["Camiña",-19.3,-69.417,1250,"CL","Q3731"],["Pisacoma",-16.908,-69.371,1225,"PE","Q130541391"],["Anapia",-16.314,-68.853,1207,"PE","Q130541422"],["Tacachi",-17.641,-65.806,1198,"BO","Q1516800"],["Palca",-16.561,-67.953,1180,"BO","Q1001975"],["Pilcuyo",-16.111,-69.554,1155,"PE","Q130541395"],["Puerto Acosta",-15.533,-69.252,1123,"BO","Q1866555"],["San Pedro de Buena Vista",-18.271,-65.981,1100,"BO","Q1001985"],["Paractito",-17.012,-65.456,1030,"BO","Q104878856"]]}
@@ -0,0 +1 @@
{"rows":[["Camaná",-16.624,-72.711,13304,"PE","Q1028011"],["Characato",-16.469,-71.484,12411,"PE","Q131412532"],["Tiabaya",-16.45,-71.591,10870,"PE","Q131412534"],["La Pampa",-16.614,-72.699,9194,"PE","Q17075166"],["Samegua",-17.182,-70.9,7950,"PE","Q137709489"],["Santa Rita de Siguas",-16.494,-72.094,6119,"PE","Q130598977"],["Cocachacra",-17.089,-71.759,5477,"PE","Q5775805"],["Islay",-17.002,-72.105,5132,"PE","Q27995444"],["Chivay",-15.633,-71.6,5000,"PE","Q2351933"],["Caravelí",-15.773,-73.366,5000,"PE","Q968765"],["San Gregorio",-16.573,-72.716,4532,"PE","Q130598988"],["Pueblo Nuevo",-17.612,-71.34,4437,"PE","Q137709501"],["Sabandia",-16.457,-71.495,3771,"PE","Q130598979"],["El Algarrobal",-17.617,-71.317,3694,"PE","Q5350720"],["Omate",-16.674,-70.97,3158,"PE","Q3322634"],["Estación de Pucará",-15.034,-70.338,3028,"PE","Q130541377"],["Bella Unión",-15.45,-74.658,2882,"PE","Q130598995"],["Aplao",-16.083,-72.5,2860,"PE","Q2423691"],["Mañazo",-15.801,-70.343,2658,"PE","Q130541434"],["La Curva",-17.144,-71.821,2536,"PE","Q130598984"],["Deustua",-15.642,-70.35,2231,"PE","Q130541439"],["Laraqueri",-16.15,-70.064,2202,"PE","Q130541429"],["Pucará",-15.042,-70.368,1832,"PE","Q11286696"],["Cotahuasi",-15.213,-72.888,1529,"PE","Q2638258"],["Arapa",-15.139,-70.11,1502,"PE","Q130541374"],["Yauca",-15.662,-74.527,1468,"PE","Q129209417"],["Pampacolca",-15.714,-72.574,1438,"PE","Q131412525"],["Lomas",-15.57,-74.851,1402,"PE","Q130598993"],["Jaquí",-15.479,-74.444,1400,"PE","Q130598997"],["Ocoña",-16.432,-73.105,1365,"PE","Q130598989"],["Huancarqui",-16.096,-72.472,1256,"PE","Q130599002"],["Uchumayo",-16.425,-71.673,1244,"PE","Q27500860"],["Vítor",-16.466,-71.935,1126,"PE","Q130598982"],["Viraco",-15.658,-72.525,1102,"PE","Q131412527"],["Cabanilla",-15.62,-70.346,1098,"PE","Q27831775"],["San José",-16.62,-72.736,1090,"PE","Q130598986"],["Chumpi",-15.095,-73.748,1080,"PE","Q131324815"]]}
@@ -0,0 +1 @@
{"rows":[["Outapi",-17.503,14.986,13664,"NA","Q1758215"],["Opuwo",-18.061,13.84,12331,"NA","Q1024089"],["Ruacana",-17.433,14.35,5939,"NA","Q1013946"],["Kamanjab",-19.629,14.845,3915,"NA","Q1699191"],["Eheke",-17.833,14.867,1115,"NA","Q5348569"]]}
@@ -0,0 +1 @@
{"rows":[["Broome",-17.962,122.236,14660,"AU","Q606294"],["Cable Beach",-17.933,122.214,5730,"AU","Q55819367"],["Djugun",-17.941,122.231,3291,"AU","Q31436896"],["Derby",-17.311,123.635,3222,"AU","Q1018373"],["Bilingurr",-17.925,122.234,1540,"AU","Q31440680"],["St George Ranges",-18.795,124.166,1240,"AU","Q31431747"]]}
@@ -0,0 +1 @@
{"rows":[["Kununurra",-15.774,128.739,5494,"AU","Q1110973"],["Halls Creek",-18.23,127.67,1605,"AU","Q992686"],["Fitzroy Crossing",-18.178,125.591,1297,"AU","Q1421393"]]}
@@ -0,0 +1 @@
{"rows":[["Tennant Creek",-19.647,134.19,3080,"AU","Q18015"]]}
@@ -0,0 +1 @@
{"rows":[["Lumina",-16.225,137.123,2558,"","Q104434355"],["Doomadgee",-17.942,138.828,1405,"AU","Q2022784"],["Wellesley Islands",-16.573,139.349,1136,"AU","Q1756163"],["Gununa",-16.666,139.181,1022,"AU","Q13365146"]]}
@@ -0,0 +1 @@
{"rows":[["Normanton",-17.676,141.084,1391,"AU","Q1021888"],["Kowanyama",-15.477,141.744,1079,"AU","Q6435007"]]}
@@ -0,0 +1 @@
{"rows":[["Mareeba",-16.983,145.417,11825,"AU","Q1894520"],["Edmonton",-17.017,145.75,11409,"AU","Q5338982"],["Kelso",-19.397,146.721,10599,"AU","Q6386527"],["Redlynch",-16.883,145.7,10571,"AU","Q21905016"],["Mount Louisa",-19.283,146.733,9227,"AU","Q6921896"],["Mount Sheridan",-16.984,145.729,8678,"AU","Q30749753"],["Ayr",-19.583,147.4,8603,"AU","Q2875020"],["Annandale",-19.318,146.775,8574,"AU","Q4767920"],["Bentley Park",-17.004,145.738,8360,"AU","Q4890491"],["Douglas",-19.317,146.75,7780,"AU","Q5301158"],["Atherton",-17.266,145.474,7724,"AU","Q755507"],["Mooroobool",-16.935,145.731,7222,"AU","Q6908439"],["Innisfail",-17.524,146.029,7173,"AU","Q690795"],["Burdell",-19.246,146.7,7171,"AU","Q30979764"],["Gordonvale",-17.097,145.779,6944,"AU","Q5586063"],["Smithfield",-16.831,145.691,6664,"AU","Q7545487"],["Bushland Beach",-19.189,146.681,6641,"AU","Q5001524"],["Trinity Beach",-16.783,145.7,6594,"AU","Q7842589"],["Manoora",-16.92,145.74,6175,"AU","Q19875371"],["Kewarra Beach",-16.788,145.676,6133,"AU","Q14935459"],["Cranbrook",-19.309,146.751,5908,"AU","Q5181943"],["Condon",-19.332,146.724,5894,"AU","Q5159319"],["Brinsmead",-16.903,145.711,5537,"AU","Q18754859"],["Mount Low",-19.225,146.681,5488,"AU","Q30890908"],["Manunda",-16.919,145.748,5390,"AU","Q31049999"],["Cairns North",-16.91,145.762,5334,"AU","Q24189752"],["Woree",-16.95,145.75,5127,"AU","Q8034505"],["North Ward",-19.25,146.817,5073,"AU","Q7057186"],["White Rock",-16.979,145.757,4918,"AU","Q31202461"],["Aitkenvale",-19.283,146.8,4797,"AU","Q4699323"],["Rasmussen",-19.35,146.716,4669,"AU","Q7295132"],["Wulguru",-19.333,146.817,4570,"AU","Q8039200"],["Idalia",-19.3,146.817,4563,"AU","Q5987581"],["Ingham",-18.65,146.167,4455,"AU","Q976153"],["Whitfield",-16.902,145.728,4275,"AU","Q24190484"],["Deeragun",-19.25,146.667,4273,"AU","Q5250870"],["Bayview Heights",-16.963,145.73,4238,"AU","Q4875008"],["Earlville",-16.949,145.733,4200,"AU","Q30992079"],["Edge Hill",-16.902,145.743,4088,"AU","Q24190459"],["West End",-19.265,146.793,4064,"AU","Q7985038"],["Heatley",-19.293,146.753,4038,"AU","Q31053515"],["Bohle Plains",-19.314,146.692,3989,"AU","Q16945893"],["Westcourt",-16.935,145.72,3918,"AU","Q21898860"],["Port Douglas",-16.484,145.465,3650,"AU","Q1364325"],["Parramatta Park",-16.924,145.762,3621,"AU","Q31038342"],["Mundingburra",-19.3,146.783,3620,"AU","Q6935818"],["Cairns City",-16.923,145.773,3616,"AU","Q16890097"],["Trinity Park",-16.805,145.704,3536,"AU","Q31202245"],["Hermit Park",-19.283,146.8,3512,"AU","Q5741738"],["Kuranda",-16.817,145.633,3273,"AU","Q451609"],["Clifton Beach",-16.766,145.67,3192,"AU","Q5133179"],["Tolga",-17.217,145.483,3177,"AU","Q3530583"],["Home Hill",-19.659,147.412,2954,"AU","Q2272457"],["Townsville City",-19.258,146.818,2945,"AU","Q7830276"],["Gulliver",-19.282,146.771,2884,"AU","Q5617793"],["Railway Estate",-19.283,146.817,2871,"AU","Q7284149"],["Kanimbla",-16.917,145.724,2827,"AU","Q18754879"],["Yorkeys Knob",-16.823,145.716,2794,"AU","Q21924820"],["Cooktown",-15.468,145.25,2746,"AU","Q1020734"],["Alice River",-19.329,146.606,2685,"AU","Q4726066"],["Yarrabah",-16.909,145.87,2559,"AU","Q8049518"],["Pimlico",-19.283,146.783,2557,"AU","Q7194652"],["Currajong",-19.277,146.777,2548,"AU","Q16890779"],["Palm Cove",-16.744,145.671,2450,"AU","Q7128027"],["South Townsville",-19.267,146.833,2424,"AU","Q7568670"],["Holloways Beach",-16.842,145.739,2398,"AU","Q5881831"],["Garbutt",-19.267,146.767,2396,"AU","Q5522045"],["Tully",-17.933,145.933,2390,"AU","Q121706"],["Bungalow",-16.938,145.756,2358,"AU","Q30979699"],["Vincent",-19.288,146.763,2357,"AU","Q7931637"],["Caravonica",-16.867,145.683,2183,"AU","Q5037805"],["Freshwater",-16.883,145.717,2142,"AU","Q5503094"],["Belgian Gardens",-19.25,146.8,2073,"AU","Q4882466"],["Oonoonba",-19.3,146.823,2050,"AU","Q7095370"],["Thuringowa Central",-19.317,146.733,2023,"AU","Q7799299"],["Malanda",-17.354,145.594,2000,"AU","Q1886714"],["Mossman",-16.45,145.367,1937,"AU","Q2241511"],["Rosslea",-19.298,146.8,1903,"AU","Q24189972"],["East Innisfail",-17.55,146.083,1855,"AU","Q5328645"],["Jensen",-19.257,146.641,1797,"AU","Q16889180"],["Murray",-19.34,146.777,1739,"AU","Q31202335"],["Stuart",-19.317,146.817,1576,"AU","Q7626232"],["Alligator Creek",-19.424,146.946,1550,"AU","Q16868938"],["Black River",-19.222,146.619,1493,"AU","Q15733741"],["Innisfail Estate",-17.516,146.046,1454,"AU","Q30766194"],["Ravenshoe",-17.609,145.484,1400,"AU","Q1528286"],["Hyde Park",-19.28,146.797,1387,"AU","Q5953604"],["Forrest Beach",-18.709,146.295,1364,"AU","Q15218047"],["Arriga",-17.078,145.316,1323,"AU","Q28110041"],["Wongaling Beach",-17.915,146.097,1323,"AU","Q55819321"],["Cardwell",-18.267,146.033,1320,"AU","Q1005913"],["Babinda",-17.345,145.925,1287,"AU","Q2877892"],["Allingham",-18.708,146.295,1277,"AU","Q30481480"],["Yungaburra",-17.271,145.583,1272,"AU","Q1580463"],["Millstream",-17.626,145.381,1246,"AU","Q31202239"],["Nelly Bay",-19.158,146.85,1213,"AU","Q6990222"],["Stratford",-16.877,145.732,1198,"AU","Q762191Line truncated
@@ -0,0 +1 @@
{"rows":[["Olukonda",-17.983,16.017,14318,"NA","Q1654926"],["Cuangar",-17.6,18.617,12681,"AO","Q203050"],["Otavi",-19.638,17.34,10756,"NA","Q1013965"],["Nkurenkuru",-17.617,18.6,10463,"NA","Q918461"],["Omuthiya",-18.359,16.58,7560,"NA","Q1005584"],["Okahao",-17.883,15.1,7486,"NA","Q2017063"],["Oshikuku",-17.658,15.473,5499,"NA","Q2033305"],["Oniipa",-17.912,16.041,4740,"NA","Q2024282"],["Tsintsabis",-18.772,17.964,4000,"NA","Q28401753"],["Oshivelo",-18.617,17.167,2700,"NA","Q914118"]]}
@@ -0,0 +1 @@
{"rows":[["Norsup",-16.065,167.4,2998,"VU","Q11792967"],["Port Olry",-15.042,167.07,1951,"VU","Q1050300"],["Lenakel",-19.533,169.267,1507,"VU","Q2390976"],["Isangel",-19.55,169.267,1437,"VU","Q1070178"],["Hog Harbour",-15.133,167.1,1000,"VU","Q5876947"]]}
@@ -0,0 +1 @@
{"rows":[["Sigatoka",-18.15,177.5,9622,"FJ","Q26720"],["Navua",-18.22,178.18,5812,"FJ","Q2999039"],["Vaileka",-17.367,178.15,5078,"FJ","Q2705079"],["Savusavu",-16.747,179.358,5000,"FJ","Q619440"],["Namatakula",-18.229,177.783,2522,"FJ","Q26920"],["Tavua",-17.441,177.863,2388,"FJ","Q26690"]]}
@@ -0,0 +1 @@
{"rows":[["Senanga",-16.121,23.272,14102,"ZM","Q569090"],["Sesheke",-17.481,24.306,13167,"ZM","Q1756357"],["Kalabo",-15.25,22.683,7731,"ZM","Q1015056"],["Shakawe",-18.369,21.846,6693,"BW","Q170663"],["Kangongo",-17.951,21.161,3500,"NA","Q24233912"],["Lisikili",-17.55,24.433,2000,"NA","Q23807913"],["Shorobe",-19.762,23.677,1031,"BW","Q166927"]]}
@@ -0,0 +1 @@
{"rows":[["Maamba",-17.358,27.217,14322,"ZM","Q1436787"],["Itezhi Tezhi",-15.75,26.033,13858,"ZM","Q1675276"],["Chirundu",-16.033,28.85,13585,"ZM","Q489790"],["Chongwe",-15.35,28.7,12160,"ZM","Q1076154"],["Siavonga",-16.518,28.742,11832,"ZM","Q2280835"],["Kazungula",-17.804,25.241,8704,"BW","Q170870"],["Namwala",-15.761,26.453,5399,"ZM","Q912503"]]}
@@ -0,0 +1 @@
{"rows":[["Shamva",-17.317,31.55,10353,"ZW","Q606345"],["Chivhu",-19.021,30.892,10263,"ZW","Q1021903"],["Mupandawana",-19.642,31.156,5409,"ZW","Q16895576"],["Neno",-15.398,34.653,2283,"MW","Q136384994"],["Lion's Den",-17.27,30.025,1000,"ZW","Q1827298"]]}
@@ -0,0 +1 @@
{"rows":[["Thyolo",-16.067,35.133,7029,"MW","Q2144010"],["Machinga",-15.179,35.3,1833,"MW","Q12810684"]]}
@@ -0,0 +1 @@
{"rows":[["Cap Malheureux",-19.984,57.614,5070,"MU","Q130238"]]}
@@ -0,0 +1 @@
{"rows":[["Port Mathurin",-19.683,63.421,5929,"MU","Q1021638"],["Baie aux Huîtres",-19.729,63.361,2500,"MU","Q2879542"]]}
@@ -0,0 +1 @@
{"rows":[["Avarua",-21.207,-159.771,4798,"CK","Q170482"]]}
@@ -0,0 +1 @@
{"rows":[["ʻOhonua",-21.333,-174.95,1200,"TO","Q3711222"]]}
@@ -0,0 +1 @@
{"rows":[["Muʻa",-21.179,-175.117,5000,"TO","Q2359181"],["Lapaha",-21.18,-175.118,1974,"TO","Q23017968"]]}
@@ -0,0 +1 @@
{"rows":[["Santa Leopoldina",-20.099,-40.527,13813,"BR","Q678885"],["Cachoeira do Campo",-20.346,-43.67,8923,"BR","Q61993345"],["Tombos",-20.905,-42.023,8609,"BR","Q2007466"],["Antônio Pereira",-20.304,-43.481,4480,"BR","Q9622616"],["Azurita",-20.009,-44.472,3653,"BR","Q51535701"],["Monsenhor João Alexandre",-20.365,-44.687,3137,"BR","Q61992763"],["Macuco de Minas",-21.283,-44.761,2843,"BR","Q10322853"],["Marilândia",-20.365,-44.929,1955,"BR","Q62027102"],["Doutor Sá Fortes",-21.285,-43.751,1601,"BR","Q62026468"],["Getulândia",-22.662,-44.101,1255,"BR","Q10289361"],["Pau Grande",-22.584,-43.17,1000,"BR","Q2058402"]]}
@@ -0,0 +1 @@
{"rows":[["Barra Funda District",-23.523,-46.674,14383,"BR","Q4863126"],["Vila Guiomar",-23.657,-46.544,13118,"BR","Q49136532"],["Jardim",-23.648,-46.538,9566,"BR","Q49136148"],["Marsilac District",-23.936,-46.709,8258,"BR","Q6773956"],["Jardim Ipanema",-23.686,-46.503,7294,"BR","Q49136783"],["Centro",-23.658,-46.526,4757,"BR","Q49136416"],["Vila Gilda",-23.671,-46.537,4245,"BR","Q49137947"],["Silveira",-23.667,-46.514,3893,"BR","Q49136245"],["Vila América",-23.668,-46.508,3893,"BR","Q49137806"],["Córrego do Ouro",-21.371,-45.776,3794,"BR","Q10263414"],["Maristela",-23.039,-47.89,2269,"BR","Q48878950"],["Lamounier",-20.475,-45.034,2181,"BR","Q62027156"],["Desemboque",-20.014,-47.021,2019,"BR","Q107406993"],["Renascer community",-22.752,-47.67,2000,"BR","Q127545136"],["São Sebastião da Estrela",-21.004,-45.044,1965,"BR","Q61755056"],["Pontevila",-20.536,-45.585,1701,"BR","Q62027292"],["Ribeiros",-21.989,-45.589,1429,"BR","Q10360917"],["Jardim Pedro Zalla",-23.044,-47.841,1420,"BR","Q100153850"],["Casa Branca",-23.661,-46.518,1352,"BR","Q49136123"],["Vila São José",-23.055,-47.83,1070,"BR","Q110290544"],["Vila Campacci",-23.055,-47.836,1030,"BR","Q107398172"],["Vila Darcy",-23.057,-47.834,1020,"BR","Q114823203"]]}
@@ -0,0 +1 @@
{"rows":[["Mariluz",-24.002,-53.146,9847,"BR","Q2003711"],["Japorã",-23.891,-54.404,8148,"BR","Q1805419"],["Itambé",-23.661,-51.99,6111,"BR","Q2283708"],["Mercedes",-24.454,-54.162,5931,"BR","Q957375"],["Pato Bragado",-24.626,-54.225,5733,"BR","Q1803627"],["Entre Rios do Oeste",-24.704,-54.234,4575,"BR","Q1803939"],["Porto Rico",-22.772,-53.267,3182,"BR","Q1985148"]]}
@@ -0,0 +1 @@
{"rows":[["Paranhos",-23.893,-55.431,12921,"BR","Q522494"],["Porto Murtinho",-21.699,-57.883,12859,"BR","Q1792999"],["San Lázaro",-22.167,-57.917,11755,"PY","Q1990310"],["Sete Quedas",-23.97,-55.036,10994,"BR","Q1794989"],["Aral Moreira",-22.934,-55.635,10748,"BR","Q22067428"],["Menno Colony",-22.442,-59.605,10700,"PY","Q6817183"],["Antônio João",-22.191,-55.948,9303,"BR","Q22067430"],["Caracol",-22.014,-57.024,5036,"BR","Q2289933"],["Fortín Lugones",-24.287,-59.828,3872,"AR","Q8962087"],["Rio Verde",-23.645,-56.407,3600,"PY","Q134156375"],["Nueva Durango Colony",-24.227,-55.866,2410,"PY","Q134187608"],["Volendam Colony",-24.279,-57.013,1810,"PY","Q2521969"],["Manitoba Colony",-23.558,-56.656,1269,"PY","Q134189497"]]}
@@ -0,0 +1 @@
{"rows":[["Rivadavia",-24.183,-62.883,10353,"AR","Q1017544"],["El Sauzalito",-24.428,-61.683,8366,"AR","Q1579107"],["La Esperanza",-24.226,-64.839,6887,"AR","Q55387"],["Santa Clara",-24.283,-64.683,6374,"AR","Q2001906"],["Pozo de Maza",-23.573,-61.706,6029,"AR","Q9062068"],["Puesto Viejo",-24.485,-64.968,5088,"AR","Q1749201"],["Fernheim Colony",-22.34,-60.03,4984,"PY","Q882290"],["Aguas Calientes",-24.583,-64.925,4635,"AR","Q3606915"],["Aguas Blancas",-22.736,-64.354,3648,"AR","Q121952"],["San Lorenzo",-21.418,-64.749,3401,"BO","Q1002061"],["El Piquete",-24.179,-64.679,3369,"AR","Q3720978"],["Neuland Colony",-22.634,-60.207,2347,"PY","Q1709409"],["Cuevo",-20.455,-63.519,2317,"BO","Q1143259"],["Dragones",-23.249,-63.34,1779,"AR","Q5305352"],["El Brial Colony",-21.773,-63.368,1579,"BO","Q141620779"],["La Florida Colony",-21.659,-63.291,1192,"BO","Q141711675"]]}
@@ -0,0 +1 @@
{"rows":[["Pica",-20.5,-69.333,9296,"CL","Q51102"],["Pozo Almonte",-20.26,-69.786,9277,"CL","Q51585"],["Yala",-24.117,-65.4,8544,"AR","Q6169692"],["Maimará",-23.626,-65.409,6906,"AR","Q3843526"],["San Antonio de los Cobres",-24.226,-66.319,6853,"AR","Q1563449"],["San Antonio",-24.367,-65.335,6729,"AR","Q2219283"],["María Elena",-22.35,-69.667,6457,"CL","Q16923"],["San Pedro de Atacama",-22.911,-68.2,5347,"CL","Q187893"],["Pampa Blanca",-24.533,-65.077,4907,"AR","Q3892905"],["La Caldera",-24.6,-65.383,4525,"AR","Q1016001"],["Camargo",-20.64,-65.21,4502,"BO","Q1642851"],["Susques",-23.401,-66.367,2974,"AR","Q1495796"],["Huacalera",-23.433,-65.35,2124,"AR","Q3787362"],["Volcán",-23.918,-65.465,1843,"AR","Q4016103"],["Purmamarca",-23.733,-65.483,1838,"AR","Q1025405"],["Uquía",-23.304,-65.356,1510,"AR","Q3552109"],["Pumahuasi",-22.283,-65.683,1499,"AR","Q3925556"],["Abdón Castro Tolay",-23.367,-66.067,1302,"AR","Q1748963"],["Cieneguillas",-22.1,-65.867,1047,"AR","Q3676596"],["Rinconada",-22.44,-66.167,1007,"AR","Q1817419"]]}
Loaded 100 of 1337 files, more files were not shown because too many files have changed in this diff. Show more