Do not use deprecated APIs for converting coordinate systems

See commit messages for details.