I've set up a district with specialized industry (oil or ore) over an area with that natural resource. Buildings pop up, things work, and eventually the resource is depleted (as seen on the Natural Resources view). The buildings stay up, however, and appear to continue working. Will the buildings continue to work indefinitely, or do I need to eventually set the district back to generic industry?
Yes, they still work, but they need to import resources.
When you place specialized industry on their respective resources, they will create a mix of raw material producing factories and raw material consuming factories. The proximity means that the transport of goods between them is a very small issue. The consumers will supply goods to your generic industry so they don't need to import from off-map.
When the resources are depleted, or when you place specialized industry in an area without natural resources, then all the producers will be replaced with consumers. Now they need to import raw materials from off-map. This will create more cargo traffic at your highway ramps and cargo terminals (train, ship, airport). When you have a good road network, then this might not be an issue. But if the industrial zone is not that well connected, then it might lead to traffic problems.
When you can handle the traffic, then you might want to consider keeping the specialized industry, because it still creates more tax money than level 1 generic industry. But on the other hand, specialized industry can't upgrade. So if the area happens to meet the service coverage requirements for level 3 generic industry, then you might want to consider replacing.
When you can't solve the traffic issue, get rid of the industrial zone. Generic industry isn't a solution, because they too will need to import.
What do they produce? Traffic. Lots of traffic.
When the ore/oil is depleted, the industries will import those raw materials instead. You can see this on the "Outside Connections" info view.
This creates a great deal of additional traffic. In fact, the Cities: Skylines official Wiki warns of this:
This can be quite a shock for your transportation system and supply chain, as a zone which previously supplied raw material will transform into one that needs to import it.
Two city or zone Policies will greatly exacerbate the situation:
- Industrial Space Planning - doubling product output.
- Industry 4.0 (now in base game) - increasing product output by 50% (and demanding high education workforce)
These two policies also increase raw material imports by same amount.
I had a large area (about 1/3 of a tile) that I kept as an ore zone long after the ore ran out. It was running both policies. It created tremendous traffic issues in the zone, strained freeways between the zone and all outside connections, and created long queues at the two nearest rail freight depots**.
Turn off specialty industry when that happens
The general advice is to shut down the specialty industries after the ore or oil runs out. They remain at level 1*, so there is no great loss getting rid of them.
Official advice is to remove the specialization from the zone.
My own preference is to keep an eye on the Natural Resources info view, and "de-zone" little squares within the district once their resource is depleted (i.e. change the amber squares into clear). I didn't zone the entire district to begin with, so at that point I zone another part of the district amber (industrial) and let it be mined.
I've never been in a rush, so I just wait for the entire zone to be depleted and then remove its specialization. By the time the last parts of the zone are depleted, the ground pollution is gone from the first parts, and residences and businesses can be zoned.
However, you could also shrink the district to exclude the depleted areas, and then zone them for industry again; that would bring general industry.
* To be more precise, they only have one level; it might be level 3 but they start at it, so what's the difference? I thought I saw something about a DLC changing that and allowing them to level... but I can't find it again. Park Life? Industries?
** The queues at the freight depots ran smoothly because I installed a 0.5 km zig-zag road for them to queue in; it would've been a disaster if they queued on city streets.