Crowdsensing is a mode of using mobile devices to collect data. With the development of smartphones, crowdsensing-based urban environmental monitoring systems have become a promising research topic. In this system, because the distribution of participants is uneven, a lack of measured data will exist in the times and locations where there are no participants. These missing data need to be inferred. However, the existing inference algorithms do not consider GPS location errors and outlier data. To solve these problems, a grid distance-based tensor completion missing data inference algorithm considering the local outlier factor (LOF) and GPS location error processing is proposed, called the LGGDTC algorithm. In the algorithm, the LOF is used to detect and eliminate the outlier data. On this basis, the probabilities that each environmental data may be collected in different locations are calculated, and then the environmental data of each location are calculated. Then, the similarity distance between two different locations is calculated by the geographic and feature distance, and the objective function is constructed. Finally, the block coordinate descent method is used to obtain the solution of the objective function. The simulation results show that the LGGDTC algorithm can obtain good performance. [ABSTRACT FROM AUTHOR]