Image copyright Lely Image caption The floating farm will start with about 40 cows milked by robots

The world's first offshore dairy farm opens in the Port of Rotterdam this year, with the aim of helping the city produce more of its own food sustainably. But will such farms ever be able to produce enough to feed the world's growing urban populations?

A Dutch property company, Beladon, is launching the world's first "floating farm" in a city port.

It has built the offshore facility right in the middle of Rotterdam's Merwehaven harbour and will use it to farm 40 Meuse-Rhine-Issel cows milked by robots.

Built-up urban areas may not seem like the most sensible places to run farms, but reducing the distance food travels before it reaches consumers' plates makes environmental sense as it reduces transport pollution.

And if the global population grows to 9.8 billion by 2050 as expected, 70% are forecast to live in cities - up from 55% today.

Image copyright Floating Farm Image caption An artist's impression of how Beladon's floating farm will look when finished

So urban indoor farms, where produce is grown vertically on stacks of shelves under ultraviolet lights, are - literally - on the rise.

Beladon's farm, which is on three levels and is anchored to the ocean floor, is expected to open at the end of 2018 and produce about 800 litres of milk a day.

Peter van Wingerden, an engineer at Beladon, came up with the idea in 2012 when he was in New York working on a floating housing project on the Hudson river.

While there, Hurricane Sandy struck, flooding the city streets and crippling its transport networks. Deliveries struggled to get through and within two days it was hard to find fresh produce in shops.

"Seeing the devastation caused by Hurricane Sandy I was struck by the need for food to be produced as near as possible to consumers," says Mr van Wingerden.

Image copyright Jan van der Meijde Image caption Minke van Wingerden thinks floating farms have great potential for cities built near water

"So the idea came up to produce fresh food in a climate-adaptive way on the water."

The concept would be resilient against hurricanes, too, he adds.

At first people thought the idea was "weird, funny or unbelievable", he says, but they have started to come round.

"With increasing demand for healthy food, fast-growing urbanisation and climate change, we can't rely on the food production systems of the past any more," he says.

Later in 2012, his team began working on the design and talking to the Port Authority in Rotterdam. Despite its initial hesitations about the potential noise and smell, the port gave Beladon a space to build a prototype.

Since then the farm has taken shape, and earlier this summer its floating platform was moved by barge from Zaandam in the north of Holland, to Rotterdam.

Peter's wife and business partner, Minke van Wingerden, says the farm will start with 40 cows, enough for the venture to break even. But she says it is "easily scalable", with larger operations promising "obvious efficiencies".

The farm also aims to reuse and recycle as much as it can.

More Technology of Business

"At least 80% of what our cows eat will be waste products from Rotterdam's food industry," says the farm's general manager, Albert Boersen.

That might include grains discarded by local breweries, leftovers from restaurants and cafes, by-products from local wheat mills, and even grass clippings, all collected and delivered in electric trucks provided by local "green waste" firm GroenCollect.

"We will grow duckweed as an animal feed, too," says Ms van Wingerden. "It is high in protein, fast-growing and can be nurtured with cow urine. We will have an installation of four or five vertical platforms growing the plant under special LED lights."

Image copyright Amaya Hagelaar Image caption Waste fodder for the cows will be collected from restaurants and breweries in electric vans

The project will even generate some of its own energy - hydrogen produced through electrolysis powered by solar panels.

Once up and running, the farm will produce and pasteurise milk and yoghurt on-site and sell it in Rotterdam. It will also process and sell its own cow manure.

Dr Fenton Beed, a team leader at the UN's Food and Agriculture Organisation, thinks urban farms are useful because they tend to use less water, fertiliser and pesticide than conventional production systems.

But he also acknowledges that space limitations may prevent enough food being produced to supply the world's burgeoning urban populations.

"Constraints to producing food in controlled environments include costs for initial investment, LED lighting and continuous energy supplies," says Dr Beed.

"That means that unless policies incentivise the engagement of smaller producers, this technology will be reserved for income-rich private and public entities."

Image copyright Plenty Image caption Plenty grows its crops vertically indoors

But such concerns aren't stopping companies like Plenty from attracting significant investment.

The San Francisco-based start-up produces leafy greens in indoor farms and claims it can grow up to 350 times more per square metre than outdoor field farms.

Its crops are grown on six-metre vertical poles, using hydroponics - a water-only feeding system - and LED lights. No soil or pesticides are used. Infrared sensors monitor how the crops are faring so that the system can adjust light, heat and water flow accordingly.

Since it was founded in 2013, Plenty has raised $226m (£177m) from investors such as Amazon's Jeff Bezos, SoftBank's Vision Fund and Innovation Endeavors. This year it will expand its US operations and open its first farm in the Middle East.

Image copyright Spread Image caption Spread's Techno Farm concept is attracting investment

Japan's Spread is another firm developing automated vegetable-growing in vertical urban settings with its Techno Farm concept.

Back in the Netherlands, Peter and Minke van Wingerden are looking at opportunities to build more floating farms around the country, as well as in Asia.

"We hope to make many more floating farms, but also welcome others copying us or coming up with concepts contributing to these goals," says Mr van Wingerden.

"Healthy, sufficient food production is key to a better, cleaner, safer world."