Extract function for setting up tile transform