# Why would the whole of mankind live in a single, gigantic city? [closed]

Most of Earth's surface is wild, with a population density equal to zero. There is only one place on Earth where human beings live. It is a gargantuan city, spreading across thousands of square kilometers, of tens or even hundreds of millions inhabitants, who never (or almost?) leave its boundaries, with near-future technology.

With some simple calculations, it turns out we can fit the whole of mankind in a city the size of a bunch of US southern states, should the city have a population density around that of Paris. Now, half a million square kilometers for a city sound just too impossible to manage. Given that Tokyo has a about 35 million people living in it, I find it somewhat more reasonable to think about a megacity of about 20x that time (or 600 million inhabitants), that somehow live all together.

Since such a city would still depend on resources for the outside (especially food and minerals), how would they get them without any human outside?

• Do you have any other ideas so far? Adding some of these could help restrict our ideas a little to fit in with your story. Narrowing this down could help avoid it seeming a little like ideas pooling. – Lio Elbammalf Feb 5 '17 at 16:21
• The goal is a densely populated city the outside of which is feared so much that no one would want to go outside without being either extremely brave or suicidal. It's the something out there I cannot find a reasonable explanation for. – Adrien Feb 5 '17 at 16:58
• Well, you just wouldn't get a situation like that. I think the best you could do is have a powerful elite which keeps the underclass walled up in the city so that they can enjoy the uncrowded environment outside the walls. – jamesqf Feb 6 '17 at 1:12
• Another possibility is extreme environmentalism. There is some evidence that "land-sparing" in which you focus human development in particular areas, and allow other areas to remain untouched, may be good for biodiversity and the environment. This is instead of trying to develop everywhere but at lower intensity. – James Elderfield Feb 6 '17 at 15:33
• This question feels very broad, and yet it has no close votes. – Monica Cellio Feb 7 '17 at 3:47

## Lack of critical resources

Going back through history Mega City used to not be the only city. It was a trade city located in a very strategic location where a lot of trade routes passed through. Normally cities grow and die with various civilizations and empires, but that did not happen with Mega City. It manage to not only survive but kept growing and thriving. It also kept adapting to the times preventing the city from going into decline.

People kept migrating to Mega City in the hopes to get a piece of the wealth Mega City had and the people in charge of the city did not get corrupted by the power and wealth of the city and instead focused on increasing the city's material wealth even further. As a result over the ages a lot of the rare metals and other resources last stop was Mega City. As Mega City grew other countries shrank. Once Mega City held control of all critical resources it essentially starved the rest of the world of the technologies they needed to keep their civilizations going.

Now the world is in such a state that if you try to build a new city you would be hard pressed to find rarer materials, you would be limited to only the most basic of structures and accommodations. The leaders of Mega City have also put a ban in place of the export of materials, since they do not want people leaving to form their own city. People caught smuggling these items out of the city face rather harsh punishments.

There are of course exceptions to this ban, farming equipment and power sources or anything that needs lots of space is allowed out of the city. However, if you are farmer and caught shipping any of your crops to any place other than Mega City expect harsh repercussions.

• No magic, no handwaving, a corrupt elite in an authoritarian government... Yeah, sounds like the best choice to me. – Adrien Feb 5 '17 at 19:00
• @Adrien Authoritarian, maybe... but corrupt? The answer explicitely says (...) the people in charge of the city did not get corrupted by the power and wealth of the city and instead (...) and if that fact changed over time it is not said in the answer... – xDaizu Feb 6 '17 at 9:53
• @Adrien You might also have to look into creating very space efficient farms and incorporating them into your city. Since there would only be one city then there would be a limit as to how far a farm could be from the city, so making space efficient farms would help with that and the further expansion of the city as new people are born. Also they would have to either give up on meats or maybe have space efficient artificial meat farms. – user31746 Feb 6 '17 at 11:15
• @xDaizu Ooops, I did not notice that part. – Adrien Feb 6 '17 at 11:29
• Elitism would also be a solution : give the city's inhabitants the impression that they are "chosen", that outsiders are barbarians, that people who want to help them are delusive hippies, and you might succeed into restraining resources without resort to authoritarianism. It would fit well with extreme loyalty to their leaders/government. You might need propaganda, but history might be enough. – Aaron Feb 7 '17 at 14:22

Latency.

In the near future, computers / mobile phones and the internet have developed to such an extent that anyone outside the critical radius of the city is essentially cut off from it.

This already happens in the current world for things like high frequency trading, where much advantage is to be gained by being closer to the exchange.

• A good name for this city would be Google City. – Stig Hemmer Feb 6 '17 at 8:51
• Alternative answer: poor phone coverage. You just can't get good 128g reception a few kilometers away from the city, and without 128g speed you might as well have a 56k modem attached to your phone... – xDaizu Feb 6 '17 at 9:58
• A very interesting solution. – Adrien Feb 6 '17 at 11:33
• This could reasonably happen if there's a lot of virtual reality. The rich constantly live in virtual reality, where latency is very important. The poor don't care about latency, but all the wealth (and food and resources) is in the city, so they're kinda stuck there. – Erik Feb 7 '17 at 13:27

Nuclear holocaust is so yesterday. If you really want to mess up the planet, think biological weapons!

Late 21st century, a biotech savant with a passion for horror movies decides to create Ridley Scott's alien from the movie of the same name. For all his genius at genetics, his skills at containment are less than stellar, so within days of his creating the first face-hugger, Earth has a new apex predator.

In a last minute, desperate fight for its survival, humanity develops living walls which self-heal themselves faster than the alien's acid blood can burn through. All the major cities grow enormous shield walls for themselves and humanity pours into these protected zones. With careful screening of their citizenry, most of the cities manage to keep the monsters out. Survival seems possible, but then the effects of overcrowding, such as overwhelmed sewer systems, begin to kill off the walled cities. Starvation and disease claim what the aliens could not.

Except for Australia!

Isolated and far from earliest alien breeding grounds, Australia had a little more time to prepare than everyone else. They build their walls out from their cities, surrounding fertile farmlands and natural fresh water sources. Beyond those initial circular walls, they build more walls to claim large swaths of land and resources for future growth. When some of those outreaching walls reached the walls of other cities, the cities would merge. The age of the mega-cities had begun.

When the would-be aliens finally reach the Australian shores, the mega-city of Adelaide-Melbourne-Sydney-Brisbane is ready for them. Humanity may have lost most its homeworld, but atleast within these mighty city walls, life and hope continue.

• I think this would make for a good overall explanation, but I have to be a bit skeptical as to how a society with enough knowledge in genetic engineering could not just extinguish their "Alien" foes with some sort of artificial virus or other pathogen. – Adrien Feb 5 '17 at 18:58
• Because a Australian religious leader, who came to power in the mega-city just before the aliens breached the shoreline, had all the genetic scientists executed because their dark knowledge offended his god. The Australian scientists were the only ones who had enough time to develop a bio-tech response and although they developed (and even tested it in isolated locations in Asia), they were all crucified before the solution could be mass produced or deployed. – Henry Taylor Feb 5 '17 at 19:07
• They build their walls out from their cities, surrounding fertile farmlands and natural fresh water sources. Beyond those initial circular walls, they build more walls to claim large swaths of land and resources for future growth. When some of those outreaching walls reached the walls of other cities, the cities would merge. So... Attack on Titan? – tonysdg Feb 6 '17 at 17:48
• @tonysdg, Thanks! I hadn't encountered Attack on Titan before, but I've added it to my reading list. 21 volumes!!!! That is going to set back my reading budget quite a bit. I actually stole my answer from one of the early alien's novels called EarthHive, adding the walled cities from Aeon-Flux and the later Maze-Runner books. Stretching the defenses out to include farmland was stolen from the Divergent series and bringing the walls to life with self-healing came from the scifi series Andromeda. I am a thief of ideas, but I prefer to mix it up a bit. – Henry Taylor Feb 6 '17 at 18:55

Men had built cities before, but never such a city as Diaspar; for millennia its protective dome shutout the creeping decay and danger of the world outside.

The City and the Stars, Arthur C. Clarke

The premise of this novel is that humanity has retreated into one big city. Except for the protagonist, people can't even imagine what it's like to go outside the city and are afraid to do so.

This novel shows an internalised fear of the outside world. Of course, the city provides for its citizens. How near-future that is, is up for debate.

• This is a comment posted as an answer. – Frostfyre Feb 7 '17 at 18:09
• Could you elaborate? – Zxyrra Feb 7 '17 at 18:24
• This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review – Zxyrra Feb 7 '17 at 18:24
• @Zxyrra that's not what "not an answer" means. That flag means that nothing was posted that could under the most charitable reading be construed as an answer. – SQB Feb 7 '17 at 18:40
• It addresses the question but in a barebone way. I like the idea you've presented, but more information or examples is much more useful to the asker. – Zxyrra Feb 7 '17 at 18:45

Consider the story of the Tower of Babel.

The humans chose to live in a central location specifically. Gen 11:4 "Then they said, “Come, let us build ourselves a city, with a tower that reaches to the heavens, so that we may make a name for ourselves; otherwise we will be scattered over the face of the whole earth.”

You need only a philosophical basis of some form that make the people desirous of living in a single city, whether religious, or a strong desire to remain in contact with with other people, or something else entirely. If people have a strong enough desire to live in a single city, that is what will happen.

Contrary to a lot of the answers you've already had, I actually think that anything negative that happened would place a huge amount of pressure on groups to compete with each other for survival, and the most likely scenario would be a collection of small, competing cities which were very close to (but also warily separate from) each other.

I think the spur needs to be positive, then. People move to cities because they believe they will benefit from them. Transportation can only go so fast, being in a city makes you near to lots of other things (other people, with other skills and access to other resources), so you are at an advantage when it comes to accessing resources. This is pretty much why cities exist.

So, I think what you need to do is amplify this, such that it begins to seem completely ridiculous for anyone not to live in a city. Come up with a reason why people can gain from being close together, a form of technology that's massively beneficial but relies on people being in close proximity. At first, people will think they can do without it, but in time the people who lack it will come to seem (and think of themselves as) impoverished. Cities will grow, big ones will grow more, and people will begin to move from the small ones to the big ones (since they offer more advantage).

Wait long enough, and almost everyone will be in one place. It then takes only a little pressure of the negative sort to get rid of the people who chose the "simple life" outside of the city, and create the scenario you describe.

• This is my feeling! Biopower (a society's sense of what is reasonable) controls more behavior than any government. – Neal Feb 6 '17 at 13:49
• A possibility for such a technology might be a replacement for the internet. Right now, internet relies on powerful backbones and existing infrastructure to rout a lot of data. If that were to be replaced with an ad-hoc distributed network, then being far away from people means you have no access to the internet. – Valthek Feb 7 '17 at 14:38

This is only possible with extremely hostile environment, which needs complicated systems to make habitable. Such conditions may be on Mars or the Moon, where most likely the colonization will start from one certain point.

Some new material with great properties gets mass use, until we discover, too late, that it's very, very bad for the ozone layer.

The ozone layer is completely ruined. Suddenly going outside during the day is a big hazard.

A gargantuan machine is built, at huge cost, which generates enough of a magnetic field to make a large area safe.

Building a second one would be just too expensive. Actually much more than the first, which depleted some rare material good for magnets.

We get resources from the outside with robots, remote control, and human crews who only go out at night. These last are exceptionally well paying, high turnover jobs. Recycling and hydroponics are used to do as much as possible in the safe area.

• That humanity would have developped a mass usage of an ozone-destructor chemical in the near future seems quite odd, unless we consider an alternative timeline in which CFC was not banned in the 80's. However, this makes me wonder about the oxygen proportion in the atmosphere. If the ozone layer no longer exists, then, as I understand it (I might be wrong), life outside the oceans is basically impossible, and all trees and plants on Earth quickly die. Even though oxygen would still be generated from phytoplankton, the oxygen levels would eventually go below 20%. – Adrien Feb 6 '17 at 11:40
• Having a totally ozone layer would cause significant changes to the ecosystem, but not make it uninhabitable - yes, the increased UVB radiation would have harmful effects on skin and eyes, but all that means is that people (hermits?) who want to live away from that city would have to wear covering clothing and sunglasses whenever going outside, that is completely sufficient. Some of them could even ignore that altogether and the only effect would be a larger risk of cancer and shorter lifespan - which would be acceptable for some, as evidenced by people using tanning beds and smoking. – Peteris Feb 6 '17 at 17:27
• @Peteris To be fair, most people that use tanning beds or smoke also refuse evidence of higher cancer incidence linked to the usage of those things. – T. Sar Feb 7 '17 at 13:28
• @TSar yes, so people like that would simply go out and live outside of that city magnetic field despite the increased health risks. – Peteris Feb 7 '17 at 13:47

Option 1: The only functional fusion reactor in the world is at the center of that city, and there is little to no hope of ever building a different one (although the current one could be repaired from almost any damage.)

Why this works: In the near-future, we can assume that power is the greatest resource requirement of civilization. Furthermore, the infrastructure required to transmit such an awesome amount of power is incredibly expensive and becomes more and more inefficient the farther you go. Therefore, humanity bunches up around this energy source.

Additional Details: Power alone won't be sufficient to overcome humanity's drive towards expansion, so we'll need something else to force us to bunch up. Carrot - maybe there is some energy field discovered that dramatically improves human health, but you have to be constantly in the field and it's incredibly energy-hungry. Stick - maybe there is some really nasty radiation coming in and only a very energy-hungry shield can stop it.

Option 2: Total zombie/demonic/alien/whatever apocalypse.

Why this works: The loners and splinter groups just keep getting wiped out before they can ever gain traction, so only the main city continues to survive. It's not that there aren't other cities, just that none of them ever last more than a few years before succumbing to the zombies/aliens/sapient apes.

I don't think you can produce the food in a city. It will need to be surrounded by a lot of farmland (also solar farms and wind farms)

But the back-story may be the almost complete ecological collapse of the late 21st century leading to the death of most of the human race. ( I hope not but we aren't listening well to the warnings). Somewhere got lucky and the climate changes that wrecked most of the planet created an improvement locally. Geographically, Australia would work well, although I know it would take a lot more than rain to make the red interior into best fertile farmland. Or maybe the US centre after 200 ft of sea level rise turns the Missisippi into a new Mediterranean Sea and makes US central winters balmy.

Anyway, the survivors somehow pull together in a mega-city in the middle of a continent-sized patch of arable land, and vow to control their population and let the planet heal itself. They hold to this with religious fervour, and nature rewards them. 1000 years on there is one city of 600 million people. Farming is completely automated. Everyone is vegetarian (or maybe meat on very special occasions omly). They worship Gaia. Nobody lives permanently amongst the robo-tractors and -trucks, though engineers visit when maintenance is needed. The rest of the planet is uninhabited and regarded as sacred ground. (Not sure why no survivors elsewhere. Plague? Nuclear pogroms during the dark century? Beserker bots? An in-gathering when population overshoot becomes undershoot - we need everybody and we can offer you a better life?) All of these? Anyway, it is a technological and technocratic utopia but people are forgetting their past.

Now, rewrite the Atlantis.myth in that setting?

• Unfortunately, your answer raises the exact question I was trying to ask (though I might have not expressed myself well enough): what is keeping people from funding other cities? For a nuclear holocaust, I cannot see why only one place in the world (much less the size of Australia or the US central valley) would have been spared. The idea of hostile robots is the most satisfying to me, since it can work out with a post-apocalyptic world, modern technology and the lack of human presence elsewhere. I guess a sort of bug in their programming makes one single location on Earth safe. – Adrien Feb 5 '17 at 17:06
• Since when can't you grow food in a city? en.wikipedia.org/wiki/Vertical_farming – AngelPray Feb 5 '17 at 18:18
• @Adrian I was thinking fear keeps then from expanding. Some is rational because of a real threat out there, much is religious based on what Gaia did last time humanity covered the whole planet. The city ( and universal birth control) exists to keep population static and most continents empty. – nigel222 Feb 6 '17 at 8:16
• @AngelPray of course you can grow food in a city, but not enough to feed all its inhabitants the whole year around, especially not without energy input above solar. – nigel222 Feb 6 '17 at 8:19
• @Adrien Oh, they tried to leave and found new cities.. but whatever crazy robot race collects their resources had to develop mechanisms to cope with the savage wilderness out there. And they do not distinguish stray humans from stray hungry tigers. (berserker bots, as was stated in the answer) So the further out you get the less used to human contact they are, which makes them more dangerous. – skymningen Feb 6 '17 at 11:05

# Religious Environmental Protection

As time went on, the destruction of the planet seemed to be the inevitable end point of industrial society. Under these conditions the cult of Gaia rose to power and swiftly took the world over.

But people did not want to give up the fruits of industrialised society, so a compromise was made. One small section of the planet would be sacrificed so that the rest may be left to recover and flourish.

The land near the city is a blasted wasteland, with toxic runoff from the dense and heavy industrialisation near the edges of the city, but beyond a few hundred kilometres nature begins to take hold again, and within a thousand there are lush forests. Most of the planet is wild now as it hadn't been for thousands of years hence.

With the wilderness comes great danger. Most humans have none of the survival skills required to survive in the wild, and taking any form of technology which could harm the planet into the wilderness is forbidden (though some would try, facing the wrath of the Zealots of Gaia). All the old frontiers have returned, and many of the old dangerous mega-fauna have been reintroduced to the world through the wonders of genetic engineering. Giant terror birds stalk the plains along with ten ton armadillos, and lizards as big as a car lie in wait to ambush the unwary.

Officially there are no human settlements outside the city. Unofficially though...

An extremely limited habitable zone

Perhaps the planet is only habitable at extremes of altitude. On Earth this might mean only the Himilayas or the Mariana Trench still support life. With such limited opportunities for building having a single city would make sense.

Sure, in a "Waterworld" scenario you have scattered populations living on the ocean but if you made that impossible (say the water or air is toxic) then you could rule that sort of thing out.

The city needs to offer some special refuge or protection that humans can't find in many spread-out settlements. The reason could be technological, supernatural, agricultural, or anything that gives humanity solace.

This is basically the same situation as The Last City on Earth in Destiny. The remnants of humanity gathered there because it was the only place that afforded them protection from an overwhelming alien threat. In that story, the presence of a different, more benevolent alien being protected humanity.

In Attack on Titan, humanity has retreated behind enormous walls to seek refuge.

Another reason might be that the rest of the world is now arid or otherwise unfarmable, and people have flocked to this last bit of land or water since they need to be near it to survive.

You get exactly this effect in largely agrarian nations which have one big city and place their nation's capital there.**

As farm work gets automated... as transport gets easier... it becomes easier to live in a lovely flat in the city and simply commute to the farm jobs. Quality of living being the motivating factor: availability of specialty shops with necessary supplies, restaurants, nightlife, specialty BOAF, mating opportunities etc.

** In the US and Canada, we work hard to avert this trope, by intentionally putting capitals not in the big cities. That's why DC not NYC. Albany not NYC. Madison not Milwaukee. Sacramento not L.A. Ottawa not Toronto, etc. Sometimes that doesn't work, as in Ohio.

As one commenter above wrote, The City and the Stars by Arthur C. Clarke is a great response to this. There are two cities left on Earth: the most prominent is a city created to escape from the outside world. The population is genetically altered to not feel fear where people once yearned to explore. To paraphrase one excerpt from the book:

If I ask you to walk along a thin plank, you could do it almost without thought. But put the same plank between two tall buildings and you will almost certainly shy away from the challenge. Such is why we choose not to explore the outside world. It is not because we can't, but because something inside screams at us not to.

The other city is a city which its inhabitants are telepathic, so their occupants stay near in order to stay grouped to one single mind. This reason is less fun IMO

First, North Korea is punished for its wrongdoings even more than ever and becomes a still more isolated and closed country than it ever had been. Nobody comes in, and nobody comes out. Even China cutted off all relations. Even peace negotiations with South Korea are ended for once and all (they never produced anything meaningful anyway). People caught trying to come in are promptly shot on sight. People who are able to leave won't ever be allowed to come back. North Korea's government works very hard to ensure this draconian policy and they become very effective in doing that.

Meanwhile, some fundamentalist cult guys engage into bioterrorism. They are very scientifically skilled, very well-financed, very secretive, very well-organized and very motivated by fanatism. Their ultimate purpose is to sterilize all the humanity leading to its extinction.

The bioterrorist group develop many different kind of very efficient viruses for reaching their purpose. Those are the characteristics of those viruses:

• Act by reducing otherwise healthy women fertility to near zero by inducing miscarriages and severe birth defects in human fetuses or perhaps by just messing up with ovule production. Screwing up with male's sperm is also a target.

• Spread out by air from person to person like common flu.

• People carrying those viruses will seems to be healthy and asymptomatic, otherwise normal people, so they may live and spread out the viruses unaware of the fact for many years.

• Those virus were engineered with the purpose of evading clinical tests and detection. They also do not develop or even self-destructs in lab conditions with the purpose of slowing down any treatment, cure or drug research.

• Since there are several variants of those viruses, if a group of people is immune to a particular kind of virus, it won't be immune for the other types. Also, if a cure, drug or treatment is found for one kind of virus, the other kinds are likely to also be active.

• Cats and dogs are also able to carry the viruses and contaminate people with them. However, the viruses don't do anything bad to them.

• The viruses are unable to be spread out by other type of animals or plants or dust or whatever.

• The viruses won't last long outside of the body of a human, a cat or a dog.

Further, the bioterrorists spread their corrupt influence all around the world and they pervade and corrupt almost everywhere in the world. They will bribe, trick, kill, manipulate, brainwash, whatever, any people that they think that is needed in order to reach their goals, although they won't be successfully every time with that.

Those viruses spread out in the world pretty quickly. Also, the terrorists ensures their major circulation to everywhere.

No matter what the scientists tries to do, they won't be able to save humanity. There are a lot of different kind of viruses, they spread very quickly and in just a few years almost every person in the world is contaminated. Studying even a single type of those viruses is very hard and demands a lot of years in research done by a lot of people and this also takes a lot of money as investment. Also, nobody knows what the heck is going on, at least initially, and until they are able to figure it out, it would be already too late.

In some years no more babies are born and humanity is doomed and eventually dies out.

Except for one place: North Korea!

North Korea extreme isolation allows them to be a place free of those viruses. No matter what the bioterrorists try to do, they always fail to spread the viruses to North Korea. Anyway, initially the bioterrorists didn't payed much attention to that (there were always a lot of many other areas more interesting to work) until it was already too late for them. This also gives North Korea some time to prepare against the outside danger and fortify their defences and also build multiple shells of walls and minefields both on land and sea. When the bioterrorists finally turns definitelly commit on attacking North Korea with all of their resources to finally fullfill their ultimate purpose, they find that North Korea is very well prepared and ahead of their moves. No matter what the bioterrorists try to do, the government always caught them and shoot whoever and whatever tried to come in, including people, cats, dogs, drones, boats and even pigeons and fishes.

The circulation of the viruses worldwide also makes the North Korean be very sure that they shouldn't ever open their borders and ensures that they will have a very legitimate interest to not loose their policy even by a tiny bit. A large part of their economy (not that it was a sizeable economy, but anyway) is actively dedicated to not allow people coming in.

In some years, the rest of the world becomes a place devoid of human activity. There could be a few eldery people thrieving in the ruins of once opulent cities or living simple lifes in isolated farms here or there, but they are all ultimately doomed.

Finally, Pyongyang grows out and embrace virtually all of the North Korea territory, forming a megacity. The city surely features some voids for agriculture, and a large part of the agriculture is performed in the roofs of the houses to improve land usage without hampering urban area growing. Knowing that the the rest of the humanity died out and that the viruses were poorly researched, North Korea will not expand out its borders with the fear of getting contaminated.

Some people might be sent out to study and re-explore the rest of the forsaken world, but they won't ever be allowed back. Further, since outside North Korea there is just wildlife, wastelands, desolation, the possibility of getting contaminated and no chance of coming back later, very few people wants to leave anyway. The few people who actually leave, are too few and too sparse to create a city big enough to deserve being called as such, at least while they don't met with a puppy or a kitty somewhere nearby. Also, sending out drones instead of people is always something much safer to do.

• I remember a zombie apocalypse book I read a few years ago that featured North Korea as the only remaining standing country for the very reasons you cite: in the story, they simply shot everyone trying to enter the country, zombie or not. Of course, no one there but the highest officials and intelligence agency workers knew about the apocalypse, so the population continues living as always. They are then sent to capture a surviving city in America (as they lack oil). Unfortunately, I do not remember the title of the book. – Adrien Feb 7 '17 at 21:13

The city could be like a colony on an uninhabitable planet or an artificial space habitat. It could be a totally enclosed environment like a space habitat. If nuclear fusion has been invented it can get a small proportion of necessary energy from solar and wind energy and most of it from gigantic fusion power plants.

As for why a single city, it might be built on the equator of Earth and have a beanstalk leading up into orbit. And there may be many space colonies and habitats using similar technology and a lot of trade up and down the beanstalk.

And another reason may be that in this future research has proven that all the species of great apes and three surviving species of proboscideans and 80 odd species of cetaceans (if that many species survive) are as intelligent as humans and their ancestors have been so for tens of millions of years. And humans feel guilty about exterminating a number of species of proboscideans and cetaceans and apes and endangering the rest in the last 13,000 years through hunting and habitat loss and so want to restore most of the Earth to the use of those species.

And possibly intelligent computers and robots enforce that separation of humans from most of Earth. Maybe if humans are caught on Earth outside the single great city they are killed.

And maybe some humans have phobias about surprise gamma ray bursts. Humans who don't have such phobias live in space while humans who do live in the city on Earth that has walls and roof hardened against radiation much more than any space colony or habitat could be. And if people live in the city on Earth because they have phobias about unexpected gamma ray bursts they are not going to go outside the city and risk being caught unexpectedly by a gamma ray burst.

• And what event lead to robots enforcing the seperation? Or humans becoming gamma ray phobiacs? – AngelPray Feb 5 '17 at 23:03

Why would the whole of mankind live in a single, gigantic city?

Think in terms of scale. Most modern cities on Earth are not haphazardly placed. The vast majority of them are located where they are located due to their position as gateway ports and trade routes.

Even after these cities use as a port for ships has been obsoleted by trains, planes and automobiles, the overall majority of the population still gathers to cities since it’s a hub and relative maturity of culture and infrastructure is better than elsewhere.

So absorbing all that, why would a MegaCity™ exist? Easy: The planet itself is a “port” on a larger—possibly galactic—scale. Travelers come and go to that city from other points in the galaxy, but it’s no different than any other physical locale.

Meaning space travel is cheap and common and establishing life on other worlds is relatively cheap and easy.

And regarding harvesting natural resources from the planet the MegaCity™ exists on? Well perhaps as sophisticated a civilization that MegaCity™ might be, perhaps the refining process for raw materials is so risky/toxic that the concept of avoiding harvesting resources “right next door” exists.

For example, let’s say a good source of energy is something at the core of a planet and that is all a society needs to build itself up. What is the downside of a “mining disaster” on a core level? Would the whole planet—much like a coal mine—just catch on fire and collapse? That seems like something you want to avoid doing near a population.

And another benefit of having a planet that only has one MegaCity™: The rest of the planet becomes a huge natural refuge. Perhaps no matter how advanced the world is, people still enjoy raw nature. So much the same way the “National Parks Service” in the U.S. protects vast swaths of land, there could be a “Global Parks Service” whose job it is to ensure that the natural world outside of the city exists as untouched by the hand of civilization as possible.

This sounds like a classic dystopian situation to me, and to be honest, isn't all that much of a stretch when you extend current trends in the world up to a century from now.

1. Some loosely defined group of people who share an interest in preserving the environment decide that, to accomplish their goals, they need to somehow engineer the future in such a way as to convince everyone to live in tightly populated cities and abandon rural areas entirely. To do this, they make public education mandatory and infiltrate the education system in order to raise a generation with a culture that goes counter to that of the new generations' parents or grandparents. It becomes easier to enjoy life when those of this new generation gather together in large cities because conversations with parents and grand parents have become uncomfortable and contentious to the point of obliterating family ties.

2. Once everyone is in big cities, the group continues the trend, finding environmental issues that are caused by each of the cities and using these as excuses to shut them down and move entire populaces until all are contained in one large city. I imagine that throughout this process, a lot of population control would be utilized, including war, reproduction bans, genetic engineering (for infertility or even homosexuality), and secret contamination programs. The resultant megaopolis would be huge, to be sure, but it wouldn't necessarily require a city the size of, say, Arizona to accommodate everyone who is still left over.

3. The government finds that people in a single location are much easier to predict and control, so big companies and government collude to create a culture and society that is much more materialistic than we are now. Just think: they know enough about everyone in the city that, using super computers, they can predict who you will interact with today, who will get sick, who will get into accidents, etc. and they can use this data to prevent crimes without arresting or imprisoning people, to prevent traffic accidents (by then, traffic would probably be automated anyway), and even arrange romantic encounters with total strangers as a form of secret genetic engineering of the human race. In short, without actually directly manipulating people, the data one would have from such a city would grant those who have access to it immense political and social power. Thus, the rich and powerful are happy because they control everything, while the regular citizenry are ignorantly happy because they aren't aware of just how much is being decided for them and suggested through targeted advertisement and subconscious suggestions.

4. Some legitimate benefits beyond accident and crime prevention also crop up. For example, with everyone so close and everyone so technologically connected, artificial intelligence platforms could take advantage not only of the immense computing power in the abundance of digital devices, but also of the random data on these devices, effectively simulating human intelligence by using human-generated random data. Everyone would have access to these conversant AIs and much of an individual's life would be spent conversing with, being entertained by, or learning from such entities.

All of those stages would come with war, political strife, resource shortages, massive epidemics, and conspiracies. Not a world I would like to live in, but I can understand how being raised with a culture that supports the idea would make it tolerable.

Apocalypse, Alien invasion, whatever that makes the world hard to survive in.

it is well known fact that the volume increases with third power of radius and surface increases with second power. It is easier to sustain one big wall around one city than many smaller walls and trading routes between cities are vulnereable.

In this scenario the crucial buildings and people are in the huge city and only expendable units (warriors, miners) and outposts are outside the city.

brainwashing

"brave new world" by aldous huxley explores a society controlled by conditioning people to be docile and easy to shepherd. if a government managed to do such a thing, they might breed citizens with an immense fear of nature and an inborn love of their home town. couple that with a few generations of exterminating all the competing cities, and boom: civilization in a bottle.

side note: if you really want to parallel the book, you also need to give them a strong desire to travel so you can sell tickets on the monorail loop where they can see the terrifying trees from the safety of their civilized rail car and still be back home in time for the nightly orgy.

Incessant warfare led to the genetic engineering of a people who long to cooperate and conform: the development of the meek gene. It was supposed to enable the ruling class to dominate a docile workforce and live in peace forever without fear of revolution. However, the unmodified elites ended up killing each other off through intrigue and their own personal vices. This left behind a people who inherited a marvelous city and are good at building.

The Meeks fear one thing: loneliness. This keeps them together.

UPDATE: The food thing.

It has been conjectured that one could build large green houses to feed the world.

1) Each greenhouse is 1 km x 1 km x 1 km in size.

2) The sunlamps used to grow the food are powered by fusion reactors. (Sunlight cannot supply the required power density.)

3) Aeroponics (better than hydroponics) is used to grow the food. The more carbon dioxide there is in the atmosphere, the better the plants grow!

4) The support members are made of strong nano-materials.

5) Each greenhouse of this size could feed 50 million people.

6) For a city of 5 billion people, you would need one hundred such greenhouses. Just to be safe and deal with maintenance downtime and population growth, make that two hundred greenhouses.

Imagine: only two hundred square kilometers of farmland would be needed. Instead of farmland taking up vastly more space than our cities, cities would take up more space than our farmland.

Agoraphobia. In Asimov's Caves of Steel most of the inhabitants of Earth are agoraphobic. Living under the domes was necessary at one point, but after a while everyone began to fear the outside. Only a few brave (or crazy) people ventured out of the domes. From Wikipedia

Baley, like most earth-born human beings of his century, is strongly agoraphobic, as The Caves of Steel reveals that most natives of Earth spend lives living in immense domed cities ("caves of steel") and rarely, if ever, travel to the outside surface. Baley's agoraphobia is an important personality characteristic and plot point in several of the novels in which he appears. In the later stories he has limited success in overcoming his agoraphobia, which he recognizes as a potential limitation to his species and more directly his son. (Baley's agoraphobia mirrors Asimov's own personality, who was a well known claustrophile.)

• I thought "agoraphobia" was the fear of large crowds... which you would expect in a city that can have around 500 million inhabitants. – Adrien Feb 7 '17 at 13:09
• @Adrien -- Generically, it's fear of being in an uncomfortable place. (Which could be either crowds or open spaces.) If you're afraid to go outside, it's agoraphobia. If you're afraid of crowds it's more specifically enochlophobia. – Clinton Pierce Feb 7 '17 at 17:57

It's dangerous to go outside... aparently.

The powers that be have told the peoples of the megacity that it's dangerous to leave the city due to toxic gasses/radiation/disease/monsters. The powers are of course being economical with the truth.

Maybe some of them genuinely do believe that it's dangerous outside, or maybe having all of humanity under one roof makes everything so much easier to manipulate. Surveillance on those pesky radicals is simple when there's only a megacity-sized area they could possibly be in. Think North-Korea, but only North-Korea, no other pesky countries around to try to sway the humble people away from their supreme leader's omnibenevolence.

Life is boring outside the big city

The big city does not only provide everything necessary for survival, but it is also the only place on earth equipped with all of the most advanced technologies that make up civilisation: High-speed internet, public transport, sports arenas, theatres and cinemas of all kind, theme parks, restaurants, medical doctors and hospitals, factories, electrical power, schools and universities, just everything is concentrated on this one place.

No one wants to miss all that, and therefore everyone lives in the big city and former settlements in the wide outside are given up and turned to ghost towns.

You cannot survive without the hive.

Human researchers were looking at viruses and bacteria to find how they can mutate so quickly compared to humans. In their research they found a way to modify human DNA to quickly bolster the human immune system. Unfortunately, our biological opponents found a way to mutate even faster.

Biological mutations in these super-viruses and bacteria have made them adapt so quickly that a single human (even with its super boosted immune system) cannot keep its immune system up-to-date with the most recent mutation. It is true, that SOME humans will create antibodies to the newest threat, but should your body fail to do so it spells for certain death.

Part of your daily morning routine is for your blood to be scanned to find what new antibodies it created. Today it may be you that creates an antibody. Tomorrow it could be the mayor, or a nurse, or even some guy that works in the sanitation department. The government uses this information to create "booster shots" that are available in hospitals through a tightly enmeshed distribution system. Due to the size of the population, as the new threats are found the antibodies are just as quickly found in somebody, somewhere in the city.

Leaving the city for even a few days could be fatal. Too many people have taken that risk and never returned. Or maybe they didn't return for another reason...