Move proj initialization code out of transformPoint function