Automatically acquiring comprehensive, accurate, and real-time mapping information and translating this information into digital maps are challenging problems. Traditional methods are time consuming and costly because they require expensive field surveying and labor-intensive post-processing. Recently, the ubiquitous use of positioning technology in vehicles and other devices has produced massive amounts of trajectory data, which provide new opportunities for digital map production and updating. This paper presents an automatic method for producing road networks from raw vehicle global positioning system (GPS) trajectory data. First, raw GPS positioning data are processed to remove noise using a newly proposed algorithm employing flexible spatial, temporal, and logical constraint rules. Then, a new road network construction algorithm is used to incrementally merge trajectories into a directed graph representing a digital map. Furthermore, the average road traffic volume and speed are calculated and assigned to corresponding road segments. To evaluate the performance of the method, an experiment was conducted using 5.76 million trajectory data points from 200 taxis. The result was qualitatively compared with OpenStreetMap and quantitatively compared with two existing methods based on the F-score. The findings show that our method can automatically generate a road network representing a digital map.