tloubrieu-jpl commented on code in PR #174:
URL: 
https://github.com/apache/incubator-sdap-nexus/pull/174#discussion_r921396416


##########
analysis/webservice/algorithms_spark/Matchup.py:
##########
@@ -218,12 +218,17 @@ def calc(self, request, **args):
 
         self.log.debug("Querying for tiles in search domain")
         # Get tile ids in box
-        tile_ids = [tile.tile_id for tile in
-                    
self._get_tile_service().find_tiles_in_polygon(bounding_polygon, 
primary_ds_name,
-                                                             
start_seconds_from_epoch, end_seconds_from_epoch,
-                                                             fetch_data=False, 
fl='id',
-                                                             
sort=['tile_min_time_dt asc', 'tile_min_lon asc',
-                                                                   
'tile_min_lat asc'], rows=5000)]
+        if not self._get_tile_service().supports_direct_bounds_to_tile():
+            tile_ids = [tile.tile_id for tile in
+                        
self._get_tile_service().find_tiles_in_polygon(bounding_polygon, 
primary_ds_name,
+                                                                 
start_seconds_from_epoch, end_seconds_from_epoch,
+                                                                 
fetch_data=False, fl='id',
+                                                                 
sort=['tile_min_time_dt asc', 'tile_min_lon asc',
+                                                                       
'tile_min_lat asc'], rows=5000)]
+        else:
+            bb = bounding_polygon.bounds
+
+            tile_ids = 
[self._get_tile_service().bounds_to_direct_tile_id(bb[1], bb[0], bb[3], bb[2], 
start_time, end_time)]

Review Comment:
   If I understand well, that is a smart way of still using SDAP framework 
without need to use the solr index when the collection is stored in ZARR. Great 
job. So that is how you made the performances better.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sdap.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to