Skip to content

Commit

Permalink
#22 add zip flag
Browse files Browse the repository at this point in the history
  • Loading branch information
webgisdeveloper committed Feb 4, 2022
1 parent b7f43f0 commit eb2faf2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions webAPI/getInterpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-- requirements: pykrige
"""

import os
import os, sys
import math
import argparse
import shutil
Expand All @@ -24,6 +24,7 @@ def _getParser():
choices=['linear', 'gaussian', 'power','exponential', 'hole-effect', 'spherical'], default='linear')
parser.add_argument('-az','--azimuth', action='store', dest='azimuth',required=False,help='Azimuth', default=-5)
parser.add_argument('-ea','--elevation', action='store', dest='elevation',required=False,help='Elevation Angle', default=60)
parser.add_argument('-z', '--zip', action='store_true',dest='zip',required=False,help='create zip file')

return parser

Expand All @@ -36,7 +37,7 @@ def main():

def getInterpolation(results):
"""run interpolation"""

curdir = os.getcwd()

datatable = os.path.basename(results.datatable)
Expand Down Expand Up @@ -69,7 +70,8 @@ def getInterpolation(results):
interpolated_values['Lon'], interpolated_values['Lat'], interpolated_values[entry])

# zip results:
shutil.make_archive('gps_interpolation','zip')
if results.zip:
shutil.make_archive('gps_interpolation','zip')

# get imagebounds
lat0, lat1 = gps_df['Lat'].min(), gps_df['Lat'].max()
Expand Down

0 comments on commit eb2faf2

Please sign in to comment.