Skip to content

DotNet.Astronomy.Class.CodexRegionMap

github-actions[bot] edited this page Sep 20, 2026 · 11 revisions

EliteDangerousAlmanac / Astronomy / CodexRegionMap

Class: CodexRegionMap

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/CodexRegionMap.cs:37

Which codex region one place in the galaxy belongs to.

Remarks

A system's region follows from where it sits on a flat grid over the plane of the galaxy, whose cell is about 49 light years on a side. The cells of each region are held as runs in a shared data file, and this class rebuilds the row index it reads them through.

Two readings are offered, because the game calls two things the region. FindAt answers where a place is, which is what the codex records a find against and what the game shows on a jump into a system. FindForBoxel answers where the corner of a system's boxel is, which is what the journal and the codex front page show. The two differ near a border.

The reading is the EliteDangerousRegionMap algorithm. See ATTRIBUTIONS.md for credit and licence terms.

Properties

LightYearsPerCell

static LightYearsPerCell: double

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/CodexRegionMap.cs:54

The edge of one cell of the region grid, in light years.

OriginX

static OriginX: double

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/CodexRegionMap.cs:45

The galactic X of the galaxy's corner, in light years.

OriginY

static OriginY: double

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/CodexRegionMap.cs:48

The galactic Y of the galaxy's corner, in light years.

OriginZ

static OriginZ: double

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/CodexRegionMap.cs:51

The galactic Z of the galaxy's corner, in light years.

Methods

FindAt()

static FindAt(point): CodexRegion?

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/CodexRegionMap.cs:63

Finds the codex region at one place on the plane of the galaxy.

Parameters

point

GalacticPlanePosition

The place in light years, with Sol at the origin.

Returns

CodexRegion?

The region there, or null where the place lies outside the mapped grid.

Exceptions

ArgumentNullException

The place is absent.

FindAt()

static FindAt(position): CodexRegion?

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/CodexRegionMap.cs:80

Finds the codex region at one place in the galaxy.

Parameters

position

GalacticPosition

The position in light years, with Sol at the origin.

Returns

CodexRegion?

The region there, or null where the place lies outside the mapped grid.

Remarks

The height is read and left alone. The region map is flat, so a region has no height to hold a place against.

Exceptions

ArgumentNullException

The position is absent.

FindAt()

static FindAt(x, z): CodexRegion?

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/CodexRegionMap.cs:93

Finds the codex region at one place on the plane of the galaxy.

Parameters

x

double

The galactic X in light years, with Sol at the origin.

z

double

The galactic Z in light years.

Returns

CodexRegion?

The region there, or null where the place lies outside the mapped grid.

FindForBoxel()

static FindForBoxel(id64): BoxelCodexRegion

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/CodexRegionMap.cs:116

Finds the codex region of a system's boxel, from its address.

Parameters

id64

ulong

The system address.

Returns

BoxelCodexRegion

The corner of the system's boxel in light years, with Sol at the origin, and the region there.

Remarks

This is the region the journal writes and the codex front page shows. It is read at the corner of the system's boxel, which near a border is not always the region at the system's own place. Those coordinates are also as near a position as an address alone reaches: they are true to one boxel edge, which MassCode.BoxelEdgeLy reads.

.NET

Guides
Astronomy
Classes (16)
Records (29)
Enumerations (6)
Commodities
Classes (2)
Records (1)
Enumerations (1)
Equipment
Classes (8)
Records (19)
Enumerations (8)
GalaxyMap
Classes (1)
Records (1)
Localization
Classes (2)
Enumerations (1)
Materials
Classes (5)
Records (2)
Enumerations (4)
Ships
Classes (42)
Records (115)
Interfaces (1)
Enumerations (35)

Clone this wiki locally