Changeset 3015 for trunk


Ignore:
Timestamp:
11/19/14 13:23:30 (10 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-4362

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Fix for the issue on sdgrid that resulting map extent expands or shrinks when cell size is calculated by the task.
A cause of the issue is that the task always takes 10% margin when it calculates cell size automatically. In this fix, margin is set to 1 pixel.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STGrid.cpp

    r3011 r3015  
    11361136  Double wx = max( abs(xmax-center_(0)), abs(xmin-center_(0)) ) * 2 ;
    11371137  Double wy = max( abs(ymax-center_(1)), abs(ymin-center_(1)) ) * 2 ;
    1138   // take 10% margin
    1139   wx *= 1.10 ;
    1140   wy *= 1.10 ;
    11411138
    11421139  Quantum<Double> qcellx ;
     
    11721169        wy = 0.00290888 ;
    11731170      }
    1174       qcellx = Quantum<Double>( wx/nx_*cos(center_[1]), "rad" ) ;
    1175       qcelly = Quantum<Double>( wy/ny_, "rad" ) ;
     1171      if (nx_ > 1) {
     1172        qcellx = Quantum<Double>(wx / (nx_ - 1) * cos(center_[1]), "rad");
     1173      }
     1174      else {
     1175        qcellx = Quantum<Double>( 1.1f * wx / nx_ * cos(center_[1]), "rad" );
     1176      }
     1177      if (ny_ > 1) {
     1178        qcelly = Quantum<Double>(wy / (ny_ - 1), "rad");
     1179      }
     1180      else {
     1181        qcelly = Quantum<Double>( 1.1f * wy / ny_, "rad" );
     1182      }
    11761183    }
    11771184  }
Note: See TracChangeset for help on using the changeset viewer.