# Path: cmt/util/processManyLakes.py
# class LakeDataLoggerBase(object):
#     '''Log manager class to store the results of lake processing.
#         One of these will be used for each lake.
#         This class is a dummy base class that should be derived from.'''
#     
#     def __init__(self, logDirectory, ee_lake, lake_name):
#         '''Initialize with lake information'''
#         self.ee_lake        = ee_lake
#         self.base_directory = logDirectory
#         self.lake_name = lake_name
#        
#     def getBaseDirectory(self):
#         '''The top level output folder'''
#         return self.base_directory
#     
#     def getLakeDirectory(self):
#         raise Exception('Implement me!')
#        
#     def getLakeName(self):
#         return self.lake_name
#        
#     def computeLakePrefix(self):
#         '''Returns a file prefix for this lake in the log directory'''
#         return os.path.join(self.base_directory, self.lake_name)
#     
#     #def findRecordByDate(self, date):
#     #    '''Searches for a record with a particular date and returns it'''
#     #    return None
#     
#     def addDataRecord(self, dataRecord):
#         '''Adds a new record to the log and optionally save an image'''
#         return True


import logging
    import cmt.ee_authenticate
    import sys
    import os.path
    import cmt.ee_authenticate
import sys
import time
import os
import csv
import ee
import numpy
import traceback
import cmt.domain
import cmt.util.processManyLakes
import cmt.modis.flood_algorithms
import cmt.util.evaluation
import cmt.util.miscUtilities
import cmt.util.imageRetrievalFunctions
from   cmt.util.processManyLakes import LakeDataLoggerBase
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
# -----------------------------------------------------------------------------

'''
    Run MODIS based flood detection algorithms on many lakes at a single time
    and log the results compared with the permanent water mask.
'''

logging.basicConfig(level=logging.ERROR)
try:
except:
    sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..'))
cmt.ee_authenticate.initialize()





class LoggingClass(LakeDataLoggerBase):
    '''Log MODIS flood detection results for a lake compared with the permanent water mask'''

    def __init__(self, logDirectory, ee_lake, lake_name):
        '''Open and prep the output file'''
        # Base class init function
        LakeDataLoggerBase.__init__(self, logDirectory, ee_lake, lake_name)

        # Get the file path

# Path: cmt/util/processManyLakes.py
# class LakeDataLoggerBase(object):
#     '''Log manager class to store the results of lake processing.
#         One of these will be used for each lake.
#         This class is a dummy base class that should be derived from.'''
#     
#     def __init__(self, logDirectory, ee_lake, lake_name):
#         '''Initialize with lake information'''
#         self.ee_lake        = ee_lake
#         self.base_directory = logDirectory
#         self.lake_name = lake_name
#        
#     def getBaseDirectory(self):
#         '''The top level output folder'''
#         return self.base_directory
#     
#     def getLakeDirectory(self):
#         raise Exception('Implement me!')
#        
#     def getLakeName(self):
#         return self.lake_name
#        
#     def computeLakePrefix(self):
#         '''Returns a file prefix for this lake in the log directory'''
#         return os.path.join(self.base_directory, self.lake_name)
#     
#     #def findRecordByDate(self, date):
#     #    '''Searches for a record with a particular date and returns it'''
#     #    return None
#     
#     def addDataRecord(self, dataRecord):
#         '''Adds a new record to the log and optionally save an image'''
#         return True


# Path: bin/modis_lake_measure.py
import logging
    import cmt.ee_authenticate
    import sys
    import os.path
    import cmt.ee_authenticate
import sys
import time
import os
import csv
import ee
import numpy
import traceback
import cmt.domain
import cmt.util.processManyLakes
import cmt.modis.flood_algorithms
import cmt.util.evaluation
import cmt.util.miscUtilities
import cmt.util.imageRetrievalFunctions
from   cmt.util.processManyLakes import LakeDataLoggerBase

# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
# -----------------------------------------------------------------------------

'''
    Run MODIS based flood detection algorithms on many lakes at a single time
    and log the results compared with the permanent water mask.
'''

logging.basicConfig(level=logging.ERROR)
try:
except:
    sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..'))
cmt.ee_authenticate.initialize()





class LoggingClass(LakeDataLoggerBase):
    '''Log MODIS flood detection results for a lake compared with the permanent water mask'''

    def __init__(self, logDirectory, ee_lake, lake_name):
        '''Open and prep the output file'''
        # Base class init function
        LakeDataLoggerBase.__init__(self, logDirectory, ee_lake, lake_name)

        # Get the file path

        filePrefix = LakeDataLoggerBase.computeLakePrefix(self)