Function for applying a 2d transform to an extent
Properly transform extent