astro.codex region lookup.Function.findCodexRegionAt - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki
@elite-dangerous-almanac/core / astro/codex-region-lookup / findCodexRegionAt
findCodexRegionAt(
point):CodexRegion|null
Defined in: src/astro/codex-region-lookup.ts:208
Find the galactic region at a point on the galactic plane.
This is the region the game records a codex discovery against, and the region name shown when jumping into a system.
Galactic position, in light-years. Only x and z are read — the
vertical y is accepted but ignored, because the region map is a flat X/Z projection.
CodexRegion | null
The CodexRegion containing the point, or null if the point
lies outside the mapped region grid.
import { findCodexRegionAt } from '@elite-dangerous-almanac/core/astro/codex-region-lookup';
findCodexRegionAt({ x: 0, z: 0 })?.name; // -> 'Inner Orion Spur' (near Sol)
findCodexRegionAt({ x: 0, z: 25900 })?.name; // -> 'Galactic Centre'
// A full position works as it comes — no need to strip the `y` first:
findCodexRegionAt({ x: 0, y: 0, z: 0 })?.name; // -> 'Inner Orion Spur'