Implemented discrete cost of housing density

Implemented discrete cost of housing density in discrete cost analysis
where map values are interpreted as 0 for low density and 255 for high
density and the cost is calculated by 1+ value*8/255 so that high
density is assigned a 9 and low a 1