vibeproj.projections

Projection registry — maps projection names to implementation classes.

Submodules

Attributes

Classes

Projection

Base class for all map projections.

Functions

register(name, projection)

Register a projection implementation.

get_projection(→ base.Projection)

Look up a projection by name.

Package Contents

class vibeproj.projections.Projection

Base class for all map projections.

Subclasses implement forward/inverse transforms that operate on arrays of coordinates. The xp parameter is the array module (numpy or cupy).

Projection math operates in radians on the ellipsoid. The pipeline handles degree/radian conversion, axis swapping, and false easting/northing.

name: str = ''
setup(params: vibeproj.crs.ProjectionParams) dict

Compute derived parameters from projection params.

Called once at construction time. Returns a dict of computed params that will be passed to forward/inverse.

abstractmethod forward(lam: object, phi: object, params: vibeproj.crs.ProjectionParams, computed: dict, xp: types.ModuleType) tuple

Forward projection: geographic (lon, lat in radians) -> projected (x, y in meters).

lam: longitude relative to central meridian (radians), array phi: latitude (radians), array Returns (x, y) in projection-native units (before false easting/northing and scale).

abstractmethod inverse(x: object, y: object, params: vibeproj.crs.ProjectionParams, computed: dict, xp: types.ModuleType) tuple

Inverse projection: projected (x, y) -> geographic (lon, lat in radians).

x, y: projection-native units (after removing false easting/northing and scale). Returns (lam, phi) in radians, with lam relative to central meridian.

vibeproj.projections.PROJECTION_REGISTRY: dict[str, base.Projection]
vibeproj.projections.register(name: str, projection: base.Projection)

Register a projection implementation.

vibeproj.projections.get_projection(name: str) base.Projection

Look up a projection by name.