@@ -49,9 +49,9 @@ def sources(self):
4949
5050 return r .json ()
5151
52- def summary (self , const_id = None , sat_id = None , date = 'acquired' , part = 'day' ,
53- place = None , geom = None , start_time = None , end_time = None ,
54- params = None , bbox = False ):
52+ def summary (self , const_id = None , sat_id = None , date = 'acquired' , part = None ,
53+ place = None , geom = None , start_time = None , end_time = None , cloud_fraction = None ,
54+ cloud_fraction_0 = None , fill_fraction = None , params = None , bbox = False ):
5555 """Get a summary of the results for the specified spatio-temporal query.
5656
5757 :param list(str) const_id: Constellation identifier(s).
@@ -62,6 +62,9 @@ def summary(self, const_id=None, sat_id=None, date='acquired', part='day',
6262 :param str geom: A GeoJSON or WKT region of interest.
6363 :param str start_time: Desired starting date and time (inclusive).
6464 :param str end_time: Desired ending date and time (inclusive).
65+ :param float cloud_fraction: Maximum cloud fraction, calculated by data provider.
66+ :param float cloud_fraction_0: Maximum cloud fraction, calculated by cloud mask pixels.
67+ :param float fill_fraction: Minimum scene fill fraction, calculated as valid/total pixels.
6568 :param bool bbox: If true, query by the bounding box of the region of interest.
6669 :param str params: JSON of additional query parameters.
6770
@@ -135,6 +138,15 @@ def summary(self, const_id=None, sat_id=None, date='acquired', part='day',
135138 if end_time :
136139 kwargs ['end_time' ] = end_time
137140
141+ if cloud_fraction :
142+ kwargs ['cloud_fraction' ] = cloud_fraction
143+
144+ if cloud_fraction_0 :
145+ kwargs ['cloud_fraction_0' ] = cloud_fraction_0
146+
147+ if fill_fraction :
148+ kwargs ['fill_fraction' ] = fill_fraction
149+
138150 if params :
139151 kwargs ['params' ] = json .dumps (params )
140152
@@ -149,8 +161,9 @@ def summary(self, const_id=None, sat_id=None, date='acquired', part='day',
149161 return r .json ()
150162
151163 def search (self , const_id = None , sat_id = None , date = 'acquired' , place = None ,
152- geom = None , start_time = None , end_time = None , params = None ,
153- limit = 100 , offset = 0 , bbox = True ):
164+ geom = None , start_time = None , end_time = None , cloud_fraction = None ,
165+ cloud_fraction_0 = None , fill_fraction = None , params = None ,
166+ limit = 100 , offset = 0 , bbox = False ):
154167 """Search metadata given a spatio-temporal query. All parameters are
155168 optional. Results are paged using limit/offset.
156169
@@ -161,6 +174,9 @@ def search(self, const_id=None, sat_id=None, date='acquired', place=None,
161174 :param str geom: A GeoJSON or WKT region of interest.
162175 :param str start_time: Desired starting date and time (inclusive).
163176 :param str end_time: Desired ending date and time (inclusive).
177+ :param float cloud_fraction: Maximum cloud fraction, calculated by data provider.
178+ :param float cloud_fraction_0: Maximum cloud fraction, calculated by cloud mask pixels.
179+ :param float fill_fraction: Minimum scene fill fraction, calculated as valid/total pixels.
164180 :param bool bbox: If true, query by the bounding box of the region of interest.
165181 :param str params: JSON of additional query parameters.
166182 :param int limit: Number of items to return.
@@ -213,6 +229,15 @@ def search(self, const_id=None, sat_id=None, date='acquired', place=None,
213229 if end_time :
214230 kwargs ['end_time' ] = end_time
215231
232+ if cloud_fraction :
233+ kwargs ['cloud_fraction' ] = cloud_fraction
234+
235+ if cloud_fraction_0 :
236+ kwargs ['cloud_fraction_0' ] = cloud_fraction_0
237+
238+ if fill_fraction :
239+ kwargs ['fill_fraction' ] = fill_fraction
240+
216241 if params :
217242 kwargs ['params' ] = json .dumps (params )
218243
@@ -233,7 +258,8 @@ def search(self, const_id=None, sat_id=None, date='acquired', place=None,
233258 return result
234259
235260 def keys (self , const_id = None , sat_id = None , date = 'acquired' , place = None ,
236- geom = None , start_time = None , end_time = None , params = None , limit = 100 ,
261+ geom = None , start_time = None , end_time = None , cloud_fraction = None ,
262+ cloud_fraction_0 = None , fill_fraction = None , params = None , limit = 100 ,
237263 offset = 0 , bbox = False ):
238264 """Search metadata given a spatio-temporal query. All parameters are
239265 optional. Results are paged using limit/offset.
@@ -245,6 +271,9 @@ def keys(self, const_id=None, sat_id=None, date='acquired', place=None,
245271 :param str geom: A GeoJSON or WKT region of interest.
246272 :param str start_time: Desired starting date and time (inclusive).
247273 :param str end_time: Desired ending date and time (inclusive).
274+ :param float cloud_fraction: Maximum cloud fraction, calculated by data provider.
275+ :param float cloud_fraction_0: Maximum cloud fraction, calculated by cloud mask pixels.
276+ :param float fill_fraction: Minimum scene fill fraction, calculated as valid/total pixels.
248277 :param bool bbox: If true, query by the bounding box of the region of interest.
249278 :param str params: JSON of additional query parameters.
250279 :param int limit: Number of items to return.
@@ -266,13 +295,15 @@ def keys(self, const_id=None, sat_id=None, date='acquired', place=None,
266295 """
267296 result = self .search (sat_id = sat_id , const_id = const_id , date = date ,
268297 place = place , geom = geom , start_time = start_time ,
269- end_time = end_time , params = params , limit = limit ,
270- offset = offset , bbox = bbox )
298+ end_time = end_time , cloud_fraction = cloud_fraction ,
299+ cloud_fraction_0 = cloud_fraction_0 , fill_fraction = fill_fraction ,
300+ params = params , limit = limit , offset = offset , bbox = bbox )
271301
272302 return [feature ['id' ] for feature in result ['features' ]]
273303
274304 def features (self , const_id = None , sat_id = None , date = 'acquired' , place = None ,
275- geom = None , start_time = None , end_time = None , params = None ,
305+ geom = None , start_time = None , end_time = None , cloud_fraction = None ,
306+ cloud_fraction_0 = None , fill_fraction = None , params = None ,
276307 limit = 100 , bbox = False ):
277308 """Generator that combines summary and search to page through results.
278309
@@ -282,7 +313,9 @@ def features(self, const_id=None, sat_id=None, date='acquired', place=None,
282313 """
283314 result = self .summary (sat_id = sat_id , const_id = const_id , date = date ,
284315 place = place , geom = geom , start_time = start_time ,
285- end_time = end_time , params = params , bbox = bbox )
316+ end_time = end_time , cloud_fraction = cloud_fraction ,
317+ cloud_fraction_0 = cloud_fraction_0 , fill_fraction = fill_fraction ,
318+ params = params , bbox = bbox )
286319
287320 for summary in result :
288321
@@ -294,8 +327,10 @@ def features(self, const_id=None, sat_id=None, date='acquired', place=None,
294327
295328 features = self .search (sat_id = sat_id , const_id = const_id ,
296329 date = date , place = place , geom = geom ,
297- start_time = start_time ,
298- end_time = end_time , params = params ,
330+ start_time = start_time , end_time = end_time ,
331+ cloud_fraction = cloud_fraction ,
332+ cloud_fraction_0 = cloud_fraction_0 ,
333+ fill_fraction = fill_fraction , params = params ,
299334 limit = limit , offset = offset , bbox = bbox )
300335
301336 offset = limit + offset
0 commit comments