@@ -237,17 +237,19 @@ def list_mosaics(pretty):
237237
238238@mosaics .command ('search' )
239239@click .argument ('name' )
240- @click .option ('--rbox ' , type = BoundingBox (), help = (
240+ @click .option ('--bbox ' , type = BoundingBox (), help = (
241241 'Region to query as a comma-delimited string:'
242242 ' lon_min,lat_min,lon_max,lat_max'
243243))
244+ @click .option ('--rbox' , type = BoundingBox (), help = 'Alias for --bbox' )
244245@limit_option (None )
245246@pretty
246- def search_mosaics (name , rbox , limit , pretty ):
247+ def search_mosaics (name , bbox , rbox , limit , pretty ):
247248 '''Get quad IDs and information for a mosaic'''
249+ bbox = bbox or rbox
248250 cl = clientv1 ()
249251 mosaic , = cl .get_mosaic_by_name (name ).items_iter (1 )
250- response = call_and_wrap (cl .get_quads , mosaic , rbox )
252+ response = call_and_wrap (cl .get_quads , mosaic , bbox )
251253 echo_json_response (response , pretty , limit )
252254
253255
@@ -286,10 +288,11 @@ def quad_contributions(name, quad, pretty):
286288
287289@mosaics .command ('download' )
288290@click .argument ('name' )
289- @click .option ('--rbox ' , type = BoundingBox (), help = (
291+ @click .option ('--bbox ' , type = BoundingBox (), help = (
290292 'Region to download as a comma-delimited string:'
291293 ' lon_min,lat_min,lon_max,lat_max'
292294))
295+ @click .option ('--rbox' , type = BoundingBox (), help = 'Alias for --bbox' )
293296@click .option ('--quiet' , is_flag = True , help = (
294297 'Disable ANSI control output'
295298))
@@ -298,16 +301,17 @@ def quad_contributions(name, quad, pretty):
298301 exists = True , resolve_path = True , writable = True , file_okay = False
299302))
300303@limit_option (None )
301- def download_quads (name , rbox , quiet , dest , limit ):
304+ def download_quads (name , bbox , rbox , quiet , dest , limit ):
302305 '''Download quads from a mosaic'''
306+ bbox = bbox or rbox
303307 cl = clientv1 ()
304308
305309 dl = downloader .create (cl , mosaic = True )
306310 output = downloader_output (dl , disable_ansi = quiet )
307311 output .start ()
308312 try :
309313 mosaic , = cl .get_mosaic_by_name (name ).items_iter (1 )
310- items = cl .get_quads (mosaic , rbox ).items_iter (limit )
314+ items = cl .get_quads (mosaic , bbox ).items_iter (limit )
311315 except Exception as ex :
312316 output .cancel ()
313317 click_exception (ex )
0 commit comments