pisces.geometry.coordinates.utils.load_coordinate_dict#

pisces.geometry.coordinates.utils.load_coordinate_dict(data: dict, registry: Registry = None) CoordinateSystem[source]#

Load a coordinate system from a dictionary using the registry.

Parameters:
  • data (dict) –

    A dictionary with the following structure:

    {
        "class": "<CoordinateSystemClassName>",
        "parameters": {
            ...
        },  # Optional keyword arguments
    }
    

  • registry (Registry, optional) – The registry to use to resolve the coordinate system class. Defaults to the Pisces default registry.

Returns:

An instance of the requested coordinate system.

Return type:

CoordinateSystem

Raises:
  • KeyError – If the class name is missing or not found in the registry.

  • TypeError – If instantiation with the given parameters fails.