Further working on TerrainMap

Test cases extended and bugfixing