You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by hu...@apache.org on 2015/11/11 20:15:11 UTC

[1/2] climate git commit: CLIMATE-704 - Sensitivity of spatial boundary check in dataset_processor

Repository: climate
Updated Branches:
  refs/heads/master 1aa5a98e2 -> 16380c165


CLIMATE-704 - Sensitivity of spatial boundary check in dataset_processor

- ocw.dataset_processor._are_bounds_contained_by_dataset has been updated to make it less sensitive to very small differences in spatial boundary limits


Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/3443b2af
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/3443b2af
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/3443b2af

Branch: refs/heads/master
Commit: 3443b2af57dd30b25e73cbe098c9723e0a4b09c2
Parents: 1aa5a98
Author: huikyole <hu...@argo.jpl.nasa.gov>
Authored: Wed Nov 11 10:56:33 2015 -0800
Committer: huikyole <hu...@argo.jpl.nasa.gov>
Committed: Wed Nov 11 10:56:33 2015 -0800

----------------------------------------------------------------------
 ocw/dataset_processor.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/3443b2af/ocw/dataset_processor.py
----------------------------------------------------------------------
diff --git a/ocw/dataset_processor.py b/ocw/dataset_processor.py
index 90e644e..ea08680 100755
--- a/ocw/dataset_processor.py
+++ b/ocw/dataset_processor.py
@@ -1093,19 +1093,19 @@ def _are_bounds_contained_by_dataset(bounds, dataset):
     errors = []
 
     # TODO:  THIS IS TERRIBLY inefficent and we need to use a geometry lib instead in the future
-    if not lat_min <= bounds.lat_min <= lat_max:
+    if not np.round(lat_min,3) <= np.round(bounds.lat_min,3) <= np.round(lat_max,3):
         error = "bounds.lat_min: %s is not between lat_min: %s and lat_max: %s" % (bounds.lat_min, lat_min, lat_max)
         errors.append(error)
 
-    if not lat_min <= bounds.lat_max <= lat_max:
+    if not np.round(lat_min,3) <= np.round(bounds.lat_max,3) <= np.round(lat_max,3):
         error = "bounds.lat_max: %s is not between lat_min: %s and lat_max: %s" % (bounds.lat_max, lat_min, lat_max)
         errors.append(error)
 
-    if not lon_min <= bounds.lon_min <= lon_max:
+    if not np.round(lon_min,3) <= np.round(bounds.lon_min,3) <= np.round(lon_max,3):
         error = "bounds.lon_min: %s is not between lon_min: %s and lon_max: %s" % (bounds.lon_min, lon_min, lon_max)
         errors.append(error)
 
-    if not lon_min <= bounds.lon_max <= lon_max:
+    if not np.round(lon_min,3) <= np.round(bounds.lon_max,3) <= np.round(lon_max,3):
         error = "bounds.lon_max: %s is not between lon_min: %s and lon_max: %s" % (bounds.lon_max, lon_min, lon_max)
         errors.append(error)
 


[2/2] climate git commit: CLIMATE-704 - Sensitivity of spatial boundary check in dataset_processor

Posted by hu...@apache.org.
CLIMATE-704 - Sensitivity of spatial boundary check in dataset_processor

- ocw.dataset_processor._are_bounds_contained_by_dataset has been updated to make it less sensitive to very small differences in spatial boundary limits


Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/16380c16
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/16380c16
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/16380c16

Branch: refs/heads/master
Commit: 16380c165fda06eb449b27bbc6cd4f527054a77b
Parents: 1aa5a98 3443b2a
Author: huikyole <hu...@argo.jpl.nasa.gov>
Authored: Wed Nov 11 11:14:29 2015 -0800
Committer: huikyole <hu...@argo.jpl.nasa.gov>
Committed: Wed Nov 11 11:14:29 2015 -0800

----------------------------------------------------------------------
 ocw/dataset_processor.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------