One of the most frustrating parts of driving in San Francisco is finding a parking spot, and then feeding the meter before it expires.

By the end of March, those two issues will be resolved after the city replaces 5,000 old parking meters with updated high-tech versions that will not only accept credit cards and let drivers pay from their phones, but will also alert drivers of an available parking spot through a smartphone app.

That approach will make San Francisco among the only places to use smart meters to control parking flow, according to California transportation experts in The Wall Street Journal.

Other nearby cities such as Sausalito and Redwood City have already shifted away from coin-only meters and adopted smart meters that help make parking more convenient for drivers and easier to manage for the cities. San Francisco’s $25 million project, funded completely by a federal grant, will go a step beyond, using the new meters to reduce car congestion on city streets.

Workers have already begun placing disk-like sensors on the ground next to more than 5,000 metered parking spaces — about one-fifth of the total — which will detect whether a car is there. New meters and pay stations that cover multiple spots also will send signals to a central system that will give the San Francisco Municipal Transportation Agency real-time insight into utilization.

San Francisco plans to use the meters to influence how many people park in a particular area at a particular time. The long-term goal is to continuously adjust parking rates up or down to keep 15 percent of spaces in a neighborhood free, said an agency official.

The city plans to make information about available parking spots available to drivers through signs and later a smartphone app, although the city will rely on outside parties to provide the software, similar to the way it does for bus-arrival information.