String.valueOf(tgc.isCrossingMeridianAt180())));
private GeoCoding createStripeGeocode(float[] lats, float[] lons, int y, int stripeW, int stripeH, float offsetX, float offsetY, float subSamplingX, float subSamplingY) throws IOException { final Range range = Range.computeRangeFloat(lats, IndexValidator.TRUE, null, ProgressMonitor.NULL); if (range.getMin() < -90) { return null; } else { final ModisTiePointGrid latGrid = new ModisTiePointGrid("lat" + y, stripeW, stripeH, offsetX, offsetY, subSamplingX, subSamplingY, lats); final ModisTiePointGrid lonGrid = new ModisTiePointGrid("lon" + y, stripeW, stripeH, offsetX, offsetY, subSamplingX, subSamplingY, lons, TiePointGrid.DISCONT_AT_180); final TiePointGeoCoding geoCoding = new TiePointGeoCoding(latGrid, lonGrid, getDatum()); _cross180 = _cross180 || geoCoding.isCrossingMeridianAt180(); return geoCoding; } }
cross180 = cross180 || geoCoding.isCrossingMeridianAt180(); gcList.add(geoCoding); centerLineList.add(createCenterPolyLine(geoCoding, gcStripeSceneWidth, gcStripeSceneHeight));
addRow("Name of latitude tie-point grid", tgc.getLatGrid().getName()); addRow("Name of longitude tie-point grid", tgc.getLonGrid().getName()); addRow("Crossing 180 degree meridian", String.valueOf(tgc.isCrossingMeridianAt180())); addEmptyRow(); addRow("Geographic coordinates (lat,lon) are computed from pixel coordinates (x,y)\n" +
private void testPositions(TestSet ts) { assertEquals(true, ts.gc.canGetGeoPos()); assertEquals(true, ts.gc.canGetPixelPos()); testGeoPos(ts, TestSet.UL); testGeoPos(ts, TestSet.UC); testGeoPos(ts, TestSet.UR); testGeoPos(ts, TestSet.CL); testGeoPos(ts, TestSet.CC); testGeoPos(ts, TestSet.CR); testGeoPos(ts, TestSet.LL); testGeoPos(ts, TestSet.LC); testGeoPos(ts, TestSet.LR); testPixelPos(ts, TestSet.UL); testPixelPos(ts, TestSet.UC); testPixelPos(ts, TestSet.UR); testPixelPos(ts, TestSet.CL); testPixelPos(ts, TestSet.CC); testPixelPos(ts, TestSet.CR); testPixelPos(ts, TestSet.LL); testPixelPos(ts, TestSet.LC); testPixelPos(ts, TestSet.LR); assertEquals(ts.crossingMeridianAt180, ts.gc.isCrossingMeridianAt180()); }