Geography and landscape are important determinants of genetic variation in natural populations, and several ancestry estimation algorithms have been proposed to investigate population structure using genetic and geographic data simultaneously. Those approaches are often based on computer-intensive stochastic simulations, and do not scale with the dimensions of the data sets generated by high-throughput sequencing technologies. There is a growing demand for faster algorithms able to analyze genome-wide patterns of population genetic variation in their geographic context. Here, I will present TESS3 a major update of the spatial ancestry estimation program TESS, which combines matrix factorization and spatial statistical methods. TESS3 provides estimates of ancestry coefficients with accuracy comparable to TESS and with run-times much faster than other algorithms. In addition, the program can be used to perform genome scans for selection, and separate adaptive from non-adaptive genetic variation using ancestral allele frequency di fferentiation tests. I will illustrate the main features of the algorithm on European lines of the plant species Arabidopsis thaliana.