Say if humanity was forced to create a single mega-city on a, relative to the entire land-area of the earth, small area. Where skyscrapers are 1000-4000 meters tall. If the world pooled all its resources and created profit-incentives for the private sector to get that extra push going. How long do you think that city would take to build and how long would it take until all the people got over there?
Regardless of how people end up being transported to the city, the bottleneck will be the process of getting them into the city.
What land area does the city occupy? How many ways are there to enter it, and how large are they?
- Buses enter the city carrying 50 people each.
- An entire busload of people can be processed in 5 minutes.
- There are 25 entrances to the city (or one entrance with 25 lanes or whatever).
That means that 250 people can be processed every minute. If this operates 24 hours a day, every day, that means that 360,000 people per day can be admitted into the city.
Now consider that 250/minute happens to be the current worldwide birth rate. The above situation will barely handle the new people being born.
So, even if the above process prevents the current population from growing, how long do you think it will take to process the remaining 8 billion people?
If the city had another 25 entrances processing them at the same rate, it would take 61 years to admit everyone.
The world has far too many people for there to be any practical solution to this (or almost any other) problem.
It would take no time at all.
Everyone already in the city is to be saved. Everyone outside is not.
Build a wall.
When everyone outside dies, all that remain (it would be hard to call that collection of beings "humanity") would be inside.
There would be no need for 4000 ft apartment blocks.
As people have said, we don't have any way to know how long it takes to build a 4000 meter tall building. So that's going to be a huge unknown.
But JUST getting them in is, more or less, two years. Assuming about 7 billion people and only luggage they can bring with them.
Fly them to the continent the mega city is on. Current air travel stats show this takes about two years. Right now there are about 4.5 billion air passengers per year. It only takes re-directing the planes, not new capacity.
Though maybe you need more trans-ocean airliners than currently exist. So maybe while the 4000 meter apartment blocks are going up, you also have to build a bunch of the latest jet airliners. Probably you have to build less than 50% of the current fleet. Or possibly not even that many, since you could use local transport a lot to get people to and from the trans-ocean flights.
Beijing subway carries about 9.75 million passengers per day. Your mega-city will require something at least this efficient. That requires about 2 years to get all the people in.
So you need a network of airports all over the city, both inside and around the edge. Each airport gets a honking-big subway station. Or possibly two or three stations, depending on the density and local conditions.
So total move in time is two years plus construction time. This Yahoo answer claims an international airport is 2 to 5 years construction. So that might be the rate limiting step there.
Note that this omits any possible transport of personal belongings beyond what you can carry with you. If people want to bring huge truckloads of furniture and VHS cassettes and such, the time will increase correspondingly.
It all depends on the level of technology available. Say if we have teleporter technology, building the city might not take that long, since you can build units all over the world and then teleport them to the top of what's being build of the city. The units are obviously built from superstrong materials able to stand the weight of billions of people and their basic daily needs collected in a small area. Maybe diamond nanothread? With enough machines building or teleporting these units, this need not take very long, depending on the availability of raw materials. If the materials are made from carbon harvested from asteroids by millions of robots, raw materials will not be a problem.
Then, once the city has been finished, you can use the same teleporters to teleport families into the units. If there is one teleporter per thousand families, this can be done within a day, if a family can be teleported every minute.
What I am really saying here is that you must specify the level of technology before we can even begin to answer this question.
How long would it take to build? How long would you like. One week. Or one year. With such venture your goal is to build everything from scratch to finished product as fast as you can. So there is no natural growing stage. It's rather something like fake cities of China, new capitol of Burma or "New Kairo". You build up finished product.
Now, for the "people in". I will use something that is already exist and reflect similar idea. Manhattan. Manhattan’s daytime population is approximately 3.94 million of which 1.46 million are local residents. So everyday you have two and a half million people pouring in. On special days that number can rise up to 5 million. But keep in mind those 5 millions are usually with "hand luggage". So 2.5 million people each day is something that can be realistically done. It would take 3200 days to move in 8 billion people at that rate. For ease of the calculation we assume all "soon to be born" people moved in first so whole global birth take place already and only in The Citey.
That leave you around 9 years of people moving in. With the assumption that all "soon to be born" people moved in first so whole global birth take place already and only in The Citey.