-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwarp-debug.py
43 lines (33 loc) · 1.03 KB
/
warp-debug.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
#debug of warp
import argparse
import subprocess as sub
import shutil
import os
import geopandas as gpd
import pandas as pd
from time import sleep
import csv
import sys
import ogr
import gdal
import osr
#LSDTopoTools specific imports
#Loading the LSDTT setup configuration
setup_file = open('chi_automation.config','r')
LSDMT_PT = setup_file.readline().rstrip()
LSDMT_MF = setup_file.readline().rstrip()
Iguanodon = setup_file.readline().rstrip()
setup_file.close()
sys.path.append(LSDMT_PT)
sys.path.append(LSDMT_MF)
sys.path.append(Iguanodon)
import LSDPlottingTools as LSDPT
directory = "/exports/csce/datastore/geos/groups/LSDTopoData/Himalayan_Ksn_Concavity/cosmo_data/basin_shapefiles/"
rasterDS = gdal.Open(directory+'output5.tif')
print gdal.Info(rasterDS)
srs = osr.SpatialReference()
###problematic - get from input file directly
srs.ImportFromEPSG(4326)
#outputDS = gdal.Open(directory+'output6.tif')
gdal.Warp(directory+'outputDS.tif',rasterDS,dstSRS=srs)
#print gdal.Info(outputDS)