Commit 05009680 authored by Adan Salazar Garibay's avatar Adan Salazar Garibay

cleaning code

parent 52cb9e49
......@@ -23,7 +23,7 @@ Example of dowloading Sentinel images from the Copernicus Open Access Hub < http
"""
from sentinelsat.sentinel import read_geojson, geojson_to_wkt
from argparse import ArgumentParser
from geosentinel.ui_utils import download_sentinel_mages
from geosentinel.ui_utils import (download_sentinel_mages)
from geosentinel.arguments import SENTINEL_ARGUMENTS
def main():
......
......@@ -23,7 +23,7 @@ Example of finding Sentinel files in a specific directory
"""
from argparse import ArgumentParser
from geosentinel.ui_utils import find_files
from geosentinel.ui_utils import (find_files_Sentinel)
from geosentinel.arguments import SENTINEL_FIND_ARGUMENTS
def main():
......@@ -40,7 +40,7 @@ def main():
args = parser.parse_args()
list_files = find_files(args)
list_files = find_files_Sentinel(args)
print "There is/are %d " % len(list_files) + args.plattform + " file(s)"
......
......@@ -35,7 +35,7 @@ Functions:
"""
from argparse import ArgumentParser
#from argparse import ArgumentParser
import os,sys
import zipfile
......@@ -49,41 +49,6 @@ from sentinelsat.sentinel import SentinelAPI #read_geojson, geojson_to_wkt
from geosentinel.products import SentinelData
#from Sentinel.exceptions import ImageNotFoundError
#: Command line arguments for collecting information about Sentinel data and products
SENTINEL_ARGUMENTS = ArgumentParser(add_help=False)
SENTINEL_ARGUMENTS.add_argument("init_date", help="initial date for dowloading period.")
SENTINEL_ARGUMENTS.add_argument("end_date", help="final date for dowloading period.")
SENTINEL_ARGUMENTS.add_argument("product_type", help="sentinel product type {SLC, GRD, IW }")
SENTINEL_ARGUMENTS.add_argument("plattform", help="sentinel-1 or sentinel-2")
SENTINEL_ARGUMENTS.add_argument("overlap", type=int, help="Percentage of overlapping between the polygon "
"provided by the user and the polygon of the image")
SENTINEL_ARGUMENTS.add_argument("output_folder", help="Folder to download Sentinel files ")
SENTINEL_FIND_ARGUMENTS = ArgumentParser(add_help=False)
SENTINEL_FIND_ARGUMENTS.add_argument("folder", help="Folder to find Sentinel files ")
SENTINEL_FIND_ARGUMENTS.add_argument("plattform", help="Sentinel-1 or Sentinel-2")
SENTINEL_UNZIP_ARGUMENTS = ArgumentParser(add_help=False)
SENTINEL_UNZIP_ARGUMENTS.add_argument("folder", help="Folder to find Sentinel files")
SENTINEL_UNZIP_ARGUMENTS.add_argument("plattform", help="Sentinel-1 or Sentinel-2")
SENTINEL_UNZIP_ARGUMENTS.add_argument("product_type", help="sentinel product type {all, SM_SLC, SM_GRDF, SM_GRDH, SM_GRDM, IW_SLC, IW_GRDH, IW_GDRM, EW_SLC, EW_GRDH, EW_GRDM, WV_SLC, WV_GRDM, MSIL1C, OPER_PRD }")
def check_existing_productType(product,flag):
if(flag==1):
plattform=['Sentinel-1', 'sentinel-1', 'Sentinel-2', 'sentinel-2']
......
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