Black poplars thrive in wet woodlands , near streams or in natural flood plains and were used widely as a building material and for farm equipment until their natural habitat was reduced by housing and farming .