kevinmarlis opened a new pull request #156:
URL: https://github.com/apache/incubator-sdap-nexus/pull/156


   Apache ticket: [SDAP-318](https://issues.apache.org/jira/browse/SDAP-318)
   
   This updates the timeSeriesSpark algorithm to use the bounding box (instead 
of polygon) to perform spatial searching on Solr. This is in line with how the 
other algorithms do spatial searching. 
   
   **The issue**: Polygon search runs into an inherent issue with WKT strings 
where bounding boxes with > 180 difference between maxLon and minLon. This 
results in no tiles being returned from Solr, and an empty list being returned 
for the algorithm results. 
   
   **The fix**: Update algorithm to use 
[get_tiles_bounded_by_box](https://github.com/apache/incubator-sdap-nexus/blob/6583534206a1d9dbfb1eb1bada50af6f3e09396a/data-access/nexustiles/nexustiles.py#L260)
 instead of 
[get_tiles_bounded_by_polygon](https://github.com/apache/incubator-sdap-nexus/blob/6583534206a1d9dbfb1eb1bada50af6f3e09396a/data-access/nexustiles/nexustiles.py#L269).
 In `spark_driver` the list of nexus tiles has been updated to use the polygon 
itself instead of the polygon's WKT string representation. This allows for the 
use of the polygon's bounds for `get_tiles_bounded_by_box`, and is consistent 
with how other algorithms pass bounds.
   
   The algorithm's test has also been updated to reflect this change:
   ```
   (nexus) marlis@RAYL-C01360 incubator-sdap-nexus % pytest 
analysis/tests/algorithms_spark/test_timeseriesspark.py
   ========================================== test session starts 
==========================================
   platform darwin -- Python 3.7.10, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
   rootdir: /Users/marlis/Developer/ECCO/SDAP/incubator-sdap-nexus/analysis
   collected 5 items                                                            
                           
   
   analysis/tests/algorithms_spark/test_timeseriesspark.py .....                
                     [100%]
   
   ===================================== 5 passed, 9 warnings in 6.42s 
=====================================
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to