SmosDgg { public static int gridPointIdToSeqnum(int gridPointId) { return gridPointId < A ? gridPointId : gridPointId - D * ((gridPointId - 1) / A) + 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 gridPointIdToSeqnum() { assertEquals(1, SmosDgg.gridPointIdToSeqnum(1)); assertEquals(2, SmosDgg.gridPointIdToSeqnum(2)); assertEquals(3, SmosDgg.gridPointIdToSeqnum(3)); assertEquals(262144, SmosDgg.gridPointIdToSeqnum(262144)); assertEquals(262145, SmosDgg.gridPointIdToSeqnum(262145)); assertEquals(262146, SmosDgg.gridPointIdToSeqnum(1000001)); assertEquals(262147, SmosDgg.gridPointIdToSeqnum(1000002)); assertEquals(524288, SmosDgg.gridPointIdToSeqnum(1262143)); assertEquals(524289, SmosDgg.gridPointIdToSeqnum(1262144)); assertEquals(524290, SmosDgg.gridPointIdToSeqnum(2000001)); assertEquals(524291, SmosDgg.gridPointIdToSeqnum(2000002)); assertEquals(2359296, SmosDgg.gridPointIdToSeqnum(8262143)); assertEquals(2359297, SmosDgg.gridPointIdToSeqnum(8262144)); assertEquals(2359298, SmosDgg.gridPointIdToSeqnum(9000001)); assertEquals(2359299, SmosDgg.gridPointIdToSeqnum(9000002)); assertEquals(2621441, SmosDgg.gridPointIdToSeqnum(9262144)); assertEquals(2621442, SmosDgg.gridPointIdToSeqnum(9262145)); }