SmosDgg { public static int seqnumToZoneId(int seqnum) { return seqnum <= C ? 1 : seqnum == MAX_SEQNUM ? MAX_ZONE_ID : (seqnum - 2) / B + 1; } private  SmosDgg(); static SmosDgg getInstance(); static int gridPointIdToSeqnum(int gridPointId); static int seqnumToSeqnumInZone(int seqnum); static int seqnumToZoneId(int seqnum); AffineTransform getImageToMapTransform(); MultiLevelImage getMultiLevelImage(); static final int MIN_GRID_POINT_ID; static final int MAX_GRID_POINT_ID; static final int MAX_SEQNUM; static final int MAX_ZONE_ID; }
@Test public void seqnumToZoneId() { assertEquals(1, SmosDgg.seqnumToZoneId(1)); assertEquals(1, SmosDgg.seqnumToZoneId(2)); assertEquals(1, SmosDgg.seqnumToZoneId(3)); assertEquals(1, SmosDgg.seqnumToZoneId(262144)); assertEquals(1, SmosDgg.seqnumToZoneId(262145)); assertEquals(2, SmosDgg.seqnumToZoneId(262146)); assertEquals(2, SmosDgg.seqnumToZoneId(262147)); assertEquals(2, SmosDgg.seqnumToZoneId(524288)); assertEquals(2, SmosDgg.seqnumToZoneId(524289)); assertEquals(3, SmosDgg.seqnumToZoneId(524290)); assertEquals(3, SmosDgg.seqnumToZoneId(524291)); assertEquals(9, SmosDgg.seqnumToZoneId(2359296)); assertEquals(9, SmosDgg.seqnumToZoneId(2359297)); assertEquals(10, SmosDgg.seqnumToZoneId(2359298)); assertEquals(10, SmosDgg.seqnumToZoneId(2359299)); assertEquals(10, SmosDgg.seqnumToZoneId(2621441)); assertEquals(10, SmosDgg.seqnumToZoneId(2621442)); }