Expand description
Binary format definition for proj-rust’s embedded EPSG registry
(proj-core/data/epsg.bin).
This crate is the single source of truth for the container layout shared
by the proj-core reader (epsg_db) and the gen-registry writer in
gen-reference. Any change here is a format change: bump VERSION,
regenerate the registry, and let the CI reproducibility check
(scripts/check-registry-generation.sh) prove writer and reader agree.
The container is little-endian throughout: a fixed header (magic, version,
twelve section counts) followed by packed variable-length records per
section. Strings are u16 length-prefixed UTF-8.
Modules§
- read
- Little-endian read primitives for the trusted, CI-reproducibility-gated embedded blob. Offsets are validated by construction (record walking), so these index directly and panic on a malformed blob rather than returning errors — a corrupt embedded registry is a build defect, not user input.
- write
- Little-endian write primitives. Float canonicalization (NaN bit patterns, decimal normalization) is generator policy and lives with the generator.
Constants§
- AXIS_
ORDER_ EAST_ NORTH - AXIS_
ORDER_ NORTH_ EAST - AXIS_
ORDER_ UNSUPPORTED - COMPOUND_
CRS_ RECORD_ BASE_ SIZE - DATUM_
RECORD_ SIZE - DATUM_
SHIFT_ IDENTITY - DATUM_
SHIFT_ UNKNOWN - ELLIPSOID_
RECORD_ SIZE - FLAG_
APPROXIMATE - FLAG_
DEPRECATED - FLAG_
PREFERRED - FLAG_
SUPERSEDED - EPSG records a same-CRS-pair replacement for this operation
(
supersessiontable); ranking prefers the replacement. - GEOCENTRIC_
CRS_ RECORD_ BASE_ SIZE - Geocentric CRS: code, datum code, base geographic CRS code.
- GEO_
CRS_ AXIS_ ORDER_ OFFSET - Offset of the axis order tag in a geographic CRS record.
- GEO_
CRS_ RECORD_ BASE_ SIZE - Geographic CRS: code, datum code, authority axis order tag.
- GRID_
FORMAT_ GEOTIFF - GRID_
FORMAT_ GTX - GRID_
FORMAT_ NTV2 - GRID_
INTERPOLATION_ BILINEAR - HEADER_
SIZE - Fixed header: magic (4) + version (2) + reserved (2) + twelve
u32section counts. - HORIZONTAL_
CRS_ GEOGRAPHIC - HORIZONTAL_
CRS_ PROJECTED - MAGIC
"EPSG"in big-endian byte order.- METHOD_
ALBERS - METHOD_
AMERICAN_ POLYCONIC - METHOD_
AZIMUTHAL_ EQUIDISTANT - METHOD_
CASSINI_ SOLDNER - METHOD_
COLOMBIA_ URBAN - METHOD_
EQUAL_ EARTH - METHOD_
EQUIDISTANT_ CYL - METHOD_
GUAM - METHOD_
HOTINE_ OBLIQUE_ MERCATOR_ A - METHOD_
HOTINE_ OBLIQUE_ MERCATOR_ B - METHOD_
KROVAK_ MODIFIED_ NORTH_ ORIENTATED - METHOD_
KROVAK_ NORTH_ ORIENTATED - METHOD_
LABORDE - METHOD_
LAEA - METHOD_
LAEA_ SPHERICAL - METHOD_
LCC - METHOD_
LCC_ 1SP_ VARIANT_ B - METHOD_
LCC_ MICHIGAN - METHOD_
MERCATOR - METHOD_
OBLIQUE_ STEREO - METHOD_
POLAR_ STEREO - METHOD_
POLAR_ STEREO_ VARIANT_ C - METHOD_
TRANSVERSE_ MERCATOR - METHOD_
WEB_ MERCATOR - OP_
CONCATENATED - OP_
GEOCENTRIC_ AFFINE - General geocentric affine map: three translations followed by a row-major scaled 3×3 matrix. Used for EPSG full-matrix Helmert methods.
- OP_
GRID_ SHIFT - OP_
HELMERT - OP_
IDENTITY - PROJ_
CRS_ AXIS_ ORDER_ OFFSET - Offset of the axis order tag in a projected CRS record.
- PROJ_
CRS_ RECORD_ BASE_ SIZE - VERSION
- Container format version; bump on any layout or semantic change.
- VERTICAL_
COMPONENT_ ELLIPSOIDAL - VERTICAL_
COMPONENT_ REGISTRY_ CRS - VERTICAL_
CRS_ RECORD_ BASE_ SIZE - VERTICAL_
OFFSET_ GEOID_ HEIGHT_ METERS