Terrain stability for route planning