merge json

parent e052f335
...@@ -22,8 +22,8 @@ def L2ASCLtoDict(filename, wkt): ...@@ -22,8 +22,8 @@ def L2ASCLtoDict(filename, wkt):
return dict(count) return dict(count)
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
def main(argv): def main(argv):
if len(sys.argv) != 2: if len(sys.argv) != 3:
print("Usage: " + argv[0] + " <JSON File>") print("Usage: " + argv[0] + "<JSON SCL> <JSON Cfg>")
else: else:
jsonFile=open(argv[2]).read() jsonFile=open(argv[2]).read()
cfg = json.loads(jsonFile) cfg = json.loads(jsonFile)
......
...@@ -4,6 +4,6 @@ CGF=$2 ...@@ -4,6 +4,6 @@ CGF=$2
JOBS=${3:-1} JOBS=${3:-1}
cd $DIR cd $DIR
ls *.tif | parallel --jobs $JOBS 'L2ASCLtoJSON.py '{}' $2 > $(echo '{}' | cut -d"." -f1).json' ls *.tif | parallel --jobs $JOBS 'L2ASCLtoJSON.py '{} $2 ' > $(echo '{}' | cut -d"." -f1).json'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment