Spatiotemporal scale is a basic component of geographical problems because the size of spatiotemporal units may have a significant impact on the aggregation of spatial data and the corresponding analysis results. However, there is no clear standard for measuring the representativeness of conclusions when geographical data with different temporal and spatial units are used in geographical calculations. Therefore, a spatiotemporal analysis unit optimization framework is proposed to evaluate candidate analysis units using the distribution patterns of spatiotemporal data. The framework relies on Pareto optimality to select the spatiotemporal analysis unit, thereby overcoming the subjectivity and randomness of traditional unit setting methods and mitigating the influence of the modifiable areal unit problem (MAUP) to a certain extent. The framework is used to analyze floating car trajectory data, and the spatiotemporal analysis unit is optimized by using a combination of global spatial autocorrelation coefficients and the coefficients of variation of local spatial autocorrelation. Moreover, based on urban hotspot calculations, the effectiveness of the framework is further verified. The proposed optimization framework for spatiotemporal analysis units based on multiple criteria can provide suitable spatiotemporal analysis scales for studies of geographical phenomena.