Skip to content

Commit

Permalink
geeup v0.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
samapriya committed Dec 26, 2018
1 parent 0205c57 commit 55b020e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
12 changes: 4 additions & 8 deletions geeup/geeup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env python

import argparse,os,ee,sys
import argparse,os,ee,sys,platform
os.chdir(os.path.dirname(os.path.realpath(__file__)))
from hurry import filesize
from ee import oauth
Expand Down Expand Up @@ -79,7 +79,6 @@ def selupload_from_parser(args):
multipart_upload=args.large,
nodata_value=args.nodata,
bucket_name=args.bucket,
band_names=args.bands,
manifest=args.manifest)

def tabup_from_parser(args):
Expand Down Expand Up @@ -131,7 +130,6 @@ def main(args=None):
required_named.add_argument('--source', help='Path to the directory with images for upload.', required=True)
required_named.add_argument('--dest', help='Destination. Full path for upload to Google Earth Engine, e.g. users/pinkiepie/myponycollection', required=True)
required_named.add_argument('-m', '--metadata', help='Path to CSV with metadata.')
required_named.add_argument('-mf','--manifest',help='Manifest type to be used,Choose PS OrthoTile(PSO)|PS OrthoTile DN(PSO_DN)|PS OrthoTile Visual(PSO_V)|PS4Band Analytic(PS4B)|PS4Band DN(PS4B_DN)|PS4Band SR(PS4B_SR)|PS3Band Analytic(PS3B)|PS3Band DN(PS3B_DN)|PS3Band Visual(PS3B_V)|RE OrthoTile (REO)|RE OrthoTile Visual(REO_V)')
optional_named = parser_upload.add_argument_group('Optional named arguments')
optional_named.add_argument('--large', action='store_true', help='(Advanced) Use multipart upload. Might help if upload of large '
'files is failing on some systems. Might cause other issues.')
Expand All @@ -148,18 +146,16 @@ def main(args=None):
required_named = parser_selupload.add_argument_group('Required named arguments.')
required_named.add_argument('--source', help='Path to the directory with images for upload.', required=True)
required_named.add_argument('--dest', help='Destination. Full path for upload to Google Earth Engine, e.g. users/pinkiepie/myponycollection', required=True)
required_named.add_argument('-m', '--metadata', help='Path to CSV with metadata.')
required_named.add_argument('-mf','--manifest',help='Manifest type to be used,Choose PS OrthoTile(PSO)|PS OrthoTile DN(PSO_DN)|PS OrthoTile Visual(PSO_V)|PS4Band Analytic(PS4B)|PS4Band DN(PS4B_DN)|PS4Band SR(PS4B_SR)|PS3Band Analytic(PS3B)|PS3Band DN(PS3B_DN)|PS3Band Visual(PS3B_V)|RE OrthoTile (REO)|RE OrthoTile Visual(REO_V)')
optional_named = parser_selupload.add_argument_group('Optional named arguments')
optional_named.add_argument('-m', '--metadata', help='Path to CSV with metadata.')
optional_named.add_argument('--large', action='store_true', help='(Advanced) Use multipart upload. Might help if upload of large '
'files is failing on some systems. Might cause other issues.')
optional_named.add_argument('--nodata', type=int, help='The value to burn into the raster as NoData (missing data)')
optional_named.add_argument('--bands', type=_comma_separated_strings, help='Comma-separated list of names to use for the image bands. Spaces'
'or other special characters are not allowed.')

required_named.add_argument('-u', '--user', help='Google account name (gmail address).')
optional_named.add_argument('-b', '--bucket', help='Google Cloud Storage bucket name.')

parser_upload.set_defaults(func=upload_from_parser)
parser_selupload.set_defaults(func=selupload_from_parser)

parser_tabup = subparsers.add_parser('tabup', help='Batch Table Uploader.')
required_named = parser_tabup.add_argument_group('Required named arguments.')
Expand Down
1 change: 1 addition & 0 deletions geeup/metadata_ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

os.chdir(os.path.dirname(os.path.realpath(__file__)))
lp=os.path.dirname(os.path.realpath(__file__))
sys.path.append(lp)
ee.Initialize()
def selupload(user, source_path, destination_path, manifest=None,metadata_path=None, multipart_upload=False, nodata_value=None, bucket_name=None):

Expand Down

0 comments on commit 55b020e

Please sign in to comment.