Navigation Menu

Skip to content

Commit

Permalink
Fixed VIIRS Aggrigation zone geolocation problem. Can now tolerate mi…
Browse files Browse the repository at this point in the history
…ssing geolocation scans in the middle of a file.
  • Loading branch information
dshea committed Dec 15, 2014
1 parent 786d6d4 commit ddded7b
Show file tree
Hide file tree
Showing 4 changed files with 417 additions and 26 deletions.
Expand Up @@ -250,6 +250,7 @@ private int getGeoCodingIndexfor(final GeoPos geoPos) {
} else if (direction == -1) {
index++;
direction = +1;
index = getNextCenterLineIndex(index, direction);
if (index == _biggestValidIndex) {
return index;
}
Expand Down
Expand Up @@ -266,8 +266,8 @@ private void addStripeGeocode(float[] lats, float[] lons, int y, int stripeW, in
_gcList.add(gc);
_centerLineList.add(createCenterPolyLine(gc, stripeW, stripeH));
} else {
_gcList.add(null);
_centerLineList.add(null);
_gcList.add(_gcList.size(), null);
_centerLineList.add(_centerLineList.size(), null);
}
}

Expand All @@ -276,9 +276,7 @@ private GeoCoding createStripeGeocode(float[] lats, float[] lons, int y, int str
if (range.getMin() < -90) {
return null;
} else {
final ModisTiePointGrid latGrid = new ModisTiePointGrid("lat" + y, stripeW, stripeH, 0, 0, 1, 1, lats);
final ModisTiePointGrid lonGrid = new ModisTiePointGrid("lon" + y, stripeW, stripeH, 0, 0, 1, 1, lons);
final TiePointGeoCoding geoCoding = new TiePointGeoCoding(latGrid, lonGrid, getDatum());
final BowtiePixelScanGeoCoding geoCoding = new BowtiePixelScanGeoCoding(lats, lons, stripeW, stripeH);
_cross180 = _cross180 || geoCoding.isCrossingMeridianAt180();
return geoCoding;
}
Expand Down

0 comments on commit ddded7b

Please sign in to comment.