Skip to content

Rename default UnitConverter to something more specific (e.g. Unity()) #2410

@erikvansebille

Description

@erikvansebille

Reading through the unit converter guide in #2409, I realise that while Geographic and GeographicPolar are sensible names for UnitConverters, the default one (which does not do any conversion), is called UnitConverter.

class UnitConverter:
"""Interface class for spatial unit conversion during field sampling that performs no conversion."""
source_unit: str | None = None
target_unit: str | None = None
def to_target(self, value, z, y, x):
return value
def to_source(self, value, z, y, x):
return value

That name may be confusing. Perhaps better to call it NoConversion? Or does anyone have a better name?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions