scale_in_parts_per_million¶
- geodetic_engine.geodesy.utils.scale_in_parts_per_million(operation)[source]¶
Restate an operation’s scale difference in parts per million.
Only the scale difference is touched, and it is converted with its own stated factor, so the operation keeps its name, method, accuracy, area of use and authority code, and describes exactly the same transformation.
- Parameters:
operation (
CoordinateOperation) – Any coordinate operation, concatenated or single step.- Return type:
- Returns:
The operation itself when the scale difference is already in parts per million, or it states none, otherwise an equivalent operation that is.
- Raises:
UnembeddableOperationError – If the restated operation cannot be read back, which would leave nothing to embed.
Example
>>> operation = CoordinateOperation.from_authority("EPSG", 10586) >>> next(p.unit_name for p in operation.params if p.code == "8611") 'parts per billion' >>> restated = scale_in_parts_per_million(operation) >>> next(p.unit_name for p in restated.params if p.code == "8611") 'parts per million'