]> git.mxchange.org Git - simgear.git/commitdiff
fix for sgGetBuckets. Northern most buckets in the bounding box were left out
authorPeter Sadrozinski <psadro@albert.arrs.arrisi.com>
Wed, 16 Apr 2014 14:18:13 +0000 (10:18 -0400)
committerPeter Sadrozinski <psadro@albert.arrs.arrisi.com>
Wed, 16 Apr 2014 14:18:13 +0000 (10:18 -0400)
simgear/bucket/newbucket.cxx

index d948932b7869e9867322e738442cb950f41d665b..fb9a62a17715beed1575ad28ccb46b0c7ec11ffe 100644 (file)
@@ -408,7 +408,7 @@ void sgBucketDiff( const SGBucket& b1, const SGBucket& b2, int *dx, int *dy ) {
 void sgGetBuckets( const SGGeod& min, const SGGeod& max, std::vector<SGBucket>& list ) {
     double lon, lat, span;
 
-    for (lat = min.getLatitudeDeg(); lat <= max.getLatitudeDeg(); lat += SG_BUCKET_SPAN) {
+    for (lat = min.getLatitudeDeg(); lat < max.getLatitudeDeg()+SG_BUCKET_SPAN; lat += SG_BUCKET_SPAN) {
         span = sg_bucket_span( lat );
         for (lon = min.getLongitudeDeg(); lon <= max.getLongitudeDeg(); lon += span)
         {