All but the most rural police departments have long since moved to frequency hopping, encrypted radios thanks to DHS initiatives and funding, no? This also adds complexity to the task of triangulating them doesn't it?
At this point, there's so much tech emitting radio waves in the average police car you'd need bespoke methods to detect most of it. The stack and operational procedures change every 5-10 years too. They used to (~20 years ago?) drive around with active radar engaged so they could pull over speeders without having to stop and use the handheld unit, but this would broadcast their proximity to everybody with a radar detector as they drove around. Easy to triangulate with consumer hardware.
With object-detection tech being commodity, it might be easier to just deploy RPi cameras and flag any vehicle with "POLICE" vinyls on the side. They out themselves there since no civilian is driving a similar vehicle.
Undercover cars are a different matter. You'd have a hard time disambiguating service vehicles from civilian-owned. Most of those even retain the side-view spotlight. You could safely ignore any with "PRIVATE" or "SECURITY" written on the side though; the cops out themselves again since most departments don't buy slick-tops and then slap "POLICE" vinyls on it (though I think Georgia departments are compelled to do this; I've seen black vinyl lettering on black undercover cars which I assume was meant to skirt some law).
Option B: most departments outsource maintenance of their vehicles to contracted civilian mechanics. Drive around town enough and you'll probably find a lot with a bunch of police cars parked there. Plant an ALPR camera facing the lot and record plates. Then you can use ALPR around town.
Staking out the maintenance depot or department fleet yard is probably the most expedient solution to getting a database of the vehicles in the first place, you're absolutely right.