cedar.utils module¶
Common utility functions
- 
class cedar.utils.EE_STATES[source]¶
- Bases: - object- 
CANCELLED= 'CANCELLED'¶
 - 
CANCEL_REQUESTED= 'CANCEL_REQUESTED'¶
 - 
COMPLETED= 'COMPLETED'¶
 - 
EMPTY= 'EMPTY'¶
 - 
FAILED= 'FAILED'¶
 - 
READY= 'READY'¶
 - 
RUNNING= 'RUNNING'¶
 - 
UNSUBMITTED= 'UNSUBMITTED'¶
 
- 
- 
cedar.utils.affine_to_str(transform)[source]¶
- Return a string representatin of an affine.Affine transform 
- 
cedar.utils.create_filters(filters)[source]¶
- Convert a list of filters/filter descriptions to List[ee.Filter] - Parameters
- filters (List[dict]) – Earth Engine filters serialized to dict 
- Returns
- Filters as ee.Filter 
- Return type
- List[ee.Filter] 
 
- 
cedar.utils.dict_to_filter(function, **kwds)[source]¶
- Convert serialized form of filter to a ee.Filter - Parameters
- function (str) – Name of filter. Should be a (static) method of - ee.Filter
- kwds – Keyword arguments to pass to for the filter construction. These will depend on the filter in question 
 
- Returns
- Earth Engine filter 
- Return type
- ee.Filter 
 
- 
cedar.utils.load_ee(initialize=True)[source]¶
- Import and initialize the EE API, handling errors - Parameters
- initialize (bool, optional) – Try to initialize the EE API, or not 
- Returns
- Earth Engine API module - ee
- Return type
- Raises
- ImportError – Raised if the Earth Engine cannot be imported 
- ee.ee_exceptions.EEException – Raised if the Earth Engine cannot be initialized, typically because you haven’t authenticated yet. 
- Exception – Passes other exceptions caused by - ee.Initialize()