-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschem.txt
82 lines (70 loc) · 5.25 KB
/
schem.txt
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
74
75
76
77
78
79
80
81
82
0) Downloading the HGT file
Server : https://dds.cr.usgs.gov/srtm/version2_1/SRTM3/South_America/S23W048.hgt.zip
1) Identifying the corner by using the filename
Filename: S23W048.hgt
Diagram:
.---------------------.
|¹. | 1. São Carlos
| |
| |
| ². | 2. Rio Claro
| |
| |
| |
| |
| |
| .³| 3. Campinas
.-->o---------------------.
| ^
|
.------| o Bottom Left corner coordinates are related to the filename
| Latitude : -23 ( S23)
| Longitude: -48 (W048)
2) Dumping 16 bytes
Dump Add| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F |-- ASCII CHAR --
--------|---------------------------------------------------|----------------|
00000000| 03 23 03 22 03 1C 03 18 03 12 03 0A 03 0B 03 0F | # " |
3) Translating short integers (each 2 bytes) from Hexadecimal (0x0000)
to Decimal base (./-00000)
Observation: Byte order of SRTM DEM HGT files is Big Endian
Example using the 16 bytes extracted in the step 2.
Hex Value 0x0323 0x0322 0x031C 0x0318 0x0312 0x030A 0x030B 0x030F ...
Dec Value 803 802 796 792 786 778 779 783 ...
.
.
.
4) Creating a grid file (with more data, of course!)
-48° -47° -47° -47° -47° -47° -47° -47° -47° -47° -47° -47° -47° -47° -47°
00' 59' 59' 59' 59' 59' 59' 59' 59' 59' 59' 59' 59' 59' 59'
00" 57" 54" 51" 48" 45" 42" 39" 36" 33" 30" 27" 24" 21" 18"
-22°00'00". . . . . . . . . . . . . . .
803 802 796 792 786 778 779 783 789 796 803 807 811 815 816
-22°00'03". . . . . . . . . . . . . . .
802 801 796 792 784 773 777 784 792 797 804 809 812 816 817
-22°00'06". . . . . . . . . . . . . . .
800 798 793 787 777 769 776 786 792 799 806 809 812 814 815
-22°00'09". . . . . . . . . . . . . . .
801 796 793 784 773 768 778 791 795 801 804 810 812 812 813
-22°00'12". . . . . . . . . . . . . . .
796 792 787 778 769 769 779 792 797 802 807 809 811 812 813
-22°00'15". . . . . . . . . . . . . . .
794 790 785 775 769 771 780 792 797 798 805 809 810 811 811
-22°00'18". . . . . . . . . . . . . . .
789 786 781 774 768 771 781 789 795 798 806 809 809 809 809
-22°00'21". . . . . . . . . . . . . . .
787 783 778 771 -1 771 779 790 795 799 804 807 807 806 806
-22°00'24". . . . . . . . . . . . . . .
787 781 775 768 -3 773 782 789 794 798 802 803 806 803 803
-22°00'27". . . . . . . . . . . . . . .
783 779 773 -3 -1 773 781 788 794 798 802 802 803 801 798
-22°00'30". . . . . . . . . . . . . . .
779 774 -1 -6 768 775 782 790 794 797 799 798 799 796 794
-22°00'33". . . . . . . . . . . . . . .
769 -2 -5 -5 771 780 785 790 792 796 796 795 793 793 789
-22°00'36". . . . . . . . . . . . . . .
-8 -10 -8 768 776 781 787 793 793 793 793 792 790 787 783
-22°00'39". . . . . . . . . . . . . . .
-11 -4 769 774 779 785 789 791 790 790 789 787 785 782 774
-22°00'42". . . . . . . . . . . . . . .
-4 772 775 777 781 785 787 788 788 788 785 782 779 772 -11
-22°00'45". . . . . . . . . . . . . . .