Location based social network (LBSN) provides large amounts of data which record the locations visited by users and corresponding latitude and longitude of these locations. Such datasets can be used to explore visiting preferences of users and predict the locations which are likely to be visited by a particular user in the future. Thus, the problem of prediction of users’ preference locations has become a research hotspot and attracts great attention from academia and practitioners. However, it is still a challenge to precisely predict which locations will be visited by users. The main reason is that the visiting decisions made by users will be affected by not only preferences but also geographical factors. In this paper, we investigate the influence of geographical factors, and propose a gridding-based tensor decomposition algorithm for users’ preference locations prediction. We divide the entire city into grids and fill these grids with visiting records of users. A tensor is constructed according these grids, and a tensor decomposition algorithm is employed to calculate the visiting probability of each grid for each user. Then, we calculate the popularity of locations in each grid. Finally, we construct a ranking list of all locations by considering both grids' visiting probabilities and corresponding popularity scores. We have implemented our algorithm and compared with existing approaches by using two public datasets, Foursquare and Gowalla. The experimental results show that our algorithm achieves higher precision and recall.