-
Notifications
You must be signed in to change notification settings - Fork 18
/
ChiMappingExamples.py
73 lines (58 loc) · 2.71 KB
/
ChiMappingExamples.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
"""
This function drives the Chi mapping examples that are used with our documentation.
The website is: https://lsdtopotools.github.io/LSDTopoTools_ChiMudd2014/
Written by Simon Mudd and Fiona Clubb
June 2017
git
GPL3
"""
import LSDChiMappingExamples as CME
import LSDMapWrappers as MW
if __name__ == "__main__":
"""
This is just a few lines for keeping track of how long the program is taking.
You can ignore it.
"""
import time
tic = time.clock()
"""
These lines tell the example functions where your files are. If you are using
the recommended file setup you won't need to modify these lines.
If you have set up your own directory structure you will need to modify
the directory names.
IMPORTANT: To get this to work properly, in the chi mapping tool,
you need these flags:
write_hillshade: true
print_chi_data_maps: true
print_basin_raster: true
Instructions for the chi mapping tool are here:
https://lsdtopotools.github.io/LSDTopoTools_ChiMudd2014/
"""
#DataDirectory = "S:\\movern_analysis\hokkaido\\"
#Base_file = "hokkaido_points"
#DataDirectory = "T:\\analysis_for_papers\\Xian\\"
#DataDirectory = 'C:\\VagrantBoxes\\LSDTopoTools\\Topographic_projects\\LSDTT_chi_examples\\'
#Base_file = 'Xian2'
#DataDirectory = 'C:\\VagrantBoxes\\LSDTopoTools\\Topographic_projects\\Meghalaya\\Paper\\'
DataDirectory = 'T:\\analysis_for_papers\\Meghalaya\\Full_landscape\\'
Base_file = 'Mega_select_south'
"""
These lines are used to run the examples. Each line calls a function in the directory
../LSDChiMappingExamples/
The individual examples are different python scripts which you can inspect at your
lesiure. By playing with these scripts you can learn how to use our plotting tools.
To run the examples simply comment or uncomment these lines by adding or
removing the comment symbol, #, below.
"""
#MW.SimpleHillshade(DataDirectory,Base_file,cmap = "terrain", dpi = 250)
#MW.PrintBasins(DataDirectory,Base_file)
#MW.PrintBasins_Complex(DataDirectory,Base_file,Remove_Basins = [6], Rename_Basins = {3:"A",4:"B",8:"C",10:"D",12:"E"})
#MW.PrintChannels(DataDirectory,Base_file)
MW.PrintChannelsAndBasins(DataDirectory,Base_file, dpi = 300)
#CME.ExampleOne_PartOne_SimpleHillshade(DataDirectory,Base_file)
#CME.ExampleOne_PartTwo_PrintBasins(DataDirectory,Base_file)
#CME.ExampleOne_PartThree_PrintBasinsWithLabels(DataDirectory,Base_file)
#CME.ExampleOne_PartFour_MaskBasins(DataDirectory,Base_file)
#CME.ExampleOne_PartFive_MaskBasinsMF(DataDirectory,Base_file)
toc = time.clock()
print("This took: "+str(toc - tic)+" units of time")