-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathENVI_header_alamos_1.py
32 lines (28 loc) · 990 Bytes
/
ENVI_header_alamos_1.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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 16 13:30:23 2021
@author: jacktarricone
"""
headerParameters = {}
headerParameters['fileName'] = '/Volumes/JT/projects/uavsar/jemez/raw_data/02122020_02192020/headers/alamos_1.hdr'
headerParameters['samples'] = '4713'
headerParameters['lines'] = '7795'
headerParameters['ULlon'] = '-106.566746880000011'
headerParameters['ULlat'] = '36.121778400000004'
headerParameters['pixelSize'] = '0.0000555600000000'
headerText = '''ENVI
description = {{{fileName}}}
samples = {samples}
lines = {lines}
bands = 1
header offset = 0
data type = 4
interleave = bsq
sensor type = Unknown
byte order = 0
map info = {{Geographic Lat/Lon, 1.000, 1.000, {ULlon}, {ULlat}, {pixelSize}, {pixelSize}, WGS-84, units=Degrees}}
wavelength units = Unknown'''.format(**headerParameters)
headerFile = open('/Volumes/JT/projects/uavsar/jemez/raw_data/02122020_02192020/headers/alamos_1.hdr','w')
headerFile.write(headerText)
headerFile.close()