Nearly all the expected surge in the world's population from 7 billion people to 9 billion by 2050 will come in urban areas of Asia and Africa, and planning for it will be crucial to limit the spread of slums and related social and environmental problems, experts say.
That many fast-growing cities today have informal settlements and black-market economies "is in part a testament to failure to accommodate and plan for urban growth effectively and fairly", said Gordon McGranahan, principal researcher on human settlements for the London-based International Institute on Environment and Development (IIED).
But "conditions don't have to be so adverse," he said at Fair Ideas, a two-day conference on sustainable development solutions organised by IIED and Brazil's Pontificia Catholic University.
Already half of the world's population lives in urban areas, and the percentage is expected to reach 70 percent by 2050, according to U.N. estimates. Much of that growth will come not from migration from rural areas but the expansion of urban areas themselves, said George Martine, a Canadian sociologist and demographer.
"All future demographic growth will be urban," said Martine, adding that 94 percent of it is expected to happen in developing countries. With most still to come, urban expansion will be "the most important social transformation in this half-century," he predicted.
"It will be hugely positive or hugely negative depending on actions that are taken now," he said. "In order to have sustainable cities we need to plan ahead."
Aid workers say slum populations are especially vulnerable to earthquakes and weather-related hazards, such as flooding and storms, due to their poorly constructed homes and often limited or defective infrastructure and services, such as drainage. Threats to crowded urban areas from extreme weather events and rising sea levels are expected to worsen as climate change accelerates.
One big problem is that many countries see increasing urbanisation as a problem that needs to be halted, Martine said. The difficulty is that stopping rural to urban migration "doesn't work and has never worked", and most of the biggest rises in urban population today are from births to city dwellers anyway, he added.
Because many government leaders oppose urbanisation, they fail to plan for it - a problem Brazil, the host country of this week's Rio+20 summit on sustainable development, has experienced first-hand, Martine said.
Brazilians began moving in large numbers from rural areas to cities in the 1940s, well before their counterparts in Asia and Africa, Martine said. Today 85 percent of Brazilians live in urban areas.
But because that shift was not supported, many of the newcomers ended up in slums, like the tin-roof "favelas" that sprawl over Rio's green hillsides, above the homes of wealthier residents.
With little access to government services, transportation or jobs, many urban arrivals turned to black-market work, putting them beyond the reach of city tax officials. Houses were built haphazardly and sometimes unsafely, without sewers, running water or electricity. Poverty, crime, violence and inequality surged.
Brazil has since moved to "formalise" many of its slums and provide services. But the transition has been more difficult and costly than building the necessary infrastructure in the first place, according to Martine.
Where shacks have been built side by side over huge areas of land, "where are you going to put in the roads?" he asked.
Successful planning for the coming urban transition in other parts of the world requires favouring mass transportation over roads for cars, making affordable land with basic services available to families wanting to build houses, and improving governance, particularly to avoid corruption, he said.
The problem is "there's a big gap between what's going on and what we want, and we have to close that gap," he said.
Zimbabwe's government, for instance, has in recent years organised mass evictions of informal settlers in cities, said Patience Mudimu, who has fought those evictions as part of her work for the Dialogue on Shelter for the Homeless in Zimbabwe Trust.
But because most people who are evicted have nowhere else to go, many simply relocate to other slums in the city, "playing a kind of cat and mouse game", Mudimu said. "These evictions have not provided a permanent or sustainable solution," she added.
Slum dwellers have responded by organising community movements to talk with the government about solving their particular problems. For example, Zimbabwe's lack of toilet facilities is so severe that the World Bank two years ago ranked it as having the highest open defecation rate in the world.
Citizens' groups have been effective in collecting basic data on informal settlements for city officials, who need to know things like what water and electricity sources are used and what type of housing exists before they can upgrade areas, said Sekai Catherine Chiremba, national coordinator of the Zimbabwe Homeless People's Federation leadership council.
As a result of the federation's work, the movement has been allocated some plots of land by the government to start building improved housing, she said.
"The challenge is one of scale," Mudimu said. "The current services are not sufficient for the existing population. So it worries us to think about the future population that is coming in urban areas if we are failing to provide for the current population."