Skip to content

Add source_epoch and target_epoch parameters to Transformer.from_crs() and TransformerGroup, matching the --s_epoch and --t_epoch options in cs2cs in PROJ. #1558

@phaarnes

Description

@phaarnes

Background

Add source_epoch and target_epoch parameters to Transformer.from_crs() and TransformerGroup, matching the --s_epoch and --t_epoch options in cs2cs in PROJ.

Dynamic reference frames such as ITRF, NAD83(CSRS), ETRF, and others vary with time due to tectonic motion or deformation models.
PROJ supports this natively via CoordinateMetadata and in the command-line tool cs2cs using:

--s_epoch {epoch} # Epoch of coordinates in the source CRS, as decimal year. Only applies to a dynamic CRS.
--t_epoch {epoch} # Epoch of coordinates in the target CRS, as decimal year. Only applies to a dynamic CRS.

Added to PROJ v9.4.

Problem: pyproj cannot perform epoch-to-epoch transformations within the same dynamic CRS

In PROJ (via cs2cs), this works:

cs2cs EPSG:8254 EPSG:8254 --s_epoch 2010 --t_epoch 2020

This performs a change of coordinate epoch within the same CRS using the appropriate velocity/grid model.

But in pyproj, there's no way to express this:

Transformer.from_crs("EPSG:8254", "EPSG:8254")

There is no way to specify:

  • the epoch of the source CRS
  • the epoch of the target CRS

transform(..., tt=...) handles per-coordinate time, but this is not the same thing as CRS metadata epoch, which affects how PROJ selects transformations (PointMotionOperation, deformation grid, etc.).

This missing feature prevents pyproj from reproducing transformations that cs2cs and PROJ fully support.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions