itacart.constants

Immutable constants of the ITACaRT specification.

All values transcribed from Silva, Dietzsch & Shiguemori (2025), Revista Brasileira de Cartografia, v. 77. DOI: 10.14393/rbcv77n0a-79281

Provenance: itacart_core/resolutions.py and Table 1 of the paper.

The module holds data, not behaviour. The single exception is refinement_alphabet(), a lookup over REFINEMENT_ALPHABET that exists so the even/odd predicate is written once in the whole package (see the warning on QUINARY_CODES).

Reading note: the section comments follow the paper’s own numbering, and every constant carries the figure, table or equation it is taken from, so that checking this module against the PDF is a mechanical exercise.

Module constants

WGS84_A

Semi-major axis, in metres.

WGS84_INV_F

Inverse flattening (1/f).

WGS84_F

Flattening, derived from WGS84_INV_F.

WGS84_B

a(1 - f).

WGS84_E2

f(2 - f).

WGS84_E

8.1819190842622e-2.

WGS84_EP2

Second eccentricity squared, e^2 / (1 - e^2).

MERIDIAN_QUADRANT

Meridian quadrant of the WGS84 ellipsoid, in metres.

EQUATOR_QUADRANT

Half-equator length on the sinusoidal plane, pi * a, in metres.

SINUSOIDAL_PROJ

PROJ string of the equivalent projection.

PRIME_MERIDIAN_LON

Longitude of the prime meridian, in degrees.

ANTEMERIDIAN_LON

Longitude of the antemeridian, in degrees.

RESOLUTION_COUNT

14, from global quadrant to 1 cm.

CELL_SIZE_M

Base and height of a cell, in metres, indexed by resolution.

CELL_AREA_M2

Nominal cell area, in square metres, indexed by resolution.

VISUALIZATION_SCALE

Denominator of the visualization scale (Jenny et al., 2008).

ANALYSIS_SCALE

Denominator of the analysis scale (Tobler, 1987).

TOKENIZABLE_RESOLUTIONS

Resolutions whose cell size is an exact power of ten metres.

RES1_CELLS_X

Number of FULL 10 km cells along the equator, per quadrant.

RES1_CELLS_Y

Number of FULL 10 km cells along the central meridian, per quadrant.

RES1_MIN_INDEX

Lowest resolution-1 address of a quadrant (paper, Table 1).

RES1_MAX_INDEX

Highest resolution-1 address of a quadrant (paper, Table 1).

QUATERNARY_GRID_SIZE

2 x 2.

QUINARY_GRID_SIZE

5 x 5.

QUATERNARY_CODES

1-to-4 refinement codes, used to address EVEN resolutions (2, 4, ..., 12).

QUINARY_CODES

1-to-25 refinement codes (A1..E5), addressing ODD resolutions (3, 5, ..., 13).

REFINEMENT_RATIO

Number of children produced when descending INTO each resolution.

REFINEMENT_ALPHABET

Alphabet addressing each resolution, derived from REFINEMENT_RATIO.

RESOLUTION_TABLE

Table 1 as a sequence indexed by resolution.

QUADRANT_CODE_LENGTH

NE, NW, SE or SW.

INDEX_EXAMPLE_ATOMIC

Canonical single-cell example from the paper (section 3.1).

INDEX_EXAMPLE_SIBLINGS

two cells, one index.

EXTENSION_ZONES

Eastern-quadrant extensions across the antemeridian.

EXTENSION_LON_PRECISION

Longitude precision adopted for extension limits, in degrees.

CELL_SHAPES

Every shape a cell may take, in order of decreasing frequency.

PARALLELOGRAM_BASE_ANGLE_DEG

Acute angle of the cell on the projection plane, before ellipsoidal distortion.

TRIANGLE_BASE_TO_HEIGHT_RATIO

Base-to-height ratio of the isosceles prime-meridian cell (Figure 4a).

Functions

refinement_alphabet

Return the refinement alphabet addressing resolution.

Classes

ExtensionZoneSpec

Bounds of one eastern-quadrant extension across the antemeridian.

ResolutionSpec

One row of Table 1, addressable by resolution.