available_operations

geodetic_engine.geodesy.available_operations(source_crs, target_crs, *, authority='any', accuracy=None, allow_superseded=True, allow_ballpark=True)[source]

List every coordinate operation PROJ offers between two CRSs.

This package’s equivalent of inspecting a pyproj.transformer.TransformerGroup directly: every candidate is described, including a ballpark fallback or one whose grid is not installed, so an operation= argument for Transformation can be chosen with full information instead of by trial and error. Nothing here is applied to coordinates or checked against a request.

A deprecated EPSG operation is never among the candidates: PROJ’s own operation search excludes deprecated operations unconditionally, with no option to include them, so there is no allow_deprecated filter here to match – one would silently do nothing.

Parameters:
  • source_crs (Any) – CRS the input coordinates would be in.

  • target_crs (Any) – CRS to produce coordinates in.

  • authority (str | None, default: "any") – Restrict candidates to those published by this authority, for example "EPSG". "any" searches every authority without the preference PROJ otherwise gives the source/target CRS’s own authority. Defaults to “any”; pass None to use PROJ’s preference.

  • accuracy (float | None, default: None) – Discard candidates stated as less accurate than this, in metres. Omitted by default, so every accuracy is considered.

  • allow_superseded (bool, default: True) – Whether to include an operation EPSG has marked as superseded by a newer one. True by default, since a superseded operation is still valid, just no longer preferred.

  • allow_ballpark (bool, default: True) – Whether to include a ballpark approximation among the candidates. True by default, so its presence and its lack of a usable accuracy are visible here rather than only discovered when Transformation refuses it.

Return type:

tuple[OperationCandidate, ...]

Returns:

One candidate per operation PROJ offers, in the order PROJ ranks them, which weighs area of use and other criteria alongside accuracy: for ED50 to WGS 84 the first candidate is EPSG:1133 (10 m) ahead of EPSG:1612 (1 m). Filter on accuracy or pass accuracy= rather than taking the first entry as the best. Pass any entry’s authority_code as Transformation’s operation= argument.

Example

>>> candidates = available_operations("EPSG:4230", "EPSG:4326")
>>> candidates[0].authority_code
'EPSG:1133'
>>> most_accurate = available_operations(
...     "EPSG:4230", "EPSG:4326", accuracy=1.0, allow_ballpark=False
... )
>>> all(c.accuracy is not None and c.accuracy <= 1.0 for c in most_accurate)
True