Boomer Jerritt via Getty Images A farmer on a tractor prepares the land in Comox Valley, B.C. under the Comox Glacier.

Yes, that's right. It's more affordable to buy a home in metropolitan New York than it is in Nanaimo, B.C.

Rising house prices in British Columbia, combined with rising mortgage rates, have pushed Nanaimo, the Comox Valley and the Fraser Valley into the top 20 least affordable cities in an annual survey from research firm Demographia .

MONTREAL — We've all heard about unaffordable housing in Toronto and Vancouver, but a few smaller cities and rural areas in B.C. have now joined the ranks of the world's least affordable housing markets.

After sitting in third place for several years, Vancouver has leapfrogged Sydney, Australia, to become the second-least affordable major city in the world.

Toronto, meanwhile, has been steadily rising over the past few years. It now ranks as the 16th least affordable city among 309 metro areas surveyed, up from 21st place last year and 28th the year before.

Watch: The extreme measures Canadians go through to buy a home. Story continues below.

The median house in Vancouver cost 12.6 times the median income in 2018, the survey found — exactly the same ratio as the year before. But Vancouver rose to second place because house prices are falling rapidly in Sydney, and the city is becoming more affordable

That's not the case with Toronto, which has seen affordability worsen over the past year. A median home in Canada's largest city cost 8.3 times the median income in 2018, up from 7.8 the year before, by Demographia's calculations.

Hong Kong retained its spot as the least affordable housing market in the world. A median house there costs a dizzying 20.9 times median income.

Demographia considers any housing market with a ratio above 5.0 to be "severely unaffordable." To be considered "affordable," a housing market would have to have a ratio of no more than 3.0.

By those standards, Toronto house prices would have to fall by more than half, and Vancouver prices would have to fall by some 75 per cent, in order to be "affordable."

We're going to go out on a limb here and say these cities will never be affordable again, at least not by this metric.

Looking at Canadian cities alone, the list is dominated by locations close to either Toronto or Vancouver. B.C. and southern Ontario cities take every spot among the top 20, save for Montreal, which just squeaked onto the list.