Trendy neighbourhoods and cityscapes nestled against a backdrop of snow-capped mountains are among the things that draw people to Vancouver, but it comes at a price and it's not just a lot of rain: Vancouver is one of the world's least affordable when it comes to housing.

Lotusland was ranked the second least affordable among 337 metropolitan markets, according to a housing affordability survey from Demographia released this week. Hong Kong is the most unaffordable.

On the flip side, the survey found Detroit, the most affordable major market.

Demographia, a U.S.-based urban policy consulting firm that argues government policies to contain urban sprawl leads to higher house prices and speculation in markets, rates affordability using a method they refer to as the median multiple.

That is the median house price divided by gross before-tax annual median household income. The higher the measure the more unaffordable.

Vancouver's median multiple was 9.5, with its median house price of $621,300 on household income of $65,200.

"The idea is that, 'I want to be here so badly that I'm willing to pay higher rent and make lower salary,' " said Tsur Somerville, a real-estate expert and professor at the University of B.C.'s Sauder School of Business, in a Vancouver Province newspaper report.

"There's a perception right now that (Vancouver's) an attractive place to be."

The ninth annual survey was done on 337 markets including Australia, the United States, United Kingdom and New Zealand.

A measure of 5.1 or greater places a city in the severely unaffordable category. Vancouver saw its measure fall to 9.5 from 10.6, a ranking described as "dreadful" by Wendell Cox, a co-author of the survey in the Globe and Mail. Cox added the figure needed to drop further.

Elsewhere, Toronto's measure inched higher to 5.9 from 5.1, while Calgary's ranking moved up to 4.3 from 3.9. Overall, housing in Canada is moderately unaffordable, the survey showed.