The weight matrix is one of the most important things in Generalized Space–Time Autoregressive (GSTAR) modeling. Commonly, the weight matrix is built based on the assumption or subjectivity of the researchers. This study proposes a new approach to composing the weight matrix using the minimum spanning tree (MST) approach. This approach reduces the level of subjectivity in constructing the weight matrix since it is based on the observations. The spatial dependency among locations is evaluated through the centrality measures of MST. It is obtained that this approach could give a similar weight matrix to the commonly used, even better in some ways, especially in modeling the data with higher variability. For the study case in traffic problems, the number of vehicles entering the Purbaleunyi toll was modeled by GSTAR with several weight matrix perspectives. According to Space–Time ACF-PACF plots, GSTAR(1;1), GSTAR(1,2), and GSTAR(2;1,1) models are the candidates for appropriate models. Based on the root mean square errors and mean absolute percentage errors, it is concluded that the GSTAR(2,1,1) with MST approach is the best model to forecast the number of vehicles entering the Purbaleunyi toll. This best model is followed by GSTAR(1,1) with an MST approach of spatial weight matrix.