  Spatial regression models are central to the field of spatial statistics.
Nevertheless, their estimation in case of large and irregular gridded spatial
datasets presents considerable computational challenges. To tackle these
computational problems, Arbia \citep{arbia_2014_pairwise} introduced a
pseudo-likelihood approach (called pairwise likelihood, say PL) which required
the identification of pairs of observations that are internally correlated, but
mutually conditionally uncorrelated. However, while the PL estimators enjoy
optimal theoretical properties, their practical implementation when dealing
with data observed on irregular grids suffers from dramatic computational
issues (connected with the identification of the pairs of observations) that,
in most empirical cases, negatively counter-balance its advantages. In this
paper we introduce an algorithm specifically designed to streamline the
computation of the PL in large and irregularly gridded spatial datasets,
dramatically simplifying the estimation phase. In particular, we focus on the
estimation of Spatial Error models (SEM). Our proposed approach, efficiently
pairs spatial couples exploiting the KD tree data structure and exploits it to
derive the closed-form expressions for fast parameter approximation. To
showcase the efficiency of our method, we provide an illustrative example using
simulated data, demonstrating the computational advantages if compared to a
full likelihood inference are not at the expenses of accuracy.
