Most of us appear blissfully ignorant of a global event that will shape all of our futures: the price of staples such as wheat, corn, soya beans and rice is rising alarmingly ... and shows no signs of abating

An ordnance survey map of Edinburgh in the 1920s hangs on the wall in the corner of the Sheep Heid pub in Duddingston village on the outskirts of the capital. It shows a fascinating topography of the city in the years immediately after the first world war. It is a garden city, dotted with acre upon acre of green space. And it raises some fundamental questions about what Scotland and Scottish businesses are doing to prepare us all for the end of cheap food.

Scotland is a country blessed with some of the most fertile agricultural land in the world. We are able to grow an array of cereal crops such as wheat, barley and oats, and our beef cattle and raspberries are world renowned. Yet most of us appear blissfully ignorant of a global event that will shape all of our futures: the price of staples such as wheat, corn, soya beans and rice is rising alarmingly.

It is a perfect storm of four significant and inter-related events. The explosion in the price of oil to more than $100 a barrel has put great pressure on the cost of food distribution. At the same time the United States has given huge agricultural subsidies to create biofuel as a substitute in the form of ethanol distilled from corn. The use of cereals for such industrial purposes has increased by more than 25% since 2003, eating up a huge amount of land that might otherwise be used for food production.

Yet this is happening while global warming is turning large tracts of the world into arid desert, meaning millions of people face starvation as land suitable for cultivation dwindles. Meanwhile, the economic powerhouses of China and India are driving a huge spike in demand for food. China's 1.3 billion consumers will plough through more than 50kg of beef per head in 2008, compared to 20kg in 1985. This pushes up demand for grain because it takes 8kg of grain to produce just one kilogram of beef.

As a result, the price rises in food staples were extraordinary throughout 2007. Since last spring, wheat prices have doubled and almost every crop is at or near a peak in nominal terms. The Economist's food price index is higher today than at any time since it was created in 1845. Even in real terms, prices have jumped by 75% since 2005.

This shows no signs of abating. The world's urban population is still exploding, and within the next three decades 61% of us will live in urban areas. Together with rising incomes in countries with huge populations, such as China and India, this will keep pushing up demand for high-value food products.

As if this were not going to put enough pressure on food prices, food output will also come under pressure from changing weather patterns. Far from going upwards, output in developing countries is projected to decline by 20%, while output in industrial countries is projected to decline by 6%, according to Professor William Cline of the Centre for Global Development. Most alarmingly, temperature increases of more than 3C may cause prices to increase by up to 40%, says a 2007 report by the Intergovernmental Panel on Climate Change.

Many economists are now predicting the end of a golden era when the vast buying power of the leading UK supermarket chains was able to deliver economies of scale and cheap food to millions in Britain. From 1974 until 2005 food prices on world markets fell by three-quarters in real terms, with obesity and gluttony exploding simultaneously. But the days of the great grain mountains appear to have come to an end.

The bad news for Scotland is that its farming industry is not in a position to help us avoid rising world food prices by producing more food for ourselves. For one thing, Scotland doesn't have any extra farmland. This is illustrated by the fact that in 1997, the total area under cultivation was 5.5 million hectares - and 10 years later this was about the same.

And although Scotland has become one of the most efficient farming nations in the world since the second world war, the extensive use of fertilisers is reaching its peak and the price of potash and phosphates is also set to rise. If Scotland's farmers want to increase their yields they need to widen the variety of the crops they plant. Longer-term, this can only mean genetically modified crops, which would not be popular in Scotland.

The fact that we cannot be self-sufficient means that it is ultimately the consumer who will foot the bill for increasing food costs. With the contents of the food shopping trolley talking up a considerably higher percentage of a family or an individual's annual income in future, it will mean less money for spending on other consumer goods. The effects of this are likely to be felt by any number of businesses.

Part of this will be a deep impact on retail spending and perhaps also the country's growing debt burden. The UK's economy is so finely balanced on a set of retail scales that it could tip over with hefty inflation on basic foods. Of course, the UK's sophisticated supply chain for food supply and distribution would cushion some of the extra costs but, without doubt, Scotland's government must start thinking of radical ways of alleviating the problem.

This brings us back to the 1920s map on the wall of the Sheep Heid. It was a period in which the population of 4.8 million, with Glasgow housing more than one million, was recovering from the carnage of the first world war. Purchasing power and buying habits were hit by the recession that followed, and by the end of the decade the country faced widescale deprivation and mass unemployment as the Great Depression took hold. Yet we did not starve. Why?

The Sheep Heid map shows the wide open spaces of Edinburgh of the era, bisected by dozens of market gardens, orchards, nurseries and allotments. This exemplifies what was going on all over Scotland, which meant that there was a plentiful supply of cheap fruit and vegetables, potatoes and oats that could be bought locally. The working-class staple diet was cheap enough to ensure most people had enough to eat. Scots were much thinner, but were generally fit and healthy. Bread and milk were increasingly expensive, but most Scots supplemented their basic diet by buying locally grown fruit and vegetables. We must now consider a return, en masse, to this way of seasonal living. You could call it urban crofting - but we need more green growing space in the heart of our towns and cities.

To achieve this, Scotland needs government and business working more closely with regional and national planners and land economists to create a bold blueprint that gives more land to localised and small-scale urban food production.

This would help insulate us from the rising cost of staples grown elsewhere. It would also mean that we run up fewer air and road miles for food imports, whether it be produce grown in other parts of the UK or the exotic fruits and spices that we import.

The success of local farmers' markets has been a bonus that shows the way ahead. As Dr Chris Mackel of Edinburgh agribusiness consultancy Euro Access says: "There are some very good companies in Scotland, such as Kettle Produce in Fife, who are giving local farmers a better route to local markets. And companies such as Scotch Premier meat have done a huge amount for the quality beef farmers."

But these are only baby steps compared to what is required. With housing plans being laid out for 35,000 new homes per year for the next 10 years, there must be more homes with gardens, and more green space for domestic fruit and vegetable patches. There has to be more space in our cities for allotments and greenhouses, all within walking or cycling distance from people's front doors. Flats must be equipped with window boxes and roof gardens. Here there are also opportunities for a new breed of Scottish microbusinesses and start-ups to look at how local food can be grown and supplied.

Before Christmas, Stewart Maxwell, the communities minister, announced £30 million for urban regeneration projects at Inverclyde, Irvine Bay and Clydebank. The spin was all about new housing, infrastructure, jobs and leisure facilities, in which Maxwell talked about the "long-term revitalisation of communities that have been neglected for too long". But there was not a single mention of green space for locally-grown produce or the creation of community-based market gardens. Meanwhile, Scotland's Housing Supply Task Force - the great and the good of Scottish building - needs to address the relationship between housing and food supply.

Nicola Sturgeon, the deputy first minister and cabinet secretary for health and wellbeing, has talked about the value of good housing. As health minister, however, she might like to consider a more radical plan for delivering a healthier Scotland. It has been shown that the impact of cereal price increases on poorer households is dramatic. For every 1% increase in the price of food, food consumption expenditure decreases by 0.75%. Faced with higher prices, the poor switch to foods that are less nutritious. Any government that is serious about avoiding this problem has to start responding now.

This could then sit next to the UK government's plans for delivering a sustainable farming and food sector. These were outlined by the Department for Environment, Food and Rural Affairs in its July 2006 report Sustainable Farming And Food Strategy: Forward Look. The report sets out priorities that are appropriate for a devolved Scotland with its own agriculture office. It is all about reconnecting farmers with their markets and strengthening the links between the numerous elements of the food chain.

This has meant Scotland's 90,000 farm businesses moving away from dependence on the vast subsidies that have been paid out in the past and improving their environmental performance, protecting the rural landscape, conserving scarce resources and controlling pollution. Meanwhile, the Scottish government is committed to exploiting opportunities to reduce emissions from agriculture and seeking opportunities to expand the production of bioenergy and other non-food crops. But there needs to be a deeper commitment to consumption and production that are sustainable and have a lower environmental impact.

Finally, there is a role for consumers, who need to be more aware of how food arrives on their plate. Diets also need to change, both as we switch away from the exotic and as we accept the limitations of what can be achieved on home turf.

In sum, this country needs a radical agenda that involves consumers, farmers, government and other businesses if it is to prepare for the changes that have already begun. If we want security for the future, we need to look back to the past. Not only that, but a carrot or leek and potato soup tastes so much better when the produce comes out of your own allotment, garden or window box.