@@ -58,9 +58,10 @@ def sources(self):
58
58
r = self .session .get ('/sources' )
59
59
return r .json ()
60
60
61
- def bands (self , limit = None , products = None , offset = None , wavelength = None , resolution = None , tags = None ):
62
- """Seach for imagery data bands that you have access to.
61
+ def bands (self , products = None , limit = None , offset = None , wavelength = None , resolution = None , tags = None ):
62
+ """Search for imagery data bands that you have access to.
63
63
64
+ :param list(str) products: A list of product(s) to return bands for.
64
65
:param int limit: Number of results to return.
65
66
:param int offset: Index to start at when returning results.
66
67
:param float wavelenth: A wavelength in nm e.g 700 that the band sensor must measure.
@@ -81,6 +82,26 @@ def bands(self, limit=None, products=None, offset=None, wavelength=None, resolut
81
82
r = self .session .post ('/bands/search' , json = kwargs )
82
83
return r .json ()
83
84
85
+ def derived_bands (self , bands = None , limit = None , offset = None ):
86
+ """Search for predefined derived bands that you have access to.
87
+
88
+ :param list(str) bands: A list of source bands that must be part of
89
+ the derived band i.e ["nir"]
90
+ :param int limit: Number of results to return.
91
+ :param int offset: Index to start at when returning results.
92
+ """
93
+ params = ['bands' , 'limit' , 'offset' ]
94
+
95
+ args = locals ()
96
+ kwargs = {
97
+ param : args [param ]
98
+ for param in params
99
+ if args [param ] is not None
100
+ }
101
+
102
+ r = self .session .post ('/bands/derived/search' , json = kwargs )
103
+ return r .json ()
104
+
84
105
def products (self , bands = None , limit = None , offset = None ):
85
106
"""Search products that are available on the platform.
86
107
@@ -118,6 +139,17 @@ def available_products(self):
118
139
119
140
return r .json ()
120
141
142
+ def translate (self , const_id ):
143
+ """Translate a deprecated constellation identifier
144
+ into a new-style product identifier.
145
+
146
+ :param string const_id: The constellation identifier to translate.
147
+ """
148
+
149
+ r = self .session .get ('/products/translate/{}' .format (const_id ))
150
+
151
+ return r .json ()
152
+
121
153
def summary (self , products = None , const_id = None , sat_id = None , date = 'acquired' , part = None ,
122
154
place = None , geom = None , start_time = None , end_time = None , cloud_fraction = None ,
123
155
cloud_fraction_0 = None , fill_fraction = None , pixels = None , params = None ,
@@ -513,3 +545,12 @@ def get_band(self, band_id):
513
545
"""
514
546
r = self .session .get ('/bands/%s' % band_id )
515
547
return r .json ()
548
+
549
+ def get_derived_band (self , derived_band_id ):
550
+ """Get information about a single product.
551
+
552
+ :param str derived_band_id: Derived band identifier.
553
+
554
+ """
555
+ r = self .session .get ('/bands/derived/%s' % derived_band_id )
556
+ return r .json ()
0 commit comments