Temperature-variation-induced error compensation plays a pivotal role in large-scale metrology, in which the nonuniform temperature field would greatly influence the coordinate transformation process between different systems. This paper proposes a novel analytical thermal deformation compensation method with spatial discretisation modelling among 2-D distributed Enhanced Reference System points to reduce the thermal influence on the coordinate transformation process. First, the analytical thermal deformation model based on the spatial discretisation is established with the plane thermal elastic mechanics and the Finite Difference Method. Then the nonuniform temperature field model is developed based on Ordinary Kriging spatial interpolation. Finally, a compensation method for the coordinate transformation process is proposed based on the actual measurement data and the proposed thermal deformation model. The experimental results illustrate the existence and significance of the nonuniform feature of the temperature field. By the proposed compensation method, the coordinate transformation error is reduced by 47.13% and 76.67% in the x and y directions, respectively. The method is applicable to diminish the influence of thermal deformation under a nonuniform temperature field on the coordinate transformation of large-scale metrology.