Skip to main content

Crate proj_epsg_format

Crate proj_epsg_format 

Source
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 (supersession table); 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 u32 section 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