added functionality to create linear distance maps