The advancement of cognitive computing for traffic status understanding, powered by machine learning and data analytics, enables prediction of traffic anomalies from continuously generated big GPS trajectory data. Existing methods generally use traffic indicators such as traffic flows and speeds to detect anomalies, but they may over-identify anomalies while missing the critical ones. For example, they use historical anomalies to train the prediction model, but past anomalies may not be a perfect indication of future anomalies since anomalies are often rare. In this paper, we propose a novel cognitive approach, a Visible Outlier Indexes and Meshed Spatiotemporal Neighborhoods (VOI-MSN) method, to predict traffic anomalies from GPS trajectories. In the VOI-MSN method, two cognitive techniques are provided. The first is VOI, which measures the abnormal scores using overall samples and can be intuitively understood by humans. The second is MSN, which learns the dynamic impact range (i.e., spatiotemporal neighborhood) from historical trajectory data and provides a complete and exact analysis of the local traffic situation. It emulates human cognitive processing to adaptively judge the impact range by experience. The effectiveness of the proposed method is demonstrated using a massive trajectory dataset with 2.5 billion location records for 27,266 taxis, and it achieves higher precision and recall in predicting traffic anomalies than the counterpart methods. The VOI-MSN method achieves high accuracy and recall for predicting traffic anomalies. It outperforms traffic indicator-based (speed and traffic flow) methods, the fixed-size spatial neighborhood method and the causal network method.