Traffic monitoring systems use city infrastructure and vehicle Telematics systems to collect data on traffic flow. Ultrasonic sensors, video cameras, or other sensors feed live traffic data to a centralized server. The data can be used to develop applications to redirect traffic to less congested areas and provide real-time traffic updates. Further analysis on the data can be done to predict traffic density and improve road and city planning to minimize traffic congestion. An algorithm is used to predict traffic density to minimize traffic congestion.The infrastructure used in traffic monitoring can also be used for other connected car or smart city applications such as autonomous driving and emergency response. For example, RFID or UWB tags can be used to prioritize the emergency vehicles like ambulances and fire engines. In the case of emergency situations such as an explosion, fire and smoke sensors can be deployed on city infrastructure to detect hazards and re-direct traffic.