From eb2faf252aa5c54f5d64a489b7056b903131c78e Mon Sep 17 00:00:00 2001 From: webgisdeveloper Date: Thu, 3 Feb 2022 20:11:30 -0500 Subject: [PATCH] #22 add zip flag --- webAPI/getInterpolation.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/webAPI/getInterpolation.py b/webAPI/getInterpolation.py index 347d24e..483951a 100644 --- a/webAPI/getInterpolation.py +++ b/webAPI/getInterpolation.py @@ -5,7 +5,7 @@ -- requirements: pykrige """ -import os +import os, sys import math import argparse import shutil @@ -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 @@ -36,7 +37,7 @@ def main(): def getInterpolation(results): """run interpolation""" - + curdir = os.getcwd() datatable = os.path.basename(results.datatable) @@ -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()