diff --git a/eodatadown/__init__.py b/eodatadown/__init__.py index 734d56d..4a51c07 100644 --- a/eodatadown/__init__.py +++ b/eodatadown/__init__.py @@ -40,8 +40,8 @@ import logging.config import json -EODATADOWN_VERSION_MAJOR = 0 -EODATADOWN_VERSION_MINOR = 53 +EODATADOWN_VERSION_MAJOR = 1 +EODATADOWN_VERSION_MINOR = 0 EODATADOWN_VERSION_PATCH = 0 # Check is GTIFF Creation Options Flag has been defined and if not then define it. diff --git a/eodatadown/eodatadownlandsatgoogsensor.py b/eodatadown/eodatadownlandsatgoogsensor.py index 2336fdd..6955fb4 100644 --- a/eodatadown/eodatadownlandsatgoogsensor.py +++ b/eodatadown/eodatadownlandsatgoogsensor.py @@ -523,7 +523,10 @@ def check_new_scns(self, check_from_start=False): # Get the next PID value to ensure increment c_max_pid = ses.query(func.max(EDDLandsatGoogle.PID).label("max_pid")).one().max_pid - n_max_pid = c_max_pid + 1 + if c_max_pid is None: + n_max_pid = 0 + else: + n_max_pid = c_max_pid + 1 logger.debug("Perform google query...") goog_fields = "scene_id,product_id,spacecraft_id,sensor_id,date_acquired,sensing_time,collection_number," \ diff --git a/eodatadown/eodatadownsentinel1asf.py b/eodatadown/eodatadownsentinel1asf.py index 102b2b1..d0ae932 100644 --- a/eodatadown/eodatadownsentinel1asf.py +++ b/eodatadown/eodatadownsentinel1asf.py @@ -386,7 +386,10 @@ def check_new_scns(self, check_from_start=False): # Get the next PID value to ensure increment c_max_pid = ses.query(func.max(EDDSentinel1ASF.PID).label("max_pid")).one().max_pid - n_max_pid = c_max_pid + 1 + if c_max_pid is None: + n_max_pid = 0 + else: + n_max_pid = c_max_pid + 1 str_start_datetime = query_date.isoformat()+"UTC" str_now_datetime = datetime.datetime.utcnow().isoformat()+"UTC" diff --git a/eodatadown/eodatadownsentinel2googsensor.py b/eodatadown/eodatadownsentinel2googsensor.py index e418386..e0af5e9 100644 --- a/eodatadown/eodatadownsentinel2googsensor.py +++ b/eodatadown/eodatadownsentinel2googsensor.py @@ -441,7 +441,10 @@ def check_new_scns(self, check_from_start=False): # Get the next PID value to ensure increment c_max_pid = ses.query(func.max(EDDSentinel2Google.PID).label("max_pid")).one().max_pid - n_max_pid = c_max_pid + 1 + if c_max_pid is None: + n_max_pid = 0 + else: + n_max_pid = c_max_pid + 1 logger.debug("Perform google query...") goog_fields = "granule_id,product_id,datatake_identifier,mgrs_tile,sensing_time,geometric_quality_flag," \ diff --git a/setup.py b/setup.py index 27ad2e6..bb3ffc5 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ import os setup(name='EODataDown', - version='0.53.0', + version='1.0.0', description='A tool for automating Earth Observation Data Downloading.', author='Pete Bunting', author_email='pfb@aber.ac.uk',