This study was carried out to determine the spatial relationships between environmental factors (Quaternary deposits, topographical situation, land cover, forest site types, tree species, soil texture) and soil groups, and their prefix qualifiers (according to the international Food and Agricultural Organization soil classification system World Reference Base for Soil Resources [FAO WRB]). The results show that it is possible to establish relationships between the distribution of environmental factors and soil groups by applying the generalized linear models in data statistical analysis, using the R 2.11.1 software for processing data from 113 sampling plots throughout the forest territory of Latvia.A very high diversity of soil groups in a relatively similar geological structure was revealed. For various reasons there is not always close relationship between the soil group, their prefix qualifiers and Quaternary deposits, as well as between forest site types, the dominant tree species and specific soil group and its prefix qualifiers. Close correlation was established between Quaternary deposits, forest site types, dominant tree species and soil groups within nutrient-poor sediments and very rich deposits containing free carbonates. No significant relationship was detected between the CORINE Land Cover 2005 classes, topographical situation and soil group.